/* Color Name Finder — light UI with soft pastel gradients (approved mockup 16.10.2026). One column width --col
   for header, tools, text and footer so all edges line up. */
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: optional;
}
:root {
  --ink: #16161d;
  --ink-2: #4a4a57;
  --muted: #6b6b7b;
  --line: #e7e7ef;
  --line-2: #f0f0f5;
  --bg: #f7f7fb;
  --card: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(22, 22, 29, .04), 0 8px 28px rgba(22, 22, 29, .07);
  --shadow-sm: 0 1px 2px rgba(22, 22, 29, .05), 0 3px 10px rgba(22, 22, 29, .05);
  --col: 1120px;
  --narrow: 760px;
  --ok: #157f3b;
  --warn: #9a6200;
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg);
  background-image:
    radial-gradient(60vw 420px at 0% 0%, rgba(255, 196, 225, .55), transparent 70%),
    radial-gradient(50vw 380px at 100% 0%, rgba(172, 226, 255, .6), transparent 70%),
    radial-gradient(50vw 360px at 50% -80px, rgba(255, 236, 170, .45), transparent 70%),
    radial-gradient(40vw 420px at 85% 260px, rgba(214, 196, 255, .35), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(22, 22, 29, .3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.2rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .92em; }
button { font: inherit; color: inherit; }
svg:not(.fa) { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Font Awesome Pro 7 icons (src/icons, inlined at build): 640-unit box with built-in padding, so a touch larger */
svg.fa { fill: currentColor; stroke: none; flex: none; }
.heart-on { display: none; color: #e0457b; }
[aria-pressed="true"] .heart-off { display: none; }
[aria-pressed="true"] .heart-on { display: inline-block; }
.wrap { width: min(var(--col), 100% - 32px); margin-inline: auto; }
.narrow { width: min(var(--narrow), 100% - 32px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--ink-2); margin-bottom: .6em; }
.lead { font-size: 1.08rem; color: var(--ink-2); }
:focus-visible { outline: 3px solid #5b7cfa; outline-offset: 2px; border-radius: 6px; }

/* header */
.site-header { position: relative; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 76px; height: var(--hh); }
.logo img { width: 80px; height: 80px; flex: none; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-height: 44px; }
.logo img { border-radius: 18px; box-shadow: 0 4px 14px rgba(91, 76, 230, .22); }
.logo span { display: flex; flex-direction: column; line-height: 1.2; }
.logo b { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.logo small { font-size: .84rem; color: var(--muted); }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; font-size: .93rem; font-weight: 600; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: rgba(255, 255, 255, .75); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .8); box-shadow: var(--shadow-sm); }
.icon-btn svg { width: 22px; height: 22px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .8); box-shadow: var(--shadow-sm); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 4px auto 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { text-decoration: none; display: inline-block; padding: 12px 0; margin: -12px 0; }
.crumbs a:hover { text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 12px;
  font-weight: 700; font-size: .93rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: transform .1s, box-shadow .15s, background .15s; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2b2b36; }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-light:hover { border-color: #cfcfdc; box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-icon { width: 44px; padding: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-row.center { justify-content: center; }
.link-btn { background: none; border: 0; padding: 0 4px; min-height: 44px; min-width: 44px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .85rem; font-weight: 600; }

/* hero */
.hero { text-align: center; padding: 34px 0 22px; position: relative; }
.hero .lead { max-width: 640px; margin-inline: auto; }
.hero-sm { padding: 20px 0 18px; }
.hero-sm h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); }
.hand { position: absolute; right: 1%; top: 196px; font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; font-size: 1.15rem; line-height: 1.25;
  color: var(--ink-2); transform: rotate(-8deg); margin: 0; }
.tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 6px; margin-top: 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); }
.tabs [role="tab"] { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 10px 18px; min-height: 44px; border-radius: 999px; font-weight: 700; font-size: .92rem; cursor: pointer; }
.tabs [role="tab"] svg { width: 19px; height: 19px; }
.tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: #fff; }
.tabs [role="tab"]:not([aria-selected="true"]):hover { background: rgba(22, 22, 29, .05); }

/* home: full-bleed colour field (.cfield) of every hue (x) from light to dark (y). Pure CSS gradients, no images or filters;
   ui.js (initField) recomputes the colour under the pointer from the SAME stops — keep FIELD_* there in step. */
