/* Tokens: see DESIGN.md for the reason behind each value. */
:root {
  --paper: #F4F5F2;
  --surface: #FFFFFF;
  --ink: #1B1F1C;
  --ink-2: #4A524C;
  --line: #D3D8D2;
  --tape: #F5C518;
  --tape-ink: #1B1F1C;
  --danger: #A4231B;
  --ok: #1E6B45;
  --hover: #E8EBE6;
  --font: 'Archivo', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --nav-h: 60px;
  --r-ctl: 10px;
  --r-opt: 14px;
  --r-sheet: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141715;
    --surface: #1D211E;
    --ink: #EEF0EC;
    --ink-2: #B5BDB6;
    --line: #343A35;
    --danger: #FF8A80;
    --ok: #6FD3A0;
    --hover: #262B27;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141715;
  --surface: #1D211E;
  --ink: #EEF0EC;
  --ink-2: #B5BDB6;
  --line: #343A35;
  --danger: #FF8A80;
  --ok: #6FD3A0;
  --hover: #262B27;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 420;
  line-height: 1.5;
  font-variation-settings: 'wdth' 100;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  overflow-wrap: anywhere;
}

h1, h2, h3, h4 {
  font-variation-settings: 'wdth' 118;
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem); margin-top: 1.6em; }
h3 { font-size: 1.125rem; margin-top: 1.2em; }
h4 { font-size: 1rem; }
h1:focus { outline: none; }

p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }

a[href], button, summary, select, label[for], .check, .star, input[type="checkbox"], input[type="radio"], .file-btn { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--tape);
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  background: var(--tape); color: var(--tape-ink); padding: 10px 14px; border-radius: var(--r-ctl);
}
.skip:focus { top: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and navigation */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  max-width: 1180px; margin: 0 auto;
}
.wordmark {
  font-variation-settings: 'wdth' 125;
  font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 12px rgba(20, 23, 21, 0.08); /* elevation: the bar floats over scrolling content */
}
.nav a {
  min-height: var(--nav-h); display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-weight: 600; font-size: 0.9375rem; padding: 0 4px; text-align: center;
  border-top: 4px solid transparent;
}
.nav a[aria-current="page"] { border-top-color: var(--tape); font-weight: 800; }
.nav a:active { background: var(--hover); }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .top { padding-top: 18px; }
  .nav { position: static; display: flex; gap: 6px; background: none; border: 0; box-shadow: none; padding: 0; margin-left: auto; }
  .nav a { min-height: 44px; padding: 0 14px; border-top: 0; border-bottom: 4px solid transparent; }
  .nav a[aria-current="page"] { border-bottom-color: var(--tape); }
  .nav a:hover { background: var(--hover); border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
}

