/* The Arvax site. One stylesheet for every page. Context: PRODUCT.md and DESIGN.md.
   The Luxe system, shared with the member app (vigil-poc apps/app/lib/theme.ts holds the same values).
   One warm charcoal-green ground, cards a shade deeper, a raised tile, and a cream panel for every
   document a visitor reads closely or fills in. Two accents carry meaning and nothing else does:
     terracotta = actions and alerts: every button, and every "!" mark.
     sage       = "all good": live, on watch, closed. A status colour, never a control.
   No red. DM Serif Display for headings and numbers, DM Sans for everything else. One column on a phone. */

/* Typefaces are served from this site (assets/fonts). The visitor's browser is sent nowhere else. */
@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/dm-serif-display-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/dm-serif-display-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Serif Display"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/dm-serif-display-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Serif Display"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/dm-serif-display-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/dm-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/dm-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* The dark surfaces, from the ground up. */
  --ground: #474C49;
  --card: #2B2D2E;
  --tile: #343637;                          /* a raised tile: a card on a card-coloured band */
  --hair: rgba(255, 255, 255, 0.12);
  --field-line: rgba(255, 255, 255, 0.22);  /* the edge of a control on a dark surface */
  --text: #F2EDE2;                          /* 7.5:1 on the ground, 11.9:1 on a card */
  --muted: #B4B9B1;                         /* 6.9:1 on a card, 6.1:1 on a tile. 4.4:1 on the ground: never used there */

  /* Terracotta: actions and alerts. Nothing else is terracotta. */
  --terra: #B25B37;                         /* white on it 4.7:1 */
  --terra-strong: #9C4E2E;                  /* hover and active; as text on cream 5.1:1 */
  --on-terra: #FFFFFF;

  /* Sage: "all good", live, on watch, closed. Never a button. */
  --sage: #8FB58C;
  --sage-ink: #1C3321;                      /* on sage 5.9:1 */

  /* Cream: a document. */
  --cream: #F3EDE0;
  --cream-ink: #2D2B27;                     /* 12.1:1 on cream */
  --cream-muted: #6B6657;                   /* 4.9:1 on cream */
  --cream-rule: rgba(45, 43, 39, 0.16);
  --cream-wash: rgba(45, 43, 39, 0.07);

  /* What a card is here, and what secondary text may be here. A band or a card re-sets these. */
  --card-bg: var(--card);
  --quiet: var(--text);

  /* The state marks, as images. */
  --via-open: url("/assets/brand/via-open.svg");
  --via-closed: url("/assets/brand/via-closed.svg");
  --via-pending: url("/assets/brand/via-pending.svg");
  --via-pending-ink: url("/assets/brand/via-pending-ink.svg");
  --via-live: url("/assets/brand/via-live.svg");

  /* Type. */
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-body: clamp(1.125rem, 1.07rem + 0.24vw, 1.25rem);
  --t-small: 1rem;
  --t-lead: clamp(1.3rem, 1.16rem + 0.6vw, 1.6rem);
  --t-h3: 1.5rem;
  --t-h2: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem);
  --t-h1: clamp(2.8rem, 1.6rem + 4.6vw, 5.25rem);

  /* Space and shape. */
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1312px;
  --section: clamp(72px, 9vw, 128px);
  --r-card: 20px;
  --r-button: 16px;
  --r-field: 12px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);

  --focus: var(--text);
  color-scheme: dark;
}