:root { --hh: 104px; --field-h: 1138px; }
body.page-home { background-image: none; }
.cfield-wrap { position: relative; padding-bottom: 56px; }
.cfield-wrap > :not(.cfield) { position: relative; z-index: 1; }
/* fixed height: tied to the content it would stretch whenever the result panel changes, and the colours would crawl */
.cfield { position: absolute; left: 0; right: 0; top: calc(-1 * var(--hh)); height: var(--field-h); z-index: 0; border-radius: 0 0 44px 44px;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 56%, rgba(0, 0, 0, .45) 78%, rgba(0, 0, 0, .9) 100%),
    linear-gradient(to bottom, rgba(255, 255, 255, .94) 0%, rgba(255, 255, 255, .8) 18%, rgba(255, 255, 255, .45) 34%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(to right, #e25a5a, #e2e25a, #5ae25a, #5ae2e2, #5a5ae2, #e25ae2, #e25a5a); /* hsl(h 70% 62%): pure screen hues were too harsh (Ivan 16.10) */ }
.picking, .picking * { cursor: crosshair !important; }
.field-loupe { position: fixed; z-index: 30; pointer-events: none; display: flex; align-items: center; gap: 8px; transform: translate(14px, 14px); }
.field-loupe i { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 4px 14px rgba(0, 0, 0, .25); }
.field-loupe span { background: rgba(22, 22, 29, .88); color: #fff; font-size: .78rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.field-loupe span small { font-family: var(--mono); font-weight: 600; opacity: .8; margin-left: 4px; }
.page-home .hero h1, .page-home .hero .lead { text-shadow: 0 0 24px rgba(255, 255, 255, .7); }

/* tool card: main area + result panel */
.tool-card { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0; background: var(--card); border-radius: 24px; box-shadow: var(--shadow); overflow: clip; }
.tool-main { padding: 22px; min-width: 0; }
.tool-side { padding: 22px; border-left: 1px solid var(--line-2); }

.explorer { display: grid; grid-template-columns: minmax(0, 1fr) 26px; gap: 18px; }
.sv { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; cursor: crosshair; touch-action: none; --hue: hsl(0 100% 50%);
  background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, var(--hue)); }
.sv-knob { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 2px 8px rgba(0, 0, 0, .3); pointer-events: none; }
.hue { position: relative; border-radius: 999px; cursor: pointer; touch-action: none;
  background: linear-gradient(to bottom, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%); }
.hue-knob { position: absolute; left: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 2px 8px rgba(0, 0, 0, .3); pointer-events: none; }
.rows { margin-top: 16px; display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.row-label { font-size: .85rem; color: var(--ink-2); min-width: 104px; }
.dots { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; overflow: hidden; flex: 1; min-width: 0; height: 44px; } /* one line: a wrapping row made the card jump */
.dots .dot-btn { flex: none; }
.dot-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .06); cursor: pointer; padding: 0; }
.dot-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* result panel */
.res-sw { height: 92px; border-radius: 14px; border: 1px solid rgba(0, 0, 0, .05); }
.res-head { display: flex; align-items: center; gap: 10px; margin-top: 16px; min-width: 0; }
.res-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.2; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef7f0; color: var(--ok); white-space: nowrap; flex: none; }
.badge[data-level="mid"] { background: #eef3ff; color: #2d4fbf; }
.badge[data-level="lo"] { background: #fff5e6; color: var(--warn); }
/* every variable line of the panel has a FIXED height (clamped), otherwise the card jumps on each pick */
.res-desc { color: var(--ink-2); font-size: .9rem; margin: 6px 0 12px; line-height: 1.45; height: 2.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.res-codes { margin: 0; display: grid; gap: 8px; }
.code-row { display: grid; grid-template-columns: 62px 1fr 44px; align-items: center; border: 1px solid var(--line); border-radius: 10px; min-height: 44px; }
.code-row dt { font-size: .8rem; font-weight: 700; color: var(--muted); padding-left: 12px; border-right: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; }
.code-row dd { margin: 0; padding: 0 10px; font-family: var(--mono); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy { width: 44px; height: 44px; border: 0; background: none; border-radius: 8px; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.copy:hover { background: var(--line-2); color: var(--ink); }
.copy svg { width: 19px; height: 19px; }
.res-compare { display: grid; grid-template-columns: 34px 34px 1fr; gap: 0; align-items: center; margin: 14px 0 6px; }
.res-compare p { margin: 0 0 0 12px; font-size: .8rem; color: var(--ink-2); line-height: 1.35; height: 2.7em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cmp { height: 34px; border: 1px solid rgba(0, 0, 0, .06); }
.cmp:first-child { border-radius: 8px 0 0 8px; }
.cmp:nth-child(2) { border-radius: 0 8px 8px 0; }
.res-precise { font-size: .82rem; color: var(--ink-2); margin: 8px 0 0; line-height: 1.45; height: 2.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sw-inline { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 2px; border: 1px solid rgba(0, 0, 0, .1); }
.res-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.res-actions .btn { padding: 10px 12px; }
.res-links { display: flex; gap: 16px; margin: 4px 0 0; font-size: .84rem; font-weight: 600; height: 44px; overflow: hidden; white-space: nowrap; }
.res-links a { overflow: hidden; text-overflow: ellipsis; min-width: 0; line-height: 44px; }
.res-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 8px; }
.tool-side .res-top .chips { grid-template-columns: 1fr; }
.tool-main .res-top .chips { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.mini { display: none; }
@media (max-width: 960px) {
  .mini { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 3; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
    margin: -14px -14px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
  .mini-sw { width: 38px; height: 38px; border-radius: 10px; flex: none; border: 1px solid rgba(0, 0, 0, .06); }
  .mini-text { display: grid; line-height: 1.25; min-width: 0; flex: 1; }
  .mini-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mini-text span { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
}

/* chips (named swatches) */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.chips-tight { gap: 8px; }
.chip { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 7px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); text-decoration: none; cursor: pointer; min-width: 0; position: relative; }
.chip:hover { border-color: #cfcfdc; box-shadow: var(--shadow-sm); }
.chip-sw { grid-row: 1 / 4; width: 40px; height: 40px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .06); }
.chip-name { font-weight: 700; font-size: .86rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-hex { font-family: var(--mono); font-size: .75rem; color: var(--muted); white-space: nowrap; }
.chip-src { grid-column: 2; justify-self: start; font-size: .62rem; font-weight: 700; color: var(--muted); background: var(--line-2); padding: 0 5px; border-radius: 5px; margin-top: 2px; line-height: 1.5; }
a.chip .chip-name { text-decoration: underline; text-decoration-color: rgba(22, 22, 29, .25); text-underline-offset: 2px; }
.chips-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

/* input fields */
.field { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fff; min-height: 46px; flex: 1; min-width: 0; }
.field:focus-within { border-color: #9aa8f5; box-shadow: 0 0 0 3px rgba(91, 124, 250, .15); }
.field svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.field input { border: 0; outline: 0; font: inherit; font-size: 1rem; flex: 1; min-width: 0; background: none; padding: 10px 0; }
.field-prefix { color: var(--muted); font-weight: 700; }
.field-lg { min-height: 54px; }
.codeform { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.codeform .err { flex-basis: 100%; margin: 0; color: #b42318; font-size: .85rem; }
.codeform-lg .field { min-height: 54px; font-size: 1.1rem; }
.searchbox { display: grid; gap: 14px; }
.examples { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.fields { display: grid; grid-template-columns: 1.6fr repeat(6, 1fr); gap: 8px; margin-top: 16px; }
.f { display: grid; gap: 2px; font-size: .74rem; font-weight: 700; color: var(--muted); }
.f input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px; font: inherit; font-size: .92rem; color: var(--ink); font-family: var(--mono); min-height: 42px; }
.f input:focus { outline: 0; border-color: #9aa8f5; box-shadow: 0 0 0 3px rgba(91, 124, 250, .15); }
.f-drop { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
textarea { width: 100%; font-family: var(--mono); font-size: .92rem; border: 1px solid var(--line); border-radius: 12px; padding: 12px; resize: vertical; background: #fff; }

/* image tool */
.drop { display: grid; place-items: center; text-align: center; gap: 4px; padding: 36px 20px; border: 2px dashed #d5d5e2; border-radius: 16px; background: #fafafd; cursor: pointer; min-height: 220px; align-content: center; }
.drop svg { width: 48px; height: 48px; color: #5b7cfa; margin-bottom: 6px; }
.drop b { font-size: 1.05rem; }
.drop span { font-size: .88rem; color: var(--muted); max-width: 360px; }
.drop.over, .drop:hover { border-color: #5b7cfa; background: #f4f6ff; }
.drop-lg { min-height: 320px; }
.has-image .drop { min-height: 0; padding: 12px; grid-auto-flow: column; gap: 10px; }
.has-image .drop svg { width: 26px; height: 26px; margin: 0; }
.has-image .drop span { display: none; }
.stage { position: relative; margin-top: 12px; border-radius: 14px; overflow: visible; }
.stage canvas:first-child { display: block; width: auto; height: auto; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 14px; cursor: crosshair; touch-action: none; } /* keeps the aspect ratio: no letterbox, pointer = pixel */
.loupe { position: absolute; left: 0; top: 0; width: 110px; height: 110px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .3); pointer-events: none; image-rendering: pixelated; background: #fff; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.pal { display: grid; gap: 2px; text-align: left; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.pal span { height: 44px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .05); }
.pal b { font-size: .8rem; line-height: 1.2; margin-top: 4px; }
.pal small { font-family: var(--mono); font-size: .72rem; color: var(--muted); }

/* home cards */
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.feature { display: flex; flex-direction: column; align-items: center; text-align: center; }
.feature h2 { font-size: 1.05rem; margin: 14px 0 6px; }
.feature p { font-size: .9rem; color: var(--muted); flex: 1; }
.feature .btn, .feature .codeform { width: 100%; }
.feature .codeform { flex-wrap: nowrap; }
.feature .codeform .btn { width: 44px; flex: none; }
.feature-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; }
.feature-ico svg { width: 28px; height: 28px; }
.ico-blue { background: #e3f1ff; color: #1677d8; }
.ico-green { background: #def7e5; color: #1b9c4c; }
.ico-violet { background: #eee8ff; color: #6b46e5; }
.ico-orange { background: #ffeadb; color: #e2601a; }

.section { margin-top: 56px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-head p { margin: 0; color: var(--ink-2); }
.h-big { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); }
.trends { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.trend { background: #fff; border-radius: 16px; padding: 8px 8px 12px; box-shadow: var(--shadow-sm); text-decoration: none; display: grid; gap: 2px; }
.trend:hover { box-shadow: var(--shadow); }
.trend-sw { height: 84px; border-radius: 10px; margin-bottom: 8px; }
.trend b { font-size: .9rem; padding: 0 4px; }
.trend span:last-child { font-family: var(--mono); font-size: .78rem; color: var(--muted); padding: 0 4px; }
.fams { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.fam { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; background: #fff; border-radius: 14px; padding: 10px; text-decoration: none; box-shadow: var(--shadow-sm); }
.fam:hover { box-shadow: var(--shadow); }
.fam-sw { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .06); }
.fam b { font-size: .88rem; line-height: 1.25; }
.fam span:last-child { font-size: .76rem; color: var(--muted); }
.library { display: grid; gap: 18px; }
.lib-group h3 { margin-bottom: 8px; }
.lib-group h3 a { text-decoration: none; }
.pill-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-links a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .88rem; font-weight: 600; }
.pill-links a:hover { border-color: #cfcfdc; box-shadow: var(--shadow-sm); }
.dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .08); vertical-align: -4px; margin-right: 6px; flex: none; }
.pill-links .dot { margin: 0; width: 22px; height: 22px; }

/* prose */
.prose { font-size: 1.02rem; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.faq { margin-top: 2em; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 1.4rem; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 0; }
.byline { font-size: .85rem; color: var(--muted); margin-top: -4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; }

/* color pages */
.color-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; margin-top: 18px; background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 22px; }
.color-hero-sw { min-height: 340px; height: 100%; border-radius: 18px; display: flex; align-items: flex-end; padding: 18px; font-family: var(--mono); font-weight: 700; font-size: 1.1rem; border: 1px solid rgba(0, 0, 0, .05); }
.color-hero-info h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); }
.color-hero .eyebrow { margin-bottom: .4em; }
table { border-collapse: collapse; width: 100%; }
.codes { margin-top: 6px; }
.codes th { text-align: left; font-size: .8rem; color: var(--muted); width: 74px; padding: 7px 0; font-weight: 700; }
.codes td { padding: 4px 0; border-top: 1px solid var(--line-2); }
.codes tr:first-child td { border-top: 0; }
.codes td:last-child { width: 40px; text-align: right; }
.codes code { font-size: .92rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.defs th, .defs td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: .9rem; vertical-align: middle; }
.defs th { font-size: .78rem; color: var(--muted); font-weight: 700; background: #fafafd; }
.defs tr:last-child td { border-bottom: 0; }
.defs td:first-child, .defs td:nth-child(2) { white-space: nowrap; }
.vs { display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.vs-sw { height: 150px; display: flex; align-items: flex-end; padding: 14px; }
.vs-sw span { background: rgba(255, 255, 255, .92); padding: 6px 10px; border-radius: 8px; font-size: .82rem; font-weight: 700; line-height: 1.3; }
h3 .count { font-size: .75rem; color: var(--muted); font-weight: 700; background: var(--line-2); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; margin-left: 6px; }
.section h3 { margin-top: 22px; }
.ladder { display: grid; grid-template-columns: repeat(9, 1fr); border-radius: 14px; overflow: hidden; }
.ladder button { border: 0; height: 84px; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 8px; }
.ladder button span { font-family: var(--mono); font-size: .66rem; font-weight: 700; opacity: 0; transition: opacity .15s; }
.ladder button:hover span, .ladder button:focus-visible span { opacity: 1; }
.ladder-sm button { height: 44px; }
.harmonies { display: grid; gap: 16px; }
.harmonies .chips { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.harmony h3 { margin: 0 0 8px; font-size: .95rem; }
.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.contrast-box { border-radius: 14px; padding: 20px; display: grid; gap: 2px; border: 1px solid rgba(0, 0, 0, .05); }
.contrast-box b { font-size: 1.2rem; }
.code { background: #16161d; color: #e9e9f2; border-radius: 14px; padding: 18px; overflow-x: auto; font-size: .88rem; line-height: 1.6; }

/* app block (under the colour field on the home page) */
.app-block { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: center; margin-top: 40px; padding: 34px 40px; background: #fff; border-radius: 24px; box-shadow: var(--shadow-sm); }
.app-copy p { color: var(--ink-2); max-width: 560px; }
.app-tiles { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: #fff; }
.app-tile__qr { width: 120px; height: 120px; }
.app-tile__cap { font-size: .74rem; color: var(--muted); }
.app-tile.is-soon { padding: 0; border: 0; flex-direction: row; gap: 10px; }
.store-badge { display: block; line-height: 0; border-radius: 9px; }
.store-badge svg { height: 44px; width: auto; display: block; }
a.store-badge:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.store-badge.is-soon { opacity: .55; filter: grayscale(1); }
.soon-tag { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b46e5; background: #eee8ff; padding: 2px 9px; border-radius: 999px; }
.app-phone { justify-self: center; width: 210px; height: 400px; border-radius: 38px; background: #16161d; padding: 10px; box-shadow: 0 20px 50px rgba(22, 22, 29, .25); transform: rotate(-4deg); }
.ph-screen { height: 100%; border-radius: 29px; overflow: hidden; background: #f7f7fb; display: flex; flex-direction: column; }
.ph-cam { flex: 1; position: relative; background: radial-gradient(60% 50% at 30% 30%, #b9d6a3, transparent), radial-gradient(70% 60% at 75% 65%, #5f8f4e, transparent), linear-gradient(160deg, #a7c98f, #4e7a3e); }
.ph-reticle { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.ph-card { display: flex; align-items: center; gap: 8px; margin: -26px 10px 8px; position: relative; background: #fff; border-radius: 14px; padding: 8px; box-shadow: var(--shadow-sm); }
.ph-sw { width: 32px; height: 32px; border-radius: 8px; background: #88b378; flex: none; }
.ph-txt { display: grid; line-height: 1.2; flex: 1; }
.ph-txt b { font-size: .82rem; }
.ph-txt small { font-family: var(--mono); font-size: .66rem; color: var(--muted); }
.ph-badge { font-size: .6rem; font-weight: 800; color: var(--ok); background: #eef7f0; padding: 2px 6px; border-radius: 999px; }
.ph-row { display: flex; gap: 6px; padding: 0 10px 14px; }
.ph-row i { flex: 1; height: 22px; border-radius: 6px; background: #88b378; }
.ph-row i:nth-child(2) { background: #c0737a; } .ph-row i:nth-child(3) { background: #87ceeb; } .ph-row i:nth-child(4) { background: #c79fef; } .ph-row i:nth-child(5) { background: #ca6641; }

/* footer */
.site-footer { margin-top: 80px; background: #fff; border-top: 1px solid var(--line); padding: 34px 0 30px; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-bottom: 28px; border-bottom: 1px solid var(--line-2); }
.trust > div { display: flex; gap: 12px; align-items: center; }
.trust svg { width: 34px; height: 34px; flex: none; color: #5b7cfa; }
.trust > div:nth-child(1) svg { color: #e2601a; } .trust > div:nth-child(2) svg { color: #e0457b; } .trust > div:nth-child(3) svg { color: #6b46e5; } .trust > div:nth-child(4) svg { color: #1677d8; }
.trust p { margin: 0; display: grid; line-height: 1.35; }
.trust b { font-size: .92rem; }
.trust span { font-size: .82rem; color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 26px 0 10px; }
.fh { font-weight: 800; font-size: .9rem; margin-bottom: .6em; }
.cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.cols a { text-decoration: none; color: var(--ink-2); font-size: .9rem; display: inline-flex; align-items: center; min-height: 40px; }
.cols a:hover { color: var(--ink); text-decoration: underline; }
.legal { font-size: .8rem; color: var(--muted); margin: 14px 0 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .9rem; z-index: 20; box-shadow: var(--shadow); }

/* responsive */
@media (max-width: 1100px) {
  .hand { display: none; }
  .trends { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .app-block { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .app-phone { display: none; }
  .app-tile__qr, .app-tile__cap { display: none; }
  .app-tile { padding: 0; border: 0; flex-direction: row; gap: 10px; }
  .tool-card { grid-template-columns: 1fr; }
  .tool-side { border-left: 0; border-top: 1px solid var(--line-2); }
  .cards4 { grid-template-columns: 1fr 1fr; }
  .color-hero { grid-template-columns: 1fr; }
  .color-hero-sw { min-height: 200px; }
  .trust { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; order: 3; }
  .header-search { order: 2; }
  .nav { display: none; position: absolute; top: calc(var(--hh) - 6px); left: 16px; right: 16px; flex-direction: column; background: #fff; padding: 10px; border-radius: 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}
@media (max-width: 640px) {
  :root { --hh: 76px; --field-h: 772px; }
  .logo img { width: 56px; height: 56px; border-radius: 13px; }
  .logo b { font-size: 1.12rem; }
  .cols a { min-height: 44px; }
  .header-row { gap: 10px; min-height: 64px; }
  .cfield-wrap { padding-bottom: 36px; }
  .cfield { border-radius: 0 0 28px 28px; }
  .logo small { display: none; }
  .hero { padding: 18px 0 14px; }
  .tabs { border-radius: 18px; display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tabs [role="tab"] { justify-content: center; padding: 10px 8px; font-size: .86rem; }
  .tool-main, .tool-side { padding: 14px; }
  .tool-card, .color-hero { border-radius: 18px; }
  .explorer { grid-template-columns: 1fr; gap: 14px; }
  .sv { aspect-ratio: 4 / 3; }
  .hue { height: 36px; background: linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%); }
  .hue-knob { top: 50%; }
  .row-label { min-width: 0; flex-basis: 100%; }
  .cards4 { grid-template-columns: 1fr; }
  .section { margin-top: 40px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .chips { grid-template-columns: 1fr 1fr; }
  .harmonies, .contrast { grid-template-columns: 1fr; }
  .fields { grid-template-columns: repeat(3, 1fr); }
  .f-hex { grid-column: 1 / -1; }
  .ladder button span { display: none; }
  .cols { grid-template-columns: 1fr 1fr; }
  .trust { grid-template-columns: 1fr; }
  .defs th, .defs td { padding: 8px 10px; }
  .vs-sw { height: 110px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
