/* Toolyz - kinetic. Near-black stage, acid-lime and coral accents, everything in motion.
   Display: Unbounded · Text: Inter · Figures: JetBrains Mono */

:root {
  --bg: #07080c;
  --surface: #0f1118;
  --surface-2: #161924;
  --text: #f4f4ef;
  --text-2: #a7aab9;
  --text-3: #686c7e;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --acid: #d4ff3a;
  --coral: #ff6a4d;
  --sky: #5ad7ff;
  --danger: #ff7a7a;
  --grad: linear-gradient(90deg, var(--acid), var(--sky), var(--coral), var(--acid));
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .15, 1);
  --r: 16px;
}
:root[data-theme="light"] {
  --bg: #f4f4ee; --surface: #ffffff; --surface-2: #ecece4; --text: #0b0c10; --text-2: #4b4f5e; --text-3: #7d8193;
  --line: rgba(0, 0, 0, .08); --line-2: rgba(0, 0, 0, .16); --acid: #6f9f00; --coral: #e0471f; --sky: #0a86b5;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--ui); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main, .site-header, .site-footer { position: relative; z-index: 1; }
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--acid); }
::selection { background: var(--acid); color: #000; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

/* Living aurora behind everything */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .42; animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 52vw; height: 52vw; left: -12vw; top: -18vw; background: var(--acid); }
.aurora i:nth-child(2) { width: 46vw; height: 46vw; right: -14vw; top: 8vh; background: var(--coral); animation-duration: 28s; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 40vw; height: 40vw; left: 30vw; bottom: -22vw; background: var(--sky); animation-duration: 25s; animation-delay: -12s; opacity: .3; }
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vw, -4vh, 0) scale(1.12); }
  100% { transform: translate3d(-4vw, 5vh, 0) scale(.94); }
}
.grain { position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: .06; animation: grain 1.2s steps(6) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes grain { 0% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,3%); } 80% { transform: translate(3%,1%); } 100% { transform: translate(0,0); } }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -.035em; margin: 0 0 .5rem; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
em { font-style: normal; background: var(--grad); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hue 9s linear infinite; }
@keyframes hue { to { background-position: 300% 0; } }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.22rem); color: var(--text-2); max-width: 50ch; margin: 0 0 1.8rem; }
.muted { color: var(--text-3); }
.err { color: var(--danger); font-family: var(--mono); font-size: .88rem; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 1.1rem; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--surface) 75%, transparent); }
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 0 var(--acid); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acid) 70%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--acid); color: #000; padding: 8px 12px; z-index: 50; border-radius: 8px; }

/* Word-by-word headline entrance */
.word { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(6deg); transform-origin: 0 100%; animation: wordIn .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 75ms + 120ms); }
@keyframes wordIn { to { opacity: 1; transform: none; } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; }
.logo { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.04em; display: inline-flex; align-items: center; gap: 9px; }
.logo::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--acid); transform: rotate(45deg); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(405deg); } }
.nav { display: flex; gap: 6px; align-items: center; }
.nav > a { position: relative; font-size: .9rem; font-weight: 500; color: var(--text-2); padding: 8px 12px; }
.nav > a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--acid); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav > a:hover { color: var(--text); }
.nav > a:hover::after { transform: scaleX(1); }

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; position: relative; overflow: hidden;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2);
  padding: 10px 18px; border-radius: 999px; transition: color .3s, border-color .3s, transform .25s var(--ease), box-shadow .3s;
  will-change: transform;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--acid); transform: translateY(101%); transition: transform .4s var(--ease); z-index: -1; border-radius: inherit; }