/* Every size is in rem, so a visitor's own browser text size and zoom enlarge the whole page. */
html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--card); scrollbar-color: var(--muted) var(--card); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 var(--t-body)/1.6 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; caret-color: var(--text); }
::selection { background: var(--cream); color: var(--cream-ink); }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { max-width: 100%; }
/* DM Serif Display has one weight. Never ask it for bold: the browser would fake it. */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-wrap: balance; }
h1 { font-size: var(--t-h1); line-height: 1.04; letter-spacing: -0.012em; }
h1 em { font-style: italic; }
h2 { font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.008em; max-width: 18ch; }
h3 { font-size: var(--t-h3); line-height: 1.2; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--cream); color: var(--cream-ink); padding: 12px 16px; z-index: 20; border-radius: 6px; }
.skip:focus { left: 12px; top: 12px; }
.measure { max-width: 60ch; }
.muted { color: var(--quiet); }
/* Read by screen readers, not shown: the words behind a drawn state. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Cream. A document laid on the dark ground. Text on it is ink. ---- */
/* color-scheme: light makes the browser draw its own controls (checkboxes, select arrows) for cream. */
.paper, .article, .band-close > .wrap { --focus: var(--cream-ink); --quiet: var(--cream-muted); color: var(--cream-ink); color-scheme: light; }
.paper { background: var(--cream); border-radius: var(--r-card); padding: clamp(22px, 3vw, 36px); box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.55); }
.paper ::selection, .article ::selection, .band-close ::selection { background: var(--cream-ink); color: var(--cream); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--cream-rule); font-size: 1rem; color: var(--cream-muted); }
.sheet-head b { font: 400 1.5rem/1.2 var(--serif); color: var(--cream-ink); }

/* ---- The state marks: the same everywhere. Each carries a word beside it; the shape repeats it. ---- */
.via { display: inline-block; flex: none; width: 1.25rem; height: 1.25rem; background: no-repeat center / contain; vertical-align: -0.2em; }
.via.is-open { background-image: var(--via-open); }       /* needs attention: terracotta, with "!" */
.via.is-closed { background-image: var(--via-closed); }   /* closed: sage, with a tick */
.via.is-pending { background-image: var(--via-pending); } /* not yet: a dashed ring */
.via.is-live { background-image: var(--via-live); }       /* running: a sage dot */
.paper .via.is-pending { background-image: var(--via-pending-ink); }

/* ---- Pills. Sage for what is on; quiet for what is not yet. Never terracotta unless it is an alert. ---- */
.pill { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--muted); font: 600 0.9375rem/1.4 var(--sans); white-space: nowrap; }
.pill.is-good { background: var(--sage); color: var(--sage-ink); }
.pill.is-attn { background: var(--terra); color: var(--on-terra); }
.paper .pill { background: var(--cream-wash); color: var(--cream-ink); }
.paper .pill.is-good { background: var(--sage); color: var(--sage-ink); }
.paper .pill.is-attn { background: var(--terra); color: var(--on-terra); }

/* ---- Header. The same on every page. ---- */
.site-header { background: var(--ground); color: var(--text); border-bottom: 1px solid var(--hair); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: clamp(14px, 2vw, 20px); }
.brand { display: flex; align-items: center; gap: clamp(8px, 1vw, 12px); color: inherit; text-decoration: none; font: 400 clamp(1.7rem, 1.4rem + 1vw, 2.15rem)/1 var(--serif); letter-spacing: 0.01em; }
.brand img { width: clamp(36px, 30px + 1.4vw, 44px); height: auto; aspect-ratio: 1; display: block; flex: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px clamp(10px, 1.8vw, 26px); margin-left: auto; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; font: 500 1.0625rem/1 var(--sans); padding: 14px 4px; min-height: 48px; display: inline-flex; align-items: center; }
.nav a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 1px; }
.nav a:not(.btn)[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--text); text-decoration-thickness: 2px; }

/* ---- Buttons. One primary: terracotta, white lettering, on any surface. ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border-radius: var(--r-button); border: 1px solid transparent; font: 600 1.0625rem/1 var(--sans); letter-spacing: 0.005em; text-decoration: none; cursor: pointer; transition: background-color 180ms, transform 180ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terra); color: var(--on-terra); box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.7); }
.btn-primary:hover, .btn-primary:active { background: var(--terra-strong); }
.btn-quiet { background: transparent; color: var(--text); border-color: var(--field-line); }
.btn-quiet:hover { background: rgba(255, 255, 255, 0.08); }
.paper .btn-quiet { color: var(--cream-ink); border-color: var(--cream-muted); }
.paper .btn-quiet:hover { background: var(--cream-wash); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.head-cta { min-height: 48px; padding: 0 22px; border-radius: 14px; }
.quiet-link { font: 500 1.0625rem/1.4 var(--sans); display: inline-flex; align-items: center; min-height: 48px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* ---- Opening band. The ground, plain. ---- */
.open { position: relative; color: var(--text); }
.lead { margin-top: 24px; max-width: 38ch; font-size: var(--t-lead); line-height: 1.45; color: var(--text); }
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.open-plain { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(48px, 7vw, 96px); }
.open-plain h1 { max-width: 16ch; }
.open-plain .lead { max-width: 46ch; }

