/* HOW Volunteers — gold, black, red and white, from the official HOW logo. Phone-first. */

:root {
  --black: #000000;
  --bg: #FFFFFF;
  --bg-2: #F7F5EE;
  --card: #FFFFFF;
  --ink: #151414;
  --muted: #5C5748;
  --line: #E8E0D0;
  --gold: #C9A43A;       /* logo metallic gold — fills; black text on this (8.8:1) */
  --gold-hi: #D4AF37;    /* lighter highlight for gold gradients */
  --gold-lo: #B0883C;    /* deeper gold in the logo ring */
  --gold-ink: #8A6414;   /* gold text/links on white (~5.4:1, AA) */
  --gold-soft: #F7F1DE;
  --brand: var(--gold);
  --brand-ink: var(--gold-ink);
  --brand-soft: var(--gold-soft);
  --logo-red: #CC1028;   /* sampled from the logo figures (~5.7:1 on white) */
  --ok: #0D4F3D;
  --ok-soft: #EFFAE5;
  --warn: #AE3E09;
  --warn-soft: #FBE3D9;
  --danger: #CC1028;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .06);
  --head: "Montserrat", system-ui, sans-serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --team: var(--gold-ink);
  --gold-fill: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 52%, var(--gold-lo) 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh; min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-top: 1.25rem; padding-bottom: 2.5rem; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0 0 .5rem; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
a { color: var(--brand-ink); }
a:hover { color: var(--ink); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hint { color: var(--muted); font-size: .92rem; }
.center { text-align: center; }
.mt { margin-top: 1.5rem; }
.warn, .warn-text { color: var(--warn); }
.warn-text { font-weight: 500; }

/* ---------- header / nav ---------- */
.site-header {
  background: var(--black); color: #fff;
  border-bottom: 3px solid var(--brand);
  position: sticky; top: 0; z-index: 5;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .4rem .75rem; padding-top: .5rem; padding-bottom: .5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.logo {
  width: 52px; height: 52px; flex: none; object-fit: contain;
  background: transparent; border-radius: 50%;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--head); font-weight: 700; font-size: 1.15rem; color: #fff; }
.brand-text small { color: #E2E2E2; font-size: .78rem; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: .25rem; overflow-x: auto; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; color: #fff; padding: .3rem .75rem; border-radius: 999px;
  font-weight: 500; font-size: .95rem; white-space: nowrap;
}
.nav a:hover { background: #2b2b2b; color: #fff; }
/* Black on #C9A43A is about 8.8:1. White on this gold would fail AA. */
.nav a.on { background: var(--gold-fill); color: var(--black); font-weight: 700; }

.subnav { background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: .9rem; }
.subnav-inner { display: flex; align-items: center; gap: .25rem 1rem; padding-top: 0; padding-bottom: 0; overflow-x: auto; white-space: nowrap; }
.subnav-label { font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; }
.subnav a, .subnav .linklike { display: inline-flex; align-items: center; min-height: 44px; }
.subnav a { text-decoration: none; color: var(--brand-ink); }
.subnav a.on { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.subnav form { margin-left: auto; }

.site-footer { border-top: 3px solid var(--brand); background: var(--black); color: #C9C9CF; font-size: .85rem; padding: 1.25rem 0 calc(1.25rem + env(safe-area-inset-bottom)); text-align: center; }
.site-footer p { margin: .2rem 0; }
.verse { font-family: var(--head); font-weight: 600; font-style: italic; color: var(--ink); font-size: .95rem; }
.verse span { font-weight: 400; font-style: normal; color: var(--muted); font-family: var(--sans); font-size: .8rem; }
.site-footer .verse { color: #fff; }
.site-footer .verse span { color: #C9C9CF; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-height: 44px; padding: .55rem 1.1rem; border-radius: 10px;
  background: var(--gold-fill); color: var(--black); border: 1px solid var(--gold-lo);
  font: 700 1.05rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(0.95); color: var(--black); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: #fff; color: var(--brand-ink); border-color: var(--line); font-size: .95rem; }
.btn-ghost:hover { background: var(--brand-soft); border-color: var(--brand-ink); color: var(--brand-ink); }
.btn-small { padding: .3rem .8rem; }
.btn-small.btn-ghost { font-size: .875rem; }
.btn-icon { width: 44px; padding: 0; font-size: 1.4rem; line-height: 1; }
.btn-block { width: 100%; }
.btn.danger, .linklike.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: var(--brand-soft); }
.linklike { background: none; border: 0; padding: 0; min-height: 44px; color: var(--brand-ink); font: inherit; text-decoration: underline; cursor: pointer; }

label { display: block; font-weight: 600; font-size: .92rem; }
input[type=text], input:not([type]), input[type=tel], input[type=email], input[type=password],
input[type=month], input[type=search], select, textarea {
  display: block; width: 100%; margin-top: .3rem;
  font: 400 16px var(--sans); color: var(--ink);
  padding: .6rem .75rem; min-height: 44px;
  background: #fff; border: 1px solid #8A8D9B; border-radius: 10px;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible {
  outline: 3px solid var(--brand-ink); outline-offset: 1px;
}
textarea { resize: vertical; }
.site-header a:focus-visible { outline-color: var(--gold); outline-offset: -3px; }
.check { min-height: 44px; display: flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand-ink); margin: 0; flex: none; }
.stack > * + * { margin-top: 1rem; }
.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; align-items: center; }
form.inline { display: inline; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; padding: 0; }

/* ---------- layout pieces ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.page-head p.muted { margin: .3rem 0 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: var(--brand-ink); margin: 0 0 .2rem; }
.eyebrow a { color: inherit; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .card { padding: 1.4rem; } }
.card.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.card.subtle { background: transparent; box-shadow: none; border-style: dashed; }
.two-col { display: grid; gap: 1rem; align-items: start; }
.two-col > .card { margin-bottom: 0; }
.two-col + .card { margin-top: 1rem; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }

.flash { border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1rem; font-weight: 500; border: 1px solid; }
.flash-ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.flash-warn { background: var(--warn-soft); border-color: var(--warn); color: #7A2B06; }

.pill { display: inline-block; font: 600 .72rem/1 var(--sans); padding: .3rem .55rem; border-radius: 999px; background: var(--bg-2); color: var(--muted); vertical-align: middle; letter-spacing: .02em; }
.pill-gold { background: var(--gold-soft); color: var(--ink); }
.pill-open { background: var(--ok-soft); color: var(--ok); }
.pill-sample { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }

.month-nav { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; flex-wrap: wrap; }
.month-nav strong { font-family: var(--head); font-size: 1.3rem; color: var(--ink); min-width: 9.5rem; text-align: center; }
.today-link { font-size: .9rem; margin-left: .25rem; }

.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 1rem; scrollbar-width: none; }
.chips.static { flex-wrap: wrap; overflow: visible; margin-bottom: 1rem; }
.chips.small { margin: .35rem 0; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 44px;
  padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap;
}
.chip::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--team); }
.chip.on { background: var(--gold-fill); border-color: var(--gold-lo); color: var(--black); }
.chip.on::before { background: rgba(255, 255, 255, .7); }
.chips.small .chip { min-height: 0; padding: .2rem .6rem; font-size: .78rem; }

/* ---------- schedule ---------- */
.sundays { display: grid; gap: 1rem; }
.sunday { margin: 0; }
.sunday.past { opacity: .72; }
.sunday.upcoming { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft), var(--shadow); }
.sunday-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.sunday-title { flex: 1; min-width: 0; }
.sunday-title h2 { margin: 0 0 .15rem; }
.date-badge {
  flex: none; width: 52px; text-align: center; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #fff; line-height: 1;
}
.date-badge span { display: block; background: var(--black); color: #fff; font: 700 .68rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; padding: .3rem 0; }
.date-badge strong { display: block; font: 700 1.35rem/1 var(--head); color: var(--ink); padding: .35rem 0 .4rem; }

.team-grid { display: grid; gap: .85rem; }
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .sunday:not(.edit) .team-grid { grid-template-columns: repeat(4, 1fr); } }
.team-block { border-left: 4px solid var(--team); padding: .1rem 0 .1rem .8rem; }
.team-block h3, .team-block legend { color: var(--team); font-family: var(--sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; margin-bottom: .35rem; }
.roster { list-style: none; margin: 0; padding: 0; }
.roster li { display: flex; justify-content: space-between; gap: .75rem; padding: .38rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.roster li:last-child { border-bottom: 0; }
.roster .pos { color: var(--muted); }
.roster .who { font-weight: 600; text-align: right; }
.roster .who.empty { color: var(--muted); font-weight: 500; font-style: italic; }
.roster li.me { background: var(--gold-soft); margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; border-radius: 6px; }
.me-mark { background: var(--gold-soft); padding: 0 .3rem; border-radius: 4px; }
.legend { color: var(--muted); font-size: .85rem; margin-top: 1rem; }

/* schedule editor */
.sunday.edit .team-block { padding-left: .8rem; }
.slot-field { margin-bottom: .6rem; }
.slot-field label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.slot-field select { margin-top: .15rem; min-height: 44px; padding-top: .45rem; padding-bottom: .45rem; }
.slot-field.has-warn select { border-color: var(--warn); background: var(--warn-soft); }
.sunday.edit .actions { justify-content: flex-end; }
.sunday.edit.dirty { border-color: var(--gold); }
.sunday.edit.dirty .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* ---------- my schedule ---------- */
.search { margin: 0 0 .75rem; }
.name-list { list-style: none; margin: 0 0 1rem; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; max-height: 60vh; overflow-y: auto; }
.name-list li + li { border-top: 1px solid var(--line); }
.name-list a { display: flex; justify-content: space-between; padding: .85rem 1rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.name-list a:hover { background: var(--brand-soft); }
.name-list a span { color: var(--muted); }

.assign-list { list-style: none; margin: 0; padding: 0; }
.assign-list li { display: flex; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.assign-list li:last-child { border-bottom: 0; }
.assign-list .date-badge span { background: var(--team); }
.empty-state { color: var(--muted); background: var(--bg-2); border-radius: 10px; padding: 1rem; text-align: center; margin: 0; }

.month-label { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1rem 0 .5rem; }
.day-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: .5rem; }
.day-toggle { position: relative; font-weight: 400; cursor: pointer; }
.day-toggle input { position: absolute; opacity: 0; inset: 0; }
.day-toggle span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; min-height: 72px; padding: .35rem .2rem;
  transition: background .12s, border-color .12s;
}
.day-toggle small { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.day-toggle strong { font: 700 1.3rem/1.1 var(--head); color: var(--ink); }
.day-toggle .state { font: 600 .66rem/1.2 var(--sans); font-style: normal; color: var(--ok); min-height: .8rem; }
.day-toggle input:checked + span { background: var(--brand-soft); border-color: var(--brand-ink); }
.day-toggle input:checked + span strong { color: var(--danger); text-decoration: line-through; }
.day-toggle input:checked + span .state { color: var(--danger); font-size: 0; }
.day-toggle input:checked + span .state::after { content: "Away"; font-size: .66rem; }
.day-toggle input:focus-visible + span { outline: 3px solid var(--brand-ink); }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, #fff 35%); padding: 1rem 0 calc(.25rem + env(safe-area-inset-bottom)); margin-bottom: -.25rem; }
.sticky-actions .btn { width: 100%; }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: .9rem 1rem; }
.stat strong { display: block; font: 700 1.6rem/1.1 var(--head); color: var(--ink); }
.stat span { color: var(--muted); font-size: .85rem; }
.stat-warn { background: var(--warn-soft); border-color: var(--warn); }
.stat-warn strong { color: var(--warn); }
.conflicts { margin: 0; padding-left: 1.1rem; }
.conflicts li { margin-bottom: .4rem; }
.conflicts a { color: var(--ink); text-decoration: none; }
.conflicts a:hover { text-decoration: underline; }
.load { display: flex; flex-wrap: wrap; gap: .4rem; }
.load-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .4rem .25rem .75rem; font-size: .88rem; }
.load-item b { display: inline-block; min-width: 1.5rem; text-align: center; background: var(--gold-fill); color: var(--black); border-radius: 999px; margin-left: .25rem; font-size: .8rem; padding: .05rem .3rem; }

.vol-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
@media (min-width: 760px) { .vol-list { grid-template-columns: 1fr 1fr; } }
.vol { display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: 1rem; }
.vol.inactive { opacity: .65; }
.vol > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.vol h3 { margin: 0; font-size: 1.1rem; }
.vol .contact { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin: 0 0 .2rem; }
.vol .contact a { text-decoration: none; }
.vol p { margin-bottom: 0; }
.vol-actions { display: flex; flex-direction: column; gap: .4rem; flex: none; }

.teams-field .hint { margin-top: .25rem; }
.team-pick { border-left: 4px solid var(--team); background: var(--bg-2); border-radius: 0 10px 10px 0; padding: .65rem .8rem; margin-bottom: .6rem; }
.team-check strong { color: var(--team); }
.pos-picks { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: .45rem 0 0 1.75rem; }
.pos-picks .check { font-weight: 400; }
.pos-picks .check input { width: 18px; height: 18px; }

.login h1 { margin-bottom: .25rem; }
.login form > * + * { margin-top: 1rem; }

/* ---------- printable view ---------- */
.print-page { background: #fff; padding: 1rem; display: block; }
.print-toolbar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.print-toolbar .month-nav { margin: 0; }
.print-chips .chips { margin-bottom: .75rem; }
.print-head { display: flex; align-items: center; gap: .8rem; border-bottom: 2px solid var(--brand); padding-bottom: .6rem; margin-bottom: .8rem; }
.print-head h1 { margin: 0; font-size: 1.5rem; }
.print-head p { margin: 0; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.print-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.print-table th, .print-table td { border: 1px solid var(--line); padding: .4rem .55rem; text-align: left; vertical-align: top; }
.print-table thead th { background: var(--black); color: #fff; font-weight: 700; white-space: nowrap; }
.print-table tbody th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.print-table .team-row th { background: var(--team); color: #fff; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.print-table td.empty { color: var(--muted); text-align: center; }
.print-foot { margin-top: .8rem; font-size: .82rem; color: var(--muted); }

@media print {
  @page { size: landscape; margin: 12mm; }
  .no-print, .site-header, .subnav, .site-footer { display: none !important; }
  body, .print-page { background: #fff; padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-table { font-size: 10.5pt; }
  .print-table tr { break-inside: avoid; }
  .card { box-shadow: none; }
}

/* ---------- event survey ---------- */
.survey-wrap { max-width: 680px; margin: 0 auto; }
.survey-logo { display: block; width: 120px; height: 120px; margin: .25rem auto 1rem; }
.survey-head { justify-content: center; text-align: center; }
.survey-legend { font: 700 1.25rem/1.2 var(--head); color: var(--ink); margin-bottom: .5rem; }
.survey fieldset .hint { margin-bottom: .6rem; }
.survey-foot { margin-top: .75rem; }
.rating { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.rating legend { float: left; width: 100%; line-height: 1.35; margin-bottom: .5rem; }
.rating legend + * { clear: both; }
.options { display: grid; gap: .4rem; }
@media (min-width: 640px) { .options:not(.options-stack) { grid-template-columns: 1fr 1fr; } }
.option {
  display: flex; align-items: center; gap: .7rem; min-height: 46px; padding: .5rem .8rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 500; cursor: pointer;
}
.option span { min-width: 0; overflow-wrap: anywhere; }
.option input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--brand-ink); }
.option:has(input:checked) { background: var(--brand-soft); border-color: var(--brand-ink); }
.option:focus-within { outline: 3px solid var(--brand-ink); outline-offset: 1px; }
.clear-rating { min-height: 44px; font-size: .875rem; }
.survey-field { margin-top: 1.25rem; }
.survey-field .hint { margin: .2rem 0 0; }

/* survey results */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .6rem; }
.filter-bar label { min-width: 12rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chip { min-height: 44px; padding: .4rem .95rem; border: 1px solid #8A8D9B; border-radius: 999px; background: #fff; color: var(--ink); font: 500 .92rem var(--sans); cursor: pointer; }
.filter-chip:hover { background: var(--brand-soft); }
.filter-chip[aria-pressed=true] { background: var(--gold-fill); border-color: var(--gold-lo); color: var(--black); font-weight: 700; }
.filter-chip:focus-visible, summary:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 1px; }
.filter-status { font-weight: 500; }
.kpis { grid-template-columns: 1fr; }
@media (min-width: 480px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
.kpis .stat { border-top: 3px solid var(--black); }
.kpis .stat[data-kpi^=positive] { border-top-color: var(--ok); }
.kpis small { display: block; color: var(--muted); font-size: .8rem; }
.dash .two-col { margin: 1rem 0; }
.dash .two-col > *, .dash .card { min-width: 0; }
.chart-box { position: relative; width: 100%; min-width: 0; height: 260px; }
.chart-tall { height: 400px; margin-bottom: 1rem; }
.chart-box canvas { max-width: 100%; }
.dash summary { display: flex; align-items: center; min-height: 44px; color: var(--brand-ink); font-weight: 500; cursor: pointer; }
.dash summary::before { content: "+"; width: 1.2rem; font-weight: 700; }
.dash details[open] summary::before { content: "−"; }

.legend-row { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0 0 .5rem; padding: 0; }
.swatch { display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; margin-right: .4rem; vertical-align: -.05rem; }
.lv-strongly_agree { background: #8A6414; color: #fff; } /* gold-ink, white 5.4:1 */
.lv-agree { background: #C9A43A; color: #151414; }       /* logo gold, black 8.8:1 */
.lv-neutral { background: #E2D4A3; color: #151414; }
.lv-disagree { background: #CC1028; color: #fff; }       /* logo red, white 5.7:1 */
.lv-strongly_disagree { background: #8B0A1A; color: #fff; }
.lv-not_applicable { background: #8A8D9B; }
.lv-unable_to_assess { background: #C9CBD3; }
.question { padding: .9rem 0; border-top: 1px solid var(--line); scroll-margin-top: 8rem; }
#comments { scroll-margin-top: 8rem; }
.question:target { background: var(--gold-soft); box-shadow: 0 0 0 .5rem var(--gold-soft); border-radius: 2px; }
.question h3 { margin-bottom: .1rem; font-size: 1rem; font-weight: 600; }
.question p { margin-bottom: .4rem; }
.question-row { display: grid; gap: .5rem 1.25rem; align-items: center; }
@media (min-width: 760px) { .question-row { grid-template-columns: minmax(0, 1fr) 17.5rem; } }
.stack-track { display: grid; align-items: center; min-height: 24px; background: var(--bg-2); border-radius: 4px; }
.ratebar { grid-area: 1 / 1; display: flex; gap: 2px; height: 24px; background: #fff; border-radius: 4px; overflow: hidden; }
.ratebar:not(:has(.stack-seg:not([hidden]))) { background: none; }
.stack-none { grid-area: 1 / 1; padding: 0 .6rem; }
.stack-seg { flex: 0 1 0; min-width: 3px; font: 700 .8rem/24px var(--sans); text-align: center; }
.question .outside { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin: 0; }
.outside-count { white-space: nowrap; }

.attention { list-style: none; margin: 0; padding: 0; }
.attention li { display: flex; gap: .8rem; align-items: flex-start; padding: .6rem 0; border-top: 1px solid var(--line); }
.attention p { margin: .1rem 0 0; }
.attention-count { flex: none; min-width: 2.4rem; padding: .25rem .4rem; border-radius: 8px; background: var(--brand-soft); color: var(--brand-ink); text-align: center; font-size: 1.1rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: .5rem .6rem; text-align: left; vertical-align: top; }
.data-table thead th { background: var(--bg-2); font-weight: 700; }
.data-table tbody th { font-weight: 500; min-width: 12rem; }
.data-table p { margin-bottom: .25rem; }
.data-table td { font-variant-numeric: tabular-nums; }
.comments-table { min-width: 640px; }
.comments-table td:first-child { width: 9rem; }
.comments-table td:last-child { width: 17rem; }
.comment-tools { display: grid; gap: .75rem; margin-bottom: .75rem; }
.comment-tools label { max-width: 26rem; }
.survey-list { list-style: none; margin: 0; padding: 0; }
.survey-list li { padding: .8rem 0; border-top: 1px solid var(--line); }
.survey-list p { margin-bottom: .3rem; }
.survey-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }
.survey-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.survey-contact { display: flex; flex-wrap: wrap; gap: .2rem .8rem; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.badges .pill { max-width: 100%; overflow-wrap: anywhere; }
.answers { margin: 0; }
.answers dt { font-weight: 600; margin-top: .8rem; }
.answers dd { margin: .15rem 0 0; }

@media print {
  .dash .two-col { display: block; }
  .dash .two-col > .card { margin-bottom: 1rem; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .question, .stat, .chart-box, .attention li, .survey-row, .data-table tr { break-inside: avoid; }
  .dash summary { display: none; }
  .table-scroll { overflow: visible; }
  .comments-table { min-width: 0; }
}

/* Survey steps (JS-enhanced). Without JS, every step stays visible and only Submit is used. */
form.survey[data-wizard] .survey-step { display: none; }
form.survey[data-wizard] .survey-step.is-current { display: block; }
form.survey:not([data-wizard]) .js-step-nav { display: none; }
.survey-nav { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.survey-nav .btn-block { flex: 1 1 12rem; }
.survey-nav .btn-ghost { flex: 0 0 auto; min-width: 6rem; }
.survey-intro { margin-bottom: 1.25rem; }
#contribute-error, #routing-error { margin-top: .75rem; }
form.survey .survey-step { scroll-margin-top: 6.5rem; }
