/* ===========================================================================
   Components
   Everything here is hand-rolled: no framework, no build step. Class names are
   flat and descriptive so a view file reads like the markup it produces.
   =========================================================================== */

/* --- Masthead ------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.masthead .wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--t-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.masthead .wordmark svg {
  color: var(--brass);
  flex: none;
}

.masthead .spacer {
  flex: 1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--t-md);
  font-weight: 550;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.15s ease,
    border-color 0.15s ease;
}

.btn:hover {
  background: var(--surface-2);
}
.btn:active {
  transform: translateY(1px);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--brass);
  border-color: var(--brass);
  color: #fffdf8;
}

:root[data-theme="dark"] .btn-primary,
.btn-primary {
  color: #17140e;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .btn-primary {
    color: #fffdf8;
  }
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--brass) 88%, var(--ink));
  border-color: color-mix(in srgb, var(--brass) 88%, var(--ink));
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
  padding-inline: var(--sp-3);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.btn-urgent {
  background: var(--urgent);
  border-color: var(--urgent);
  color: #fff;
}

:root[data-theme="dark"] .btn-urgent {
  color: #2a0f0c;
}

.btn-block {
  width: 100%;
}
.btn-sm {
  min-height: 40px;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--t-sm);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.btn-row-fill > .btn {
  flex: 1 1 12rem;
}

/* --- Cards & panels ------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-1);
}

.card-flat {
  box-shadow: none;
  background: var(--surface-2);
}

.card-tight {
  padding: var(--sp-4);
}

/* The dossier device: a brass rule and a monospace case number. Used sparingly
   so the "investigation" idea reads as craft, not costume. */
.dossier {
  position: relative;
  padding-top: var(--sp-5);
}

.dossier::before {
  content: "";
  position: absolute;
  inset-inline: var(--sp-5);
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--brass), transparent 70%);
}

.case-no {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-ink);
}

:root[data-theme="dark"] .eyebrow {
  color: var(--brass);
}

/* --- Notices -------------------------------------------------------------- */

.notice {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: var(--t-sm);
  line-height: 1.55;
}

.notice svg {
  flex: none;
  margin-top: 2px;
  color: var(--ink-3);
}

.notice-disclaimer {
  background: var(--brass-soft);
  border-color: color-mix(in srgb, var(--brass) 35%, transparent);
}

.notice-disclaimer svg {
  color: var(--brass-ink);
}

:root[data-theme="dark"] .notice-disclaimer svg {
  color: var(--brass);
}

.notice-urgent {
  background: var(--urgent-soft);
  border-color: var(--urgent-line);
  border-left-width: 4px;
  color: var(--ink);
}

.notice-urgent svg {
  color: var(--urgent);
}

.notice-info {
  background: var(--teal-soft);
  border-color: color-mix(in srgb, var(--teal) 30%, transparent);
}

.notice-info svg {
  color: var(--teal);
}

.notice-demo {
  background: var(--indigo-soft);
  border-color: color-mix(in srgb, var(--indigo) 32%, transparent);
}

.notice-demo svg {
  color: var(--indigo);
}

/* --- Progress rail -------------------------------------------------------- */