/* The home opening: copy and the working form on the left, one member's statement on the right. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: clamp(32px, 6vw, 96px); align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.hero h1 { max-width: 15ch; font-size: clamp(2.8rem, 1.5rem + 3.4vw, 4.5rem); }
.quick { margin-top: 36px; display: flex; gap: 8px; max-width: 560px; padding: 7px; border-radius: 22px; border: 1px solid var(--field-line); background: var(--card); }
.quick:focus-within { border-color: var(--text); }
.quick label { position: absolute; left: -9999px; }
.quick input { flex: 1; min-width: 0; min-height: 56px; border: 0; background: transparent; color: var(--text); padding: 0 18px; font: 400 1.125rem/1 var(--sans); border-radius: var(--r-button); }
.quick input::placeholder { color: var(--muted); opacity: 1; }
.quick input:focus-visible { outline: none; }
.terms-line { margin-top: 16px; font-size: var(--t-small); color: var(--text); }
.hero-figure { display: flex; justify-content: flex-end; }
.hero-figure .statement { width: 100%; }

/* ---- How Arvax works: six products, each a card with its state as a pill. ---- */
.parts { margin-top: 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.parts li { --quiet: var(--muted); display: grid; gap: 10px; align-content: start; grid-template-rows: auto auto 1fr auto; padding: 24px 24px 22px; background: var(--card-bg); border: 1px solid var(--hair); border-radius: var(--r-card); }
.parts h3 { font-size: 1.75rem; line-height: 1.15; margin-top: 6px; }
.parts p { color: var(--muted); font-size: 1.0625rem; }
.parts .status { display: block; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 1rem; color: var(--text); }

/* ---- The statement. One member's own dated account, on cream. ---- */
.statement { position: relative; width: min(100%, 460px); }
.statement .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--cream-rule); }
.statement .date { white-space: nowrap; text-align: right; }
.statement .ref { display: block; text-align: right; font-size: 1rem; color: var(--cream-muted); white-space: nowrap; }
.statement .title { font: 400 1.75rem/1.15 var(--serif); color: var(--cream-ink); }
.statement .sub, .statement .date { font-size: 1rem; color: var(--cream-muted); }
.statement table { width: 100%; border-collapse: collapse; }
.statement th { position: absolute; left: -9999px; }
.statement td { padding: 12px 0; border-bottom: 1px solid var(--cream-rule); font-size: 1.0625rem; vertical-align: middle; }
/* The flex row lives inside the cell: a flex cell leaves the table's row and its rule drifts. */
.statement td.what .what-in { display: inline-flex; align-items: center; gap: 12px; }
/* A count is a number, so it is set in the display serif. It is never a score. */
.statement td.n { text-align: right; font: 400 1.625rem/1 var(--serif); width: 2rem; padding-right: 16px; }
.statement td.s { text-align: right; color: var(--cream-muted); font-size: 1rem; white-space: nowrap; }
.statement td.s .blank { display: inline-block; width: 7rem; border-bottom: 1px dashed var(--cream-muted); vertical-align: middle; }
/* "Do this first": attention, so it carries the terracotta mark. The words stay in ink. */
.statement .first { margin-top: 16px; padding: 14px 16px; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(178, 91, 55, 0.45); border-radius: 14px; font-size: 1.0625rem; }
.statement .first b { display: flex; align-items: center; gap: 8px; color: var(--terra-strong); font-weight: 700; }
.statement .first b::before { content: ""; width: 1.125rem; height: 1.125rem; flex: none; background: var(--via-open) no-repeat center / contain; }
.statement .key { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 1rem; color: var(--cream-ink); }
.statement .key span { display: inline-flex; align-items: center; gap: 8px; }
.statement .note { margin-top: 10px; font-size: 1rem; color: var(--cream-muted); }

