/* ============================================================
   Babies Name Generator: global stylesheet
   Hand-written, no toolchain. Warm, modern, not pink/blue.
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin-ext.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #FBF8F4;
  --surface: #FFFFFF;
  --surface-alt: #F5EFE8;
  --text: #24212B;
  --text-muted: #5E5866;
  --text-subtle: #6E6876;
  --border: #E7DFD6;
  --border-strong: #D5CABE;
  --accent: #B04A28;          /* apricot, darkened for text contrast (4.5:1 on accent-soft) */
  --accent-fill: #C4532F;     /* buttons (white text 4.5:1) */
  --accent-hover: #8F3818;
  --accent-soft: #FBE7DE;
  --on-accent: #FFFFFF;
  --girl: #9C4466;
  --girl-soft: #F7E4EC;
  --boy: #356B64;
  --boy-soft: #E1EFEC;
  --unisex: #65579C;
  --unisex-soft: #ECE8F7;
  --up: #2F7A4F;
  --down: #B0452F;
  --chart-line: #D9643F;
  --chart-line-2: #7A6BB0;
  --chart-grid: #EFE6DC;
  --chart-area: rgba(217, 100, 63, 0.10);
  --focus: #7A6BB0;
  --shadow: 0 1px 2px rgba(36, 33, 43, 0.06), 0 4px 16px rgba(36, 33, 43, 0.05);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4rem;
  --radius: 10px; --radius-lg: 16px; --radius-pill: 999px;
  --content: 44rem; --wide: 74rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17151C; --surface: #211E27; --surface-alt: #2A2631;
    --text: #EDE8F0; --text-muted: #B9B2C0; --text-subtle: #8E879A;
    --border: #36313E; --border-strong: #4A4454;
    --accent: #F08A66; --accent-fill: #E0714B; --accent-hover: #F6A487; --accent-soft: #3A2922;
    --on-accent: #1A1418;
    --girl: #E08AAA; --girl-soft: #3A2530; --boy: #7CC1B7; --boy-soft: #1F3331;
    --unisex: #AFA3E0; --unisex-soft: #2C2840;
    --up: #6FCB93; --down: #F08A66;
    --chart-line: #F08A66; --chart-line-2: #AFA3E0; --chart-grid: #2C2833; --chart-area: rgba(240, 138, 102, 0.12);
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.25);
  }
}
:root[data-theme="dark"] {
  --bg: #17151C; --surface: #211E27; --surface-alt: #2A2631;
  --text: #EDE8F0; --text-muted: #B9B2C0; --text-subtle: #8E879A;
  --border: #36313E; --border-strong: #4A4454;
  --accent: #F08A66; --accent-fill: #E0714B; --accent-hover: #F6A487; --accent-soft: #3A2922;
  --on-accent: #1A1418;
  --girl: #E08AAA; --girl-soft: #3A2530; --boy: #7CC1B7; --boy-soft: #1F3331;
  --unisex: #AFA3E0; --unisex-soft: #2C2840;
  --up: #6FCB93; --down: #F08A66;
  --chart-line: #F08A66; --chart-line-2: #AFA3E0; --chart-grid: #2C2833; --chart-area: rgba(240, 138, 102, 0.12);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); line-height: 1.15; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 var(--s3); }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); margin-top: var(--s7); }
h3 { font-size: 1.2rem; margin-top: var(--s5); }
p { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.25rem; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: var(--s2) var(--s4); z-index: 10; }
.skip-link:focus { left: var(--s4); }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
.prose { max-width: var(--content); }
.muted { color: var(--text-muted); }
.small { font-size: 0.9rem; }
.lede { font-size: 1.2rem; color: var(--text-muted); max-width: var(--content); }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand img { width: 32px; height: 32px; }
.brand .accent { color: var(--accent); }
.nav-primary { display: flex; gap: var(--s1); }
.nav-primary a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: var(--radius-pill); font-weight: 550; font-size: 0.97rem; }
.nav-primary a:hover, .nav-primary a[aria-current="page"] { background: var(--surface-alt); color: var(--text); }
.nav-mobile { display: none; }
.nav-mobile summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); font-weight: 600; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] .nav-mobile-panel { display: grid; }
.nav-mobile-panel { display: none; position: absolute; right: 16px; left: 16px; top: 64px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--s3); gap: 2px; }
.nav-mobile-panel a { padding: 10px 12px; border-radius: var(--radius); text-decoration: none; color: var(--text); font-weight: 550; }
.nav-mobile-panel a:hover { background: var(--surface-alt); }
@media (max-width: 860px) { .nav-primary { display: none; } .nav-mobile { display: block; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.88rem; color: var(--text-subtle); padding: var(--s4) 0 0; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 4px; color: var(--border-strong); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- Page header ---------- */
.page-head { padding: var(--s5) 0 var(--s4); }
.page-head .kicker { font-weight: 600; color: var(--text-muted); margin-bottom: var(--s2); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
main { padding-bottom: var(--s8); }
section { scroll-margin-top: 16px; }

/* ---------- Badges, chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 650; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--surface-alt); color: var(--text-muted); line-height: 1.6; }
.badge-girl { background: var(--girl-soft); color: var(--girl); }
.badge-boy { background: var(--boy-soft); color: var(--boy); }
.badge-unisex { background: var(--unisex-soft); color: var(--unisex); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 var(--s4); list-style: none; }
.chip { display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.93rem; font-weight: 550; }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.trend-up { color: var(--up); font-weight: 650; white-space: nowrap; }
.trend-down { color: var(--down); font-weight: 650; white-space: nowrap; }
.trend-flat { color: var(--text-subtle); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border-radius: var(--radius-pill); border: 1px solid transparent; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s5); }
.grid { display: grid; gap: var(--s4); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }

.name-card { position: relative; display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s4) var(--s4) var(--s3); transition: border-color .15s, box-shadow .15s; }
.name-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.name-card .nc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.name-card .nc-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.2; color: var(--text); text-decoration: none; }
.name-card a.nc-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.name-card .nc-pron { font-size: 0.85rem; color: var(--text-subtle); }
.name-card .nc-meaning { font-size: 0.95rem; color: var(--text-muted); min-height: 1.5em; }
.name-card .nc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.name-card .spark { width: 84px; height: 24px; flex: none; }
.name-card .heart { position: relative; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-subtle); padding: 0; }
.name-card .heart[aria-pressed="true"] { color: var(--accent-fill); border-color: var(--accent-fill); background: var(--accent-soft); }
.name-card .more-like { position: relative; z-index: 2; order: 5; flex-basis: 100%; text-align: left; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 2px 0 0; font: inherit; font-size: 0.85rem; font-weight: 600; }
.name-card .more-like:hover { text-decoration: underline; }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: 4px 16px; list-style: none; padding: 0; margin: 0 0 var(--s5); }
.link-grid a { display: block; padding: 6px 0; text-decoration: none; color: var(--text); border-bottom: 1px dashed var(--border); }
.link-grid a:hover { color: var(--accent); }
.link-grid .count { color: var(--text-subtle); font-size: 0.85rem; margin-left: 4px; }

.letter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0 0 var(--s4); }
.letter-grid a, .letter-grid span { display: flex; align-items: center; justify-content: center; height: 3rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--text); }
.letter-grid a:hover { border-color: var(--accent); color: var(--accent); }
.letter-grid span { color: var(--text-subtle); background: transparent; }

/* ---------- Facts box ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin: var(--s4) 0 var(--s5); }
.facts div { padding: var(--s3) var(--s4); box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border); }
.facts dt { font-size: 0.8rem; color: var(--text-subtle); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.facts dd { margin: 2px 0 0; font-weight: 650; font-size: 1.05rem; }
.facts dd .muted { font-weight: 500; font-size: 0.9rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); margin: 0 0 var(--s5); }
.data-table th, .data-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-subtle); background: var(--surface-alt); position: sticky; top: 0; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td.num, .data-table th.num { text-align: right; }
.data-table a { font-weight: 650; text-decoration: none; }
.data-table a:hover { text-decoration: underline; }
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th[data-sort]::after { content: " \2195"; opacity: .4; }
.side-by-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--s5); }

/* ---------- Charts ---------- */
.chart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s4); margin: 0 0 var(--s4); }
.chart svg { display: block; width: 100%; height: auto; }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2.25; stroke-linejoin: round; }
.chart .line-2 { fill: none; stroke: var(--chart-line-2); stroke-width: 1.75; stroke-dasharray: 5 4; }
.chart .area { fill: var(--chart-area); stroke: none; }
.chart .grid line { stroke: var(--chart-grid); }
.chart text { fill: var(--text-subtle); font-family: var(--font-body); font-size: 12px; }
.chart .peak circle { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
.chart .peak text { fill: var(--text); font-weight: 650; }
.chart-legend { display: flex; gap: var(--s4); font-size: 0.85rem; color: var(--text-muted); margin-top: var(--s2); flex-wrap: wrap; }
.chart-legend .k1::before, .chart-legend .k2::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--chart-line); }
.chart-legend .k2::before { background: var(--chart-line-2); }
.spark polyline { fill: none; stroke: var(--chart-line); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- Table of contents ---------- */
.toc { border-left: 3px solid var(--accent-soft); padding: var(--s2) 0 var(--s2) var(--s4); margin: var(--s5) 0; max-width: var(--content); }
.toc p { font-weight: 700; margin: 0 0 var(--s2); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-subtle); }
.toc ol { margin: 0; padding-left: 1.1rem; columns: 2 14rem; column-gap: var(--s6); }
.toc li { margin: 2px 0; break-inside: avoid; }
.toc a { text-decoration: none; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--border); padding: var(--s3) 0; max-width: var(--content); }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: var(--s2) 0 0; color: var(--text-muted); }

