/* Grape Tracks. Tablet first, works in portrait and on phones.
   Layout: sticky top bar, scrolling view, fixed dock at the bottom. */
:root {
  /* ---- Palette: change colors here only. ----
     Neutrals are grays; --accent is navy (buttons, selected states, headings accents),
     --accent2 is steel blue (secondary chips, Safe Harbor), --accent3 is a brighter blue used sparingly.
     Wine colors (the three-dot markers) live in content/categories/wine.json, not here. */
  --paper: #F2F3F5; --card: #FFFFFF; --ink: #1E242C; --muted: #5E6772; --line: #D7DCE2;
  --accent: #1F3A5F; --accent-ink: #FFFFFF; --accent-soft: #E3E9F0;
  --accent2: #3F5F7D; --accent2-soft: #E6EBF0; --accent3: #2D6FC4; --accent3-soft: #E2ECF8;
  --f-display: "Young Serif", Georgia, "Times New Roman", serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 16px; --dock-h: 72px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12161B; --card: #1B2128; --ink: #E7EBEF; --muted: #A2ACB7; --line: #2E3742;
    --accent: #9DB9DA; --accent-ink: #0E1620; --accent-soft: #233243;
    --accent2: #A9BCCD; --accent2-soft: #212B35; --accent3: #6FA6EC; --accent3-soft: #1C2B3D;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--f-body); font-size: 16px; line-height: 1.55; -webkit-text-size-adjust: 100%;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px)); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--card); padding: 8px 12px; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.brand b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 20px; letter-spacing: .06em; line-height: 1.1; }
.brand small { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.search input { width: 260px; max-width: 100%; height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* View */
#view { display: block; max-width: 1200px; margin: 0 auto; outline: none;
  padding: 24px max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px)); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); }
.lede { color: var(--muted); margin: 6px 0 0; max-width: 65ch; }
.back { text-decoration: none; font-weight: 600; color: var(--muted); }

/* Dock */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line);
  display: flex; justify-content: center; align-items: center; gap: 8px;
  min-height: var(--dock-h); padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.dock a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 11px 18px; border-radius: 999px; white-space: nowrap; }
.dock a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.dock a.harbor { background: var(--accent2); color: var(--card); }
.dock .narrow { display: none; }
@media (max-width: 700px) {
  .dock .wide { display: none; } .dock .narrow { display: inline-block; }
  .dock a { padding: 10px 12px; font-size: 14px; }
  .search { order: 3; flex: 1 1 100%; } .search input { width: 100%; }
  .bar { position: static; }
}

/* Front door */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .doors { grid-template-columns: minmax(0, 1fr); } }
.door { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; min-height: 170px; padding: 22px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; transition: transform .15s; }
.door:hover { transform: translateY(-2px); }
.door .k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.door .t { font-family: var(--f-display); font-size: 26px; line-height: 1.15; }
.door .d { font-size: 14px; color: var(--muted); }
.door.hero { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.door.hero .k, .door.hero .d { color: inherit; opacity: .85; }
.door.lucky { background: var(--accent2-soft); border-color: transparent; } .door.lucky .k, .door.lucky .d { color: var(--accent2); }
.door.soon { border-style: dashed; opacity: .75; }
@media (prefers-reduced-motion: reduce) { .door { transition: none; } .door:hover { transform: none; } }

/* Chips and filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip.static { cursor: default; padding: 5px 12px; font-size: 13px; }
.chip.red { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip.nw { background: var(--accent2-soft); border-color: transparent; color: var(--accent2); }
.chip.cellar { background: var(--accent3-soft); border-color: transparent; color: var(--accent3); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.toolbar select { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--card); }

/* Wine rows (cards that line up like a table on wide screens) */
.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) 110px 70px 70px; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; }
.row:hover { border-color: var(--accent); }
.row .n b { display: block; } .row .n span, .row .w { color: var(--muted); font-size: 14px; }
.row .p { text-align: right; font-variant-numeric: tabular-nums; }
.row .p small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.dots { color: var(--accent); letter-spacing: 2px; font-size: 13px; }
@media (max-width: 760px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row .w, .row .dotcol { display: none; }
  .row .p.glass { display: none; }
}
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); }

/* Shelves */
.shelf { margin-bottom: 28px; } .shelf h2 { font-size: 26px; margin-bottom: 10px; }
.shelf h2 small { font-family: var(--f-body); font-size: 15px; color: var(--muted); margin-left: 8px; }