.btn:hover { color: #000; border-color: var(--acid); }
.btn:hover::before { transform: none; }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--acid); color: #000; border-color: var(--acid); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--acid) 80%, transparent); }
.btn.primary::before { background: var(--coral); }
.btn.primary:hover { color: #000; border-color: var(--coral); }
.btn.big { padding: 15px 30px; font-size: 1rem; margin: 12px 0 4px; }
.btn.small { padding: 7px 14px; font-size: .82rem; }
.btn.ghost { background: transparent; border-color: transparent; }
kbd { font-family: var(--mono); font-size: .7rem; border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; margin-left: 6px; color: var(--text-3); }
.icon-btn { font: inherit; cursor: pointer; background: var(--surface-2); border: 1px solid var(--line-2); width: 34px; height: 34px; color: var(--text); border-radius: 10px; }
.icon-btn:hover { border-color: var(--acid); }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; padding: 70px 0 40px; }
.hero h1 { margin-bottom: 24px; }
.hero-stats { display: flex; gap: 32px; margin: 30px 0 34px; flex-wrap: wrap; }
.hero-stats div { font-family: var(--mono); font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.hero-stats b { display: block; font-family: var(--display); font-size: 2.2rem; font-weight: 700; color: var(--text); letter-spacing: -.03em; text-transform: none; line-height: 1.1; }

.searchbar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 6px 6px 22px; max-width: 520px; transition: border-color .3s, box-shadow .3s; }
.searchbar:focus-within { border-color: var(--acid); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acid) 18%, transparent); }
.searchbar input { flex: 1; font: inherit; font-size: 1rem; background: transparent; border: 0; color: var(--text); padding: 10px 0; min-width: 0; }
.searchbar input::placeholder { color: var(--text-3); }
.searchbar input:focus { outline: none; }
.searchbar button { font: inherit; font-family: var(--mono); font-size: .76rem; background: var(--acid); color: #000; border: 0; border-radius: 999px; padding: 11px 16px; cursor: pointer; }

/* Demo */
.demo { margin: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 26px; box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--coral) 45%, transparent); position: relative; }
.demo::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--angle, 0deg), var(--acid), var(--sky), var(--coral), var(--acid)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .55; animation: orbit 6s linear infinite; pointer-events: none; }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes orbit { to { --angle: 360deg; } }
.demo-top { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px 14px; font-family: var(--mono); font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.demo-top b { color: var(--acid); font-weight: 500; }
.demo .compare { border-radius: 16px; background: var(--surface-2); }
.demo .compare > img { max-height: 380px; }
.demo-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 6px 4px; font-family: var(--mono); font-size: .76rem; color: var(--text-2); }

.ticker { overflow: hidden; white-space: nowrap; margin: 40px -24px 0; border-block: 1px solid var(--line); }
.ticker-track { display: inline-flex; gap: 2.4rem; padding: 18px 0; animation: tick 50s linear infinite; font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: var(--text-3); }
.ticker-track:hover { animation-play-state: paused; }
.ticker span::after { content: "\2726"; margin-left: 2.4rem; color: var(--acid); }
@keyframes tick { to { transform: translateX(-50%); } }

.cat { margin: 110px 0 0; }
.cat-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.cat-head p { margin: 0; color: var(--text-2); max-width: 46ch; }
.cat-head .count { font-family: var(--mono); font-size: .76rem; color: var(--acid); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; counter-reset: t; }
.tool-card {
  --mx: 50%; --my: 50%; --tilt-x: 0deg; --tilt-y: 0deg;
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 180px; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; counter-increment: t;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transition: border-color .35s, transform .35s var(--ease);
}
.tool-card::before { content: counter(t, decimal-leading-zero); font-family: var(--mono); font-size: .74rem; color: var(--text-3); }
.tool-card::after { /* cursor spotlight */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(320px circle at var(--mx) var(--my), color-mix(in srgb, var(--acid) 16%, transparent), transparent 70%);
}
.tool-card:hover { border-color: color-mix(in srgb, var(--acid) 45%, transparent); }
.tool-card:hover::after { opacity: 1; }
.tool-card .ico { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); font-size: 1.15rem; transition: transform .5s var(--ease), background .3s; }
.tool-card:hover .ico { transform: rotate(-14deg) scale(1.12); background: var(--acid); color: #000; }
.tool-card h3 { margin-top: auto; font-size: 1.22rem; }
.tool-card p { margin: 0; color: var(--text-2); font-size: .92rem; line-height: 1.5; }
.tool-card[hidden] { display: none; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 110px 0 0; }
.feature { padding: 26px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); transition: transform .4s var(--ease), border-color .3s; }
.feature:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--coral) 50%, transparent); }
.feature .n { font-family: var(--mono); font-size: .72rem; color: var(--coral); text-transform: uppercase; letter-spacing: .08em; }
.feature b { display: block; font-family: var(--display); font-size: 1.15rem; font-weight: 700; margin: 12px 0 8px; line-height: 1.2; letter-spacing: -.02em; }
.feature p { margin: 0; color: var(--text-2); font-size: .94rem; }