/* ---------- Callouts ---------- */
.note { background: var(--surface-alt); border-radius: var(--radius); padding: var(--s3) var(--s4); font-size: 0.95rem; color: var(--text-muted); max-width: var(--content); }
.save-pin { display: flex; gap: var(--s5); align-items: center; flex-wrap: wrap; margin: var(--s6) 0; }
.save-pin img { width: 160px; height: 240px; border-radius: var(--radius); border: 1px solid var(--border); object-fit: cover; }

/* ---------- Generator ---------- */
.hero { padding: var(--s6) 0 var(--s4); display: grid; grid-template-columns: 1fr auto; gap: var(--s5); align-items: center; }
.hero h1 { margin-bottom: var(--s2); }
.hero .hero-art { width: 200px; height: auto; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero .hero-art { display: none; } }
.gen { display: grid; grid-template-columns: 19rem 1fr; gap: var(--s5); align-items: start; }
@media (max-width: 900px) { .gen { grid-template-columns: 1fr; } }
.gen-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s4); position: sticky; top: 12px; }
@media (max-width: 900px) { .gen-panel { position: static; } }
.gen-panel fieldset { border: 0; padding: 0; margin: 0 0 var(--s4); }
.gen-panel legend, .gen-panel label.lbl { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-subtle); margin-bottom: 6px; display: block; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-pill); cursor: pointer; font-size: 0.92rem; font-weight: 550; background: var(--surface); }
.seg input:checked + label { background: var(--accent-soft); border-color: var(--accent-fill); color: var(--accent); }
.seg input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.gen-panel input[type="text"], .gen-panel select, .tool-form input[type="text"], .tool-form select { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font: inherit; }
.gen-panel .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gen-more summary { cursor: pointer; font-weight: 650; color: var(--accent); margin-bottom: var(--s3); }
.gen-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gen-results-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: var(--s3); flex-wrap: wrap; }
.gen-status { color: var(--text-muted); font-size: 0.95rem; min-height: 1.5em; }
.gen-warn { color: var(--down); font-size: 0.85rem; font-weight: 600; }
.shortlist { margin-top: var(--s5); }
.shortlist ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.shortlist li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 14px; border-radius: var(--radius-pill); background: var(--accent-soft); font-weight: 650; }
.shortlist li button { border: 0; background: none; cursor: pointer; color: var(--text-muted); font-size: 1.1rem; line-height: 1; padding: 4px 8px; }
.random-stage { text-align: center; padding: var(--s7) var(--s4); }
.random-stage .big { font-family: var(--font-display); font-size: clamp(3rem, 2rem + 6vw, 6rem); font-weight: 700; line-height: 1.1; margin: 0; }
.tool-form { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); align-items: end; margin-bottom: var(--s5); }
.tool-form label { font-weight: 650; font-size: 0.9rem; display: block; margin-bottom: 4px; }
.result-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s5); margin-bottom: var(--s5); }
.result-box .flags { list-style: none; padding: 0; }
.result-box .flags li { padding: 4px 0; }
.ok::before { content: "\2713  "; color: var(--up); font-weight: 700; }
.warn::before { content: "!  "; color: var(--down); font-weight: 800; }