/* One line of the statement as it changes: not yet, then needs attention, then closed. */
.states-sheet { margin-top: 44px; }
.states { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.states::before { content: ""; position: absolute; left: 0; right: 0; top: calc(22px + 0.75rem - 1px); height: 2px; background: var(--cream-rule); }
.states li { position: relative; padding: 22px 24px 4px 0; display: grid; gap: 6px; align-content: start; }
.states li .via { width: 1.5rem; height: 1.5rem; margin-bottom: 8px; box-shadow: 0 0 0 6px var(--cream); border-radius: 50%; background-color: var(--cream); }
.states .when { font-size: 1rem; color: var(--cream-muted); }
.states .row { font: 400 1.5rem/1.2 var(--serif); color: var(--cream-ink); }
.states .val { color: var(--cream-ink); font-weight: 600; }
.states .val.attn { color: var(--terra-strong); }
.states .val.good { color: var(--sage-ink); }

/* ---- Sections ---- */
.section { padding-block: var(--section); }
.section > .wrap > h2 + .intro, .split h2 + .intro { margin-top: 20px; }
.intro { max-width: 56ch; color: var(--quiet); }
/* A deeper band: the card colour, edge to edge. Cards on it step up to the raised tile. */
.band-panel { --card-bg: var(--tile); --quiet: var(--muted); background: var(--card); border-block: 1px solid var(--hair); }
.sheet-wide { margin-top: 44px; }

/* What Arvax does, at the fold of the home opening: one card of rows, each with its state. */
.does { margin-bottom: clamp(48px, 7vw, 96px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: var(--r-card); overflow: hidden; }
.does a { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start; align-content: start; height: 100%; padding: 22px 26px 24px; background: var(--card); color: var(--text); text-decoration: none; }
.does a:hover { background: var(--tile); }
.does a:focus-visible { outline-offset: -4px; border-radius: 12px; }
.does .via { margin-top: 0.42rem; }
.does b { font: 400 1.5rem/1.2 var(--serif); color: var(--text); }
.does a > span:not(.via) { grid-column: 2; font-size: 1.0625rem; line-height: 1.5; color: var(--muted); }

/* ---- One route, found and closed. The one piece of motion on the site: it plays once, in under five
   seconds, when it scrolls into view. Without the script, and under reduced motion, it rests on its last frame. ---- */
.route { position: relative; margin-top: 44px; padding: clamp(22px, 3vw, 36px); background: var(--card-bg); border: 1px solid var(--hair); border-radius: var(--r-card); }
.route-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--hair); }
.route-name { font: 400 1.5rem/1.2 var(--serif); }
.route .when-open, .route.is-closed .when-closed { display: revert; }
.route .when-closed, .route.is-closed .when-open { display: none; }
.route-state { min-height: 1.9rem; }
.route:not(.is-found) .route-state .pill { visibility: hidden; }
.route-stops { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 20px; margin-top: 34px; }
.route-stops li { position: relative; display: grid; gap: 6px; align-content: start; }
.route-stops .n { position: relative; z-index: 1; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin-bottom: 12px; border-radius: 50%; border: 2px solid var(--field-line); background: var(--card-bg); font: 400 1.625rem/1 var(--serif); color: var(--muted); transition: border-color 300ms, background-color 300ms, color 300ms; }
.route-stops b { font: 400 1.375rem/1.2 var(--serif); color: var(--text); }
.route-stops .cap { font-size: 1rem; line-height: 1.5; color: var(--muted); }
/* The link from one stop to the next. */
.route-stops li:not(:last-child)::after { content: ""; position: absolute; left: 3.5rem; right: -20px; top: calc(1.75rem - 1px); height: 2px; background: var(--field-line); transition: background-color 300ms; }
/* Reached: the stop and the link behind it are open, so they carry the alert colour. */
.route-stops li.is-open .n { border-color: var(--terra); background: var(--terra); color: var(--on-terra); }
.route-stops li.is-linked:not(:last-child)::after { background: var(--terra); }
/* Closed: the first link is cut, and nothing beyond it can be reached. */
.route.is-closed .route-stops li:first-child .n { border-color: var(--field-line); background: var(--card-bg); color: var(--text); }
.route.is-closed .route-stops li:not(:first-child) .n { border-style: dashed; border-color: var(--muted); background: var(--card-bg); color: var(--muted); }
.route.is-closed .route-stops li:not(:last-child)::after { background: repeating-linear-gradient(90deg, var(--muted) 0 6px, transparent 6px 12px); }
.route.is-closed .route-stops li:first-child::after { background: linear-gradient(90deg, var(--sage) 0 38%, transparent 38% 62%, var(--muted) 62% 100%); }
.route.is-closed .route-stops li:first-child::before { content: ""; position: absolute; z-index: 1; left: calc(50% + 1.75rem - 10px); top: calc(1.75rem - 11px); width: 22px; height: 22px; background: var(--via-closed) no-repeat center / contain; }
/* The Fleet, as the mark: it goes where an attacker would. */
.route-knight { position: absolute; z-index: 2; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--card-bg); box-shadow: 0 0 0 3px var(--card-bg); transition: transform 560ms var(--ease); pointer-events: none; }
.route-finding { margin-top: 30px; padding: 22px 24px 24px; border: 1px solid rgba(178, 91, 55, 0.6); border-radius: 18px; background: var(--card); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px clamp(24px, 4vw, 56px); transition: opacity 420ms, transform 420ms var(--ease), border-color 300ms; }
.band-panel .route-finding { background: var(--card); }
.route:not(.is-found) .route-finding { opacity: 0; transform: translateY(10px); }
.route.is-closed .route-finding { border-color: rgba(143, 181, 140, 0.6); }
.route-tag { display: flex; align-items: center; gap: 10px; font: 600 1rem/1.4 var(--sans); color: var(--text); }
.route .route-tag.when-open, .route.is-closed .route-tag.when-closed { display: flex; }
.route .route-tag.when-closed, .route.is-closed .route-tag.when-open { display: none; }
.route-finding h3 { font-size: 1.75rem; }
.route-finding p { color: var(--muted); }
.route-finding > * { grid-column: 1; }
.route-finding .route-do { grid-column: 2; grid-row: 1 / span 4; align-self: center; padding-left: clamp(24px, 4vw, 56px); border-left: 1px solid var(--hair); }
.route-do b { display: block; color: var(--text); font-weight: 600; }
.route-note { margin-top: 22px; font-size: 1rem; color: var(--muted); }
.route-replay { margin-top: 18px; min-height: 48px; }
@media (prefers-reduced-motion: reduce) { .route-knight, .route-finding, .route-stops .n, .route-stops li::after { transition: none; } }