/* Wine page */
.wine { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .wine { grid-template-columns: minmax(0, 1fr); } }
.side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .side .bottle { grid-row: span 2; } }
@media (max-width: 520px) { .side { grid-template-columns: minmax(0, 1fr); } .side .bottle { display: none; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.bottle { display: grid; place-items: center; background: linear-gradient(180deg, var(--accent-soft), var(--card)); }
.bottle svg { width: 100%; max-width: 130px; height: auto; }
.slot { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; }
.price { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price div { background: var(--paper); border-radius: 10px; padding: 10px 12px; }
.price span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.price strong { font-family: var(--f-display); font-weight: 400; font-size: 28px; font-variant-numeric: tabular-nums; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; font-weight: 500; min-width: 0; }
.mine { display: flex; gap: 8px; flex-wrap: wrap; }
.mine button { flex: 1; border: 1.5px solid var(--accent); background: var(--card); color: var(--accent); border-radius: 999px; padding: 10px 12px; font-weight: 700; cursor: pointer; min-height: 44px; }
.mine button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.main { display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.hero { margin-bottom: 24px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); margin-top: 6px; }
.hero .prod { font-size: 20px; color: var(--muted); margin-top: 4px; }
.hero .crumbs { color: var(--muted); margin: 8px 0 14px; }
.sh { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sh h2 { font-size: 28px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent3-soft); color: var(--accent3); }
.meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .meters { grid-template-columns: minmax(0, 1fr); } }
.meter { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.meter .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.meter h3 { font-family: var(--f-body); font-weight: 700; font-size: 15px; }
.meter .word { font-size: 14px; color: var(--accent); font-weight: 600; text-align: right; }
.bar5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 6px; }
.bar5 i { height: 12px; border-radius: 999px; background: var(--line); }
.bar5 i.on { background: var(--accent); }
.ends { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.notes { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.notes p { margin: 0; font-size: 18px; line-height: 1.65; max-width: 65ch; }
.notes .who { font-size: 13px; color: var(--muted); margin-top: 12px; }
.sw { cursor: pointer; border-bottom: 1.5px dotted var(--accent); }
.plain .sw { border-bottom-color: transparent; cursor: default; }
.plain .sw .s, .geek .sw .r { display: none; }
.tip { position: absolute; z-index: 40; max-width: 260px; background: var(--ink); color: var(--paper); font-size: 14px; line-height: 1.4; padding: 8px 12px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.tip b { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; margin-bottom: 2px; }
.sites { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.site h3 { font-size: 18px; } .site .ava { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent2); font-weight: 700; margin-top: 2px; }
.site p { margin: 8px 0 0; font-size: 15px; }
.two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .two { grid-template-columns: minmax(0, 1fr); } }
.story p { margin: 0 0 12px; max-width: 65ch; } .story p:last-child { margin: 0; }
.specs { font-family: var(--f-mono); font-size: 14px; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs span { color: var(--muted); font-family: var(--f-body); } .specs b { font-weight: 500; text-align: right; }
.talk { background: var(--accent-soft); border-radius: var(--r); padding: 22px 24px; }
.talk blockquote { margin: 0; font-family: var(--f-display); font-size: 22px; line-height: 1.4; max-width: 60ch; }
.talk .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 18px; }
@media (max-width: 620px) { .talk .cols { grid-template-columns: minmax(0, 1fr); } }
.talk h3 { font-family: var(--f-body); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.talk ul { margin: 0; padding-left: 18px; } .talk li { margin: 4px 0; }
.pairs { display: grid; gap: 8px; }
.pair { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--card); border-radius: 12px; padding: 10px 12px; text-decoration: none; }
.pair small { display: block; color: var(--muted); font-size: 13px; }
.pair.avoid { background: transparent; border: 1px dashed var(--line); }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; text-decoration: none; min-height: 44px; }
.cta.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.goals { display: flex; flex-wrap: wrap; gap: 8px; }
.goal { border: 1.5px solid var(--accent2); background: var(--card); color: var(--accent2); border-radius: 999px; padding: 9px 16px; font-weight: 700; cursor: pointer; min-height: 44px; }
.goal[aria-pressed="true"] { background: var(--accent2); color: var(--card); }
.track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
@media (max-width: 760px) { .track { grid-template-columns: minmax(0, 1fr); } }
.stop { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.stop .k { font-size: 12px; font-weight: 700; color: var(--accent2); letter-spacing: .06em; }
.stop.start { background: var(--accent); color: var(--accent-ink); border-color: transparent; } .stop.start .k { color: inherit; opacity: .8; }
.stop small { color: var(--muted); font-size: 13px; } .stop.start small { color: inherit; opacity: .85; }
.trackmsg { margin-top: 12px; color: var(--muted); }
.sources { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.sources ul { margin: 6px 0 0; padding-left: 18px; } .sources a { color: var(--accent); }

/* Food */
.dishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.dish { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; font-weight: 600; }
.dish small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }

/* Safe Harbor */
.harbor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 24px; }
@media (max-width: 900px) { .harbor-grid { grid-template-columns: minmax(0, 1fr); } }
.shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.shortcut { min-height: 88px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px;
  font-family: var(--f-display); font-size: 22px; text-decoration: none; }
.shortcut.main { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.shortcut.calm { background: var(--accent2-soft); color: var(--accent2); border-color: transparent; }

/* ---------- splash (first screen) ---------- */
.splash-on .bar, .splash-on .dock { display: none; }
.splash { min-height: calc(100dvh - 48px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(16px, 3vh, 32px); text-align: center; }
.splash-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: min(760px, 100%); }
@media (max-width: 560px) { .splash-doors { grid-template-columns: minmax(0, 1fr); } }
.splash-btn { display: flex; flex-direction: column; gap: 8px; padding: 26px 24px; min-height: 140px; justify-content: center; border-radius: var(--r); text-decoration: none; background: var(--card); border: 1px solid var(--line); }
.splash-btn .k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.splash-btn .t { font-family: var(--f-display); font-size: clamp(22px, 3vw, 28px); line-height: 1.15; }
.splash-btn.go { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.splash-btn.go .k { color: inherit; opacity: .85; }

/* ---------- list accordion ---------- */
.acc { display: grid; gap: 12px; }
.acc-sec h2 { margin: 0; }
.acc-h { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 20px; min-height: 64px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.acc-h span { font-family: var(--f-display); font-size: 26px; }
.acc-h small { color: var(--muted); font-size: 15px; margin-right: auto; }
.acc-h i { width: 12px; height: 12px; border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(45deg); margin: -6px 6px 0 0; transition: transform .15s; }
.acc-sec.open .acc-h { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.acc-sec.open .acc-h small { color: inherit; opacity: .85; }
.acc-sec.open .acc-h i { transform: rotate(-135deg); margin-top: 6px; border-color: var(--accent-ink); }
.acc-sec .rows { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .acc-h i { transition: none; } }

/* ---------- how it's made ---------- */
.made { margin-top: 28px; }
.made h2 { font-size: 22px; margin-bottom: 10px; }
.shelves-made, .page-head + .made { margin: 0 0 24px; }
.chip.prac { background: var(--accent2-soft); border-color: transparent; color: var(--accent2); }
.chip.prac small { font-size: 12px; opacity: .8; margin-left: 6px; }
.hero .chip.prac { padding: 5px 12px; font-size: 13px; }
.chip.ghost { background: transparent; }
.made-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.made-card { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.made-card h2 { font-size: 22px; }
.made-card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.made-card small { color: var(--accent2); font-weight: 700; }
.aka { display: block; margin-top: 4px; font-size: 14px; }

/* ---------- Grape Tracks mark (footprints + title layer) ---------- */
.mark { position: relative; width: min(440px, 58vh, 86vw); margin: 0 auto; }
.mark > img { display: block; width: 100%; height: auto; }
.mark-title { position: absolute; left: -4%; right: -4%; top: 52.3%; height: 8.5%; margin: 0; display: grid; place-items: center;
  background: rgba(35, 31, 32, .72); color: #fff; font-family: var(--f-body); font-weight: 600; font-size: clamp(20px, 3.4vh, 32px);
  letter-spacing: .32em; text-transform: uppercase; line-height: 1; }
.mark-title span { padding-left: .32em; }
.mark-by { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.mark-by img { width: 40px; height: 40px; object-fit: contain; }
@media (prefers-color-scheme: dark) { .mark-by img, .brand img { background: #fff; border-radius: 50%; } }

/* ---------- three-dot wine markers ---------- */
.dot-ic { width: .95em; height: .95em; vertical-align: -.1em; margin-right: .4em; flex: none; }
.eyebrow .dot-ic { width: 1.1em; height: 1.1em; }
.acc-h .dot-ic { width: 26px; height: 26px; margin: 0; }
.acc-sec.open .acc-h .dot-ic { background: var(--card); border-radius: 50%; padding: 4px; box-sizing: content-box; width: 22px; height: 22px; }
@media (prefers-color-scheme: dark) { .dot-ic { filter: brightness(1.9) saturate(1.2); } }

/* 2-glass minimum (pricier bottles) */
.row .p.glass.min small { color: var(--accent); font-weight: 700; letter-spacing: .04em; }
.glassmin { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--accent); font-weight: 600; }

/* ---------- learn & glossary ---------- */
.door.learn { background: var(--accent-soft); border-color: transparent; }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.term { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-decoration: none; }
.term:hover { border-color: var(--accent); }
.term span { color: var(--muted); font-size: 14px; }
.term small { color: var(--accent2); font-weight: 700; font-size: 12px; margin-top: 4px; }
.gloss-q { width: min(420px, 100%); height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.term-plain { font-family: var(--f-display); font-size: 22px; color: var(--accent); margin: 4px 0 0; }
.term-def p { margin: 0; font-size: 18px; line-height: 1.6; max-width: 65ch; }
.term-def .aka { margin-top: 12px; font-size: 14px; color: var(--muted); }
h2.sub { font-size: 22px; margin: 28px 0 10px; }
.tip a { display: block; margin-top: 6px; color: inherit; font-weight: 700; text-decoration: underline; }

/* ---------- regions & maps ---------- */
:root { --sea: #dfe6ed; --other: #e9ecef; --river: #6f97ba; }
@media (prefers-color-scheme: dark) { :root { --sea: #0f1a26; --other: #232a32; --river: #4f7896; } }
.countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.country { text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.country h2 { font-size: 26px; }
.country .count { color: var(--accent2); font-weight: 700; font-size: 14px; }
.country .kids { color: var(--muted); font-size: 14px; }
.region { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .region { grid-template-columns: minmax(0, 1fr); } }
.region-about { margin: 0; font-size: 18px; line-height: 1.65; }
.region-text h2.sub:first-of-type { margin-top: 22px; }
figure.map { margin: 0; background: var(--sea); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
figure.map svg { display: block; width: 100%; height: auto; max-height: 72vh; }
figure.map figcaption { font-size: 12px; color: var(--muted); padding: 8px 12px; background: var(--card); border-top: 1px solid var(--line); }
.map-wait { padding: 60px 16px; text-align: center; color: var(--muted); }
.gt-map .land { fill: var(--card); stroke: var(--muted); stroke-width: 1.2; }
.gt-map .other { fill: var(--other); stroke: var(--line); stroke-width: 1; }
.gt-map .adm { fill: none; stroke: var(--line); stroke-width: 1; }
.gt-map .hl { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; fill-opacity: .9; }
.gt-map .river { fill: none; stroke: var(--river); stroke-width: 2.5; }
.gt-map .pin { fill: var(--card); stroke: var(--accent); }
.gt-map .pin.has { fill: var(--accent); }
.gt-map .pin.on { fill: var(--accent3); stroke: var(--ink); }
.gt-map text { font-family: var(--f-body); font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-linejoin: round; }
.gt-map a:hover text { fill: var(--accent); }
.law ol { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.law li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--paper); }
.law li:first-child { background: var(--accent-soft); }
.law li span { color: var(--muted); font-size: 13px; }
.law p { margin: 0; font-size: 15px; }
.subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.sub-place { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-decoration: none; display: flex; flex-direction: column; }
.sub-place span { color: var(--muted); font-size: 13px; }
.hero .crumbs a, .page-head .crumbs a { color: inherit; }
.page-head .crumbs { color: var(--muted); font-size: 14px; margin-bottom: 4px; }

/* ---------- learning paths ---------- */
.path-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.path-card { text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.path-card .k { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.path-card h2 { font-size: 26px; } .path-card p { margin: 0; color: var(--muted); flex: 1; }
.path-card small { color: var(--muted); font-size: 13px; }
.prog { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.prog i { display: block; height: 100%; background: var(--accent2); border-radius: 999px; }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.lesson-row { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; text-decoration: none; }
.lesson-row .num { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.lesson-row.done .num { background: var(--accent2); color: var(--card); }
.lesson-row .t { flex: 1; display: flex; flex-direction: column; } .lesson-row small { color: var(--muted); }
.lesson { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .lesson { grid-template-columns: minmax(0, 1fr); } }
.lesson-body p { font-size: 18px; line-height: 1.7; margin: 0 0 16px; max-width: 65ch; }
.takeaways { position: sticky; top: 96px; background: var(--accent-soft); border-color: transparent; }
@media (max-width: 900px) { .takeaways { position: static; } }
.takeaways h2 { font-size: 20px; margin-bottom: 8px; } .takeaways ul { margin: 0; padding-left: 18px; } .takeaways li { margin: 6px 0; }
.practice { max-width: 760px; }
.q { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; }
.qt { margin: 0 0 10px; font-size: 17px; }
.choices { display: grid; gap: 8px; }
.choice { text-align: left; border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 12px 14px; min-height: 48px; cursor: pointer; font-weight: 600; }
.choice:hover:not(:disabled) { border-color: var(--accent); }
.choice:disabled { cursor: default; opacity: .75; }
.choice.right { border-color: #2f7d4f; background: #e3f2e8; color: #1d4d31; opacity: 1; }
.choice.wrong { border-color: #a33a3a; background: #f7e3e3; color: #6b2020; opacity: 1; }
@media (prefers-color-scheme: dark) { .choice.right { background: #1b3326; color: #b6e3c6; } .choice.wrong { background: #3a1e1e; color: #f0b9b9; } }
.why { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.practice-done { padding: 14px 18px; border-radius: var(--r); background: var(--accent-soft); font-size: 17px; }
.lesson-nav { margin: 24px 0; }