.rail {
  display: flex;
  gap: var(--sp-1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.rail li {
  flex: 1;
  min-width: 0;
}

.rail .bar {
  height: 4px;
  border-radius: var(--r-full);
  background: var(--surface-sunk);
  border: 1px solid var(--line);
}

.rail li[data-state="done"] .bar,
.rail li[data-state="current"] .bar {
  background: var(--brass);
  border-color: var(--brass);
}

.rail li[data-state="current"] .bar {
  background: linear-gradient(90deg, var(--brass) 55%, var(--surface-sunk) 55%);
}

.rail .label {
  display: block;
  margin-top: var(--sp-2);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail li[data-state="current"] .label {
  color: var(--brass-ink);
  font-weight: 600;
}

:root[data-theme="dark"] .rail li[data-state="current"] .label {
  color: var(--brass);
}

.step-count {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* --- Questions & option controls ------------------------------------------ */

.qhead {
  margin-bottom: var(--sp-4);
}

.qhead .qlabel {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  line-height: 1.22;
  letter-spacing: -0.012em;
}

.qhead .qhelp {
  margin-top: var(--sp-2);
  color: var(--ink-2);
  font-size: var(--t-sm);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

.options {
  display: grid;
  gap: var(--sp-2);
}

.options.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--tap);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.opt:hover {
  border-color: var(--brass);
}

.opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.opt .mark {
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
}

.opt[data-type="single"] .mark {
  border-radius: 50%;
}
.opt[data-type="multi"] .mark {
  border-radius: 6px;
}

.opt .mark::after {
  content: "";
  opacity: 0;
  transition: opacity 0.1s ease;
}

.opt[data-type="single"] .mark::after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brass);
}

.opt[data-type="multi"] .mark::after {
  width: 11px;
  height: 6px;
  border-inline-start: 2.5px solid var(--brass);
  border-block-end: 2.5px solid var(--brass);
  transform: rotate(-45deg) translate(1px, -1px);
}

.opt:has(input:checked) {
  border-color: var(--brass);
  background: var(--brass-soft);
}

.opt:has(input:checked) .mark {
  border-color: var(--brass);
}

.opt:has(input:checked) .mark::after {
  opacity: 1;
}

.opt:has(input:focus-visible) {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}

.opt .otext {
  min-width: 0;
}

.opt .otitle {
  font-weight: 500;
}

.opt .ohelp {
  display: block;
  font-size: var(--t-xs);
  color: var(--ink-3);
  margin-top: 1px;
}

/* Compact pill row — used for L / R / Both / No difference / Unsure. */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  background: var(--surface);
  font-size: var(--t-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.pill:has(input:checked) {
  background: var(--brass);
  border-color: var(--brass);
  color: #fffdf8;
}

:root[data-theme="dark"] .pill:has(input:checked) {
  color: #17140e;
}

.pill:has(input:focus-visible) {
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}

/* --- Text inputs ---------------------------------------------------------- */

.field {
  display: block;
}

.field > .flabel {
  display: block;
  font-weight: 550;
  margin-bottom: var(--sp-2);
}

.field > .fhelp {
  display: block;
  font-size: var(--t-sm);
  color: var(--ink-3);
  margin-bottom: var(--sp-2);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: var(--tap);
  padding: var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
}

.textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.55;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brass);
}

.err {
  color: var(--urgent);
  font-size: var(--t-sm);
  margin-top: var(--sp-2);
}

/* --- 0–10 scale ----------------------------------------------------------- */

.scale {
  display: grid;
  gap: var(--sp-3);
}

.scale-readout {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}

.scale-readout .num {
  font-family: var(--font-display);
  font-size: var(--t-3xl);
  line-height: 1;
  color: var(--brass-ink);
  font-variant-numeric: tabular-nums;
}

:root[data-theme="dark"] .scale-readout .num {
  color: var(--brass);
}

.scale-readout .word {
  color: var(--ink-2);
  font-size: var(--t-sm);
}

input[type="range"] {
  width: 100%;
  height: var(--tap);
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--surface-sunk);
  border: 1px solid var(--line);
}

input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--surface-sunk);
  border: 1px solid var(--line);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--brass);
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-1);
  cursor: grab;
}

input[type="range"]::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brass);
  border: 3px solid var(--surface);
  cursor: grab;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  font-size: var(--t-xs);
  color: var(--ink-3);
}

/* --- Body map ------------------------------------------------------------- */

.bodymap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--sp-4);
}

.bodymap figure {
  margin: 0;
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.bodymap figcaption {
  text-align: center;
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--sp-2);
}

.bodymap svg {
  width: 100%;
  height: auto;
  touch-action: manipulation;
}

.body-silhouette {
  fill: var(--surface-2);
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.body-region {
  fill: transparent;
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.12s ease;
}

.body-region:hover {
  fill: color-mix(in srgb, var(--brass) 22%, transparent);
}

.body-region[aria-pressed="true"] {
  fill: color-mix(in srgb, var(--brass) 52%, transparent);
  stroke: var(--brass);
  stroke-width: 1.75;
  stroke-dasharray: none;
}

.body-region:focus-visible {
  outline: none;
  stroke: var(--brass);
  stroke-width: 3;
  stroke-dasharray: none;
}

.orient-note {
  font-size: var(--t-xs);
  color: var(--ink-3);
  text-align: center;
}

/* --- Clue chips ----------------------------------------------------------- */

.clues {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
  margin: 0;
}

.clue {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  background: var(--surface);
  font-size: var(--t-xs);
  color: var(--ink-2);
}

.clue::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
  flex: none;
}

.clue[data-tone="relief"]::before {
  background: var(--teal);
}
.clue[data-tone="nerve"]::before {
  background: var(--indigo);
}
.clue[data-tone="watch"]::before {
  background: var(--urgent);
}

/* A live counter of collected clues, shown in the interview dock. */
.clue-tally {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* --- Dock (sticky interview controls) ------------------------------------- */

.dock {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 25;
  padding: var(--sp-3) var(--sp-4)
    calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

.dock-inner {
  max-width: var(--measure);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.dock .btn-primary {
  flex: 1;
}

/* --- Findings ------------------------------------------------------------- */

.match {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.match > header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.match > .body {
  padding: var(--sp-5);
}

.strength {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--strength-color, var(--ink-2));
}

.strength .ticks {
  display: inline-flex;
  gap: 3px;
}

.strength .ticks i {
  width: 16px;
  height: 5px;
  border-radius: 2px;
  background: var(--surface-sunk);
  border: 1px solid var(--line-strong);
}

.strength .ticks i[data-on="1"] {
  background: var(--strength-color, var(--ink-2));
  border-color: var(--strength-color, var(--ink-2));
}

.evidence-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--sp-2);
}

.evidence-list li {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--t-sm);
  line-height: 1.5;
}