/* The closing band: a cream panel, and the one action. */
.band-close { padding-inline: var(--gutter); }
.band-close > .wrap { max-width: calc(var(--max) - 2 * var(--gutter)); padding: clamp(32px, 6vw, 80px); background: var(--cream); border-radius: 28px; box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.55); }
.band-close .intro { color: var(--cream-muted); }
/* The home page's close carries the price as a display number. A price, never a score. */
.close h2 + .intro { margin-top: 20px; }
.band-close > .wrap.close { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.price-tag { display: grid; gap: 2px; justify-items: end; text-align: right; color: var(--cream-muted); font-size: 1.0625rem; }
.price-tag b { font: 400 clamp(4.5rem, 2.6rem + 7vw, 8.5rem)/0.95 var(--serif); letter-spacing: -0.02em; color: var(--cream-ink); }

.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split.center { align-items: center; }
.prose { display: grid; gap: 16px; max-width: 58ch; }
.prose.on-split { margin-top: 24px; color: var(--quiet); }
.paper .prose.on-split, .paper .intro { color: var(--cream-muted); }

/* Terms: one card of rows. A term with a state carries its mark beside the name. */
.terms { --quiet: var(--muted); display: grid; padding: 4px clamp(20px, 2.4vw, 30px); background: var(--card-bg); border: 1px solid var(--hair); border-radius: var(--r-card); }
.terms .item { padding-block: 24px; display: grid; gap: 8px; }
.terms .item + .item { border-top: 1px solid var(--hair); }
.terms dt { font: 400 1.75rem/1.2 var(--serif); color: var(--text); }
.terms .item.is-live dt::before, .terms .item.is-pending dt::before { content: ""; display: inline-block; width: 1.125rem; height: 1.125rem; margin-right: 12px; vertical-align: -0.02em; background: var(--via-pending) no-repeat center / contain; }
.terms .item.is-live dt::before { background-image: var(--via-live); }
.terms dd { color: var(--muted); max-width: 58ch; }
.terms .status { display: inline-flex; align-items: flex-start; gap: 10px; margin-top: 4px; font-size: 1rem; color: var(--text); }
.terms .status .via { margin-top: 0.2em; }

/* Rules Arvax keeps: each a card that opens on the word "Never". */
.rules { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.rules li { --quiet: var(--muted); display: grid; gap: 8px; align-content: start; padding: 22px 24px 24px; background: var(--card-bg); border: 1px solid var(--hair); border-radius: var(--r-card); }
.rules li::before { content: "Never"; justify-self: start; margin-bottom: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--muted); font: 600 0.9375rem/1.4 var(--sans); }
.rules p { color: var(--muted); }
.after-list { margin-top: 44px; }
.rules.pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Things not done yet. "Not yet" is the only negative state. */
.rules.not-yet li::before { content: "Not yet"; padding-left: 34px; background: var(--cream-wash) var(--via-pending-ink) no-repeat 10px 50% / 16px 16px; color: var(--cream-ink); }
.paper .rules li { background: none; border: 0; border-top: 1px solid var(--cream-rule); border-radius: 0; padding: 22px 0 0; }
.paper .rules { gap: 28px clamp(32px, 5vw, 72px); }
.paper .rules h3 { color: var(--cream-ink); }
.paper .rules p { color: var(--cream-muted); }
.paper > .rules:first-child { margin-top: 0; }

/* A real sequence, so it is numbered: one card of rows, each number in the display serif. */
.steps { --quiet: var(--muted); margin-top: 44px; display: grid; counter-reset: step; max-width: 800px; padding: 4px clamp(20px, 2.4vw, 30px); background: var(--card-bg); border: 1px solid var(--hair); border-radius: var(--r-card); }
.split .steps { margin-top: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 16px; padding-block: 24px; }
.steps li + li { border-top: 1px solid var(--hair); }
.steps li::before { content: counter(step); font: 400 2.75rem/0.95 var(--serif); color: var(--text); }
.steps p { color: var(--muted); margin-top: 6px; }

.plain { display: grid; gap: 10px; padding-left: 1.2em; list-style: disc; }
.plain li::marker { color: var(--cream-muted); }

/* The consent record on the trust page: dated entries, each locked to the one before. */
.record { margin-top: 32px; max-width: 540px; }
.record ol { position: relative; }
.record li { display: grid; grid-template-columns: 0.75rem 7.5rem minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--cream-rule); font-size: 1.0625rem; }
/* An entry is an event, not a state: every one gets the same plain ink dot. */
.record li .via { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--cream-muted); }
.record time { color: var(--cream-muted); font-size: 1rem; }
.record .note { margin-top: 12px; font-size: 1rem; color: var(--cream-muted); }

