/* Faveworthy theme: soft bento cards on a cool gray base, one indigo brand accent for links, buttons and the mark.
   Score colors are fixed jobs: green = good / high, amber = middle, red = bad / low, slate = neutral (Check).
   The brand accent never encodes a score. Type: Plus Jakarta Sans with tabular numbers. */
:root {
  --bg: #f4f5fa; --surface: #ffffff; --surface-2: #eef0f7; --surface-3: #e5e8f2;
  --text: #121528; --text-2: #474d66; --text-3: #6a7089; --border: #e0e3ee; --border-2: #cfd3e3;
  --accent: #4f46e5; --accent-strong: #4338ca; --accent-soft: #eceafe; --on-accent: #ffffff;
  --good: #15803d; --good-bg: #dcfce7; --mid: #a16207; --mid-bg: #fef3c7; --bad: #b91c1c; --bad-bg: #fee2e2; --neutral: #475569; --neutral-bg: #e2e8f0;
  --m0: #e9ebf2; --m1: #dcefe2; --m2: #a9dcb9; --m3: #5cb87e; --m4: #1f7a45; --m-line: #ffffff; --m-label: #3a4057; --m-label-on: #ffffff;
  --shadow: 0 1px 2px rgba(18, 21, 40, .05), 0 4px 16px rgba(18, 21, 40, .05);
  --radius: 16px; --radius-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f1f; --surface: #15182c; --surface-2: #1c2038; --surface-3: #252a47;
    --text: #eef0fa; --text-2: #b6bbd3; --text-3: #8d93b0; --border: #272c48; --border-2: #343a5c;
    --accent: #8f8aff; --accent-strong: #a9a5ff; --accent-soft: #24234d; --on-accent: #0d0f1f;
    --good: #4ade80; --good-bg: #123322; --mid: #fbbf24; --mid-bg: #3a2c0b; --bad: #f87171; --bad-bg: #3d1717; --neutral: #a8b3c7; --neutral-bg: #262c40;
    --m0: #1f2338; --m1: #183a29; --m2: #1f6b42; --m3: #34a865; --m4: #6ee7a0; --m-line: #0d0f1f; --m-label: #b6bbd3; --m-label-on: #0d0f1f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f1f; --surface: #15182c; --surface-2: #1c2038; --surface-3: #252a47;
  --text: #eef0fa; --text-2: #b6bbd3; --text-3: #8d93b0; --border: #272c48; --border-2: #343a5c;
  --accent: #8f8aff; --accent-strong: #a9a5ff; --accent-soft: #24234d; --on-accent: #0d0f1f;
  --good: #4ade80; --good-bg: #123322; --mid: #fbbf24; --mid-bg: #3a2c0b; --bad: #f87171; --bad-bg: #3d1717; --neutral: #a8b3c7; --neutral-bg: #262c40;
  --m0: #1f2338; --m1: #183a29; --m2: #1f6b42; --m3: #34a865; --m4: #6ee7a0; --m-line: #0d0f1f; --m-label: #b6bbd3; --m-label-on: #0d0f1f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; font-feature-settings: "tnum" 1; overflow-x: hidden; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 680px; }
.muted { color: var(--text-3); }
.sec { color: var(--text-2); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; border-radius: 8px; }
.skip:focus { left: 8px; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hide-sm { display: none; }
@media (min-width: 760px) { .hide-sm { display: table-cell; } span.hide-sm { display: inline; } .show-sm { display: none; } }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.mark { width: 32px; height: 32px; }
.mark-bg { fill: var(--accent); } .mark-fg { fill: var(--on-accent); } .mark-cut { fill: var(--accent); }
.nav { display: none; gap: 4px; margin-left: 8px; }
.nav a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text-2); cursor: pointer; }
.iconbtn:hover { color: var(--text); border-color: var(--border-2); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }
@media (min-width: 860px) { .nav { display: flex; } .menubtn { display: none; } }
@media (max-width: 859px) {
  .nav.open { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; margin: 0; box-shadow: var(--shadow); }
  .nav.open a { padding: 12px; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 16px; }
.btn-primary, .btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover, .btn-accent:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-quiet { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-quiet:hover { border-color: var(--border-2); color: var(--text); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.textlink { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }

/* hero + search */
.hero { padding: 44px 16px 20px; }
@media (min-width: 720px) { .hero { padding: 72px 28px 28px; } }
.hero h1 { max-width: 860px; }
.search { margin-top: 24px; display: flex; gap: 8px; max-width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 8px; box-shadow: var(--shadow); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 17px; padding: 0 12px; min-height: 52px; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); }
.search .btn span { display: none; }
@media (min-width: 520px) { .search .btn span { display: inline; } }
.search-hint { margin-top: 12px; color: var(--text-3); font-size: 15px; }

/* page head, crumbs, sections */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; font-size: 14px; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; } .crumbs a:hover { color: var(--accent); }
.page-head { padding-top: 14px; padding-bottom: 8px; }
.page-head h1 { max-width: 900px; }
.page-head > p { margin-top: 12px; color: var(--text-2); font-size: 17px; max-width: 760px; }
.section { padding-top: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.section-head p { color: var(--text-3); font-size: 15px; }
.two { display: grid; gap: 16px; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.notice { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); }

/* bento facts */
.bento { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 24px; }
@media (min-width: 900px) { .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); } .bento .fact.lead { grid-row: span 1; } }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.fact .v { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fact .l { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.fact.lead { grid-column: span 2; background: var(--accent-soft); border-color: transparent; }
.fact.lead .v { font-size: 40px; color: var(--accent); }
@media (min-width: 900px) { .fact.lead { grid-column: span 1; } }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.ds-grid, .statecards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.statecards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.statecards .card { text-decoration: none; color: var(--text); padding: 16px; }
.statecards .card p { color: var(--text-2); margin-top: 4px; }
.ds-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.ds-card:hover { border-color: var(--accent); color: var(--text); }
.ds-card p { color: var(--text-2); }
.ds-card .meta { font-size: 14px; color: var(--text-3); }
.tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.fieldcard ul { list-style: none; padding: 0; margin: 12px 0 0; }
.fieldcard li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 15px; }
.free { color: var(--text-3); font-size: 13px; font-weight: 700; }

/* tables */
.tablecard { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tablescroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
th .hint { display: block; font-weight: 500; color: var(--text-3); font-size: 12px; }
td.n, th.n { text-align: right; }
th.sc, td:last-child .score { min-width: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
td.rank, th.rank { width: 40px; color: var(--text-3); text-align: right; }
.ename { font-weight: 600; }
td a { text-decoration: none; } td a:hover { text-decoration: underline; }
tr.locked td { color: var(--text-3); }
.empty { text-align: center; color: var(--text-3); padding: 28px; }
.sortbtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sortbtn:focus-visible { outline: 3px solid var(--accent); border-radius: 4px; }
.sorti { width: 14px; height: 14px; opacity: .5; }
th[aria-sort] .sorti { opacity: 1; color: var(--accent); }
.tablefoot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 14px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.tablefoot > div { display: grid; gap: 6px; }
.lock { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-3); font-weight: 600; white-space: nowrap; }
.lock .icon, .paidtag .icon { width: 13px; height: 13px; }
.paidtag { color: var(--text-3); }

/* scores */
.score { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.score .sv { font-weight: 800; }
.score .of { color: var(--text-3); font-weight: 500; font-size: .85em; }
.score .bar { width: 46px; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.score .bar span { display: block; height: 100%; border-radius: 6px; }
.vword { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.t-good .bar span { background: var(--good); } .t-good .vword, .vchip.t-good { color: var(--good); background: var(--good-bg); }
.t-mid .bar span { background: var(--mid); } .t-mid .vword, .vchip.t-mid { color: var(--mid); background: var(--mid-bg); }
.t-bad .bar span { background: var(--bad); } .t-bad .vword, .vchip.t-bad { color: var(--bad); background: var(--bad-bg); }
.t-neutral .bar span { background: var(--neutral); } .t-neutral .vword, .vchip.t-neutral { color: var(--neutral); background: var(--neutral-bg); }
.score.big { flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.score.big .sv { font-size: 56px; letter-spacing: -0.03em; line-height: 1; }
.score.big .bar { width: 140px; height: 10px; }
.score.big .vword { font-size: 15px; padding: 4px 12px; }
.t-good .sv { color: var(--good); } .t-mid .sv { color: var(--mid); } .t-bad .sv { color: var(--bad); } .t-neutral .sv { color: var(--text); }
td .score .sv { color: var(--text); }
.vchip { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.scorekey { line-height: 1.9; }
.verdict-long { margin-top: 10px; font-weight: 700; }
.verdict-long.t-good { color: var(--good); } .verdict-long.t-bad { color: var(--bad); } .verdict-long.t-neutral { color: var(--neutral); }

/* town page */
.town-top { display: grid; gap: 16px; padding-top: 20px; }
@media (min-width: 980px) { .town-top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.scorecard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 18px; }
.scorecard-head .sec { font-size: 14px; font-weight: 600; }
.ledger { display: grid; gap: 0; border-top: 1px solid var(--border); }
.ledger-row, .ledger-total { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.ledger .pts { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.pts.plus { color: var(--good); } .pts.minus { color: var(--bad); } .pts.zero { color: var(--text-3); }
.ledger-total { border-bottom: 0; color: var(--text); font-weight: 700; }
.ledger.compact .ledger-row, .ledger.compact .ledger-total { padding: 5px 0; font-size: 13px; }
.metrics { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.metric.wide { grid-column: 1 / -1; }
.metric .l { font-size: 14px; font-weight: 700; color: var(--text-2); }
.metric .v { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.metric .e { font-size: 14px; color: var(--text-2); }
.bench { position: relative; height: 26px; margin-top: 14px; }
.bench .track { position: absolute; left: 0; right: 0; top: 9px; height: 8px; border-radius: 8px; background: var(--surface-3); }
.bench .zone { position: absolute; top: 9px; height: 8px; }
.bench .zone.good { background: color-mix(in srgb, var(--good) 45%, transparent); border-radius: 8px 0 0 8px; }
.bench .zone.bad { background: color-mix(in srgb, var(--bad) 35%, transparent); border-radius: 0 8px 8px 0; }
.bench .marker { position: absolute; top: 3px; width: 2px; height: 20px; background: var(--text-3); }
.bench .here { position: absolute; top: 3px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--surface); border: 4px solid var(--text); }
.bench-l { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--text-3); margin-top: 4px; flex-wrap: wrap; }

/* map */
.mapcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 16px; }
@media (min-width: 980px) { .mapcard { grid-template-columns: minmax(0, 1fr) 280px; padding: 22px; } .statelist { grid-column: 1 / -1; } }
.mapwrap { position: relative; }
.usmap { width: 100%; height: auto; display: block; }
.st path { stroke: var(--m-line); stroke-width: 1; transition: opacity .15s; }
.l0 path, .sw.l0, .call.l0 rect { fill: var(--m0); background: var(--m0); }
.l1 path, .sw.l1, .call.l1 rect { fill: var(--m1); background: var(--m1); }
.l2 path, .sw.l2, .call.l2 rect { fill: var(--m2); background: var(--m2); }
.l3 path, .sw.l3, .call.l3 rect { fill: var(--m3); background: var(--m3); }
.l4 path, .sw.l4, .call.l4 rect { fill: var(--m4); background: var(--m4); }
a.st:hover path, a.st:focus path { opacity: .8; }
a.st:focus { outline: none; }
.hl { fill: none; stroke: var(--accent); stroke-width: 3; pointer-events: none; }
.stl { font-size: 12px; font-weight: 700; fill: var(--m-label); text-anchor: middle; pointer-events: none; }
.stl.l3, .stl.l4 { fill: var(--m-label-on); }
.call line { stroke: var(--text-3); stroke-width: 1; }
.call circle { fill: var(--text-2); }
.call rect { stroke: var(--border-2); }
.call text { font-size: 12px; font-weight: 700; text-anchor: middle; fill: var(--m-label); pointer-events: none; }
.call.l3 text, .call.l4 text { fill: var(--m-label-on); }
.maptip { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--text); color: var(--bg); border-radius: 10px; padding: 8px 12px; font-size: 13px; display: grid; gap: 2px; box-shadow: var(--shadow); white-space: nowrap; }
.maptip[hidden] { display: none; }
.maplegend { display: grid; gap: 18px; align-content: start; }
.maplegend h3 { font-size: 15px; }
.maplegend .hint { display: block; font-size: 13px; font-weight: 500; color: var(--text-3); }
.legend-bins { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; font-size: 14px; color: var(--text-2); }
.legend-bins li { display: flex; align-items: center; gap: 10px; }
.sw { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--border-2); flex: none; }
.jump { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--text-2); }
select, input, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px; min-height: 44px; padding: 8px 12px; max-width: 100%; }
textarea { min-height: 80px; resize: vertical; }
.statelist summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.statelist ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 2px 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.statelist a { display: grid; grid-template-columns: 18px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 4px; color: var(--text); text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--border); }
.statelist .v { font-weight: 700; }

/* unlock + pricing */
.unlock { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 820px) { .unlock { grid-template-columns: 1fr auto; align-items: center; } }
.unlock ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); color: var(--text-2); font-size: 15px; }
.unlock li { display: flex; gap: 8px; align-items: flex-start; }
.unlock li .icon, .plan li .icon { color: var(--accent); margin-top: 3px; width: 16px; height: 16px; }
.unlock.member p { color: var(--text-2); margin-top: 6px; }
.unlock-cta { display: grid; gap: 10px; justify-items: start; }
.price-tag { color: var(--text-2); } .price-tag .num { font-size: 26px; font-weight: 800; color: var(--text); }
.plans { display: grid; gap: 16px; padding-top: 24px; }
@media (min-width: 900px) { .plans { grid-template-columns: 1fr 1fr; align-items: start; } }
.plan { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 24px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.plan .price .num { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.plan .price small { color: var(--text-2); font-size: 16px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--text-2); }
.plan li { display: flex; gap: 8px; }

/* forms */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; color: var(--text-2); }
.form.compact { gap: 10px; }
.form.inline { margin-top: 16px; }
@media (min-width: 900px) { .form.inline { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; } .form.inline h3 { grid-column: 1 / -1; } }
.form-msg { font-size: 14px; color: var(--text-2); min-height: 1.2em; }
.form-msg.err { color: var(--bad); } .form-msg.ok { color: var(--good); }
.field-err { color: var(--bad); font-size: 13px; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.row-actions { margin-top: 16px; }
.prose h2 { margin: 26px 0 8px; font-size: 19px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 20px; display: grid; gap: 8px; }
.prose p + p { margin-top: 10px; }

/* member app */
.app-body .top { position: sticky; }
.app { display: grid; gap: 0; min-height: calc(100vh - 64px); }
@media (min-width: 980px) { .app { grid-template-columns: 250px minmax(0, 1fr); } }
.side { padding: 16px; display: grid; gap: 18px; align-content: start; border-bottom: 1px solid var(--border); background: var(--surface); }
@media (min-width: 980px) { .side { border-bottom: 0; border-right: 1px solid var(--border); padding: 22px; } }
.side h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 8px; }
.side a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.side select { width: 100%; }
.main { padding: 18px 16px 40px; min-width: 0; }
@media (min-width: 720px) { .main { padding: 26px 28px 48px; } }
.main h1 { font-size: 28px; }
.main-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.chip select { min-height: 32px; padding: 2px 8px; border-radius: 8px; }
.chip input[type="checkbox"] { min-height: 0; width: 18px; height: 18px; accent-color: var(--accent); }
.resultline { color: var(--text-2); font-size: 14px; margin-bottom: 10px; }
.why { margin-top: 4px; }
.why summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; }
.why .ledger { min-width: 280px; margin-top: 6px; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tog { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.tog input { min-height: 0; width: 14px; height: 14px; }

/* footer */
.foot { margin-top: 64px; border-top: 1px solid var(--border); background: var(--surface); }
.foot .wrap { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 24px; }
@media (min-width: 820px) { .foot .wrap:first-child { grid-template-columns: 2fr 1fr 1fr; } }
.foot p { color: var(--text-2); font-size: 14px; margin-top: 10px; max-width: 520px; }
.foot h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 8px; }
.foot a:not(.logo) { display: block; color: var(--text-2); text-decoration: none; padding: 5px 0; font-size: 15px; }
.foot a:not(.logo):hover { color: var(--accent); }
.foot-legal { border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); padding-top: 14px !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
tbody td:first-child, thead th:first-child { min-width: 140px; }
tbody td.rank, thead th.rank { min-width: 0; }
.rank-table td:nth-child(2) { min-width: 130px; }
td.addr { min-width: 220px; }
.scorecard-head p.small { font-weight: 500; margin-top: 6px; }
@media (max-width: 560px) {
  td .score .bar { display: none; }
  .rank-table td:nth-child(2), .rank-table th:nth-child(2) { min-width: 0; }
  .rank-table th, .rank-table td { padding: 10px 8px; }
  .rank-table th .hint { display: none; }
}
