/* Barcode — neutral, fast, answer-first. One accent: orange. */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --ink: #09090b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #ea580c;
  --accent-ink: #c2410c;
  --accent-soft: #fff1e6;
  --on-accent: #ffffff;
  --good: #15803d;
  --bad: #b91c1c;
  --mark: #ffedd5;
  --shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px rgb(0 0 0 / 6%);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --surface: #131316; --surface-2: #1c1c20; --ink: #fafafa; --ink-2: #d4d4d8; --muted: #a1a1aa;
    --line: #27272a; --accent: #fb923c; --accent-ink: #fdba74; --accent-soft: #2a1a0e; --on-accent: #09090b;
    --good: #4ade80; --bad: #f87171; --mark: #3b2410; --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --surface: #131316; --surface-2: #1c1c20; --ink: #fafafa; --ink-2: #d4d4d8; --muted: #a1a1aa;
  --line: #27272a; --accent: #fb923c; --accent-ink: #fdba74; --accent-soft: #2a1a0e; --on-accent: #09090b;
  --good: #4ade80; --bad: #f87171; --mark: #3b2410; --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
a.ext::after { content: "↗"; font-size: .75em; margin-left: .15em; opacity: .55; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
code, kbd { font-family: var(--mono); font-size: .86em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .4em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
mark { background: var(--mark); color: inherit; padding: 0 .15em; border-radius: 4px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; flex: none; }
.logo { width: 28px; height: 28px; }
.logo-bg { fill: var(--ink); }
.logo-page { fill: var(--bg); }
.logo-spine { stroke: var(--accent); stroke-width: 2.5; }
.search { position: relative; flex: 1; max-width: 520px; display: flex; }
.search input { width: 100%; font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: .55rem 2.6rem .55rem .9rem; height: 42px; transition: border-color .15s, background .15s; }
.search input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search button { position: absolute; right: 5px; top: 5px; width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; display: grid; place-items: center; }
.search button svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; }
.is-home .site-header .search { visibility: hidden; }
.main-nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { flex: none; text-decoration: none; color: var(--ink-2); font-size: .9rem; font-weight: 500; padding: .4rem .7rem; border-radius: 10px; }
.main-nav a:hover { background: var(--surface-2); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.theme-toggle { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.theme-toggle svg { width: 17px; height: 17px; fill: var(--ink-2); }
.bar > .main-nav { order: 2; }
.bar > .theme-toggle { order: 3; }

/* ---------- suggestions ---------- */
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 40; text-align: left; }
.suggest li { padding: .55rem .75rem; border-radius: 10px; cursor: pointer; display: flex; gap: .75rem; align-items: baseline; min-width: 0; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--surface-2); }
.suggest .sw { font-weight: 700; flex: none; }
.suggest .sd { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

main { padding-top: 28px; padding-bottom: 64px; min-height: 60vh; }

/* ---------- home ---------- */
.hero { padding: 56px 0 40px; text-align: center; }
.hero-kicker { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: .3rem .8rem; border-radius: 999px; margin: 0 0 1.2rem; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); font-weight: 850; letter-spacing: -.045em; line-height: 1.02; }
.hero h1 span { display: block; color: var(--muted); }
.hero-search { position: relative; display: flex; align-items: center; max-width: 680px; margin: 2rem auto 0; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 6px; transition: border-color .15s, box-shadow .15s; }
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow); }
.hero-search input { flex: 1; min-width: 0; font: 500 1.2rem var(--sans); color: var(--ink); background: transparent; border: 0; padding: .7rem .9rem; outline: none; }
.hero-search button, .button, .tool-form button { flex: none; font: 700 1rem var(--sans); border: 0; border-radius: 13px; background: var(--accent); color: var(--on-accent); padding: .8rem 1.4rem; cursor: pointer; text-decoration: none; display: inline-block; }
.hero-search button:hover, .button:hover, .tool-form button:hover { filter: brightness(1.06); color: var(--on-accent); }
.hero-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 880px; margin: 1.6rem auto 0; text-align: left; }
.hero-modes a { display: flex; flex-direction: column; gap: .15rem; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color .15s, transform .15s; }
.hero-modes a:hover { border-color: var(--accent); transform: translateY(-2px); }
.hero-modes strong { font-size: .95rem; color: var(--ink); }
.hero-modes span { font-size: .82rem; color: var(--muted); }
.home-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin: 8px 0 40px; }
.wotd-card { display: flex; flex-direction: column; gap: .35rem; padding: 28px; border-radius: 22px; text-decoration: none; color: var(--on-accent); background: var(--ink); position: relative; overflow: hidden; min-height: 280px; }
.wotd-card::after { content: ""; position: absolute; right: -90px; bottom: -110px; width: 260px; height: 260px; border-radius: 50%; background: var(--accent); opacity: .35; filter: blur(40px); }
.wotd-card > * { position: relative; z-index: 1; color: var(--bg); }
.wotd-card .tag { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.wotd-card .w { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 850; letter-spacing: -.045em; line-height: 1.05; margin-top: auto; }
.wotd-card .p { font-style: italic; opacity: .7; }
.wotd-card .d { font-size: 1.05rem; line-height: 1.5; opacity: .92; max-width: 34rem; }
.wotd-card .go { font-weight: 700; margin-top: .6rem; }
.wotd-card:hover .go { text-decoration: underline; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.panel h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .7rem; font-weight: 700; }
.panel h2.gap { margin-top: 1.4rem; }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mini-list li a { display: inline-block; padding: .2rem .7rem; border-radius: 999px; border: 1px dashed var(--line); text-decoration: none; font-size: .9rem; }
.mini-list .brief-def { display: none; }
.block { margin: 36px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: .8rem; }
.block-head h2 { font-size: 1.35rem; font-weight: 800; }
.block-head a { font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--accent-ink); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: .2rem; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile strong { font-size: 1.02rem; color: var(--ink); }
.tile span { color: var(--muted); font-size: .88rem; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: .2rem 0; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .75rem; border-radius: 999px; background: var(--surface-2); border: 1px solid transparent; text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 500; overflow-wrap: anywhere; transition: border-color .12s, background .12s; }
a.chip:hover { border-color: var(--accent); background: var(--surface); color: var(--ink); }
.chip.strong { font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); }
.chip.plain { color: var(--muted); background: transparent; border: 1px dashed var(--line); }
.count { color: var(--muted); font-size: .8em; font-weight: 500; }
.more { display: inline-block; margin-top: .5rem; font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--accent-ink); }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: .6rem 0 1.4rem; }
.letters a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.letters a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- word page: answer card ---------- */
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.answer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.answer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.answer-word { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem; min-width: 0; }
.answer h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); font-weight: 850; letter-spacing: -.05em; line-height: 1; overflow-wrap: anywhere; }
.syl { color: var(--muted); font-size: 1.1rem; font-weight: 500; letter-spacing: .04em; }
.answer-actions { display: flex; gap: 6px; flex: none; }
.icon-btn, .copy, .link-button, .share { font: 600 .85rem var(--sans); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 10px; padding: .45rem .8rem; cursor: pointer; }
.icon-btn:hover, .copy:hover, .link-button:hover, .share:hover { border-color: var(--ink-2); color: var(--ink); }
.save[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.save .star { margin-right: .3rem; }
.say { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 1rem 0 .2rem; }
.play { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: var(--ink); color: var(--bg); border-radius: 999px; padding: .42rem .95rem .42rem .7rem; font: 700 .85rem var(--sans); cursor: pointer; transition: transform .1s; }
.play:hover { transform: scale(1.04); }
.play svg { width: 18px; height: 18px; fill: var(--bg); }
.play svg .wave { fill: none; stroke: var(--bg); stroke-width: 2; stroke-linecap: round; }
.play.playing { background: var(--accent); }
.ipa { color: var(--ink-2); font-size: 1.02rem; font-family: "Charis SIL", "Doulos SIL", "Gentium Plus", "Segoe UI", var(--sans); }
.ipa small { font: 700 .66rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: .35rem; }
.answer-pos { margin: 1.3rem 0 .15rem; font-weight: 700; color: var(--accent-ink); font-size: .9rem; text-transform: lowercase; }
.answer-def { font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.4; font-weight: 500; letter-spacing: -.01em; margin: 0; max-width: 46rem; overflow-wrap: anywhere; }
.answer-def a { text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent); }
.answer-ex { color: var(--muted); font-size: 1.05rem; margin: .7rem 0 0; max-width: 46rem; overflow-wrap: anywhere; }
.answer-row { display: flex; align-items: baseline; gap: 10px; margin-top: .9rem; flex-wrap: wrap; }
.k { flex: none; width: 5.6rem; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.k.syn { color: var(--good); }
.k.ant { color: var(--bad); }
.answer-row .chips { flex: 1; min-width: 0; }
.origin-line { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.fact { font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; }
.fact.hot { background: var(--accent); color: var(--on-accent); }

.jump { position: sticky; top: 64px; z-index: 20; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 16px 0 8px; padding: 8px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; text-decoration: none; font-size: .88rem; font-weight: 600; color: var(--ink-2); padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.jump a:hover { border-color: var(--accent); color: var(--ink); }

.word-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: start; }
.entry { min-width: 0; }
.sidebar { position: sticky; top: 130px; display: flex; flex-direction: column; gap: 14px; }
.sec { padding: 26px 0; border-bottom: 1px solid var(--line); }
.sec:last-child { border-bottom: 0; }
.sec-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; }
.group-title { font-size: 1.15rem; font-weight: 800; margin: 1.6rem 0 .4rem; color: var(--muted); }
.group-title sup { font-size: .6em; margin-left: .1em; }
.pos-block { margin-bottom: 1.6rem; }
.pos-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; margin-bottom: .3rem; }
.pos-pill { font-weight: 800; font-size: .82rem; text-transform: lowercase; color: var(--on-accent); background: var(--ink); padding: .15rem .65rem; border-radius: 8px; }
.headline { color: var(--muted); font-size: .92rem; }
.forms { font-size: .85rem; color: var(--muted); margin: .2rem 0 .6rem; }
.form-tag { font-style: italic; }
.forms .sep { opacity: .4; }
.senses { margin: .4rem 0; padding-left: 1.7rem; }
.senses > li { padding: .65rem 0 .65rem .3rem; }
.senses > li + li { border-top: 1px solid var(--line); }
.senses > li::marker { font-weight: 800; color: var(--accent-ink); }
.subsenses { list-style: lower-alpha; padding-left: 1.3rem; margin: .4rem 0 0; }
.subsenses > li { padding: .3rem 0; }
.subsenses > li::marker { color: var(--muted); font-weight: 600; }
.gloss { font-size: 1.04rem; overflow-wrap: anywhere; }
.labels { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-right: .45rem; vertical-align: 1px; }
.label { font-size: .7rem; font-weight: 700; padding: .08rem .45rem; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); text-transform: lowercase; }
.label.q { font-weight: 500; font-style: italic; }
.label.topic { background: var(--accent-soft); color: var(--accent-ink); }
.attested { display: inline-block; font-size: .74rem; font-weight: 600; color: var(--muted); margin-top: .2rem; }
.example { margin: .5rem 0 .2rem; padding: .1rem 0 .1rem .9rem; border-left: 3px solid var(--line); color: var(--ink-2); }
.example p { margin: 0; overflow-wrap: anywhere; }
.example .translation { color: var(--muted); }
.example cite { display: block; font-style: normal; font-size: .76rem; color: var(--muted); margin-top: .2rem; overflow-wrap: anywhere; }
.example.quotation { border-left-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
details > summary { cursor: pointer; color: var(--accent-ink); font-size: .85rem; font-weight: 600; }
.more-examples, .more-chips { margin-top: .35rem; }
.sense-rel { font-size: .88rem; margin: .45rem 0 0; color: var(--ink-2); }
.rel-label { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--good); }
.thes { padding: .7rem 0; border-top: 1px solid var(--line); }
.thes:first-of-type { border-top: 0; }
.thes-gloss { margin: 0 0 .4rem; color: var(--ink-2); font-size: .95rem; }
.pos-mini { font-size: .72rem; font-weight: 800; text-transform: lowercase; color: var(--muted); margin-right: .5rem; }
.thes-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: .25rem 0; }
.thes-row .chips { flex: 1; min-width: 0; }
.origin { margin-bottom: 1.4rem; }
.origin-for { font-weight: 700; color: var(--muted); margin: 0 0 .4rem; }
.origin-prose { color: var(--ink-2); overflow-wrap: anywhere; }
.origin-links { font-size: .9rem; color: var(--muted); }
h3.mini { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 1rem 0 .4rem; }