/* ---- Form. Always on cream. ---- */
.form { display: grid; gap: 22px; max-width: 560px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font: 600 1.0625rem/1.3 var(--sans); padding: 0; color: var(--cream-ink); }
.field .hint { font-size: var(--t-small); color: var(--cream-muted); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea { width: 100%; min-height: 56px; padding: 12px 16px; font: 400 1.125rem/1.4 var(--sans); color: var(--cream-ink); background: #FFFFFF; border: 1px solid var(--cream-muted); border-radius: var(--r-field); caret-color: var(--cream-ink); }
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--cream-ink); outline-offset: 2px; border-color: var(--cream-ink); }
/* A problem is an alert, so it is terracotta, and always a sentence as well. */
.field [aria-invalid="true"] { border-color: var(--terra-strong); border-width: 2px; }
.field .error { font: 600 1rem/1.4 var(--sans); color: var(--terra-strong); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding-block: 6px; }
.choice input { width: 28px; height: 28px; margin: 0; flex: none; accent-color: var(--terra); }
.choice label { padding-block: 2px; cursor: pointer; font: 400 1.0625rem/1.5 var(--sans); color: var(--cream-ink); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 18px 20px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--hair); color: var(--text); }
.notice.problem { border-color: var(--terra); }
/* Inside a sheet, a notice is a line of the document, not a box inside a box. */
.paper .notice { background: none; border: 0; border-radius: 0; padding: 0 0 18px; border-bottom: 1px solid var(--cream-rule); color: var(--cream-ink); }
.paper .notice.problem { color: var(--terra-strong); border-bottom: 2px solid var(--terra); }
.notice h3 { font-size: 1.5rem; }
.notice p { margin-top: 6px; }

