/* Via Cancion Neighbors · production theme. Restrained palette: deep green brand, warm neutrals, amber for "Reported". */
:root {
  --ink: #1b2420;
  --ink-2: #3a4540;
  --ink-3: #5f6b66;
  --ink-4: #8d9893;
  --line: #dcd9d0;
  --line-2: #ebe8e1;
  --bg: #f6f5f1;
  --card: #ffffff;
  --fill: #f0eee8;
  --fill-2: #e4e1d8;
  --brand: #1d4b3f;
  --brand-2: #2f6b4f;
  --brand-soft: #e5efe9;
  --accent: #a8432a;
  --amber: #b7791f;
  --amber-soft: #fbf1df;
  --danger: #a12d2d;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(27, 36, 32, .05), 0 2px 10px rgba(27, 36, 32, .04);
  --nav-w: 244px;
  --top-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; }
h1 { font-family: var(--serif); font-size: 32px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; }
h3 { font-size: 15.5px; font-weight: 650; }
h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 650; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--ink-3); }
code, .mono { font-family: var(--mono); font-size: .9em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 99; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.loading { padding: 60px 0; text-align: center; color: var(--ink-3); }
.hide-sm { display: inline; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--brand); color: #fff; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; min-width: 0; }
.brand:hover { color: #fff; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: #fff; color: var(--brand); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: .02em; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-text strong { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.brand-text small { font-size: 11.5px; color: rgba(255, 255, 255, .72); }
.back-main { color: rgba(255, 255, 255, .8); font-size: 12.5px; text-decoration: none; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.back-main:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.topbar-status { flex: 1; display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: rgba(255, 255, 255, .85); overflow: hidden; white-space: nowrap; padding-left: 12px; }
.topbar-status .chip-dark { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar .btn { background: #fff; color: var(--brand); border-color: #fff; }
.topbar .btn:hover { background: var(--brand-soft); }
.topbar .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.topbar .acct .chip { font-size: 10.5px; padding: 0 6px; }
.topbar .icon-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }

/* Forms */
select, input, textarea { font: inherit; color: inherit; }
select, input[type=text], input[type=email], input[type=tel], input[type=date], input[type=datetime-local], input[type=url], input[type=search], input[type=number], textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: #fff; width: 100%; transition: border-color .12s, box-shadow .12s;
}
input[readonly] { background: var(--fill); }
input[disabled], select[disabled] { background: var(--fill); color: var(--ink-3); }
input[type=file] { font-size: 13px; max-width: 100%; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 107, 79, .18); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; flex-shrink: 0; }
label.field, .field { display: block; margin-bottom: 13px; }
label.field > span, .field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }
.check { display: flex; gap: 9px; align-items: flex-start; margin: 7px 0; cursor: pointer; font-size: 14px; }
.check input { margin-top: 3px; }
fieldset.plainset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
fieldset.plainset legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 4px; }
fieldset.plainset .check { font-size: 13.5px; margin: 5px 0; }
.choice-grid { gap: 8px; }
.choice { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; font-size: 13.5px; background: #fff; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.consent { border: 1px solid var(--line); background: var(--fill); border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.5; margin: 6px 0 10px; transition: opacity .15s; }
.consent.dim { opacity: .55; }
.note-box { background: var(--amber-soft); border: 1px solid #ecd6ad; border-radius: 8px; padding: 8px 11px; font-size: 12.5px; color: #6b4a12; margin: 6px 0 10px; }
.note-card { background: var(--amber-soft); border-color: #ecd6ad; margin-bottom: 14px; font-size: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: 8px 15px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: #163a31; color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--fill); color: var(--ink); border-color: var(--ink-4); }
.btn-ghost[aria-pressed=true] { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-light { background: #fff; color: var(--brand); border-color: #fff; }
.btn-light:hover { background: var(--brand-soft); color: var(--brand); }
.btn.danger, .btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { border-color: var(--danger); background: #fbeeee; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-lg { padding: 12px 20px; font-size: 15.5px; }
.btn[disabled], .btn[aria-disabled=true] { opacity: .45; cursor: not-allowed; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 16px; color: inherit; }
.linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; color: var(--brand); }

/* Shell */
.shell { display: flex; min-height: calc(100vh - var(--top-h)); }
.sidenav { width: var(--nav-w); flex-shrink: 0; border-right: 1px solid var(--line); background: #fbfaf7; padding: 16px 10px 80px; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; }
.nav-group { margin-bottom: 14px; }
.nav-group h4 { font-size: 10.5px; padding: 0 10px; margin: 8px 0 4px; color: var(--ink-4); }
.nav-link { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--ink-2); font-size: 14px; }
.nav-link:hover { background: var(--fill); color: var(--ink); }
.nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.nav-link .nav-ico { width: 18px; text-align: center; font-size: 13px; opacity: .75; }
.nav-link .lock { margin-left: auto; font-size: 10.5px; opacity: .55; }
.nav-cta { padding: 6px 10px; }
.nav-cta .btn { width: 100%; }
main { flex: 1; min-width: 0; padding: 30px 38px 90px; max-width: 1280px; margin: 0 auto; }
main:focus { outline: none; }
.site-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 38px 26px calc(var(--nav-w) + 38px); font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); background: var(--bg); }
.site-footer a { color: var(--ink-3); }

/* Page header */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head p { color: var(--ink-3); max-width: 760px; margin: 0; font-size: 15.5px; }
.crumbs { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-3); }
.access-pill { font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--ink-3); background: #fff; white-space: nowrap; }

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-tight { padding: 12px 14px; }
.card-flush { padding: 0; overflow: hidden; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 330px; }
.g-filter { grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
.grid > .card + .card { margin-top: 0; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt { margin-top: 14px; } .mt2 { margin-top: 26px; } .mb0 { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--line-2); margin: 18px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 12px; }
.section-title h2 { margin: 0; }
.prose h3 { margin-top: 1.2em; }
.prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin: 4px 0; }

/* Statement */
.statement { border-left: 4px solid var(--brand); background: #fff; padding: 18px 22px; margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.5; color: var(--ink); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
.statement small { display: block; margin-top: 8px; font-family: var(--font); font-size: 12px; }
.statement-inline { border-left: 3px solid var(--brand); padding: 7px 12px; background: var(--brand-soft); font-size: 13px; margin-bottom: 10px; border-radius: 0 6px 6px 0; color: var(--ink-2); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.status-card .big { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 2px 0 6px; }
.countdown { display: flex; gap: 8px; margin: 12px 0; }
.countdown div { background: var(--brand-soft); border-radius: 8px; padding: 8px 10px; text-align: center; min-width: 64px; }
.countdown b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; color: var(--brand); }
.countdown span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.today-card { background: var(--brand); color: #fff; border-color: var(--brand); }
.today-card h4, .today-card small, .today-card .muted { color: rgba(255, 255, 255, .75); }
.today-card a:not(.btn) { color: #fff; }
.today-card .btn:not(.btn-light) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-radius: 4px; padding: 2px 6px; white-space: nowrap; vertical-align: middle; line-height: 1.4; }
.badge-Verified { background: var(--brand-soft); color: var(--brand); border: 1px solid #b9d3c4; }
.badge-Verified::before { content: "✓"; }
.badge-Reported { background: var(--amber-soft); color: #8a5a12; border: 1px solid #ecd6ad; }
.badge-Reported::before { content: "◐"; }
.badge-Unverified { background: #fff; color: var(--ink-3); border: 1px dashed var(--ink-4); }
.badge-Unverified::before { content: "?"; }
.chip { display: inline-block; font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; background: #fff; color: var(--ink-2); white-space: nowrap; }
.chip-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-ok { background: var(--brand-soft); color: var(--brand); border-color: #b9d3c4; }
.chip-warn { background: var(--amber-soft); color: #8a5a12; border-color: #ecd6ad; }
.tag-sample, .wf-notes, .wf-pin, .wf-banner { display: none !important; }

/* Source line */
.src { font-size: 12px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.src a { color: var(--ink-3); }
.cite { font-size: 10.5px; vertical-align: super; text-decoration: none; border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; margin-left: 2px; background: #fff; }
.cite-n { font-size: 10.5px; color: var(--brand); font-weight: 700; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.fact { border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; background: #fff; }
.fact label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); display: block; }
.fact .v { font-weight: 600; margin: 2px 0 4px; }
.kpi { text-align: left; }
.kpi b { display: block; font-family: var(--serif); font-size: 32px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--brand); }
.kpi span { font-size: 12.5px; color: var(--ink-3); }

/* Placeholders / empty media */
.ph { position: relative; background: var(--fill); border: 1px dashed var(--line); border-radius: 8px; min-height: 120px; display: grid; place-items: center; color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-align: center; padding: 12px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.media-grid img, .media-grid video { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; background: var(--fill); }

/* Lists & tables */
.list { list-style: none; padding: 0; margin: 0; }
.list > li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.list > li:last-child { border-bottom: 0; }
.list li .done { text-decoration: line-through; color: var(--ink-4); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th, .t td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.t th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 650; background: var(--fill); position: sticky; top: 0; }
.t tr:hover td { background: #fbfaf7; }
.t tr.muted td { color: var(--ink-4); }
.t select { padding: 4px 6px; font-size: 12.5px; width: auto; }
.actions-cell { white-space: nowrap; }
.actions-cell .btn { margin: 2px 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 14px; }
.timeline li::before { content: ""; position: absolute; left: -27px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.timeline li.past::before { background: var(--brand); }
.timeline li.unknown::before { border-style: dashed; border-color: var(--ink-4); }
.timeline li.computed::before { border-radius: 2px; border-color: var(--amber); }
.timeline li.today::before { background: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline .when { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Evidence library */
.filters { position: sticky; top: calc(var(--top-h) + 14px); }
.filters fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.filters legend { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: 4px; }
.filters .check { font-size: 13px; margin: 3px 0; justify-content: space-between; }
.filters .check span.count { color: var(--ink-4); font-size: 11.5px; margin-left: auto; }
.ev-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.ev-toolbar input[type=search] { flex: 1; min-width: 220px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: #fff; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ev-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: border-color .12s, box-shadow .12s; text-align: left; font: inherit; color: inherit; }
.ev-card:hover { border-color: var(--brand-2); box-shadow: 0 4px 16px rgba(27, 36, 32, .07); }
.ev-card.gap { border-style: dashed; background: #fcfbf8; }
.ev-card h3 { margin: 0; font-size: 15px; }
.ev-card .sum { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ev-card .meta { font-size: 11.5px; color: var(--ink-3); margin-top: auto; display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 8px; }
.type-ico { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; background: var(--fill); flex-shrink: 0; }
.ev-active-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ev-active-filters .chip { cursor: pointer; }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--ink-3); background: #fff; }

/* Scorecard */
.score-row { display: grid; grid-template-columns: minmax(220px, 1.2fr) 120px minmax(0, 2fr) 160px; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.score-row:last-child { border-bottom: 0; }
.score-row .label b { display: block; }
.meter { height: 8px; background: var(--fill-2); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.meter > i { display: block; height: 100%; background: var(--brand-2); }
.status-pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; display: inline-block; text-transform: uppercase; letter-spacing: .05em; }
.st-strong { background: var(--brand); color: #fff; }
.st-building { background: var(--amber-soft); color: #8a5a12; }
.st-gap { border: 1.5px dashed var(--ink-3); background: #fff; color: var(--ink-2); }
.mini-ev { display: flex; flex-wrap: wrap; gap: 4px; }
.mini-ev button { font: inherit; font-size: 11px; border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 1px 6px; cursor: pointer; }
.mini-ev button:hover { border-color: var(--brand-2); }
.gaps { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); }
.matrix td.cell { text-align: center; font-variant-numeric: tabular-nums; }
.matrix td.cell i { display: inline-block; width: 24px; height: 24px; line-height: 24px; border-radius: 4px; font-style: normal; font-size: 11px; font-weight: 700; }
.c0 { border: 1px dashed var(--ink-4); color: var(--ink-4); }
.c1 { background: #d5e5db; color: var(--brand); }
.c2 { background: #7fa894; color: #fff; }
.c3 { background: var(--brand); color: #fff; }

/* Strength meter */
.strength { display: inline-flex; gap: 2px; vertical-align: middle; }
.strength i { width: 14px; height: 8px; border-radius: 2px; background: var(--fill-2); }
.strength i.on { background: var(--brand-2); }

/* Details */
details.acc { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
details.acc + details.acc { margin-top: 10px; }
details.acc > summary { list-style: none; cursor: pointer; padding: 15px 16px; display: flex; gap: 12px; align-items: center; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: "+"; margin-left: auto; font-size: 18px; color: var(--ink-3); }
details.acc[open] > summary::after { content: "–"; }
details.acc > .acc-body { padding: 14px 16px 16px; border-top: 1px solid var(--line-2); }
.rank { font-family: var(--serif); font-size: 22px; font-weight: 600; width: 32px; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); font-weight: 600; }
.kv dd { margin: 0; }
.lint { border: 1px solid #e3b9b0; background: #fdf3f1; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #6e2a1d; }
.lint.ok { border-color: #b9d3c4; background: var(--brand-soft); color: var(--brand); }
.lint ul { margin: 4px 0 0; padding-left: 18px; }
.lint li { margin: 3px 0; }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - var(--top-h) - 210px); min-height: 500px; }
.chat-log { flex: 1; overflow-y: auto; padding: 4px 4px 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; padding: 12px 15px; border-radius: 12px; font-size: 14px; }
.msg p { margin: 0 0 .6em; }
.msg p:last-child { margin-bottom: 0; }
.msg ul { margin: 4px 0 8px; padding-left: 18px; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 3px; }
.msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.msg.ai ol { margin: 8px 0 0; padding-left: 20px; font-size: 12.5px; color: var(--ink-3); }
.chat-input { display: flex; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.suggest button { font: inherit; font-size: 12.5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; cursor: pointer; color: var(--ink-2); }
.suggest button:hover { border-color: var(--brand-2); color: var(--brand); }
.typing { color: var(--ink-3); font-style: italic; font-size: 12.5px; }

/* Wizard & tabs */
.steps { display: flex; gap: 0; margin: 0 0 18px; padding: 0; }
.steps li { list-style: none; flex: 1; font-size: 12px; color: var(--ink-3); padding-top: 10px; border-top: 3px solid var(--line); margin-right: 4px; }
.steps li.on { border-top-color: var(--brand); color: var(--brand); font-weight: 650; }
.steps li.done { border-top-color: #9cbfae; }
.letter-preview { white-space: pre-wrap; font-family: var(--serif); font-size: 15px; line-height: 1.6; background: #fff; border: 1px solid var(--line); padding: 22px 26px; border-radius: 6px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a, .tabs button { font: inherit; font-size: 13.5px; padding: 9px 13px; border: 0; background: none; cursor: pointer; text-decoration: none; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs .on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }
.tool-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.tool-card:hover { border-color: var(--brand-2); color: var(--ink); }
.tool-card .ico { font-size: 20px; color: var(--brand); }
.progress { height: 10px; background: var(--fill-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand-2); }
.mod-card .mod-actions input { flex: 1; min-width: 200px; }

/* Calendar */
.cal-head { margin-bottom: 10px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal .dow { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 6px 8px; background: var(--fill); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 90px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 4px 6px; font-size: 11.5px; min-width: 0; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day .n { font-weight: 600; color: var(--ink-3); }
.cal .day.today .n { background: var(--brand); color: #fff; border-radius: 4px; padding: 0 5px; }
.cal .day.other { background: #fbfaf7; color: var(--ink-4); }
.cal .ev { display: block; font-size: 10.5px; margin-top: 3px; padding: 1px 5px; border-radius: 3px; background: var(--fill-2); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.ev.hearing, .ev-chip.hearing, .ev-sw.hearing { background: var(--brand); color: #fff; border-color: var(--brand); }
.ev.deadline, .ev-chip.deadline, .ev-sw.deadline { background: #fdf3f1; color: var(--accent); border: 1px solid #e3b9b0; }
.ev.zoom, .ev-chip.zoom, .ev-sw.zoom { background: #e6eef6; color: #24496b; border-color: #c4d5e6; }
.ev.volunteer, .ev-chip.volunteer, .ev-sw.volunteer { background: var(--amber-soft); color: #8a5a12; border-color: #ecd6ad; }
.ev.meeting, .ev-chip.meeting, .ev-sw.meeting { background: var(--fill-2); color: var(--ink); }
.list li.flash { background: var(--brand-soft); border-radius: 6px; padding-left: 8px; padding-right: 8px; transition: background 1s; }

/* Map */
.map-wrap { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.leaflet-box { height: 520px; width: 100%; background: var(--fill); z-index: 0; }
.leaflet-box.mini { height: 230px; }
.leaflet-box.small { height: 240px; border: 1px solid var(--line); border-radius: 8px; }
.leaflet-container { font: inherit; }
.leaflet-container a { color: var(--brand); }
.map-legend { font-size: 12.5px; padding: 10px 14px; gap: 14px; color: var(--ink-2); }
.map-legend .sw { display: inline-block; width: 13px; height: 13px; border: 1px solid rgba(0, 0, 0, .15); vertical-align: -2px; margin-right: 6px; border-radius: 50%; }
.map-legend .sw.ring { background: rgba(29, 75, 63, .1); border: 2px dashed var(--brand); }
.map-legend .ev-sw { border-radius: 3px; }

/* Gate */
.gate { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 44px 36px; text-align: center; max-width: 660px; margin: 30px auto; box-shadow: var(--shadow); }
.gate .lock-big { font-size: 34px; }

/* Dialog & toast */
dialog#dlg { border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; width: min(520px, 94vw); box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
dialog#dlg::backdrop { background: rgba(27, 36, 32, .4); }
.dlg-close { float: right; border: 0; }
#toast { position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13.5px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; max-width: 92vw; text-align: center; }
#toast.show { opacity: 1; }

.compare { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.compare > div { padding: 10px 12px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); font-size: 13px; }
.compare .hdr { background: var(--fill); font-weight: 700; }
.compare .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); background: #fbfaf7; font-weight: 600; }

/* Standalone sign-in confirmation page (/auth/verify) */
body.plain { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-page { width: min(520px, 100%); }
.auth-page h1 { font-size: 26px; }

.only-mobile { display: none; }
.scrim { display: none; }
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-side, .hero { grid-template-columns: minmax(0, 1fr); }
  .score-row { grid-template-columns: 1fr; }
  .site-footer { padding-left: 38px; }
}
@media (max-width: 820px) {
  :root { --top-h: 56px; }
  body { font-size: 15px; }
  h1 { font-size: 26px; }
  .only-mobile { display: inline-block; }
  .topbar { padding: 0 12px; gap: 10px; }
  .brand { flex: 1 1 auto; }
  .brand-text { overflow: hidden; min-width: 0; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; }
  .topbar-status, .hide-sm { display: none; }
  .topbar-right { margin-left: auto; }
  .topbar-right .btn { padding: 5px 9px; font-size: 12px; }
  .topbar-right .acct .chip { display: none; }
  .sidenav { position: fixed; left: 0; top: var(--top-h); z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: 8px 0 30px rgba(0, 0, 0, .12); }
  body.nav-open .sidenav { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(27, 36, 32, .35); z-index: 25; }
  main { padding: 20px 16px 80px; }
  .g2, .g3, .g4, .g-filter { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-direction: column; }
  .filters { position: static; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 6px; }
  .statement { font-size: 17px; padding: 14px 16px; }
  .countdown div { min-width: 0; flex: 1; }
  .cal .day { min-height: 64px; padding: 3px; }
  .cal .ev { font-size: 9.5px; }
  .leaflet-box { height: 380px; }
  .chat { height: auto; min-height: 70vh; }
  .msg { max-width: 94%; }
  .site-footer { padding: 16px; flex-direction: column; }
}
@media (max-width: 440px) {
  .topbar { gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 32px; height: 32px; font-size: 13px; }
  .brand-text strong { font-size: 13px; }
  .topbar-right { gap: 5px; }
  .topbar-right .btn { padding: 5px 8px; }
}
@media print { .sidenav, .topbar, .site-footer { display: none; } main { padding: 0; } }
