/* Heart Lexicon - calm, modern reference UI. One self-hosted family: Instrument Sans. */
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #faf7f2;
  --bg-2: #f3ede4;
  --surface: #ffffff;
  --ink: #1d1526;
  --ink-2: #463b52;
  --text: #2c2335;            /* long-form reading: a touch softer than --ink, much darker than --ink-2 */
  --muted: #6f6479;
  --line: #e8e1d7;
  --line-2: #d9d0c4;
  --accent: #b8234a;          /* berry - links, actions */
  --accent-2: #93173a;
  --accent-wash: #fbecef;
  --on-accent: #ffffff;
  --health: #2c7356;
  --health-wash: #e5f2eb;
  --adult: #6a42a5;
  --adult-wash: #efe8f8;
  --warn-wash: #fbf0d8;
  --mark: #ffe1a6;
  --focus: #2563eb;
  --shadow: 0 1px 2px rgb(29 21 38 / .05), 0 8px 24px -12px rgb(29 21 38 / .16);
  --shadow-lift: 0 2px 4px rgb(29 21 38 / .06), 0 18px 36px -16px rgb(29 21 38 / .26);
  --topbar: rgb(250 247 242 / .86);
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* Type scale - use only these sizes. */
  --fs-xs: .8125rem;   /* 13px meta, badges, captions */
  --fs-sm: .9375rem;   /* 15px secondary text, cards, UI */
  --fs-md: 1.0625rem;  /* 17px body */
  --fs-lg: 1.25rem;    /* 20px card titles, section titles */
  --fs-xl: clamp(1.4rem, 1.2rem + .8vw, 1.75rem);   /* definition, h2 */
  --fs-2xl: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem);   /* page h1 */
  --r: 16px;
  --r-sm: 10px;
  --measure: 46rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141017; --bg-2: #1b161f; --surface: #1e1823; --ink: #f2ecf4; --ink-2: #cfc4d6; --text: #e6dee9; --muted: #a397ad;
    --line: #2e2636; --line-2: #3b3244; --accent: #ff7d9b; --accent-2: #ffa3b8; --accent-wash: #35172a; --on-accent: #23070f;
    --health: #7fcfae; --health-wash: #16291f; --adult: #c4a5f3; --adult-wash: #271d3a; --warn-wash: #33291a; --mark: #6c4b12;
    --focus: #8cb4ff; --topbar: rgb(20 16 23 / .82);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / .3), 0 18px 36px -16px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141017; --bg-2: #1b161f; --surface: #1e1823; --ink: #f2ecf4; --ink-2: #cfc4d6; --text: #e6dee9; --muted: #a397ad;
  --line: #2e2636; --line-2: #3b3244; --accent: #ff7d9b; --accent-2: #ffa3b8; --accent-wash: #35172a; --on-accent: #23070f;
  --health: #7fcfae; --health-wash: #16291f; --adult: #c4a5f3; --adult-wash: #271d3a; --warn-wash: #33291a; --mark: #6c4b12;
  --focus: #8cb4ff; --topbar: rgb(20 16 23 / .82);
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
  --shadow-lift: 0 2px 4px rgb(0 0 0 / .3), 0 18px 36px -16px rgb(0 0 0 / .7);
  color-scheme: dark;
}