/* Page frame */
main { display: block; }
.page { max-width: 720px; margin: 0 auto; padding: 8px 16px 40px; }
.page-wide { max-width: 1180px; }
.lead { font-size: 1.125rem; color: var(--ink-2); }
.crumb { margin: 8px 0 4px; font-size: 0.9375rem; }
.crumb a { color: var(--ink-2); display: inline-flex; min-height: 44px; align-items: center; }
@media (min-width: 900px) {
  .page { padding-top: 24px; }
  .page-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .page.page-split { max-width: 1080px; }
  .split-aside { position: sticky; top: 24px; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .page { padding-left: 32px; padding-right: 32px; }
}

/* Home */
.hero { padding: 20px 0 8px; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3.6vw, 3.4rem); max-width: 18ch; }
.intake { display: grid; gap: 10px; margin-top: 20px; }
.intake-label { font-weight: 700; font-size: 1.0625rem; }
.intake textarea { min-height: 120px; font-size: 1.0625rem; }
.block { margin-top: 36px; }
.block h2 { margin-top: 0; }
@media (min-width: 900px) {
  .home { max-width: 1080px; display: grid; grid-template-columns: 1.25fr 1fr; column-gap: 56px; }
  .home .hero { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; column-gap: 56px; align-items: end; }
  .home .hero h1, .home .hero .lead { grid-column: 1; }
  .home .hero .intake { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .home .block-calc { grid-row: 2 / span 2; grid-column: 2; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border: 1.5px solid var(--ink); border-radius: var(--r-ctl);
  background: transparent; color: var(--ink);
  font: inherit; font-weight: 650; text-decoration: none; line-height: 1.2; text-align: center;
  transition: background-color 120ms ease, transform 80ms ease;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); background: var(--line); }
.btn:disabled { opacity: 0.55; transform: none; background: transparent; }
.btn-primary { background: var(--tape); border-color: var(--tape); color: var(--tape-ink); }
.btn-primary:hover { background: #E2B50F; border-color: #E2B50F; }
.btn-primary:active { background: #CFA50C; }
.btn-primary:disabled { background: var(--tape); }
.btn-quiet { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 0 10px; }
.btn-quiet:hover { background: var(--hover); }
.btn-small { min-height: 44px; padding: 0 12px; font-size: 0.9375rem; }
.btn-wide { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.theme { white-space: nowrap; }
@media (max-width: 380px) { .theme { font-size: 0.8125rem; padding: 0 6px; } }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label, legend { font-weight: 650; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: max(16px, 1rem);
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input[type="file"] { font: inherit; max-width: 100%; }
textarea { resize: vertical; line-height: 1.45; }
::placeholder { color: var(--ink-2); opacity: 0.85; }
.help { font-size: 0.9375rem; color: var(--ink-2); margin: 0; }
.field-error { color: var(--danger); font-weight: 600; margin: 4px 0 10px; }
.notice { border-left: 0; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-ctl); padding: 12px 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.check span { display: grid; gap: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: grid; gap: 2px; max-width: 560px; }
.inline-form { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sheet); padding: 18px 16px 8px; margin-bottom: 24px; }
.inline-form h2 { margin-top: 0; font-size: 1.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.trade-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); column-gap: 16px; }
.trade-boxes legend { margin-bottom: 4px; }
.file-btn { position: relative; justify-self: start; }

/* Rows (lists of links) */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--line); }
.rows > li { border-bottom: 1.5px solid var(--line); }
.row {
  display: grid; gap: 2px; padding: 14px 4px; min-height: 56px; text-decoration: none;
  width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit;
}
.row:hover { background: var(--hover); }
.row-title { font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.row:hover .row-title { text-decoration-color: var(--ink); }
.row-sub { color: var(--ink-2); font-size: 0.9375rem; }
.rows-compact .row { padding: 10px 4px; min-height: 48px; }

/* Receipt: perforated top edge, dotted leaders, tabular figures */
.receipt {
  background: var(--surface); color: var(--ink);
  border-radius: 3px; padding: 22px 18px 18px; margin: 12px 0;
  border: 1.5px solid var(--line); border-top: 0;
  -webkit-mask: radial-gradient(circle 6px at 9px 0, transparent 5.5px, #000 6px) 0 0 / 18px 100% repeat-x;
          mask: radial-gradient(circle 6px at 9px 0, transparent 5.5px, #000 6px) 0 0 / 18px 100% repeat-x;
  font-variant-numeric: tabular-nums;
}
.receipt-head { border-bottom: 1.5px dashed var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.receipt-head h3 { margin: 0; font-size: 1.125rem; }
.receipt-meta { color: var(--ink-2); font-size: 0.9375rem; margin: 2px 0 0; }
.receipt-rows { margin: 0; }
.leader { display: flex; align-items: baseline; gap: 6px; padding: 5px 0; }
.leader > :first-child { flex: 0 1 auto; margin: 0; }
.leader::after { content: ''; order: 1; flex: 1 1 16px; border-bottom: 2px dotted var(--line); transform: translateY(-0.3em); }
.leader > :last-child { order: 2; margin: 0; text-align: right; font-weight: 700; max-width: 60%; }
.unit { font-weight: 500; color: var(--ink-2); }
.receipt-items { border-top: 1.5px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.receipt-items h4 { margin: 0 0 4px; color: var(--ink-2); font-size: 0.9375rem; font-weight: 650; }
.receipt-items ul { list-style: none; margin: 0; padding: 0; }
.receipt-items .qty { white-space: nowrap; font-weight: 600; }
.receipt-notes { border-top: 1.5px dashed var(--line); margin: 10px 0 0; padding: 10px 0 0 18px; color: var(--ink-2); font-size: 0.9375rem; }
.receipt-notes li + li { margin-top: 6px; }

/* Question flow */
.ruler {
  position: relative; height: 22px; margin: 6px 0 20px;
  border-bottom: 2px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 40px) left bottom / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--ink-2) 0 1px, transparent 1px 8px) left bottom / 100% 6px no-repeat;
}
.ruler-fill { position: absolute; left: 0; bottom: 0; height: 100%; background: var(--tape); mix-blend-mode: multiply; transition: width 220ms ease; }
:root[data-theme="dark"] .ruler-fill { mix-blend-mode: normal; opacity: 0.85; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ruler-fill { mix-blend-mode: normal; opacity: 0.85; } }
.question legend { display: grid; gap: 4px; margin-bottom: 12px; }
.q-count { color: var(--ink-2); font-weight: 600; font-size: 0.9375rem; }
.q-text { font-variation-settings: 'wdth' 118; font-weight: 750; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem); line-height: 1.15; }
.options { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 600px) { .options { grid-template-columns: 1fr 1fr; } }
.option {
  min-height: 60px; padding: 14px 16px; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--r-opt); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 650; font-size: 1.0625rem;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.option:hover { border-color: var(--ink); }
.option:active { background: var(--tape); border-color: var(--tape); color: var(--tape-ink); }
.understood { list-style: none; padding: 0; margin: 0 0 20px; border-top: 1.5px solid var(--line); }
.understood li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1.5px solid var(--line); }
.understood li > div { display: grid; }
.understood-q { color: var(--ink-2); font-size: 0.9375rem; }
.contact { margin-top: 32px; }
.contact h2 { margin-top: 0; }
@media (min-width: 900px) { .contact { margin-top: 0; } }
.range { margin-top: 16px; }
.range h3 { font-size: 1rem; margin: 0 0 4px; }
.range-value { font-size: 1.5rem; font-weight: 800; font-variation-settings: 'wdth' 112; font-variant-numeric: tabular-nums; margin-bottom: 4px; }

/* Request status */
.panel { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sheet); padding: 16px; margin: 16px 0; }
.panel h2 { margin-top: 0; }
.panel-done { border-color: var(--ok); }
.steps { list-style: none; counter-reset: step; display: grid; gap: 0; padding: 0; margin: 20px 0; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--ink-2); }
.steps li::before {
  content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid var(--line); font-weight: 700; font-size: 0.875rem; color: var(--ink-2);
}
.steps li.done { color: var(--ink); font-weight: 650; }
.steps li.done::before { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.steps li[aria-current="step"]::before { background: var(--tape); border-color: var(--tape); color: var(--tape-ink); }
@media (min-width: 600px) { .steps { grid-template-columns: repeat(4, 1fr); } .steps li { flex-direction: column; align-items: flex-start; } }
.quote-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.quote { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-opt); padding: 14px 16px; }
.quote-chosen { border-color: var(--ink); border-width: 2.5px; }
.quote-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-weight: 700; }
.quote-top a { min-height: 44px; display: inline-flex; align-items: center; }
.quote-amount { font-size: 1.375rem; font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 112; }
.quote-incl { color: var(--ink-2); font-size: 0.9375rem; margin: 2px 0 6px; }
.quote-notes { white-space: pre-wrap; }
.chosen-label { font-weight: 700; color: var(--ok); }
.stars { display: flex; flex-wrap: wrap; gap: 8px; }
.stars legend { width: 100%; margin-bottom: 8px; }
.star { position: relative; }
.star input { position: absolute; opacity: 0; inset: 0; }
.star span {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-ctl);
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 750;
}
.star:hover span { border-color: var(--ink); }
.star input:checked + span { background: var(--tape); border-color: var(--tape); color: var(--tape-ink); }
.star input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.review-form { margin-top: 12px; }