/* ---------- Sections on home ---------- */
.band { padding: var(--s6) 0 0; }
.band h2 { margin-top: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.rank-list { list-style: none; padding: 0; margin: 0; counter-reset: r; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); counter-increment: r; }
.rank-list li::before { content: counter(r); width: 1.8rem; font-weight: 700; color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.rank-list a { font-weight: 650; text-decoration: none; flex: 1; }
.theme-card { display: flex; gap: var(--s3); align-items: center; text-decoration: none; color: var(--text); }
.theme-card img { width: 44px; height: 44px; flex: none; }
.theme-card strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.theme-card span { font-size: 0.88rem; color: var(--text-muted); }
a.card:hover { border-color: var(--accent); }

/* ---------- Ads (reserved space; empty until ADS_ENABLED) ---------- */
.ad-slot { display: none; }
.ads-on .ad-slot { display: block; min-height: 280px; margin: var(--s5) 0; background: transparent; }
.ads-on .ad-slot.ad-sidebar { min-height: 600px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: var(--s6) 0; font-size: 0.93rem; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--s5); }
.site-footer h2 { font-size: 1rem; margin: 0 0 var(--s2); font-family: var(--font-body); font-weight: 700; color: var(--text); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-az { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: var(--s5) 0 var(--s4); }
.footer-az a { font-weight: 700; display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; }
.fine { font-size: 0.85rem; color: var(--text-subtle); margin-top: var(--s4); }

@media print { .site-header, .site-footer, .gen-panel, .ad-slot, .heart { display: none !important; } }
