/* Option B on brand v2's neutral grounds. The page ships A Graphite (data-v="a"); the B and C rules are
   the council's other versions, kept until launch. Willa keeps its own blue in every version, so these selectors skip data-theme="willa". */

:root:not([data-theme="willa"]) { --rule: color-mix(in srgb, var(--ink) 16%, var(--paper)); --line: var(--rule); }

:root[data-v="a"]:not([data-theme="willa"]) { --paper: #F2F1EC; --ink: #1F201D; --grey: #6B6C66; }
:root[data-v="a"][data-mode="dark"]:not([data-theme="willa"]) { --paper: #191A18; --ink: #ECEBE5; --grey: #9C9C95; }

:root[data-v="b"]:not([data-theme="willa"]) { --paper: #F7F6F1; --ink: #2F3F2A; --grey: #5E6857; }
:root[data-v="b"][data-mode="dark"]:not([data-theme="willa"]) { --paper: #1E2A1B; --ink: #DDE3D3; --grey: #9AA592; }

:root[data-v="c"]:not([data-theme="willa"]) { --paper: #F4EFE8; --ink: #2A1A14; --grey: #75584C; }
:root[data-v="c"][data-mode="dark"]:not([data-theme="willa"]) { --paper: #1F1712; --ink: #F1E8DF; --grey: #B39A8E; }

/* Every version: flat surfaces. Screenshots fill their frame edge to edge, with no hairline and no hover outline (Alec, 2026-11-26). */
.plate { background: color-mix(in srgb, var(--ink) 4%, var(--paper)); }
.ix-pane { background: color-mix(in srgb, var(--ink) 4%, var(--paper)); }

/* ---------- B: the grid shows, sections are numbered, edges are ink ---------- */
:root[data-v="b"] body,
:root[data-v="c"] body { counter-reset: sec; }
:root[data-v="b"] main::before,
:root[data-v="c"] main::before {
  content: ""; position: fixed; inset: 0 var(--pad); z-index: 4; pointer-events: none;
  background: repeating-linear-gradient(to right, transparent 0 calc((100% - 11px) / 12), color-mix(in srgb, var(--ink) 7%, transparent) calc((100% - 11px) / 12) calc((100% - 11px) / 12 + 1px));
  border-left: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
}
@media (max-width: 899px) {
  :root[data-v="b"] main::before,
  :root[data-v="c"] main::before {
    background: repeating-linear-gradient(to right, transparent 0 calc((100% - 3px) / 4), color-mix(in srgb, var(--ink) 7%, transparent) calc((100% - 3px) / 4) calc((100% - 3px) / 4 + 1px));
  }
}
:root[data-v="b"] .head,
:root[data-v="c"] .head { border-bottom-color: var(--ink); }
:root[data-v="b"] .head .label,
:root[data-v="c"] .head .label { color: var(--ink); }
:root[data-v="b"] section .head .label::before,
:root[data-v="c"] section .head .label::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero) " / ";
  color: var(--grey);
}
:root[data-v="b"] .plate,
:root[data-v="c"] .plate { box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
:root[data-v="b"] .ix-list,
:root[data-v="c"] .ix-list { box-shadow: inset 0 1px 0 var(--ink); }
:root[data-v="b"] .routes,
:root[data-v="c"] .routes { box-shadow: inset 0 1px 0 var(--ink); }

/* ---------- C: raw. Thick rules, mono detail, plain underlined links, hard offset on hover ---------- */
:root[data-v="c"] .top.solid { box-shadow: inset 0 -2px 0 var(--ink); }
:root[data-v="c"] .head { border-bottom-width: 2px; }
:root[data-v="c"] .ix-row,
:root[data-v="c"] .routes a { box-shadow: inset 0 -1px 0 var(--ink); }
:root[data-v="c"] .ix-d,
:root[data-v="c"] .meta .d,
:root[data-v="c"] .routes .d,
:root[data-v="c"] .stop-title,
:root[data-v="c"] .head p { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }
:root[data-v="c"] .plate { box-shadow: inset 0 0 0 2px var(--ink); transition: transform 300ms var(--ease), box-shadow 300ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  :root[data-v="c"] .card:hover .plate { transform: translate(-6px, -6px); box-shadow: inset 0 0 0 2px var(--ink), 6px 6px 0 var(--ink); background: var(--paper); }
  :root[data-v="c"] .card:hover .plate img { transform: none; }
}
:root[data-v="c"] .say a,
:root[data-v="c"] .reach nav a,
:root[data-v="c"] .routes .u,
:root[data-v="c"] .fine a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
:root[data-v="c"] .globe canvas { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- round 2 fixes (council round 1) ---------- */
/* The grid sits behind content: it shows on the paper and text, never across a photo or screenshot. */
:root[data-v="b"] main::before,
:root[data-v="c"] main::before { z-index: -1; }
:root[data-v="b"] main,
:root[data-v="c"] main { isolation: isolate; }

/* Phone index rows: title and description start at the thumbnail's top edge; the status rides with the title. */
@media (max-width: 899px) {
  .ix-row { grid-template-columns: 72px 1fr auto; align-items: start; column-gap: 12px; row-gap: 2px; }
  .ix-thumb { grid-row: 1 / 3; width: 72px; }
  .ix-n { grid-column: 2; grid-row: 1; }
  .ix-t { grid-column: 3; grid-row: 1; align-self: baseline; }
  .ix-d { grid-column: 2 / 4; grid-row: 2; }
  .ix-row:hover, .ix-row.on { padding-left: 0; }
}
/* A host and its arrow never part. */
.willa a.ix-row .ix-d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Phone offline: the place follows the globe instead of floating mid-screen. */
@media (max-width: 899px) {
  .stop { align-content: start; min-height: 44svh; padding-top: 4svh; }
  .stop.stop-first { min-height: 60svh; }
  .stop-home { min-height: 30svh; }
}

/* C: mono stays for labels and hosts; long descriptions go back to Geist so lists scan. */
:root[data-v="c"] .ix-d,
:root[data-v="c"] .routes .d { font-family: inherit; font-size: 14px; }
/* On Willa blue the rules drop to one pixel so structure doesn't pile onto the blue. */
:root[data-v="c"][data-theme="willa"] .head { border-bottom-width: 1px; }
:root[data-v="c"][data-theme="willa"] .top.solid { box-shadow: inset 0 -1px 0 var(--ink); }
.cap.on-paper { color: var(--grey); }

/* Unread words in the fill-as-you-read lines stay legible in a still or a slow scroll. */
:root { --dim: color-mix(in srgb, var(--ink) 34%, var(--paper)); }

/* C on a more neutral oxide: less brown in the ground, darker secondary text. */
:root[data-v="c"]:not([data-theme="willa"]) { --paper: #F3F0EB; --ink: #2B211C; --grey: #6A5A51; }

/* ---------- round 3 fixes (council round 2) ---------- */
/* The grid belongs to the page body only: it scrolls with main, never sits over the hero photo, and steps aside on Willa blue. */
:root[data-v="b"] main::before,
:root[data-v="c"] main::before { position: absolute; inset: 0 var(--pad); transition: opacity 600ms var(--ease); }
:root[data-v="b"][data-theme="willa"] main::before,
:root[data-v="c"][data-theme="willa"] main::before { opacity: 0; }

/* Phone hero: the name sits just below the middle, so the first screen isn't mostly empty.
   The line under it hangs from the name, so a second line on a narrow phone wraps downward. */
@media (max-width: 559px) {
  .name { bottom: calc(var(--pad) + 30svh); }
  .hero-sub { top: calc(70svh - var(--pad) + 8px); bottom: auto; }
}

/* The hero caption is a paper tag, readable over margin or photo. */
.cap, .cap.on-paper { padding: 3px 7px; background: var(--paper); color: var(--ink); }

/* Unread words: darker still. */
:root { --dim: color-mix(in srgb, var(--ink) 42%, var(--paper)); }

/* B: juniper pulled toward neutral. */
:root[data-v="b"]:not([data-theme="willa"]) { --paper: #F6F6F2; --ink: #283126; --grey: #545D50; }

/* Shorter run-up to each section. */
.soft, .off, .willa { padding-top: clamp(96px, 10vw, 160px); }
.peak, .willa { padding-bottom: clamp(110px, 12vw, 200px); }

/* ---------- round 4 fixes (council round 3) ---------- */
/* The keyboard hint is for keyboards: hidden on phone widths as well as touch screens. */
@media (max-width: 559px) { .hint { display: none; } }
/* The grid recedes a step further behind large type. */
:root[data-v="b"] main::before,
:root[data-v="c"] main::before { opacity: 0.7; }
/* B: juniper one step nearer neutral; unread words darker again. */
:root[data-v="b"]:not([data-theme="willa"]) { --paper: #F5F5F2; --ink: #262B24; --grey: #50574C; }
:root { --dim: color-mix(in srgb, var(--ink) 48%, var(--paper)); }