/* Project */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 16px -16px 20px; padding: 0 16px; border-bottom: 1.5px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; min-height: 48px; padding: 0 14px; background: none; border: 0; border-bottom: 4px solid transparent;
  font: inherit; font-weight: 650; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center;
}
.tab:hover { color: var(--ink); background: var(--hover); }
.tab[aria-selected="true"], .tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--tape); font-weight: 800; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 20px; margin: 0 0 24px; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 1.5px solid var(--line); }
.totals dt { color: var(--ink-2); font-size: 0.9375rem; }
.totals dd { margin: 0; font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; font-variation-settings: 'wdth' 112; }
.totals .over dd { color: var(--danger); }
.stage h3 { margin-top: 0; }
.stage-group { color: var(--ink-2); font-weight: 500; font-size: 0.9375rem; font-variation-settings: 'wdth' 100; }
.stage + .stage { margin-top: 22px; }
.budget-lines, .mat-list { list-style: none; padding: 0; margin: 0; border-top: 1.5px solid var(--line); }
.budget-line, .mat-item {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: end;
  padding: 10px 0; border-bottom: 1.5px solid var(--line);
}
.mat-item .bl-label { grid-column: 1 / -1; font-weight: 650; }
.budget-line { grid-template-areas: "label del" "plan act"; align-items: center; }
.budget-line .bl-label { grid-area: label; font-weight: 650; }
.budget-line .btn { grid-area: del; justify-self: end; }
.budget-line .bl-num:nth-of-type(1) { grid-area: plan; }
.budget-line .bl-num:nth-of-type(2) { grid-area: act; }
.budget-line input { min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
.bl-num { display: grid; gap: 2px; font-size: 0.875rem; color: var(--ink-2); }
.bl-num input { font-variant-numeric: tabular-nums; }
.mat-item { grid-template-columns: minmax(0, 1fr) auto; }
.mat-item .bl-num { grid-template-columns: 110px auto; align-items: center; gap: 8px; color: var(--ink); }
@media (min-width: 600px) {
  .budget-line { grid-template-columns: minmax(0, 1.4fr) 120px 120px auto; grid-template-areas: "label plan act del"; align-items: end; }
  .budget-line .bl-label { align-self: center; }
}
.diary { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.diary-entry { border-top: 2px solid var(--ink); padding-top: 10px; }
.diary-entry time { font-weight: 750; font-variation-settings: 'wdth' 112; display: block; margin-bottom: 4px; }
.diary-entry img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--line); margin: 8px 0; }
.checklist { list-style: none; padding: 0; margin: 0; counter-reset: c; }
.checklist li { border-bottom: 1.5px solid var(--line); }
.checklist .check input:checked + span strong { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--ink-2); }
.crew { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.crew-member { border-top: 2px solid var(--ink); padding-top: 8px; }
details summary { min-height: 44px; display: flex; align-items: center; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

/* Directory */
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; margin-bottom: 16px; }
.filters .field:nth-of-type(3) { grid-column: 1 / -1; }
.filters .btn { grid-column: 1 / -1; justify-self: start; min-height: 44px; }
@media (min-width: 900px) { .filters { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; } .filters .field:nth-of-type(3), .filters .btn { grid-column: auto; } .filters .btn { margin-bottom: 14px; } }
.more { margin-top: 16px; }
.reviews { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.review { border-top: 1.5px solid var(--line); padding-top: 10px; }
.review-top { margin-bottom: 4px; }

/* States */
.state { color: var(--ink-2); padding: 20px 0; display: grid; gap: 10px; justify-items: start; }
.state p { margin: 0; }
.state-error { color: var(--danger); }
.spinner {
  display: inline-block; width: 16px; height: 16px; margin-right: 10px; vertical-align: -2px;
  border: 2.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 40;
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  max-width: min(92vw, 480px); padding: 12px 16px; border-radius: var(--r-ctl);
  background: var(--ink); color: var(--paper); font-weight: 600;
  box-shadow: 0 6px 24px rgba(20, 23, 21, 0.25); /* elevation: overlays content */
}
.toast[data-kind="error"] { background: var(--danger); color: #FFFFFF; }
:root[data-theme="dark"] .toast[data-kind="error"] { color: #141715; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast[data-kind="error"] { color: #141715; } }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* Admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-head h1 { margin: 0; }
.admin-split { display: grid; gap: 24px; }
@media (min-width: 900px) { .admin-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } .admin-detail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; } }
.admin-detail h2 { margin-top: 0; }
.match { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.match .actions { margin: 0; }
.message { white-space: pre-wrap; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-ctl); padding: 12px; font: inherit; font-size: 0.9375rem; max-height: 260px; overflow: auto; }
.claim { padding: 12px 0; }

/* Prose */
.prose h2 { margin-top: 1.4em; }

/* Footer */
.foot { max-width: 1180px; margin: 24px auto 0; padding: 24px 16px 28px; border-top: 1.5px solid var(--line); color: var(--ink-2); font-size: 0.9375rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; }
body[data-route="admin"] .foot { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Rarely changed calculator inputs live behind a summary to keep the result close on phones. */
.advanced { margin: 4px 0 14px; border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); }
.advanced[open] { padding-bottom: 4px; }
.tab-panel .inline-form { margin-top: 24px; }