/* ---- Footer ---- */
.site-footer { background: var(--card); border-top: 1px solid var(--hair); padding-block: 40px; color: var(--muted); font-size: var(--t-small); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer a { color: var(--muted); padding: 12px 0; display: inline-block; }
.site-footer a:hover { color: var(--text); }

/* ---- Journal. An article is a document, so it sits on cream. ---- */
.post-meta { margin-top: 24px; font-size: var(--t-small); color: var(--text); display: flex; flex-wrap: wrap; gap: 4px 20px; }
.article { max-width: 72ch; margin-inline: auto; display: grid; gap: 22px; background: var(--cream); border-radius: var(--r-card); padding: clamp(28px, 5vw, 64px); box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.55); font-size: clamp(1.1875rem, 1.12rem + 0.24vw, 1.3125rem); line-height: 1.7; }
.article h2 { font-size: clamp(1.75rem, 1.35rem + 1.4vw, 2.35rem); max-width: none; margin-top: 28px; color: var(--cream-ink); }
.article ul, .article ol { display: grid; gap: 10px; padding-left: 1.3em; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li::marker { color: var(--cream-muted); }
.article blockquote { margin: 8px 0; padding: 4px 0 4px 22px; font: italic 400 1.6rem/1.35 var(--serif); }
.article .figure { margin: 8px 0; padding: 22px 24px; background: var(--cream-wash); border-radius: var(--r-field); display: grid; gap: 8px; }
.article .figure .figure-title { font: 600 1.125rem/1.35 var(--sans); }
.article .figure p { color: var(--cream-muted); }
.article .checklist { margin-top: 20px; padding: 28px; background: var(--cream-wash); border-radius: var(--r-field); display: grid; gap: 16px; }
.article .checklist h2 { margin-top: 0; }
.article .sources { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--cream-rule); font-size: var(--t-small); color: var(--cream-muted); display: grid; gap: 12px; }
.article .sources h2 { font: 600 1.125rem/1.3 var(--sans); letter-spacing: 0; margin-top: 0; color: var(--cream-ink); }
.article .sources ul { list-style: none; padding-left: 0; }
.article .sources a { overflow-wrap: anywhere; }
/* The journal list: one card of rows, like the terms. */
.post-list { --quiet: var(--muted); display: grid; padding: 4px clamp(20px, 2.4vw, 30px); background: var(--card-bg); border: 1px solid var(--hair); border-radius: var(--r-card); }
.post-list li { padding-block: 30px; display: grid; gap: 10px; }
.post-list li + li { border-top: 1px solid var(--hair); }
.post-list h2 { font-size: clamp(1.75rem, 1.35rem + 1.3vw, 2.35rem); max-width: 24ch; }
.post-list h2 a { color: var(--text); text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.post-list p { color: var(--muted); max-width: 60ch; }
.post-list .when { font-size: var(--t-small); color: var(--muted); }
.more { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--hair); max-width: 72ch; margin-inline: auto; }

/* ---- Membership ---- */
.price { font: 400 clamp(2.8rem, 2rem + 2.4vw, 3.9rem)/1.1 var(--serif); margin-top: 6px; color: var(--cream-ink); }
.price .muted { font: 400 var(--t-body)/1 var(--sans); color: var(--cream-muted); }
#membership .actions { margin-top: 24px; }