/* Topic colours (icon tiles, pills). Kept muted so the berry accent stays the only loud colour. */
.cat-body-health { --cb: #2c7356; }
.cat-contraception { --cb: #1f6f7a; }
.cat-stis { --cb: #3c6b2e; }
.cat-relationships-dating { --cb: #b8234a; }
.cat-orientations { --cb: #b2541b; }
.cat-gender-identity { --cb: #8a3f8f; }
.cat-consent-boundaries { --cb: #2f5ea8; }
.cat-kink-bdsm { --cb: #6a42a5; }
.cat-dating-slang { --cb: #93650a; }
.cat-psychology { --cb: #4a4fa8; }
[class*="cat-"] { --c: var(--cb); --c-wash: color-mix(in srgb, var(--cb) 11%, #ffffff); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [class*="cat-"] { --c: color-mix(in srgb, var(--cb) 45%, #ffffff); --c-wash: color-mix(in srgb, var(--cb) 24%, #1e1823); }
}
:root[data-theme="dark"] [class*="cat-"] { --c: color-mix(in srgb, var(--cb) 45%, #ffffff); --c-wash: color-mix(in srgb, var(--cb) 24%, #1e1823); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility; font-kerning: normal;
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-weight: 600; line-height: 1.12; letter-spacing: -.02em; margin: 0; }
h1 { font-size: var(--fs-2xl); letter-spacing: -.035em; }
h2 { font-size: var(--fs-xl); }
p { margin: 0 0 1em; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.wrap { width: 100%; max-width: 88rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
@media (min-width: 1280px) { .wrap { padding: 0 48px; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 50; border-radius: 8px; }
.skip:focus { left: 8px; top: 8px; }
.accent { color: var(--accent); }
.kicker { display: flex; align-items: center; gap: .45rem; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin: 0 0 .6rem; letter-spacing: .01em; }
.kicker .icon { color: var(--accent); }
.kicker-date { font-weight: 400; }
.lede { font-size: var(--fs-lg); line-height: 1.55; color: var(--ink-2); max-width: 50rem; margin: .8rem 0 0; text-wrap: pretty; }
.count { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.fine { color: var(--muted); font-size: var(--fs-xs); }
main { min-height: 60vh; padding-bottom: 4rem; }

/* ---- buttons, pills ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; font: 600 var(--fs-sm)/1 var(--sans); padding: .8rem 1.25rem;
  border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-2); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-wash); }
.btn-sm { padding: .5rem .85rem; font-size: var(--fs-xs); }
.btn .icon { width: 1.05em; height: 1.05em; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .75rem .32rem .55rem; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; text-decoration: none; color: var(--c, var(--accent)); background: var(--c-wash, var(--accent-wash));
}
.pill:hover { color: var(--c, var(--accent)); filter: saturate(1.2); }
.pill .icon { width: 1.05em; height: 1.05em; }
.age {
  display: inline-block; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .03em; vertical-align: .15em; line-height: 1.5;
  color: var(--adult); background: var(--adult-wash); border-radius: 6px; padding: 0 .4em;
}
.flag { font-size: var(--fs-xs); font-weight: 600; border-radius: 999px; padding: .3rem .7rem; background: var(--warn-wash); color: var(--ink); }
.flag-offensive { background: var(--accent-wash); color: var(--accent-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--topbar); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.topbar-row { display: flex; align-items: center; gap: 12px 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand { --logo-a: var(--accent); --logo-b: color-mix(in srgb, var(--accent) 68%, #ffffff); --logo-paper: var(--bg); }
.logo { width: 32px; height: 32px; flex: none; }
.brand-name { font-size: 1.375rem; line-height: 1; letter-spacing: -.045em; }
.brand-name b { font-weight: 600; }
.brand-name-2 { font-weight: 400; color: var(--muted); }
.brand-i { position: relative; display: inline-block; }
.brand-i svg { position: absolute; left: 50%; top: -.04em; width: .38em; height: .38em; transform: translateX(-50%); }
.topbar-spacer { flex: 1; }
.mainnav { display: flex; align-items: center; gap: 2px; }
.mainnav a {
  color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; padding: .45rem .8rem; border-radius: 999px; white-space: nowrap;
}
.mainnav a:hover { background: var(--bg-2); color: var(--ink); }
.mainnav a[aria-current="page"] { background: var(--accent-wash); color: var(--accent); }
.topbar-tools { display: flex; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent;
  color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.menu-toggle { display: none; }

/* ---- search ---- */
.searchbar { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.searchbar input {
  width: 100%; min-width: 0; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-2);
  border-radius: 999px; padding: .6rem 1rem .6rem 2.6rem; transition: border-color .15s, box-shadow .15s;
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.searchbar-key {
  position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); font: 600 var(--fs-xs)/1 var(--sans); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 6px; padding: .25rem .45rem; pointer-events: none;
}
.searchbar input:focus ~ .searchbar-key, .searchbar input:not(:placeholder-shown) ~ .searchbar-key { display: none; }
.searchbar button { display: none; }
.searchbar-compact { max-width: 26rem; margin-left: auto; }
.searchbar-compact input { font-size: var(--fs-sm); height: 42px; }
.searchbar-hero { max-width: 40rem; margin: 2rem auto 0; }
.searchbar-hero input { height: 64px; font-size: var(--fs-md); padding-left: 3.3rem; padding-right: 8.5rem; box-shadow: var(--shadow); border-color: var(--line); }
.searchbar-hero .searchbar-icon { left: 1.3rem; }
.searchbar-hero .searchbar-icon .icon { width: 1.35rem; height: 1.35rem; }
.searchbar-hero .searchbar-key { display: none; }
.searchbar-hero button {
  display: inline-flex; position: absolute; right: 8px; top: 8px; bottom: 8px; align-items: center; padding: 0 1.4rem; border: 0;
  border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 var(--fs-md)/1 var(--sans); cursor: pointer;
}
.searchbar-hero button:hover { background: var(--accent-2); }
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30; list-style: none; margin: 0; padding: 6px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift); max-height: 70vh; overflow: auto;
}
.suggest a { display: block; padding: .55rem .75rem; border-radius: 10px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a.active { background: var(--bg-2); }
.suggest .s-term { font-weight: 600; }
.suggest .s-cat { font-size: var(--fs-xs); color: var(--muted); margin-left: .4rem; }
.suggest small { display: block; color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- page head, crumbs ---- */
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: var(--fs-xs); color: var(--muted); padding-top: 1.6rem; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.page-head { padding: 2.4rem 0 1.6rem; }
.crumbs + .page-head { padding-top: 1rem; }
.page-head h1 q { quotes: "\201C" "\201D"; color: var(--accent); }
.topic-head { display: flex; gap: 1.2rem; align-items: flex-start; }

/* ---- home ---- */
.hero {
  text-align: center; padding: clamp(2.8rem, 6vw, 5.5rem) 0 clamp(2.4rem, 5vw, 4rem);
  background:
    radial-gradient(60rem 22rem at 50% -6rem, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    linear-gradient(var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--line);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem; font-size: var(--fs-xs); font-weight: 500; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .95rem; margin: 0 0 1.6rem; box-shadow: var(--shadow);
}
.hero-badge .icon { color: var(--health); }
.hero h1 { font-size: clamp(2.7rem, 1.6rem + 5.4vw, 5.4rem); letter-spacing: -.045em; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin: 1rem auto 0; }
.popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem .6rem; margin-top: 1.4rem; }
.popular-label { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; }
.popular ul { display: contents; list-style: none; }
.popular a {
  display: inline-block; font-size: var(--fs-sm); font-weight: 500; padding: .35rem .85rem; border-radius: 999px; text-decoration: none;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
}
.popular a:hover { border-color: var(--accent); color: var(--accent); }

.home-feature { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 2.4rem; }
@media (min-width: 900px) { .home-feature { grid-template-columns: 7fr 5fr; } }
.tod-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; }
.tod-card h2 { font-size: var(--fs-2xl); letter-spacing: -.035em; margin: .1rem 0 .8rem; }
.tod-card h2 a { color: var(--ink); text-decoration: none; }
.tod-card h2 a:hover { color: var(--accent); }
.tod-def { font-size: var(--fs-md); line-height: 1.55; color: var(--ink-2); max-width: 36rem; }
.tod-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: .6rem; }
.decoder-teaser {
  border-radius: var(--r); padding: clamp(22px, 3vw, 34px); color: #f6eef4;
  background: radial-gradient(120% 140% at 100% 0%, #6b1d44 0%, #2a1638 55%, #1a1024 100%); box-shadow: var(--shadow);
}
.decoder-teaser .kicker { color: #e9b3c7; }
.decoder-teaser h2 { font-size: var(--fs-lg); margin-bottom: .6rem; color: #fff; }
.decoder-teaser p { color: #dccfe0; }
.decoder-sample { font-size: var(--fs-sm); background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .12); border-radius: 12px; padding: .8rem 1rem; line-height: 1.9; }
.decoder-sample mark { background: rgb(255 125 155 / .28); color: #fff; border-radius: 5px; padding: 1px 5px; }
.decoder-teaser .btn-primary { background: #ff7d9b; color: #23070f; }
.decoder-teaser .btn-primary:hover { background: #ffa3b8; }
.decoder-teaser .examples { font-size: var(--fs-sm); margin: 1rem 0 0; color: #b9aac0; }
.decoder-teaser .examples a { color: #f3c6d4; }

.section { margin-top: clamp(3rem, 6vw, 4.5rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 1.2rem; }
.section-head h2 { font-size: var(--fs-xl); letter-spacing: -.03em; }
.section-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }

/* ---- topic cards ---- */
.topic-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.topic-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr; column-gap: 14px; height: 100%; padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.topic-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--line-2); color: var(--ink); }
.topic-icon {
  grid-row: 1 / span 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: var(--c, var(--accent)); background: var(--c-wash, var(--accent-wash));
}
.topic-icon-lg { width: 64px; height: 64px; border-radius: 18px; flex: none; }
.topic-icon-lg .icon { width: 30px; height: 30px; }
.topic-name { font-weight: 600; font-size: var(--fs-md); letter-spacing: -.015em; align-self: end; }
.topic-count { font-size: var(--fs-xs); color: var(--muted); }
.topic-intro {
  grid-column: 1 / -1; margin-top: .8rem; font-size: var(--fs-sm); line-height: 1.55; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Framed link list (/category, /guides): icon | name + meta | text | arrow - same rhythm as the A-Z and /compare rows */
.link-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.link-list > li + li { border-top: 1px solid var(--line); }
.link-row {
  display: grid; grid-template-columns: auto minmax(13rem, 21rem) minmax(0, 1fr) auto; gap: .5rem 1.6rem; align-items: center;
  padding: 18px 24px; text-decoration: none; color: var(--ink); transition: background-color .15s;
}
.link-row:hover { background: var(--bg-2); color: var(--ink); }
.link-row .topic-icon { grid-row: auto; }
.link-row-head { display: flex; flex-direction: column; gap: .25rem; margin-right: .9rem; }
.link-row-name { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }
.link-row-meta { font-size: var(--fs-xs); color: var(--muted); }
.link-row-text { color: var(--text); font-size: var(--fs-sm); line-height: 1.6; max-width: 62rem; }
.link-row-go { color: var(--muted); display: grid; transition: color .15s, transform .15s; }
.link-row:hover .link-row-name, .link-row:hover .link-row-go { color: var(--accent); }
.link-row:hover .link-row-go { transform: translateX(3px); }
@media (max-width: 760px) {
  .link-row { grid-template-columns: auto minmax(0, 1fr); padding: 14px 16px; gap: .6rem 14px; }
  .link-row-head { margin-right: 0; }
  .link-row-text { grid-column: 1 / -1; }
  .link-row-go { display: none; }
}

/* ---- A-Z ---- */
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); gap: 6px; }
.letter {
  display: grid; place-items: center; height: 2.6rem; border-radius: var(--r-sm); font-weight: 600; font-size: var(--fs-sm);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background .12s, color .12s, border-color .12s;
}
a.letter:hover { border-color: var(--accent); color: var(--accent); }
.letter[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.letter.empty { opacity: .35; background: transparent; }
.letters-sticky {
  position: sticky; top: 64px; z-index: 10; background: var(--bg); padding: 10px 0; margin: 0 0 1rem;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.letters-sticky::-webkit-scrollbar { display: none; }
.letters-sticky .letter { flex: none; width: 2.5rem; height: 2.5rem; }

/* ---- listings ---- */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: .4rem 0 1.2rem; }
.list-tools[hidden], .filter-empty[hidden] { display: none; }
.filter { position: relative; display: flex; align-items: center; flex: 1; max-width: 24rem; }
.filter .icon { position: absolute; left: .9rem; color: var(--muted); pointer-events: none; }
.filter input {
  width: 100%; font: inherit; font-size: var(--fs-sm); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-2);
  border-radius: 999px; padding: .55rem 1rem .55rem 2.5rem;
}
.filter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.filter-empty { color: var(--muted); padding: 1rem 0; }
.term-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.term-grid li[hidden] { display: none; }
.term-card {
  display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.term-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); color: var(--ink); }
.term-card-name { font-weight: 600; font-size: var(--fs-md); letter-spacing: -.015em; }
.term-card:hover .term-card-name { color: var(--accent); }
.term-card-def { color: var(--text); font-size: var(--fs-sm); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.term-card-cat { margin-top: auto; padding-top: .35rem; font-size: var(--fs-xs); font-weight: 600; color: var(--c, var(--muted)); }
.via { color: var(--muted); font-size: var(--fs-xs); }
/* A-Z list: one entry per row, term | definition */
.term-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.term-list > li { border-bottom: 1px solid var(--line); margin-bottom: -1px; }  /* last visible row's line hides under the frame */
.term-list > li[hidden] { display: none; }
.term-row {
  display: grid; grid-template-columns: minmax(11rem, 17rem) minmax(0, 1fr); gap: .35rem 2.5rem; align-items: baseline;
  padding: 15px 24px; text-decoration: none; color: var(--ink); transition: background-color .15s;
}
.term-row:hover { background: var(--bg-2); color: var(--ink); }
.term-row-head { display: flex; flex-direction: column; gap: .3rem; }
.term-row-name { font-weight: 600; font-size: var(--fs-lg); letter-spacing: -.025em; line-height: 1.25; color: var(--ink); }
.term-row:hover .term-row-name { color: var(--accent); }
.term-row-cat { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
.term-row-cat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--muted)); opacity: .75; flex: none; }
.term-row-def { color: var(--text); font-size: var(--fs-sm); line-height: 1.6; max-width: 62rem; }
@media (max-width: 640px) {
  .term-row { grid-template-columns: minmax(0, 1fr); padding: 13px 16px; }
  .term-row-head { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
}
.page-head + .count, .listing > .lede + .count { margin-bottom: 1rem; }
.listing > .count { margin: 0 0 1rem; }

/* ---- callouts, 18+ ---- */
.callout {
  display: flex; gap: .7rem; align-items: flex-start; font-size: var(--fs-sm); line-height: 1.5; max-width: var(--measure);
  background: var(--warn-wash); border-radius: 12px; padding: .8rem 1rem; margin: 1rem 0;
}
.callout .icon { margin-top: .12em; }
.callout-health { background: var(--health-wash); }
.callout-health .icon { color: var(--health); }
.callout-offensive { background: var(--accent-wash); }
.callout-offensive .icon { color: var(--accent); }
.adult-notice {
  display: none; max-width: var(--measure); margin: 1.4rem 0; padding: 22px 24px; border-radius: var(--r);
  background: var(--adult-wash); border: 1px solid color-mix(in srgb, var(--adult) 35%, transparent);
}
.adult-notice-title { font-weight: 600; font-size: var(--fs-md); margin: 0 0 .4rem; }
.adult-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.btn-adult { background: var(--adult); color: #fff; }
.btn-adult:hover { filter: brightness(1.1); }
:root[data-theme="dark"] .btn-adult { color: #1a1024; }
.adult-leave { font-size: var(--fs-sm); }
html.js[data-adult] .adult-notice { display: block; }
html.js[data-adult] .gated { display: none; }
html.js.adult-ok[data-adult] .gated { display: block; }
html.js.adult-ok[data-adult] .gated.entry-layout { display: grid; }
html.js.adult-ok[data-adult] .adult-notice { display: none; }

/* ---- entry ---- */
.entry-layout { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); padding-top: 1.2rem; }
@media (min-width: 1000px) { .entry-layout { grid-template-columns: minmax(0, 1fr) 19rem; gap: 56px; } }
@media (min-width: 1360px) { .entry-layout { grid-template-columns: minmax(0, 1fr) 21rem; gap: 72px; } }
.entry { min-width: 0; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 1rem; }
.entry-head h1 { font-size: clamp(2.4rem, 1.7rem + 3vw, 3.8rem); line-height: 1.05; letter-spacing: -.04em; }
.also { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 1.1rem 0 0; }
.also .label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-right: .2rem; }
.token { font-size: var(--fs-sm); padding: .2rem .65rem; border-radius: 8px; background: var(--bg-2); color: var(--ink-2); }
.token-abbr { font-weight: 600; letter-spacing: .03em; color: var(--ink); }
.definition {
  position: relative; margin: 1.8rem 0 1.6rem; padding: 22px 24px 18px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-left: 5px solid var(--accent);
}
.definition-label { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); margin: 0 0 .4rem; }
.definition-text { font-size: var(--fs-xl); line-height: 1.45; font-weight: 500; letter-spacing: -.015em; margin: 0; max-width: 52rem; text-wrap: pretty; }
.copy-link { margin-top: 1rem; }
.copy-link.done { color: var(--health); border-color: var(--health); }
.prose { max-width: var(--measure); font-size: var(--fs-md); line-height: 1.78; color: var(--text); text-wrap: pretty; }
.prose p { margin: 0 0 1.15em; }
.entry .prose { max-width: 54rem; font-size: 1.125rem; }
.prose p:first-child { color: var(--ink); }
.block { margin-top: clamp(2.2rem, 1.8rem + 1.2vw, 3rem); }
.block h2 { display: flex; align-items: center; gap: .7rem; font-size: var(--fs-lg); margin-bottom: 1rem; letter-spacing: -.02em; }
.block h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.panel h2::after { display: none; }

/* At a glance */
.keypoints { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.keypoints li {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); font-size: var(--fs-sm); line-height: 1.55; color: var(--text);
}
.keypoints .icon { color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 4px; width: 24px; height: 24px; margin-top: 1px; stroke-width: 2.4; }

/* In a sentence + origin */
.duo { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .duo { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } .duo-single { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.panel h2 { font-size: var(--fs-md); margin-bottom: .8rem; }
.panel p { margin: 0; color: var(--text); line-height: 1.7; }
.panel-origin { background: var(--bg-2); border-color: transparent; }
.usage { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.usage li { position: relative; padding-left: 1rem; font-size: var(--fs-md); line-height: 1.55; color: var(--ink); border-left: 3px solid var(--accent-wash); }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.faq details[open] { border-color: var(--line-2); box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 18px; font-weight: 600; font-size: var(--fs-md); letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq-icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--accent-wash); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--accent); border-radius: 2px; transition: transform .2s; }
.faq-icon::after { transform: rotate(90deg); }
.faq details[open] .faq-icon::after { transform: rotate(0deg); }
.faq details p { margin: 0; padding: 0 18px 18px; color: var(--text); line-height: 1.7; max-width: var(--measure); }
.confuse { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.confuse li { display: flex; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ne { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--accent-wash); color: var(--accent); }
.confuse .hw { font-weight: 600; font-size: var(--fs-md); text-decoration: none; }
.confuse .hw:hover { text-decoration: underline; }
.confuse p { margin: .25rem 0 0; color: var(--text); font-size: var(--fs-sm); line-height: 1.55; }
.related { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.related a {
  display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 12px 14px; border-radius: 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.related a:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.related-name { font-weight: 600; }
.related a:hover .related-name { color: var(--accent); }
.related-def { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.see-also ul { padding-left: 1.1rem; }
.sources ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: src; }
.sources li { counter-increment: src; display: grid; grid-template-columns: 1.8rem 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.sources li::before { content: counter(src); grid-row: span 2; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); padding-top: .15em; }
.sources .pub { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.sources a { text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.sources a .icon { width: .85em; height: .85em; margin-left: .3em; vertical-align: -.05em; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 3rem; }
.prevnext a {
  display: flex; flex-direction: column; gap: .2rem; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; color: var(--ink);
}
.prevnext a:hover { border-color: var(--accent); }
.prevnext a[rel="next"] { text-align: right; grid-column: 2; align-items: flex-end; }
.prevnext-dir { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.prevnext-name { font-weight: 600; }
.prevnext a:hover .prevnext-name { color: var(--accent); }

.entry-aside { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1000px) { .entry-aside { position: sticky; top: 88px; align-self: start; padding-top: 3.2rem; } }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.side-card h2 { font-size: var(--fs-sm); margin-bottom: .8rem; }
.facts { margin: 0 0 .8rem; display: grid; gap: .5rem; font-size: var(--fs-sm); }
.facts div { display: flex; justify-content: space-between; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.side-list { list-style: none; padding: 0; margin: 0 0 .8rem; }
.side-list a { display: block; padding: .38rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.side-list li:last-child a { border-bottom: 0; }
.side-list a:hover { color: var(--accent); }
.side-link { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.side-link:hover { text-decoration: underline; }

/* ---- guides + comparisons ---- */
.meta-text { font-size: var(--fs-xs); color: var(--muted); }
.entry-foot { margin-top: 2.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.chips { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  display: inline-block; padding: .35rem .85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
}
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.guide .entry-head h1 { font-size: var(--fs-2xl); letter-spacing: -.035em; line-height: 1.1; }
.guide .lede { margin-top: 1rem; }
.guide-section { scroll-margin-top: 90px; }
.toc ol { counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a::before { content: counter(toc) ". "; color: var(--muted); }
.guide-grid, .compare-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.guide-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.compare-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.guide-card, .compare-card {
  display: flex; flex-direction: column; gap: .45rem; height: 100%; padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .18s;
}
.guide-card:hover, .compare-card:hover { color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.guide-card .topic-icon { margin-bottom: .4rem; }
.guide-card-meta { font-size: var(--fs-xs); color: var(--muted); }
.guide-card-title, .compare-card-title { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.guide-card:hover .guide-card-title { color: var(--accent); }
.guide-card-summary, .compare-card-intro { font-size: var(--fs-sm); color: var(--text); line-height: 1.55; }
.compare-card-intro { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.compare-card-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; }
.vs { color: var(--accent); font-weight: 500; font-size: .8em; }
/* /compare index: groups by topic, one pair per row (pair | difference in one sentence | arrow) */
.compare-group + .compare-group { margin-top: 2.4rem; }
.compare-group-h { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-lg); letter-spacing: -.02em; margin: 0 0 .9rem; }
.compare-group-h::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.compare-group-n { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); background: var(--bg-2); border-radius: 999px; padding: .1rem .55rem; }
.compare-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.compare-list > li + li { border-top: 1px solid var(--line); }
.compare-row {
  display: grid; grid-template-columns: minmax(14rem, 24rem) minmax(0, 1fr) auto; gap: .5rem 2.5rem; align-items: center;
  padding: 18px 24px; text-decoration: none; color: var(--ink); transition: background-color .15s;
}
.compare-row:hover { background: var(--bg-2); color: var(--ink); }
.compare-row-pair { display: flex; flex-direction: column; gap: .2rem; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }
.compare-row-b { display: flex; align-items: baseline; gap: .45rem; }
.compare-row-b .vs { font-size: var(--fs-xs); letter-spacing: 0; }
.compare-row-short { color: var(--text); font-size: var(--fs-sm); line-height: 1.6; max-width: 62rem; }
.compare-row-go { color: var(--muted); display: grid; transition: color .15s, transform .15s; }
.compare-row:hover .compare-row-a, .compare-row:hover .compare-row-b { color: var(--accent); }
.compare-row:hover .compare-row-go { color: var(--accent); transform: translateX(3px); }
@media (max-width: 640px) {
  .compare-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; gap: .45rem; }
  .compare-row-go { display: none; }
}
.compare-heads { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-top: .4rem; }
@media (min-width: 760px) { .compare-heads { grid-template-columns: 1fr 1fr; } }
.compare-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; border-top: 4px solid var(--c, var(--accent)); }
.compare-head h2 { font-size: var(--fs-xl); margin: .6rem 0 .5rem; }
.compare-head h2 a { color: var(--ink); text-decoration: none; }
.compare-head h2 a:hover { color: var(--accent); }
.compare-head p { color: var(--text); margin-bottom: .8rem; }
.compare-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ct-row { display: grid; grid-template-columns: minmax(9rem, 1fr) 2fr 2fr; }
.ct-row > span { padding: 14px 18px; border-top: 1px solid var(--line); color: var(--text); line-height: 1.55; }
.ct-head > span { border-top: 0; font-weight: 600; color: var(--ink); background: var(--bg-2); }
.ct-aspect { font-weight: 600; color: var(--ink) !important; }
.ct-label { display: none; }
@media (max-width: 700px) {
  .ct-head { display: none; }
  .ct-row { grid-template-columns: 1fr; border-top: 1px solid var(--line); }
  .ct-row:first-of-type { border-top: 0; }
  .ct-row > span { border-top: 0; padding: 6px 16px; }
  .ct-aspect { padding-top: 14px !important; }
  .ct-row > span:last-child { padding-bottom: 14px; }
  .ct-label { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
}
.panel-short { border-left: 4px solid var(--accent); }
.compare .duo { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .compare .duo { grid-template-columns: 1fr 1fr; } }

/* ---- decoder ---- */
.decoder-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .decoder-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; } }
.decoder-form { padding: 20px; }
.decoder-form label { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 600; margin-bottom: .6rem; }
.hint { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
.decoder-form textarea {
  width: 100%; font: 1rem/1.6 var(--sans); padding: .9rem 1rem; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line-2);
  border-radius: 12px; resize: vertical; min-height: 11rem;
}
.decoder-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.decoder-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: .9rem 0; }
.charcount { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-xs); color: var(--ink-2); background: var(--health-wash); border-radius: 10px; padding: .7rem .85rem; margin: 0; }
.privacy .icon { color: var(--health); margin-top: .1em; }
.examples-box { margin-top: 18px; }
.examples-label { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); margin-bottom: .5rem; }
.example-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.example-list a {
  display: inline-block; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
}
.example-list a:hover { border-color: var(--accent); color: var(--accent); }
.example-list a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.how { padding: 22px 24px; }
.how h2 { font-size: var(--fs-md); margin-bottom: 1rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1rem; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; gap: 12px; color: var(--ink-2); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px;
  background: var(--accent-wash); color: var(--accent); font-weight: 600; font-size: var(--fs-sm);
}
.steps strong { color: var(--ink); }
.decoded-h { font-size: var(--fs-lg); margin-bottom: 1rem; }
.decoded-text {
  margin: 0 0 1.4rem; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  font-size: var(--fs-md); line-height: 2; box-shadow: var(--shadow);
}
.hit { color: inherit; text-decoration: none; white-space: nowrap; }
.hit mark { background: var(--mark); color: var(--ink); border-radius: 5px; padding: 2px 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hit sup { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); margin-left: 2px; }
.hit:hover mark, .hit.lit mark { outline: 2px solid var(--accent); }
.explanations { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 10px; }
.explanations li {
  display: grid; grid-template-columns: 2rem 1fr; gap: 12px; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; scroll-margin-top: 90px; transition: border-color .15s, background .15s;
}
.explanations li:target, .explanations li.lit { border-color: var(--accent); background: var(--accent-wash); }
.exp-num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--mark); font-weight: 600; font-size: var(--fs-xs); color: var(--ink); }
.explanations p { margin: 0 0 .3rem; color: var(--text); line-height: 1.6; }
.found { color: var(--ink) !important; }
.found q { font-weight: 600; quotes: none; }
.kind { color: var(--muted); font-size: var(--fs-xs); margin-left: .3rem; }
.more { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* ---- about ---- */
.prose-page { max-width: 60rem; }
.prose-page > p, .prose-page > ul { color: var(--text); max-width: var(--measure); font-size: var(--fs-md); line-height: 1.75; }
.prose-page h2 { font-size: var(--fs-lg); margin: 2.6rem 0 .9rem; scroll-margin-top: 90px; }
.prose-page h3 { font-size: var(--fs-md); margin: 1.8rem 0 .5rem; scroll-margin-top: 90px; }
.prose-page li { margin-bottom: .3rem; }
.prose-page code { font-size: .9em; padding: .05em .35em; border-radius: 6px; background: var(--bg-2); }
.stats { list-style: none; padding: 0; margin: .4rem 0 1rem; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat-num { display: block; font-size: var(--fs-2xl); font-weight: 600; line-height: 1; letter-spacing: -.04em; color: var(--accent); }
.stat-label { font-size: var(--fs-xs); color: var(--muted); }
.counts { border-collapse: separate; border-spacing: 0; margin: 1rem 0; font-size: var(--fs-sm); min-width: min(100%, 26rem); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.counts caption { text-align: left; color: var(--muted); font-size: var(--fs-xs); padding-bottom: .4rem; }
.counts th, .counts td { text-align: left; padding: .6rem 1rem; border-bottom: 1px solid var(--line); }
.counts tr:last-child td { border-bottom: 0; }
.counts th { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.counts td:last-child, .counts th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- footer ---- */
.colophon { margin-top: 2rem; background: #17111d; color: #cbbfd2; padding: 3rem 0 2rem; font-size: var(--fs-sm); }
.colophon a { color: #f1e8f4; text-decoration: none; }
.colophon a:hover { color: #ff9fb6; text-decoration: underline; }
.colophon-grid { display: grid; gap: 28px; grid-template-columns: 1fr; padding-bottom: 2rem; border-bottom: 1px solid rgb(255 255 255 / .1); }
@media (min-width: 760px) { .colophon-grid { grid-template-columns: 2fr 1fr 1fr; } }
.brand-light, .brand-light:hover { color: #fff; text-decoration: none !important; }
.brand-light { --logo-a: #ff7d9b; --logo-b: #ffb3c4; --logo-paper: #17111d; }
.brand-light .brand-name-2 { color: #a99cb2; }
.colophon-about p { margin-top: .9rem; max-width: 26rem; color: #a99cb2; }
.footnav { display: flex; flex-direction: column; gap: .45rem; }
.footnav-h { font-size: var(--fs-sm); font-weight: 600; color: #8e8198; margin: 0 0 .3rem; }
.linklike { font: inherit; color: #f1e8f4; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.linklike:hover { color: #ff9fb6; text-decoration: underline; }
/* statistics consent banner (bottom card, both choices equally prominent) */
.consent {
  position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 44rem; padding: 18px 20px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-lift);
}
.consent[hidden] { display: none; }
.consent h2 { font-size: var(--fs-md); margin: 0 0 .35rem; letter-spacing: -.01em; }
.consent p { margin: 0; font-size: var(--fs-sm); line-height: 1.55; color: var(--text); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: .9rem; }
.consent-actions .btn { flex: 1 1 10rem; justify-content: center; }
.disclaimer { margin: 1.6rem 0 0; font-size: var(--fs-xs); color: #a99cb2; max-width: 56rem; }
.disclaimer strong { color: #e6dcea; }

/* ---- mobile ---- */
@media (max-width: 899px) {
  .menu-toggle { display: inline-grid; }
  .topbar-row { flex-wrap: wrap; min-height: 60px; }
  .brand { margin-right: auto; }
  .topbar-tools { order: 2; }
  .searchbar-compact { order: 3; flex-basis: 100%; max-width: none; margin: 0 0 10px; }
  .topbar-spacer { display: none; }
  .mainnav { order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 0 0 12px; }
  .mainnav a { padding: .7rem .9rem; border-radius: 12px; font-size: var(--fs-sm); }
  html.js .mainnav { display: none; }
  html.js .topbar.open .mainnav { display: flex; }
  .letters-sticky { top: 0; position: static; }
  .searchbar-key { display: none; }
}
@media (max-width: 560px) {
  body { font-size: var(--fs-sm); }
  .brand-name { font-size: 1.125rem; }
  .searchbar-hero input { height: 58px; padding-right: 1rem; font-size: var(--fs-md); }
  .searchbar-hero button { display: none; }
  .topic-head { flex-direction: column; gap: .8rem; }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext a[rel="next"] { grid-column: 1; }
  .decoded-text { padding: 14px 16px; font-size: var(--fs-sm); }
  .hit { white-space: normal; }
  .tod-foot .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media print { .topbar, .colophon, .entry-aside, .prevnext, .copy-link { display: none; } body { background: #fff; } }