/* lineage */
.lineage { list-style: none; margin: .2rem 0 1rem; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.lineage li { display: flex; flex-direction: column; padding: .55rem .85rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); position: relative; min-width: 0; }
.lineage li:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; z-index: 1; }
.lineage li.today { background: var(--ink); border-color: var(--ink); }
.lineage li.today .lang, .lineage li.today .term { color: var(--bg); }
.lineage .lang { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.lineage .term { font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; }
.lineage .lgloss { color: var(--muted); font-size: .8rem; }
.lineage.compact li { padding: .35rem .7rem; }

/* translations */
.translations { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 20px; }
.translations details { padding: .45rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.translations summary { color: var(--ink); font-weight: 600; font-size: .92rem; list-style: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.translations summary::-webkit-details-marker { display: none; }
.tprev { color: var(--muted); font-weight: 400; }
.translations ul { margin: .4rem 0; padding-left: 1rem; font-size: .9rem; }
.tsense { display: block; color: var(--muted); font-size: .78rem; }
.roman { color: var(--muted); }

.nearby { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.nearby li { padding: .2rem 0; }
.nearby a { text-decoration: none; color: var(--ink-2); }
.nearby a:hover { color: var(--accent-ink); }
.nearby .current { font-weight: 800; color: var(--ink); }
.plain { list-style: none; padding: 0; margin: 0; }

.cite-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem 1rem; }
.cite-row { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: .6rem; align-items: center; border-top: 1px solid var(--line); padding: .55rem 0; margin-top: .5rem; }
.cite-row p { margin: 0; font-size: .85rem; overflow-wrap: anywhere; }
.cite-style { font-weight: 700; font-size: .78rem; color: var(--muted); }
.attribution { font-size: .8rem; color: var(--muted); }

/* ---------- lists, results, tools ---------- */
.brief-list { list-style: none; margin: 0; padding: 0; }
.brief-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .15rem .8rem; align-items: baseline; min-width: 0; }
.brief-list li:last-child { border-bottom: 0; }
.brief-list a { font-weight: 700; text-decoration: none; }
.brief-list a:hover { color: var(--accent-ink); }
.brief-def { color: var(--ink-2); font-size: .92rem; flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.results h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 850; letter-spacing: -.04em; margin: .2rem 0 .8rem; }
.lede { color: var(--ink-2); font-size: 1.08rem; max-width: 44rem; margin: 0 0 1.2rem; }
.result-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.card h2 { font-size: 1.05rem; font-weight: 800; margin-bottom: .6rem; }
.dym { font-size: 1.2rem; }
.empty { background: var(--surface); border: 1px dashed var(--line); padding: 1rem 1.2rem; border-radius: var(--r); }
.tool-form { display: flex; gap: 8px; max-width: 640px; margin: 0 0 1.6rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px; padding: 5px; }
.tool-form:focus-within { border-color: var(--accent); }
.tool-form input { flex: 1; min-width: 0; font: 500 1.05rem var(--sans); color: var(--ink); background: transparent; border: 0; padding: .55rem .8rem; outline: none; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tool { display: flex; flex-direction: column; gap: .25rem; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; transition: border-color .15s, transform .15s; }
.tool:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool strong { font-size: 1.05rem; color: var(--ink); }
.tool span { color: var(--muted); font-size: .9rem; }
.section { margin: 1.8rem 0; }
.section h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: .6rem; }
.pager, .filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.2rem 0; }
.pager a { font-weight: 700; text-decoration: none; color: var(--accent-ink); }
.filters a { text-decoration: none; padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .9rem; font-weight: 600; }
.filters a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters a[aria-current="page"] .count { color: inherit; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--accent-ink); margin: 0; }
.eyebrow a { color: inherit; text-decoration: none; }
.origin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 1rem 0 2rem; }
.origin-card { display: flex; flex-direction: column; gap: .2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-decoration: none; transition: border-color .15s; }
.origin-card:hover { border-color: var(--accent); }
.origin-card strong { font-size: 1.02rem; }
.origin-card span { color: var(--muted); font-size: .85rem; }
.origin-card .bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: .4rem; }
.origin-card .fill { display: block; height: 100%; background: var(--accent); width: 0; }
.archive { list-style: none; padding: 0; }
.archive li { display: flex; flex-wrap: wrap; gap: .2rem 1rem; align-items: baseline; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.archive time { color: var(--muted); font-size: .85rem; min-width: 7rem; }
.archive a { font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.25rem; font-weight: 800; margin: 1.6rem 0 .5rem; }
.api { border-collapse: collapse; width: 100%; font-size: .92rem; }
.api th, .api td { text-align: left; padding: .55rem; border-bottom: 1px solid var(--line); vertical-align: top; }

/* ---------- word of the day page ---------- */
.wotd-page { max-width: 760px; margin: 0 auto; }
.wotd-word { font-size: clamp(3rem, 12vw, 5.5rem); font-weight: 850; letter-spacing: -.055em; line-height: 1; margin: .5rem 0 .3rem; overflow-wrap: anywhere; }
.wotd-page .syllables { color: var(--muted); margin: 0; }
.wotd-page .pron { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: .8rem 0; }
.wotd-pos { font-weight: 700; color: var(--accent-ink); margin: .3rem 0; }
.wotd-body section { margin: 1.8rem 0; }
.wotd-body h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: .5rem; }
.wotd-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 1.6rem 0; }
.wotd-nav { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.6rem; }
.wotd-nav a { font-weight: 700; text-decoration: none; }
.pron { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.pron-label { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: .35rem; }

/* ---------- quiz ---------- */
.quiz-word { font-size: 1.5em; font-weight: 850; letter-spacing: -.03em; }
.quiz-options { display: grid; gap: 10px; max-width: 720px; }
.quiz-options button { text-align: left; font: 500 1rem var(--sans); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: .95rem 1.1rem; cursor: pointer; transition: border-color .12s, transform .12s; }
.quiz-options button:hover { border-color: var(--accent); transform: translateX(3px); }
.quiz-result { border-radius: 14px; padding: .9rem 1.1rem; margin-bottom: 1.2rem; border: 1.5px solid; }
.quiz-result.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); }
.quiz-result.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.verdict { font-weight: 800; font-size: 1.15rem; margin: 0 0 .2rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 20px; font-size: .9rem; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 24px; }
.site-footer h2 { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .2rem 0; }
.site-footer li a { text-decoration: none; color: var(--ink-2); }
.site-footer li a:hover { color: var(--accent-ink); }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.05rem; margin: 0 0 .4rem; }
.footer-brand .logo { width: 22px; height: 22px; }
.site-footer p { color: var(--ink-2); }
.footer-home a { font-weight: 700; }
.footer-legal { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; color: var(--muted); font-size: .8rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-legal p { margin: 0; max-width: 52rem; color: var(--muted); }
.footer-links a { font-weight: 700; color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .word-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .home-grid { grid-template-columns: 1fr; }
  .hero-modes, .tiles { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav a { padding: .4rem .5rem; }
}
@media (max-width: 720px) {
  .bar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 10px; }
  .brand { order: 1; }
  .theme-toggle { order: 2 !important; margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .is-home .site-header .search { display: none; }
  .bar > .main-nav { order: 4 !important; flex-basis: 100%; margin-left: 0; }
  .jump { top: 0; }
  html { scroll-padding-top: 60px; }
  .site-header { position: static; }
  .hero { padding: 24px 0 24px; }
  .hero-search { flex-direction: row; }
  .hero-search button { padding: .75rem 1rem; }
  .answer-top { flex-direction: column; }
  .k { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .cite-row { grid-template-columns: 1fr auto; }
  .cite-style { grid-column: 1 / -1; }
  .senses { padding-left: 1.4rem; }
  .lineage li:not(:last-child)::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .site-header, .site-footer, .sidebar, .answer-actions, .jump, .cite-box button { display: none !important; }
  body { background: #fff; color: #000; }
  .word-layout { display: block; }
}
.brand span { font-weight: 500; color: var(--muted); }
.brand span b { font-weight: 800; color: var(--ink); }

/* infinite lists */
.feed-sentinel { height: 1px; }
.has-feed .pager { display: none; }
.feed-status { text-align: center; min-height: 1.5em; }

/* lighter in-text links */
.gloss a, .answer-def a, .origin-prose a { color: inherit; text-decoration: underline dotted color-mix(in srgb, var(--ink) 30%, transparent); text-underline-offset: 3px; }
.gloss a:hover, .answer-def a:hover, .origin-prose a:hover { color: var(--accent-ink); text-decoration: underline solid var(--accent); }

/* ask AI */
.ask-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ask-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-right: 4px; }
.ai-link { font-size: .8rem; font-weight: 600; text-decoration: none; padding: .22rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.ai-link:hover { border-color: var(--accent); color: var(--ink); }
.facts .ask-ai { flex-basis: 100%; margin-top: .4rem; }
.footer-legal .ask-ai { flex-basis: 100%; order: -1; padding-bottom: 12px; }

/* =====================================================================
   Unified system (v3): one skeleton, one card, one icon badge, sticky footer
   ===================================================================== */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
main { flex: 1 0 auto; width: 100%; }
.site-footer { flex-shrink: 0; }

/* header: identical on every page */
.is-home .site-header .search { visibility: visible; display: flex; }
.main-nav a { display: inline-flex; align-items: center; gap: .4rem; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico .fill { fill: currentColor; stroke: none; }
.main-nav .ico { width: 17px; height: 17px; color: var(--muted); }
.main-nav a[aria-current="page"] .ico, .main-nav a:hover .ico { color: var(--accent); }
.theme-toggle .sun { display: none; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
.theme-toggle .sun circle { fill: var(--ink-2); stroke: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
}

/* one card language */
.card, .panel, .feature, .tile, .hero-modes a, .tool, .cite-box, .empty {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}
a.feature, .tile, .hero-modes a, .tool { transition: border-color .15s, transform .15s, box-shadow .15s; }
a.feature:hover, .tile:hover, .hero-modes a:hover, .tool:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-icon, .page-icon, .hero-modes a > .ico, .tile > .ico, .tool > .ico {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.hero-modes a > .ico, .tile > .ico, .tool > .ico { padding: 11px; box-sizing: border-box; margin-bottom: .55rem; }
.feature-icon .ico, .page-icon .ico { width: 22px; height: 22px; }

/* page header, same on every non-word page */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin: 4px 0 26px; }
.page-head .page-icon { width: 56px; height: 56px; border-radius: 16px; }
.page-head .page-icon .ico { width: 28px; height: 28px; }
.page-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 850; letter-spacing: -.04em; margin: 0; }
.page-head .lede { margin: .35rem 0 0; }
.results h1 { margin: 0; }
.wotd-page { max-width: none; }

/* features (tools page) */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.feature { display: flex; flex-direction: column; gap: 14px; padding: 22px; text-decoration: none; color: var(--ink); }
.feature-top { display: flex; gap: 14px; align-items: flex-start; }
.feature h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 .15rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }
.feature-form { display: flex; gap: 6px; background: var(--surface-2); border: 1.5px solid transparent; border-radius: 13px; padding: 4px; }
.feature-form:focus-within { border-color: var(--accent); background: var(--surface); }
.feature-form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 1rem var(--sans); padding: .5rem .7rem; outline: none; }
.feature-form button { flex: none; width: 42px; border: 0; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 1.1rem; font-weight: 800; cursor: pointer; }
.feature-try { font-size: .85rem !important; }
.feature-try a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.feature-cta { margin-top: auto; font-weight: 700; color: var(--accent-ink); font-size: .92rem; }

/* home hero with illustration */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 24px; text-align: left; padding: 40px 0 28px; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); }
.hero-search { margin: 1.8rem 0 0; }
.hero-visual { display: flex; justify-content: center; }
.hero-art { width: 100%; max-width: 460px; height: auto; overflow: visible; }
.ha-page { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.ha-spine { fill: var(--line); }
.ha-lines path { fill: none; stroke: var(--line); stroke-width: 5; stroke-linecap: round; }
.ha-shadow { fill: var(--ink); opacity: .07; }
.ha-trail { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 6; opacity: .7; }
.ha-tile { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.ha-tile.hot { fill: var(--accent); stroke: var(--accent); }
.ha-letter { font: 800 26px var(--sans); text-anchor: middle; fill: var(--ink); }
.ha-letter.sm { font-size: 20px; }
.ha-letter.on { fill: var(--on-accent); }
.ha-dot { fill: var(--accent); opacity: .6; }
.ha-float { animation: ha-bob 6s ease-in-out infinite; transform-origin: center; }
@keyframes ha-bob { 50% { transform: translateY(-6px); } }
.hero-modes { max-width: none; margin: 0 0 28px; }
.hero-modes a { padding: 16px; }

/* letter tiles */
.tiles-art { height: 34px; width: auto; max-width: 100%; display: block; }
.t-bg { fill: var(--surface-2); stroke: var(--line); }
.t-edge { fill: var(--line); }
.t-l { font: 800 18px var(--sans); text-anchor: middle; fill: var(--ink); }
.t-p { font: 700 8px var(--sans); text-anchor: end; fill: var(--muted); }
.answer-tiles { margin: 0 0 .9rem; overflow-x: auto; scrollbar-width: none; }
.wotd-tiles .tiles-art { height: 28px; }
.wotd-tiles .t-bg { fill: rgb(255 255 255 / 12%); stroke: rgb(255 255 255 / 20%); }
.wotd-tiles .t-edge { fill: rgb(255 255 255 / 20%); }
.wotd-tiles .t-l { fill: var(--bg); }
.wotd-tiles .t-p { fill: var(--bg); opacity: .7; }
.meter { width: 22px; height: 12px; margin-right: .35rem; vertical-align: -1px; }
.meter .on { fill: var(--accent); }
.meter .off { fill: var(--line); }
.fact { display: inline-flex; align-items: center; }

/* bar chart (origins) */
.barchart { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
.barchart a { display: grid; grid-template-columns: 9.5rem 1fr 4.5rem; align-items: center; gap: 12px; padding: .5rem .2rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.barchart a:hover .bc-label { color: var(--accent-ink); }
.bc-label { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-bar { width: 100%; height: 10px; }
.bc-track { fill: var(--surface-2); }
.bc-fill { fill: var(--accent); }
.bc-val { text-align: right; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }

@media (max-width: 960px) {
  .features { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: -1; }
  .hero-art { max-width: 300px; }
  .barchart { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .is-home .site-header .search { display: flex; }
  .main-nav .ico { width: 16px; height: 16px; }
  .hero { padding: 12px 0 18px; text-align: left; }
  .hero-art { max-width: 220px; }
  .hero-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head .page-icon { width: 46px; height: 46px; }
  .barchart a { grid-template-columns: 7.5rem 1fr 3.6rem; }
}
@media (prefers-reduced-motion: reduce) { .ha-float { animation: none; } }
.main-nav a[aria-current="page"] { font-weight: 500; background: var(--surface-2); }
.search { flex: 1 1 420px; }
/* letter tiles: solid, readable in both themes */
.tiles-art { height: 40px; }
.t-bg { fill: var(--accent-soft); stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 1.2; }
.t-edge { fill: color-mix(in srgb, var(--accent) 35%, transparent); }
.t-l { fill: var(--accent-ink); }
.t-p { fill: var(--accent-ink); opacity: .75; }
.wotd-tiles .tiles-art { height: 30px; }
.wotd-tiles .t-bg { fill: var(--accent); stroke: var(--accent); }
.wotd-tiles .t-edge { fill: rgb(0 0 0 / 18%); }
.wotd-tiles .t-l, .wotd-tiles .t-p { fill: var(--on-accent); opacity: 1; }
@media (max-width: 720px) { .tiles-art { height: 32px; } }

/* wider canvas */
.wrap { max-width: 1440px; padding: 0 24px; }
@media (min-width: 961px) { .word-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; } }
.features { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.tiles { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.hero-modes { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.barchart { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
@media (max-width: 720px) { .wrap { padding: 0 16px; } .features, .tiles, .hero-modes, .barchart { grid-template-columns: minmax(0, 1fr); } .hero-modes, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* centered landing / empty states */
.landing { max-width: 820px; margin: 0 auto; padding: 28px 0 8px; text-align: center; }
.landing h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 850; letter-spacing: -.045em; margin: 0 0 .5rem; }
.landing .lede { margin: 0 auto 1.6rem; max-width: 38rem; }
.landing-badge { position: relative; width: 132px; height: 132px; margin: 0 auto 1.4rem; display: grid; place-items: center; }
.landing-badge .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.landing-badge .r1 { animation: spin 40s linear infinite; }
.landing-badge .r2 { inset: 18px; border-style: solid; border-color: var(--line); background: var(--surface); }
.landing-icon { position: relative; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent); }
.landing-icon .ico { width: 32px; height: 32px; stroke-width: 2; }
@keyframes spin { to { transform: rotate(360deg); } }
.landing-form { position: relative; display: flex; align-items: center; max-width: 640px; margin: 0 auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 6px; box-shadow: var(--shadow); text-align: left; }
.landing-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow); }
.landing-form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 1.15rem var(--sans); padding: .7rem .9rem; outline: none; }
.landing-form button { flex: none; font: 700 1rem var(--sans); border: 0; border-radius: 13px; background: var(--accent); color: var(--on-accent); padding: .8rem 1.3rem; cursor: pointer; }
.landing-try { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 1rem 0 0; }
.landing-try > span { color: var(--muted); font-size: .85rem; font-weight: 600; margin-right: 4px; }
.steps { list-style: none; padding: 0; margin: 2.6rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; text-align: left; }
.steps li { display: flex; flex-direction: column; gap: .2rem; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.step-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--ink); color: var(--bg); margin-bottom: .4rem; }
.steps strong { font-size: 1rem; }
.steps li > span:last-child { color: var(--muted); font-size: .9rem; }
.landing-popular { margin-top: 2.2rem; }
.landing-popular h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: .7rem; }
.chips.center { justify-content: center; }
.next-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 2.4rem; text-align: left; }
.next-steps .tile { padding: 18px; }

/* A–Z tiles */
.letter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.letter-tile { display: flex; flex-direction: column; gap: .3rem; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.letter-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.lt-char { font-size: 2.6rem; font-weight: 850; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.letter-tile:hover .lt-char { color: var(--accent-ink); }
.lt-count { color: var(--muted); font-size: .82rem; font-weight: 600; }
.lt-bar { width: 100%; height: 4px; margin-top: .3rem; }
@media (max-width: 720px) {
  .steps, .next-steps { grid-template-columns: minmax(0, 1fr); }
  .landing-badge { width: 104px; height: 104px; }
  .landing-form button { padding: .75rem 1rem; }
  .letter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lt-char { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { .landing-badge .r1 { animation: none; } }
.results > .brief-list, .results > ul.brief-list { columns: 2 460px; column-gap: 40px; }
.results > .brief-list li { break-inside: avoid; }
[hidden] { display: none !important; }
html { scroll-padding-top: 140px; } @media (max-width: 720px) { html { scroll-padding-top: 64px; } }

/* ===== v5: themed background, calmer night mode, etymology ===== */
:root { --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='rgba%289,9,11,0.05%29'%3E%3Crect x='20' y='30' width='3' height='34'/%3E%3Crect x='26' y='30' width='1.5' height='34'/%3E%3Crect x='30' y='30' width='4' height='34'/%3E%3Crect x='37' y='30' width='1.5' height='34'/%3E%3Crect x='41' y='30' width='3' height='34'/%3E%3Crect x='47' y='30' width='1.5' height='34'/%3E%3Crect x='51' y='30' width='4' height='34'/%3E%3Crect x='170' y='150' width='9' height='9'/%3E%3Crect x='182' y='150' width='3' height='3'/%3E%3Crect x='170' y='162' width='3' height='3'/%3E%3Crect x='176' y='166' width='6' height='3'/%3E%3Crect x='186' y='160' width='3' height='9'/%3E%3Crect x='150' y='40' width='14' height='14' fill='none' stroke='rgba%289,9,11,0.05%29' stroke-width='2'/%3E%3Crect x='154' y='44' width='6' height='6'/%3E%3C/g%3E%3Cg fill='rgba%289,9,11,0.05%29' font-family='ui-monospace,monospace' font-size='15' font-weight='700'%3E%3Ctext x='110' y='118' transform='rotate%28-6 110 118%29'%3EEAN%3C/text%3E%3Ctext x='26' y='200' transform='rotate%286 26 200%29'%3EQR%3C/text%3E%3Ctext x='196' y='236'%3E128%3C/text%3E%3Ctext x='60' y='120'%3E0%3C/text%3E%3C/g%3E%3C/svg%3E"); --feature-bg: #0c0a09; --feature-ink: #fafaf9; --glow: rgb(234 88 12 / 10%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='rgba%28250,250,250,0.045%29'%3E%3Crect x='20' y='30' width='3' height='34'/%3E%3Crect x='26' y='30' width='1.5' height='34'/%3E%3Crect x='30' y='30' width='4' height='34'/%3E%3Crect x='37' y='30' width='1.5' height='34'/%3E%3Crect x='41' y='30' width='3' height='34'/%3E%3Crect x='47' y='30' width='1.5' height='34'/%3E%3Crect x='51' y='30' width='4' height='34'/%3E%3Crect x='170' y='150' width='9' height='9'/%3E%3Crect x='182' y='150' width='3' height='3'/%3E%3Crect x='170' y='162' width='3' height='3'/%3E%3Crect x='176' y='166' width='6' height='3'/%3E%3Crect x='186' y='160' width='3' height='9'/%3E%3Crect x='150' y='40' width='14' height='14' fill='none' stroke='rgba%28250,250,250,0.045%29' stroke-width='2'/%3E%3Crect x='154' y='44' width='6' height='6'/%3E%3C/g%3E%3Cg fill='rgba%28250,250,250,0.045%29' font-family='ui-monospace,monospace' font-size='15' font-weight='700'%3E%3Ctext x='110' y='118' transform='rotate%28-6 110 118%29'%3EEAN%3C/text%3E%3Ctext x='26' y='200' transform='rotate%286 26 200%29'%3EQR%3C/text%3E%3Ctext x='196' y='236'%3E128%3C/text%3E%3Ctext x='60' y='120'%3E0%3C/text%3E%3C/g%3E%3C/svg%3E"); --feature-bg: #1a1512; --feature-ink: #f5f0eb; --glow: rgb(251 146 60 / 7%); } }
:root[data-theme="dark"] { --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='rgba%28250,250,250,0.045%29'%3E%3Crect x='20' y='30' width='3' height='34'/%3E%3Crect x='26' y='30' width='1.5' height='34'/%3E%3Crect x='30' y='30' width='4' height='34'/%3E%3Crect x='37' y='30' width='1.5' height='34'/%3E%3Crect x='41' y='30' width='3' height='34'/%3E%3Crect x='47' y='30' width='1.5' height='34'/%3E%3Crect x='51' y='30' width='4' height='34'/%3E%3Crect x='170' y='150' width='9' height='9'/%3E%3Crect x='182' y='150' width='3' height='3'/%3E%3Crect x='170' y='162' width='3' height='3'/%3E%3Crect x='176' y='166' width='6' height='3'/%3E%3Crect x='186' y='160' width='3' height='9'/%3E%3Crect x='150' y='40' width='14' height='14' fill='none' stroke='rgba%28250,250,250,0.045%29' stroke-width='2'/%3E%3Crect x='154' y='44' width='6' height='6'/%3E%3C/g%3E%3Cg fill='rgba%28250,250,250,0.045%29' font-family='ui-monospace,monospace' font-size='15' font-weight='700'%3E%3Ctext x='110' y='118' transform='rotate%28-6 110 118%29'%3EEAN%3C/text%3E%3Ctext x='26' y='200' transform='rotate%286 26 200%29'%3EQR%3C/text%3E%3Ctext x='196' y='236'%3E128%3C/text%3E%3Ctext x='60' y='120'%3E0%3C/text%3E%3C/g%3E%3C/svg%3E"); --feature-bg: #1a1512; --feature-ink: #f5f0eb; --glow: rgb(251 146 60 / 7%); }
body { background-color: var(--bg); background-image: radial-gradient(1200px 520px at 50% -120px, var(--glow), transparent 70%), var(--pattern); background-repeat: no-repeat, repeat; background-size: 100% 900px, 260px 260px; }
.site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); }
.site-footer { background: var(--surface); }

/* Word of the Day card: dark warm panel in both themes, never an inverted white slab */
.wotd-card { background: var(--feature-bg); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line)); }
.wotd-card > * { color: var(--feature-ink); }
.wotd-card::after { opacity: .22; }
.wotd-tiles .t-bg { fill: color-mix(in srgb, var(--accent) 85%, black); stroke: none; }

.button.ghost { background: transparent; color: var(--accent-ink); border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent); padding: .6rem 1rem; font-size: .92rem; margin-top: .4rem; }
.button.ghost:hover { background: var(--accent-soft); color: var(--accent-ink); filter: none; }
.origin-prose.big { font-size: 1.08rem; line-height: 1.75; }

/* word stories */
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.story { display: flex; flex-direction: column; gap: .45rem; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.story:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.story-word { font-size: 1.6rem; font-weight: 850; letter-spacing: -.035em; }
.story-text { color: var(--ink-2); font-size: .93rem; line-height: 1.55; }
.story-go { margin-top: auto; font-weight: 700; font-size: .88rem; color: var(--accent-ink); }

/* roots */
.roots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.root { display: flex; flex-direction: column; gap: .15rem; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.root:hover { border-color: var(--accent); transform: translateY(-2px); }
.root-lang { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.root-term { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.root-n { font-size: .82rem; color: var(--accent-ink); font-weight: 600; }

/* lineage timeline */
.timeline { list-style: none; margin: .4rem 0 1.4rem; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(var(--line), var(--accent)); }
.timeline li { position: relative; padding: .55rem 0 .55rem 40px; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; }
.tl-dot { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.timeline li.now .tl-dot { background: var(--accent); width: 20px; height: 20px; left: 2px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); }
.tl-lang { flex-basis: 100%; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.tl-term { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.timeline li.now .tl-term { color: var(--accent-ink); }
.tl-gloss { color: var(--muted); font-style: italic; }
.ety-head .eyebrow { margin-bottom: .6rem; }
.ety-head .facts .fact { white-space: normal; }

/* ===== VIN Decoder ===== */
.hero-modes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .hero-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.logo .logo-page { fill: none; stroke: var(--bg); stroke-width: 1.6; }
.logo .logo-spine { stroke: var(--accent); stroke-width: 2.5; }
.hero-search input, .vin-search input, .search input { text-transform: none; }
.vin-search input { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.vin-search input::placeholder { font-family: var(--sans); letter-spacing: 0; text-transform: none; }
.answer-row .vin-search { flex: 1 1 320px; margin: 0; max-width: 560px; }
.answer-row .vin-search input { padding-top: .7rem; padding-bottom: .7rem; font-size: 1rem; }
.answer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 1.2rem; }
.crumbs { margin: 12px 0 14px; }
.crumbs a { color: var(--muted); }
.eyebrow code { font-family: var(--mono); font-size: .95em; letter-spacing: .06em; color: var(--ink); }
.trim { color: var(--accent-ink); font-weight: 800; }

/* hero art */
.ha-body { fill: var(--surface); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.ha-glass { fill: var(--surface-2); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.ha-line { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.ha-tyre { fill: var(--ink); }
.ha-hub { fill: var(--surface-2); stroke: var(--accent); stroke-width: 3; }
.ha-pin { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.ha-plate { fill: var(--surface); stroke: var(--line); stroke-width: 2; filter: drop-shadow(0 8px 18px rgb(0 0 0 / 12%)); }
.ha-seg { opacity: .9; }
.ha-vin { font: 700 15px var(--mono); text-anchor: middle; fill: var(--ink); letter-spacing: .05em; }
.ha-tag { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.ha-tag.hot { fill: var(--accent); stroke: var(--accent); }
.ha-tagt { font: 700 13px var(--sans); text-anchor: middle; fill: var(--ink-2); }
.ha-tagt.on { fill: var(--on-accent); }
.ha-seg.s0, .vs-group.s0 { --seg: #f97316; }
.ha-seg.s1, .vs-group.s1 { --seg: #0ea5e9; }
.ha-seg.s2, .vs-group.s2 { --seg: #22c55e; }
.ha-seg.s3, .vs-group.s3 { --seg: #eab308; }
.ha-seg.s4, .vs-group.s4 { --seg: #ec4899; }
.ha-seg.s5, .vs-group.s5 { --seg: #64748b; }
.ha-seg { fill: color-mix(in srgb, var(--seg) 22%, transparent); stroke: var(--seg); stroke-width: 1.5; }

/* VIN breakdown */
.vinstrip { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.4rem 0 .4rem; }
.vs-group { flex: var(--n, 1) 1 auto; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.vs-group.s0 { --n: 3; } .vs-group.s1 { --n: 5; } .vs-group.s5 { --n: 6; }
.vs-chars { display: flex; gap: 3px; padding: 6px; border-radius: 12px; background: color-mix(in srgb, var(--seg) 14%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--seg) 55%, transparent); }
.vs-c { flex: 1 0 auto; min-width: 1.6rem; text-align: center; font: 800 1.35rem/1.9rem var(--mono); color: var(--ink); background: var(--surface); border-radius: 7px; }
.vs-group.bad .vs-chars { --seg: var(--bad); }
.vs-group.bad .vs-desc { color: var(--bad); }
.vs-name { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: color-mix(in srgb, var(--seg) 70%, var(--ink)); }
.vs-desc { font-size: .84rem; color: var(--ink-2); line-height: 1.35; overflow-wrap: anywhere; }
.vinstrip.static { margin: 1rem 0 1.4rem; }

/* checks */
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.check { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px; background: var(--surface-2); font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.check .ico { width: 18px; height: 18px; }
.check.ok { background: color-mix(in srgb, var(--good) 14%, var(--surface)); color: var(--good); }
.check.bad, .check.hot { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }
.decode-note { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .9rem; margin: .8rem 0 0; }
.decode-note .ico { width: 18px; height: 18px; flex: none; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 1.2rem; }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.stat:hover { border-color: var(--accent); transform: translateY(-2px); }
.stat-icon { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.stat-icon .ico { width: 24px; height: 24px; }
.stat-n { font-size: 1.7rem; font-weight: 850; letter-spacing: -.04em; line-height: 1.1; }
.stat-l { font-size: .85rem; color: var(--muted); font-weight: 600; }
.stat.hot { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.stat.hot .stat-icon { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.stat.hot .stat-n { color: var(--bad); }

/* notice */
.notice { display: flex; gap: 14px; align-items: flex-start; margin: 18px 0; padding: 16px 20px; border-radius: 18px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.notice > .ico { width: 28px; height: 28px; flex: none; color: var(--accent-ink); margin-top: .1rem; }
.notice p { margin: .2rem 0; }
.notice .button.ghost { margin-top: .5rem; }

/* specs */
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.spec { padding: 18px 20px; }
.spec h3 { font-size: 1rem; font-weight: 800; margin: 0 0 .6rem; }
.spec dl { margin: 0; }
.spec dl > div { display: flex; justify-content: space-between; gap: 16px; padding: .38rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.spec dl > div:first-child { border-top: 0; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }

/* recall, complaint, bulletin lists */
.rlist, .clist, .blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rlist { grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.rcard { padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.rc-head { display: flex; gap: 14px; align-items: flex-start; }
.rc-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }
.rc-icon .ico { width: 22px; height: 22px; }
.rc-title { display: block; font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; line-height: 1.3; }
a.rc-title:hover { color: var(--accent-ink); }
.rc-meta, .ci-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--muted); margin-top: .25rem; align-items: center; }
.rc-text { margin: .7rem 0 0; color: var(--ink-2); font-size: .95rem; }
.rc-more { margin-top: .6rem; }
.rc-more summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); font-size: .9rem; }
.rc-more h4 { margin: .8rem 0 .2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rc-more p { margin: 0 0 .4rem; font-size: .93rem; }
.tag { display: inline-flex; padding: .08rem .5rem; border-radius: 6px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.tag.hot { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.wotd-card .tag { background: none; padding: 0; color: inherit; }
.clist { gap: 0; columns: 2 520px; column-gap: 28px; display: block; }
.citem { break-inside: avoid; padding: 14px 0; border-top: 1px solid var(--line); }
.ci-comp { display: block; margin-top: .3rem; font-size: .95rem; }
.ci-text { margin: .35rem 0 0; color: var(--ink-2); font-size: .93rem; }
details.ci-text summary { cursor: pointer; list-style: none; }
details.ci-text summary::after { content: " more"; color: var(--accent-ink); font-weight: 700; }
details.ci-text[open] summary { display: none; }
details.ci-text p { margin: 0; }
.blist { display: block; columns: 2 520px; column-gap: 28px; }
.bitem { break-inside: avoid; display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .93rem; }
.b-id { flex: none; font: 600 .8rem/1.6 var(--mono); color: var(--muted); min-width: 5.5rem; }
.b-text { color: var(--ink-2); }
.sec-title { display: flex; align-items: center; gap: .6rem; }
.sec-title .ico { width: 28px; height: 28px; color: var(--accent); }
.sec { scroll-margin-top: 130px; }

/* charts */
.chart-card { padding: 18px 20px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin: 1rem 0; }
.chart-card.flat { padding: 0; border: 0; background: none; margin: .4rem 0 0; }
.yearchart { width: 100%; height: auto; display: block; }
.yc-axis { stroke: var(--line); stroke-width: 2; }
.yc-hit { fill: transparent; }
.yc-bar { fill: color-mix(in srgb, var(--accent) 75%, transparent); transition: fill .15s; }
.yearchart a:hover .yc-bar { fill: var(--accent); }
.yc-dot { fill: var(--bad); stroke: var(--surface); stroke-width: 2; }
.yc-label { font: 600 20px var(--sans); fill: var(--muted); text-anchor: middle; }
.recall-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 18px 0; }
.recall-overview .card { padding: 20px; }
.recall-overview h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
@media (min-width: 961px) { .recall-overview { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

/* make / year / affected grids */
.make-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 1rem; }
.lt-char.mk { font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.brief-list.cols { columns: 4 220px; column-gap: 28px; }
.brief-list.cols li { break-inside: avoid; }
.affected { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.aff { padding: 16px 18px; }
.aff-name { display: block; font-weight: 800; font-size: 1.05rem; margin-bottom: .5rem; color: var(--ink); text-decoration: none; }
.rc-block { margin-top: 1.2rem; padding: 16px 20px; border-radius: 16px; background: var(--surface-2); }
.rc-block.hot { background: color-mix(in srgb, var(--bad) 9%, var(--surface)); }
.rc-block h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .3rem; }
.rc-block p { margin: 0; }
.where { margin: 34px 0 10px; }
.where h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 14px; }
.landing .where { text-align: left; width: 100%; }
.pager { margin-top: 1rem; }
.has-feed .pager { display: none; }

@media (max-width: 960px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .vs-c { min-width: 1.15rem; font-size: 1.05rem; line-height: 1.6rem; }
  .vs-group { flex-basis: 100%; }
  .vs-group.s2, .vs-group.s3, .vs-group.s4 { flex-basis: calc(33% - 8px); }
  .stat { padding: 12px; column-gap: 10px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-n { font-size: 1.35rem; }
  .make-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec dl > div { flex-direction: column; gap: 0; }
  .spec dd { text-align: left; }
}
.answer .answer-word { display: block; }
.answer .answer-pos { text-transform: none; color: var(--ink-2); font-style: normal; }
.answer .ask-ai { margin-top: 1.2rem; }
.answer .eyebrow { margin: 0 0 .4rem; }
.yc-label { font-size: 15px; }
.recall-overview { align-items: start; }
.answer-row .k { white-space: nowrap; }
.answer h1.long { font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1.1; }
.where .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .where .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }



/* ===== WatkinsX shell integration ===== */
.site-bar { position: sticky; top: var(--wx-header-h, 60px); z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.site-bar .bar { min-height: 58px; }
.site-bar .search { flex: 1 1 420px; max-width: 640px; }
html { scroll-padding-top: calc(var(--wx-header-h, 60px) + 70px); }
.jump { top: calc(var(--wx-header-h, 60px) + 58px); }
.wx-footer__site .ask-ai { margin-top: 6px; }
.wx-footer__site .ai-link { background: rgb(255 255 255 / 8%); border-color: rgb(255 255 255 / 14%); color: inherit; }
#wx-footer:not(:has(.wx-footer)) { padding: 32px 24px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 720px) { .site-bar .bar { flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; } .site-bar .search { flex-basis: 100%; } }

/* ===== Barcode ===== */
.hero-codes { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 24px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-codes svg { max-width: 100%; height: auto; }
.hero-codes .anat { width: 100%; }
.hero-codes > svg:last-child { width: 180px; }
.hero-modes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .hero-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* anatomy */
.anat-card { padding: 20px; }
svg.anat { width: 100%; height: auto; display: block; background: #fff; border-radius: 12px; }
svg.anat .bar { fill: #111; }
svg.anat .hit { fill: transparent; }
svg.anat .seg { cursor: pointer; outline: none; }
svg.anat .seg:hover .hit, svg.anat .seg:focus .hit, svg.anat .seg.on .hit { fill: rgb(234 88 12 / 18%); }
svg.anat .seg.guard .bar { fill: #ea580c; }
svg.anat .seg.check .bar { fill: #0369a1; }
svg.anat .dig { font: 700 22px ui-monospace, Menlo, monospace; text-anchor: middle; fill: #111; }
svg.anat .seg.on .dig, svg.anat .seg:hover .dig { fill: #c2410c; }
.anat-note { margin: .8rem 0 0; font-weight: 600; color: var(--ink-2); min-height: 1.5em; }

/* QR anatomy */
.qr-anat-card { padding: 20px; margin-top: 16px; }
.qr-anat-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 961px) { .qr-anat-grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); } }
svg.qr-anat { width: 100%; max-width: 420px; height: auto; border-radius: 12px; }
.qa-bg { fill: #fff; }
.qa .qa-d { fill: #111; } .qa .qa-l { fill: #fff; }
.qa.finder .qa-d { fill: #c2410c; } .qa.finder .qa-l { fill: #ffe4d1; }
.qa.sep .qa-l { fill: #fff3eb; }
.qa.timing .qa-d { fill: #0369a1; } .qa.timing .qa-l { fill: #dbeefe; }
.qa.align .qa-d { fill: #15803d; } .qa.align .qa-l { fill: #dcfce7; }
.qa.format .qa-d { fill: #a21caf; } .qa.format .qa-l { fill: #fae8ff; }
.qa.version .qa-d { fill: #b45309; } .qa.version .qa-l { fill: #fef3c7; }
.qa.darkmod .qa-d { fill: #be123c; }
.qa { transition: opacity .15s; }
svg.qr-anat[data-focus] .qa { opacity: .18; }
svg.qr-anat[data-focus="finder"] .qa.finder, svg.qr-anat[data-focus="sep"] .qa.sep, svg.qr-anat[data-focus="timing"] .qa.timing, svg.qr-anat[data-focus="align"] .qa.align,
svg.qr-anat[data-focus="format"] .qa.format, svg.qr-anat[data-focus="version"] .qa.version, svg.qr-anat[data-focus="darkmod"] .qa.darkmod, svg.qr-anat[data-focus="data"] .qa.data { opacity: 1; }
.qr-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qr-legend li { display: grid; grid-template-columns: 18px 1fr; column-gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; outline: none; }
.qr-legend li:hover, .qr-legend li:focus, .qr-legend li.on { background: var(--surface-2); }
.qr-legend li span:last-child { grid-column: 2; color: var(--muted); font-size: .88rem; }
.qr-legend .sw { width: 16px; height: 16px; border-radius: 4px; margin-top: 3px; grid-row: span 2; border: 1px solid var(--line); }
.sw.finder { background: #c2410c; } .sw.sep { background: #fff3eb; } .sw.timing { background: #0369a1; } .sw.align { background: #15803d; }
.sw.format { background: #a21caf; } .sw.version { background: #b45309; } .sw.darkmod { background: #be123c; } .sw.data { background: #111; }

/* generator */
.gen-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 8px; }
@media (min-width: 961px) { .gen-layout { grid-template-columns: 380px minmax(0, 1fr); } }
.gen-form { display: flex; flex-direction: column; gap: 6px; padding: 20px; }
.gen-form label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 8px; }
.gen-form label.check-label { text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.gen-form select, .gen-form textarea, .gen-form input:not([type=checkbox]):not([type=color]) { width: 100%; padding: .65rem .8rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 500 1rem var(--sans); }
.gen-form textarea { font-family: var(--mono); resize: vertical; }
.gen-form select:focus, .gen-form textarea:focus, .gen-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.gen-form input[type=color] { width: 100%; height: 42px; padding: 2px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }
.gen-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gen-form .button { margin-top: 12px; }
.has-js .gen-form > .button[type=submit] { display: none; }
.preview { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.preview-art { display: flex; justify-content: center; align-items: center; padding: 28px; border-radius: 20px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 22px 22px; border: 1px solid var(--line); overflow: auto; }
.preview-art svg { max-width: 100%; height: auto; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; align-items: center; gap: .45rem; padding: .62rem 1.05rem; border-radius: 12px; border: 0; background: var(--accent); color: var(--on-accent); font: 800 .95rem var(--sans); text-decoration: none; cursor: pointer; }
.button .ico { width: 18px; height: 18px; }
.button:hover { filter: brightness(1.05); color: var(--on-accent); }
.payload { margin: 0; padding: 12px; border-radius: 12px; background: var(--surface-2); font: .85rem/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.qr-kinds { margin: 4px 0 14px; }
.qr-kinds a { display: inline-flex; align-items: center; gap: .3rem; }
.qr-kinds .ico { width: 16px; height: 16px; }
.notice.bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.notice.bad > .ico { color: var(--bad); }

/* explore */
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sym-tile { display: flex; flex-direction: column; gap: .35rem; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; min-width: 0; }
.sym-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.thumb { display: flex; align-items: center; justify-content: center; height: 96px; border-radius: 10px; background: #fff; overflow: hidden; padding: 8px; }
.thumb svg { max-height: 80px; max-width: 100%; width: auto; height: auto; }
.thumb.none { background: var(--surface-2); color: var(--muted); }
.thumb.none .ico { width: 36px; height: 36px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.tag.ok { background: color-mix(in srgb, var(--good) 14%, var(--surface)); color: var(--good); }
.lead-text { font-size: 1.08rem; line-height: 1.7; color: var(--ink-2); margin: 1rem 0 0; max-width: 820px; }
.spec.example { display: flex; flex-direction: column; gap: 10px; }
.spec.example .preview-art { padding: 16px; }
.code-h { font-family: var(--mono) !important; letter-spacing: .02em !important; overflow-wrap: anywhere; }
dl.kv { margin: 1rem 0 0; display: grid; gap: 6px; }
dl.kv > div { display: grid; grid-template-columns: minmax(120px, 280px) 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
dl.kv dt { color: var(--muted); font-weight: 600; } dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 720px) { dl.kv > div { grid-template-columns: 1fr; gap: 2px; } }

/* scan */
.scan-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 961px) { .scan-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.scan-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.scan-stage { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18% 10%; border: 3px solid var(--accent); border-radius: 14px; box-shadow: 0 0 0 999px rgb(0 0 0 / 35%); }
.scan-actions { display: flex; gap: 8px; }
.upload { display: flex; flex-direction: column; gap: 10px; }
.upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px; border-radius: 16px; border: 2px dashed var(--line); text-align: center; cursor: pointer; color: var(--ink-2); }
.drop .ico { width: 34px; height: 34px; color: var(--accent); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop span { font-size: .85rem; color: var(--muted); }
.has-js .upload > .button { display: none; }
.scan-results { display: flex; flex-direction: column; gap: 12px; }
.empty-scan { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 220px; border-radius: 20px; border: 1px dashed var(--line); color: var(--muted); }
.empty-scan .ico { width: 44px; height: 44px; }
.result { padding: 18px; }
.result-top { display: flex; gap: 8px; flex-wrap: wrap; }
.result-text code { font: 600 1.1rem/1.5 var(--mono); overflow-wrap: anywhere; }
.thumb.illus { position: relative; }
.illus-tag { position: absolute; right: 6px; bottom: 6px; padding: .05rem .4rem; border-radius: 6px; background: rgb(0 0 0 / 6%); color: #555; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.illus-art svg { max-width: min(100%, 420px); }
.thumb.illus { height: 112px; padding-bottom: 24px; }
.thumb.illus svg { max-height: 74px; }
.illus-tag { bottom: 4px; right: 50%; transform: translateX(50%); }

/* generator: what to type */
.gen-help { margin: .6rem 0 .9rem; padding: .85rem 1rem; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--line); }
.gen-help h3.mini { display: flex; align-items: center; gap: .4rem; margin: 0 0 .35rem; color: var(--accent-ink); }
.gen-help h3.mini .ico { width: 18px; height: 18px; }
.gen-help p { margin: .3rem 0; color: var(--ink-2); font-size: .93rem; line-height: 1.45; }
.gen-format { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.gen-format span, .gen-ex-label { font-size: .75rem !important; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted) !important; }
.gen-format code { font-size: .9rem; padding: .1rem .45rem; border-radius: 6px; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.gen-examples { list-style: none; margin: .3rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.gen-examples .chip { flex-direction: column; align-items: flex-start; gap: 0; border-radius: 10px; background: var(--surface); border-color: var(--line); padding: .35rem .65rem; max-width: 100%; }
.gen-examples .chip code { font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.gen-examples .chip span { font-size: .75rem; color: var(--muted); }