.evidence-list li::before {
  flex: none;
  width: 1.35rem;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  line-height: 1.6;
  color: var(--ink-3);
}

.evidence-list[data-kind="for"] li::before {
  content: "▸";
  color: var(--teal);
}
.evidence-list[data-kind="against"] li::before {
  content: "◇";
  color: var(--ink-3);
}
.evidence-list[data-kind="missing"] li::before {
  content: "?";
  color: var(--brass);
}

.subhead {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--sp-2);
}

/* --- Timeline ------------------------------------------------------------- */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  padding-inline-start: var(--sp-5);
}

.timeline::before {
  content: "";
  position: absolute;
  inset-block: 0.6rem;
  inset-inline-start: 6px;
  width: 2px;
  background: var(--line-strong);
}

.timeline li {
  position: relative;
  padding-block: var(--sp-2);
}

.timeline li::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(var(--sp-5) * -1 + 1px);
  top: 1.05rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--brass);
}

.timeline .tdate {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-3);
}

.timeline .ttitle {
  font-weight: 550;
}

/* --- Trend chart (symptom tracker) ---------------------------------------- */

.trend {
  width: 100%;
  height: auto;
  overflow: visible;
}

.trend .grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.trend .axis-text {
  fill: var(--ink-3);
  font-size: 9px;
  font-family: var(--font-mono);
}

.trend .series {
  fill: none;
  stroke: var(--brass);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.trend .dot {
  fill: var(--surface);
  stroke: var(--brass);
  stroke-width: 2;
}

/* --- Misc ----------------------------------------------------------------- */

.divide {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: var(--sp-5);
}

.kv {
  display: grid;
  gap: var(--sp-3);
}

.kv > div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 34%) 1fr;
  gap: var(--sp-3);
  align-items: baseline;
}

.kv dt {
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kv dd {
  margin: 0;
}

.steps {
  counter-reset: s;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--sp-4);
}

.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: var(--sp-3);
  align-items: start;
}

.steps li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--brass-soft);
  border: 1px solid color-mix(in srgb, var(--brass) 40%, transparent);
  color: var(--brass-ink);
  font-family: var(--font-display);
  font-weight: 700;
}

:root[data-theme="dark"] .steps li::before {
  color: var(--brass);
}

.case-tile {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  width: 100%;
  text-align: start;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.case-tile:hover {
  border-color: var(--brass);
}

.badge {
  display: inline-block;
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}

.badge[data-tone="demo"] {
  background: var(--indigo-soft);
  border-color: color-mix(in srgb, var(--indigo) 35%, transparent);
  color: var(--indigo);
}

.badge[data-tone="urgent"] {
  background: var(--urgent-soft);
  border-color: var(--urgent-line);
  color: var(--urgent);
}

.badge[data-tone="open"] {
  background: var(--brass-soft);
  border-color: color-mix(in srgb, var(--brass) 35%, transparent);
  color: var(--brass-ink);
}

:root[data-theme="dark"] .badge[data-tone="open"] {
  color: var(--brass);
}

details.disclosure {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}

details.disclosure > summary {
  padding: var(--sp-3) var(--sp-4);
  min-height: var(--tap);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-weight: 550;
  list-style: none;
}

details.disclosure > summary::-webkit-details-marker {
  display: none;
}

details.disclosure > summary::after {
  content: "+";
  margin-inline-start: auto;
  font-family: var(--font-mono);
  color: var(--ink-3);
}

details.disclosure[open] > summary::after {
  content: "−";
}

details.disclosure > .dbody {
  padding: 0 var(--sp-4) var(--sp-4);
}

.report {
  font-size: var(--t-sm);
  line-height: 1.6;
}

.report h3 {
  font-size: var(--t-md);
  margin-top: var(--sp-5);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line);
}

.report h3:first-child {
  margin-top: 0;
}

.report ul {
  padding-inline-start: 1.15rem;
}

pre.plain {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  line-height: 1.55;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  max-height: 24rem;
  overflow: auto;
}

footer.site {
  border-top: 1px solid var(--line);
  padding: var(--sp-5) var(--sp-4);
  font-size: var(--t-xs);
  color: var(--ink-3);
}

footer.site .links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  max-width: var(--measure);
  margin: 0 auto var(--sp-3);
}

footer.site .links a {
  color: var(--ink-2);
}

footer.site .fine {
  max-width: var(--measure);
  margin-inline: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 60;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-full);
  background: var(--ink);
  color: var(--bg);
  font-size: var(--t-sm);
  box-shadow: var(--shadow-2);
  animation: toast-in 0.18s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}