/* ---- Narrow screens ---- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { justify-content: center; }
  .hero-figure .statement { max-width: 500px; }
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .figure-side { order: 2; }
  .hero { padding-top: 28px; padding-bottom: 32px; gap: 30px; }
  .hero .lead { margin-top: 18px; }
  .hero h1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem); }
  .quick { margin-top: 22px; }
  .terms-line { margin-top: 12px; }
  .bar { row-gap: 0; padding-block: 10px 8px; }
  .brand { order: 0; }
  .head-cta { order: 1; margin-left: auto; }
  .nav { order: 2; width: 100%; gap: 0 18px; margin-left: 0; }
  .nav a:not(.btn) { padding-inline: 2px; min-height: 44px; padding-block: 8px; font-size: 1rem; }
  .does { grid-template-columns: minmax(0, 1fr); }
  .band-close > .wrap.close { grid-template-columns: minmax(0, 1fr); }
  .price-tag { justify-items: start; text-align: left; }
  /* The route stands on end: stops down the left, the links between them vertical. */
  .route-finding { grid-template-columns: minmax(0, 1fr); }
  .route-finding .route-do { grid-column: 1; grid-row: auto; margin-top: 8px; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--hair); }
  .route-stops { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 26px; }
  .route-stops li { grid-template-columns: 3.5rem minmax(0, 1fr); column-gap: 18px; padding-bottom: 26px; }
  .route-stops li:last-child { padding-bottom: 0; }
  .route-stops .n { grid-row: 1 / span 2; margin-bottom: 0; }
  .route-stops b { align-self: end; }
  .route-stops .cap { grid-column: 2; }
  .route-stops li:not(:last-child)::after { left: calc(1.75rem - 1px); right: auto; top: 3.5rem; bottom: 0; width: 2px; height: auto; }
  .route.is-closed .route-stops li:not(:last-child)::after { background: repeating-linear-gradient(180deg, var(--muted) 0 6px, transparent 6px 12px); }
  .route.is-closed .route-stops li:first-child::after { background: linear-gradient(180deg, var(--sage) 0 30%, transparent 30% 70%, var(--muted) 70% 100%); }
  .route.is-closed .route-stops li:first-child::before { left: calc(1.75rem - 11px); top: calc(3.5rem + (100% - 3.5rem) / 2 - 11px); }
  .rules.pairs { grid-template-columns: minmax(0, 1fr); }
  .record li { grid-template-columns: 0.75rem minmax(0, 1fr); }
  .record li time { grid-column: 2; }
  .record li span:last-child { grid-column: 2; }
  .states { grid-template-columns: minmax(0, 1fr); }
  .states::before { left: calc(0.75rem - 1px); right: auto; top: 34px; bottom: 34px; width: 2px; height: auto; }
  .states li { grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: 16px; padding: 16px 0; }
  .states li .via { grid-row: 1 / span 3; margin: 0; }
  .states li > span:not(.via) { grid-column: 2; }
}
/* On a phone a statement row reads as two lines: the line and its count, then its status. */
@media (max-width: 520px) {
  .quick { flex-direction: column; gap: 4px; }
  .quick input { min-height: 50px; }
  .quick .btn { width: 100%; }
  .statement .head { flex-direction: column; gap: 2px; }
  .statement .date, .statement .ref { display: inline; text-align: left; font-size: 1rem; }
  .statement .ref::before { content: " · "; }
  .statement table, .statement tbody { display: block; }
  .statement tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--cream-rule); }
  .statement tr:first-child { display: none; }
  .statement td { display: block; padding: 0; border: 0; width: auto; }
  .statement td.what { display: block; }
  .statement td.n { width: auto; padding: 0; }
  .statement td.s { grid-column: 1 / -1; text-align: left; width: auto; }
  .statement tr:has(.via) td.s { padding-left: 32px; }
  .statement tr > td:first-child:nth-last-child(2) { grid-column: 1 / -1; }
  .parts { grid-template-columns: minmax(0, 1fr); }
  .band-close > .wrap { border-radius: var(--r-card); }
}