.faq { margin: 110px auto 0; max-width: 780px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 22px; margin-bottom: 10px; transition: border-color .3s; }
details[open] { border-color: color-mix(in srgb, var(--acid) 40%, transparent); }
details summary { cursor: pointer; font-family: var(--display); font-size: 1rem; font-weight: 600; letter-spacing: -.01em; list-style: none; padding: 18px 0; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-family: var(--mono); color: var(--acid); transition: transform .35s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--text-2); margin: 0 0 20px; }

/* ---------- Tool page ---------- */
.crumbs { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 34px 0 18px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--acid); }
.tool-hero { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; margin-bottom: 30px; }
.tool-hero .num { font-family: var(--display); font-weight: 800; font-size: clamp(5rem, 14vw, 10rem); line-height: .8; letter-spacing: -.06em; background: var(--grad); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hue 9s linear infinite; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; margin-bottom: 18px; }
.card h2 { font-size: 1.6rem; margin-bottom: 14px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 56px; background: var(--surface-2); border-radius: 12px; color: var(--text-2); transition: transform .3s var(--ease); }
.steps li:hover { transform: translateX(6px); }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 9px; background: var(--acid); color: #000; display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); font-weight: 500; font-size: .9rem; transition: all .3s var(--ease); }
.pill:hover { background: var(--acid); color: #000; border-color: var(--acid); transform: translateY(-2px); }

/* ---------- Tool primitives ---------- */
.drop {
  position: relative; cursor: pointer; text-align: center; padding: 54px 24px; border-radius: 20px;
  border: 1.5px dashed var(--line-2); background: var(--surface-2); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 6px; transition: border-color .3s, transform .3s var(--ease);
}
.drop::before { /* breathing spotlight */
  content: ""; position: absolute; inset: -40%; background: radial-gradient(circle, color-mix(in srgb, var(--acid) 16%, transparent), transparent 55%); animation: breathe 5s ease-in-out infinite; pointer-events: none;
}
@keyframes breathe { 0%, 100% { transform: scale(.7); opacity: .4; } 50% { transform: scale(1.1); opacity: 1; } }
.drop > * { position: relative; }
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--acid); transform: scale(1.01); outline: none; }
.drop-icon { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 10px; background: var(--acid); color: #000; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.drop.over .drop-icon { animation: none; transform: scale(1.2); }
.drop strong { font-family: var(--display); font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.drop .muted { font-size: .88rem; }

.controls { display: flex; flex-wrap: wrap; gap: 20px 24px; align-items: flex-end; margin: 26px 0 6px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 150px; font-size: .9rem; font-weight: 600; }
.field.check { flex-direction: row; align-items: center; min-width: 0; gap: 10px; }
.field > span { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
input[type="text"], input[type="number"], select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 13px; transition: border-color .25s, box-shadow .25s;
}
input[type="number"], input[type="text"], select { min-width: 130px; }
textarea { width: 100%; resize: vertical; font-family: var(--mono); font-size: .86rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--acid); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acid) 22%, transparent); }
input[type="range"] { width: 240px; accent-color: var(--acid); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--acid); margin: 0; }

.out { margin-top: 24px; }
.result { display: grid; gap: 14px; justify-items: start; padding: 20px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.preview { display: block; max-width: 100%; max-height: 420px; border-radius: 12px; background: var(--surface); }
.stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.stats li { font-family: var(--mono); font-size: .78rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); margin-bottom: 8px; animation: rise .5s var(--ease) both; }
.row-name { font-weight: 600; word-break: break-all; }
.row-actions { display: flex; gap: 6px; }
.queue { list-style: none; padding: 0; margin: 14px 0 0; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }

/* Before / after comparison */
.compare { position: relative; max-width: 100%; line-height: 0; user-select: none; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); --p: 50%; background: var(--surface-2); }
.compare > img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: contain; }
.cmp-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.cmp-before img { width: 100%; height: 100%; object-fit: contain; }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; background: var(--acid); box-shadow: 0 0 16px var(--acid); transform: translateX(-1px); pointer-events: none; }
.cmp-tag { position: absolute; top: 12px; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; background: rgba(0, 0, 0, .7); color: #fff; padding: 4px 9px; border-radius: 999px; pointer-events: none; backdrop-filter: blur(4px); }
.cmp-tag.l { left: 12px; }
.cmp-tag.r { right: 12px; }
.compare input[type="range"] { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare .cmp-handle { position: absolute; top: 50%; left: var(--p); width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--acid); color: #000; display: grid; place-items: center; font-size: 16px; font-weight: 700; pointer-events: none; box-shadow: 0 0 0 6px color-mix(in srgb, var(--acid) 25%, transparent); }

/* Crop */
.crop-wrap { overflow: auto; margin-top: 16px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.crop-stage { position: relative; display: inline-block; max-width: 100%; line-height: 0; overflow: hidden; border-radius: 10px; }
.crop-stage img { display: block; max-width: 100%; height: auto; max-height: 520px; width: auto; }
.crop-box { position: absolute; border: 2px solid var(--acid); border-radius: 4px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .6); }

/* Color & analysis */
.picker { position: relative; max-width: 100%; margin-top: 18px; padding: 10px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.pick-canvas { display: block; max-width: 100%; height: auto; border-radius: 12px; cursor: crosshair; }
.readout { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin: 20px 0; }
.swatch { width: 104px; height: 104px; border-radius: 24px; border: 1px solid var(--line-2); background: #333; transition: background .25s; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .6); }
.values { flex: 1; min-width: 230px; }
.value-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.value-row b { width: 46px; font-family: var(--mono); font-size: .72rem; color: var(--text-3); font-weight: 500; }
code { font-family: var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 9px; border-radius: 8px; font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { width: 50px; height: 50px; border-radius: 14px; border: 1px solid var(--line-2); cursor: pointer; padding: 0; transition: transform .35s var(--ease); }
.chip:hover { transform: translateY(-4px) scale(1.08); }
.chip-lg { padding: 12px 15px; border-radius: 14px; font-family: var(--mono); font-size: .82rem; min-width: 150px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.kvs { margin: 0 0 10px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-size: .9rem; color: var(--text-3); }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.table thead th { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); background: var(--surface-2); font-weight: 500; }
.table tfoot th { font-family: var(--display); font-size: 1.1rem; }

/* Toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 100; max-width: min(380px, calc(100% - 36px)); }
.toast { background: var(--acid); color: #000; padding: 12px 16px; border-radius: 14px; font-size: .9rem; font-weight: 600; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .6); animation: rise .45s var(--ease) both; }
.toast.err { background: var(--coral); }

/* Finder (Ctrl/Cmd + K) */
.pal { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px); display: flex; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; } }
.pal-box { width: min(600px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8); animation: rise .45s var(--ease) both; }
.pal-input { width: 100%; font: inherit; font-size: 1.05rem; padding: 18px 22px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); }
.pal-input:focus { outline: none; }
.pal-list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
.pal-item { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 12px; cursor: pointer; font-weight: 600; transition: background .15s; }
.pal-item small { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; color: var(--text-3); align-self: center; font-weight: 500; }
.pal-item.on { background: var(--acid); color: #000; }
.pal-item.on small { color: #000; }
.pal-empty { padding: 14px; color: var(--text-3); }

/* Footer */
.site-footer { margin-top: 120px; padding: 30px 0 40px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--text-3); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 18px 32px; flex-wrap: wrap; }
.legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.legal a { color: var(--text-2); }
.legal a:hover { color: var(--acid); }

/* Informational pages (about, contact, privacy, terms, disclaimer) */
.legal-page { padding-top: 60px; max-width: 860px; }
.legal-page h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.legal-page .card h2 { font-size: 1.3rem; }
.legal-page .card p, .legal-page .card li { color: var(--text-2); }
.legal-page .card a { color: var(--acid); }
.plain { margin: 0; padding-left: 1.2rem; color: var(--text-2); display: grid; gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 42px; padding-top: 44px; }
  .tool-hero { grid-template-columns: 1fr; }
  .tool-hero .num { font-size: 5rem; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .nav > a.hide-sm { display: none; }
  .site-header .wrap { height: 62px; }
  .nav .btn kbd { display: none; }
  .grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 0; padding: 20px; }
  .drop { padding: 38px 16px; }
  .card { padding: 22px; border-radius: 18px; }
  input[type="range"] { width: 100%; }
  .field { min-width: 0; flex: 1 1 140px; }
  .controls { gap: 16px; }
  .searchbar input { font-size: 16px; }
  .ticker { margin: 40px -18px 0; }
  .cat { margin-top: 80px; }
}
@media (hover: none) { .tool-card { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .word { opacity: 1 !important; transform: none !important; }
}
