/* Human Runtime Formula — the house style.
 *
 * BLACK AND GOLD, AND NOTHING LOUD. The ground is near-black, the ink is a
 * mineral white, and the one colour is gold — spent on the mark, a label, a
 * link, a focus ring, the rule under the page you are on, and the one button
 * a page asks you to press. The register is Stripe's: calm, precise, generous
 * with air, with nothing on the page that is not read or pressed. No
 * illustration but one — the two synapses on the science page (#118) — no
 * gradient that means nothing, no countdown. A hard figure
 * is set in tabular mono and printed, never shouted.
 *
 * THREE SURFACES, ONE TYPOGRAPHIC LAW. The public site is read by a stranger
 * deciding whether to buy, the account by a customer checking an order, the
 * console by the people who run the store. All three wear the same ground,
 * the same ink and the same three faces: the display serif for the title
 * of a page a stranger reads; the system sans for every sentence and for
 * the brand word set on its own; mono with small caps and wide tracking for
 * a label, and plain mono for anything a machine cares about — an order
 * number, a date, a price in a column. System fonts only: the
 * Content-Security-Policy is `font-src 'self'` and this product ships no
 * typeface.
 *
 * THE SIGNAL IS A RULE. The oxidized red of the label's registration line is
 * `--signal`, used once on a page as a one-pixel rule under its title, and
 * for a failing field's edge. It is never a ground, never a button and never
 * small text: an error said in words is `--signal-text`, the same red lifted
 * until a sentence in it reads.
 *
 * EVERY VALUE IS A TOKEN, AND THE TOKENS ARE NOT WRITTEN HERE. The block
 * between `tokens:begin` and `tokens:end` below is generated from
 * docs/design-system/tokens.json by tools/tokens.mjs, and a test fails the
 * build when the two disagree. Below the block a rule spends roles and steps:
 * no raw colour, no font size off the scale, no raw spacing and no breakpoint
 * the tokens do not list — the same test reads every line for each. The print
 * block at the end is paper, black on white, and the one exception.
 *
 * DENSITY HAS A FLOOR. Nothing a person reads as a sentence is below 13px,
 * the smallest step of the scale; a small-caps label is 13px and tracked,
 * which reads as a mark rather than prose. Every control is at least 44px
 * tall on every pointer — HRF's enhanced target — and every input is 16px,
 * because iOS zooms the page on any input below it. The type scale is in rem,
 * so a reader's own default size moves all of it. Every page works at 320px
 * with 16px gutters.
 *
 * AND A CEILING: THE COLUMN. On a screen wider than `--measure-wide-canvas`,
 * 90rem, what is read or pressed holds to a central column that wide, on all
 * three surfaces — the site's blocks, the account's sheet, the console's rail
 * and work together, and the inside of every head and foot, which lines up
 * with the column's edges. The grounds, the rules and the blurred bars still
 * run to the window's edges, so no side of a page is ever drawn and nothing
 * floats on a margin of another colour. A bar is never capped: it stays as
 * wide as the window and pads its content in to the column, by
 * `max(<its own padding>, (100% - var(--measure-wide-canvas)) / 2)`, which is
 * its own padding on any narrower screen — so no query is needed and nothing
 * under the column's width moves.
 *
 * COLOUR IS NEVER THE ONLY SIGNAL. A status badge says the word. A notice
 * has a label. The page you are on is said in `aria-current` and drawn in
 * weight and a rule, not in colour alone. Every pair of text and ground the
 * tokens promise is worked out in docs/design-system/tokens.md. Motion is
 * 150–220ms, on hover and focus and as the site's menu opens and closes, but
 * for the synapses' figure, which moves on its own beat, and
 * `prefers-reduced-motion` switches all of it off; `prefers-contrast: more`
 * strengthens the quiet inks and the hairlines.
 *
 * ONE THEME. The site is dark because the brand is; there is no light mode
 * to drift from it. The one light surface is paper: an admin table, printed.
 */

/* tokens:begin — generated by tools/tokens.mjs from docs/design-system/tokens.json. Edit the JSON, then run
   `node tools/tokens.mjs --write`; tools/tokens.test.mjs fails the build when this block and the file disagree. */

:root {
  color-scheme: dark;
  --ink-0: #0a0a0b;
  --ink-1: #111114;
  --ink-2: #19191e;
  --ink-3: #202027;
  --glass: rgba(10, 10, 11, 0.88);
  --scrim: rgba(10, 10, 11, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-control: rgba(243, 241, 234, 0.4);
  --text: #f3f1ea;
  --text-2: rgba(243, 241, 234, 0.72);
  --text-3: rgba(243, 241, 234, 0.62);
  --gold: #c9a961;
  --gold-2: #e5cf8f;
  --gold-3: #8e7437;
  --gold-tint: rgba(201, 169, 97, 0.1);
  --gold-glow: rgba(201, 169, 97, 0.22);
  --on-gold: #0a0a0b;
  --focus: #c9a961;
  --signal: #d04b3c;
  --signal-text: #ec7a68;
  --signal-tint: rgba(208, 75, 60, 0.12);
  --signal-line: rgba(208, 75, 60, 0.5);
  --ok: #5fb28a;
  --ok-tint: rgba(95, 178, 138, 0.12);
  --ok-line: rgba(95, 178, 138, 0.4);
  --warn: #e0b04a;
  --warn-tint: rgba(224, 176, 74, 0.12);
  --warn-line: rgba(224, 176, 74, 0.4);
  --live: #8fb1d9;
  --live-tint: rgba(143, 177, 217, 0.12);
  --live-line: rgba(143, 177, 217, 0.4);
  --membrane: rgba(243, 241, 234, 0.45);
  --inflamed: #d04b3c;
  --inflamed-tint: rgba(208, 75, 60, 0.16);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c9a961' stroke-width='1.5'/%3E%3C/svg%3E");
  --picker-filter: invert(0.8);

  /* type */
  --sans: system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  --serif: "Cormorant Garamond", Cormorant, "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --fs-0: 0.8125rem;
  --fs-dense: 0.875rem;
  --fs-1: 1rem;
  --fs-2: 1.0625rem;
  --fs-3: 1.25rem;
  --fs-4: 1.625rem;
  --fs-5: 2.125rem;
  --fs-6: 3.25rem;
  --fs-7: 4.5rem;

  /* space */
  --sp-1: 2px;
  --sp-2: 4px;
  --sp-3: 6px;
  --sp-4: 10px;
  --sp-5: 14px;
  --sp-6: 20px;
  --sp-7: 28px;
  --sp-8: 40px;
  --sp-9: 56px;
  --sp-10: 80px;
  --sp-11: 120px;
  --gutter: 16px;

  /* shape */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 20px;

  /* elevation */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.5), 0 24px 64px rgba(0, 0, 0, 0.5);

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-1: 150ms;
  --t-2: 220ms;
  --t-beat: 2000ms;

  /* layout */
  --measure: 44rem;
  --measure-doc: 40rem;
  --measure-site: 72rem;
  --measure-wide-canvas: 90rem;
  --rail-w: 15rem;
  --strip-h: 52px;
  --stick: 0px;
  --head-offset: 0px;

  /* target */
  --target-min: 44px;
  --ctl-h: 44px;
  --ctl-h-primary: 52px;
  --ctl-size: 1rem;
  --row-pad-y: 7px;
  --focus-width: 3px;
  --focus-offset: 2px;

  /* layer */
  --z-raised: 2;
  --z-head: 30;
  --z-dialog: 90;
  --z-skip: 100;
}

@media (pointer: coarse) {
  :root {
    --row-pad-y: 10px;
    --strip-h: 56px;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-2: rgba(243, 241, 234, 0.86);
    --text-3: rgba(243, 241, 234, 0.78);
    --line: rgba(255, 255, 255, 0.18);
    --line-2: rgba(255, 255, 255, 0.34);
    --line-control: rgba(243, 241, 234, 0.64);
    --gold-3: #c9a961;
  }
}

/* tokens:end */

/* --- Reset ---------------------------------------------------------------- */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: tabular-nums;
  /* Where a head sticks, anything the browser scrolls to stops BELOW it
   * rather than under: a section chip, a note's own id, an element brought
   * into view because it was tabbed to. `--head-offset` is how much of the
   * window the head covers, which each surface sets only where its head
   * sticks — so a focused field is never parked under a bar. It is set on
   * this element, `html:has(> .surface--…)`, and never on the body: a custom
   * property is inherited downward, so a value the body set would never
   * reach the root that reads it here. */
  scroll-padding-top: calc(var(--head-offset) + var(--sp-5));
  scroll-behavior: smooth;
}

/* A column the height of the window, at minimum: short content still fills
 * it, so the foot lands on the floor instead of floating up under the last
 * block. `100vh` first for a browser that has not shipped `100dvh`. */
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--ink-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-1);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

svg {
  display: inline-block;
  vertical-align: middle;
}

/* Hidden means hidden, whatever else a rule says about display. */
[hidden] {
  display: none !important;
}

/* The floor: nothing here is drawn for a window narrower than a small phone. */
.surface {
  min-width: 320px;
}

/* The account's sheet has air above it: the customer is not working a queue. */
.surface--account .sheet {
  padding-top: var(--sp-8);
}

/* The public site is read rather than worked: its sentences are a step
 * larger than the account's and the console's. */
.surface--site .sheet {
  font-size: var(--fs-2);
}

/* --- Type ----------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--sp-4);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  overflow-wrap: anywhere;
}

h1 {
  font-size: var(--fs-4);
  margin-bottom: var(--sp-5);
}

h2 {
  font-size: var(--fs-3);
  margin-top: var(--sp-8);
}

h3 {
  font-size: var(--fs-2);
  margin-top: var(--sp-6);
}

h4 {
  font-size: var(--fs-1);
}

h2:first-child,
h3:first-child {
  margin-top: 0;
}

p {
  margin: 0 0 var(--sp-5);
}

ul,
ol {
  margin: 0 0 var(--sp-5);
  padding-left: 1.4em;
}

/* A link is the gold: the one place a word wears the brand's colour, at a
 * weight a sentence can carry. */
a {
  color: var(--gold-2);
  text-decoration: underline;
  text-decoration-color: var(--gold-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--t-1) var(--ease), text-decoration-color var(--t-1) var(--ease);
}

a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* The sentence under a title: larger, quieter. */
.lede {
  font-size: var(--fs-2);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 44rem;
}

/* Fine print: a date, an aside, an admission. Never below the floor. */
.fine {
  font-size: var(--fs-0);
  color: var(--text-3);
}

/* A value a machine cares about, shown as the machine holds it. */
.data,
.num {
  font-family: var(--mono);
  font-size: 0.93em;
  font-variant-numeric: tabular-nums;
}

.num {
  text-align: right;
  white-space: nowrap;
}

/* The label over a thing: mono, small caps, tracked, in the gold. The one
 * typographic mark this product has, and it is used for exactly that —
 * a label — and never for a sentence. */
.eyebrow,
.label,
.kv-key,
.rail-label,
.block-header,
.notice-label,
.note-kind,
.optional {
  font-family: var(--mono);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  font-size: var(--fs-0);
  line-height: 1.3;
}

.eyebrow {
  margin: 0 0 var(--sp-4);
  color: var(--gold);
}

.block-header {
  margin: var(--sp-6) 0 var(--sp-3);
  color: var(--text-3);
}

/* Somebody's own words, printed back: ruled, never quoted. */
.quote {
  margin: 0 0 var(--sp-5);
  padding-left: var(--sp-5);
  border-left: 2px solid var(--gold-3);
  color: var(--text-2);
  white-space: pre-wrap;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--sp-7) 0;
}

/* --- Focus ---------------------------------------------------------------- */

/* The focus ring is the gold, always visible, on the one thing you are on: a
 * 3px stroke set 2px off what it rings, so the ground shows between them on
 * a gold button as on a black page. An outline rather than a shadow, because
 * forced-colours mode keeps an outline and drops every shadow; and it follows
 * the control's own corners, which focusing never changes. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

/* The way past the chrome for a keyboard: off the page until it is focused,
 * then the first thing on it, over everything. */
.skip {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: var(--z-skip);
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: 0 var(--sp-5);
  background-color: var(--gold);
  color: var(--on-gold);
  border-radius: var(--r-1);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* --- The brand: the mark and the name ------------------------------------- */

/* The logo, as an image from the icon set: the gold is in the picture, on a
 * transparent ground, so it sits on any of the site's blacks. A block, so
 * no line box adds a descender's gap under it; never squeezed by a flex row. */
.symbol {
  display: block;
  flex: none;
}

/* The link home at the top of every page is the mark alone: no surface
 * writes the name beside it, and the picture's alt names the link. The gold
 * is for that alt, should the picture not arrive. With no word beside it the
 * link is only as big as the mark, 28px on the account and the console, so
 * it keeps the target every pressable thing has, the mark at its start. */
.brand {
  display: inline-flex;
  align-items: center;
  min-width: var(--target-min);
  min-height: var(--target-min);
  color: var(--gold);
  text-decoration: none;
}

.brand:hover {
  color: var(--gold-2);
}

/* THE NAME, SET ON ITS OWN rather than read in a sentence — the foot of
 * every surface, a title that is nothing but the name, the bottle's front
 * panel — is in the sans, in capitals, tracked a little. The face and the
 * capitals are this rule's: the string stays "Human Runtime Formula", which is
 * how a sentence, a page's title and a mail write it. Each place keeps its
 * own size and colour. */
.brand-name,
.wordmark {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: var(--sans);
}

/* The front panel's wordmark, on the about page: three words on three
 * lines in the sans, gold, tight, as the label stacks them. */
.wordmark {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-dense);
  font-weight: 600;
  line-height: 0.95;
  color: var(--gold);
}

/* THE TRADEMARK SIGN, SET AS A SUPERIOR WHERE THE TYPE IS LARGE. A face
 * draws ™ for reading sizes: its top on the cap line, and in the display
 * serif more than half a capital tall and nearly an em wide — a pair of
 * letters at 72px. In a title or a heading, and nowhere else, the kit's
 * `titleText` puts each sign in a `span.tm`, and these two rules set it
 * smaller and raise it by what that took off its top, so the top meets the
 * cap line again: a third of its own cap height at three-quarters, one and a
 * half at two-fifths. The raise is in the `cap` unit so it holds in
 * whichever face the reader's system has, after an em figure for a browser
 * without that unit, worked for the sans and the serif most systems have.
 * No line-height, so the raised sign never opens the line. A sentence, a
 * label and a figure keep the face's own sign, and the string keeps ™
 * wherever it is copied, read aloud, indexed or mailed.
 *
 * Three-quarters of a title or heading in the sans, 17–26px. Two-fifths of a
 * title in the display serif, 34–72px — 13.6px at the smallest of those,
 * above the floor — with a hair of air before it, 0.03em of the title. */
.tm {
  font-size: 0.75em;
  line-height: 0;
  vertical-align: 0.235em;
  vertical-align: calc(1cap / 3);
}

.hero-title .tm,
.band-title .tm,
.sheet--doc > h1 .tm {
  margin-left: 0.075em;
  font-size: 0.4em;
  vertical-align: 1.035em;
  vertical-align: calc(1cap * 1.5);
}

/* --- The public site: the other language --------------------------------- */

/* The one line a browser's language may draw: a link to this same page in
 * the language the visitor would rather read, above everything else and
 * quieter than all of it. A link, never a banner to dismiss, and never a
 * redirect: the page somebody asked for is the page they are on. Its ground
 * runs the window's width; its words keep to the column. */
.locale-offer {
  margin: 0;
  padding: var(--sp-3) max(var(--gutter), (100% - var(--measure-wide-canvas)) / 2);
  text-align: center;
  font-size: var(--fs-0);
  background-color: var(--ink-1);
  border-bottom: 1px solid var(--line);
}

.locale-offer a {
  color: var(--gold-2);
}

/* --- The public site: the head ------------------------------------------- */

/* The stranger's first screen, on a glass of the page's own black, under a
 * hairline, in one row at every width: on the left the mark and, after it,
 * the site's pages; on the right the one button and, at the far right, the
 * door. On a phone the pages fold under the menu's one control, still next
 * to the mark, and open as a list under the row. It sticks to the top only
 * on a desk whose window is tall enough to spare it: on a phone, on its
 * side, or zoomed in, a head that stayed would cover the field somebody is
 * typing in. */
.site-head {
  position: relative;
  z-index: var(--z-head);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas: "brand nav cta door";
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-4) var(--gutter);
  background-color: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

/* The link is the size of the mark, not of the column it stands in. */
.site-head .brand {
  grid-area: brand;
  justify-self: start;
}

/* The site's rail: the menu, and nothing else. The door is not in it; it
 * keeps the far right of the row. */
.site-nav {
  grid-area: nav;
  display: flex;
  align-items: center;
}

.site-nav a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--fs-1);
  border-bottom: 1px solid transparent;
  transition: color var(--t-1) var(--ease), border-color var(--t-1) var(--ease);
}

.site-nav a:hover {
  color: var(--text);
}

/* The page you are on: the gold rule under the word, and the ink. */
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--gold);
}

/* THE MENU. On a phone the site's pages are behind one control, the
 * browser's own disclosure, so it opens and closes on a press, from the
 * keyboard and for a screen reader with the script blocked. The control is
 * the three bars and the word, quiet, in a label's small capitals, inside
 * the hairline of a button and as big as every pressable thing. */
.site-menu {
  flex: 1 1 auto;
  min-width: 0;
}

.site-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-4);
  min-width: var(--target-min);
  min-height: var(--target-min);
  padding: 0 var(--sp-5) 0 var(--sp-4);
  color: var(--text-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  cursor: pointer;
  list-style: none;
  transition: color var(--t-1) var(--ease), border-color var(--t-1) var(--ease);
}

.site-menu-toggle::-webkit-details-marker {
  display: none;
}

.site-menu-toggle:hover,
.site-menu[open] > .site-menu-toggle {
  color: var(--text);
  border-color: var(--gold-3);
}

.site-menu-word {
  font-family: var(--mono);
  font-size: var(--fs-0);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* The three bars, in the word's ink: the middle one the span's own ground,
 * the outer two its before and after, which cross while the menu is open. */
.site-menu-icon,
.site-menu-icon::before,
.site-menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
}

.site-menu-icon {
  position: relative;
  flex: none;
  transition: background-color var(--t-2) var(--ease);
}

.site-menu-icon::before,
.site-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  transition: transform var(--t-2) var(--ease);
}

.site-menu-icon::before {
  transform: translateY(-6px);
}

.site-menu-icon::after {
  transform: translateY(6px);
}

/* Crossed while open — and, with the script, while the panel is drawn in,
 * so the bars come back as it draws out. */
.site-menu:is([open]:not(.is-animated), .is-shown) .site-menu-icon {
  background-color: transparent;
}

.site-menu:is([open]:not(.is-animated), .is-shown) .site-menu-icon::before {
  transform: rotate(45deg);
}

.site-menu:is([open]:not(.is-animated), .is-shown) .site-menu-icon::after {
  transform: rotate(-45deg);
}

/* The panel: the site's pages one under another, under the head's whole
 * row and over the page, below its hairline, each word as far in as the
 * mark. */
.site-menu-panel {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  background-color: var(--ink-0);
  border-bottom: 1px solid var(--line);
}

.site-menu-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--sp-3) var(--gutter) var(--sp-4);
}

/* WITH THE SCRIPT the panel draws in and out: from nothing to its own height
 * as it fades in, and back the same way before the disclosure closes — the
 * script holds it open meanwhile. Without the script the browser opens and
 * closes it at once. The panel clips what has not unrolled yet; the list's
 * own air keeps a focused page's ring inside it. */
.site-menu.is-animated .site-menu-panel {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition: grid-template-rows var(--t-2) var(--ease), opacity var(--t-2) var(--ease);
}

.site-menu.is-animated .site-menu-links {
  min-height: 0;
}

.site-menu.is-shown .site-menu-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

/* The button shares the phone's row with the mark, the menu and the door,
 * so under the desk's breakpoint it may take two lines rather than push the
 * row sideways. Two classes, so this outranks the button's own rules. */
.site-head .site-cta {
  grid-area: cta;
  justify-self: end;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

/* On a small phone it also draws in a little, and the menu's control keeps
 * its bars and drops its word, which its name still says, so the row fits
 * at 320px. */
@media (max-width: 30rem) {
  .site-head {
    column-gap: var(--sp-4);
  }
  .site-head .site-cta {
    letter-spacing: 0.1em;
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }
  .site-menu-toggle {
    justify-content: center;
    padding: 0;
  }
  .site-menu-word {
    display: none;
  }
}

/* THE DOOR IS A PERSON: a 24px drawing from /assets/icons at the centre of a
 * 44px target, laid as a mask over the control's own ink, so it takes its
 * colour, its hover and the page you are on from the control, and this
 * sheet stays the one place a colour is written. The control's name is a
 * visually hidden word inside it. */
.site-door > summary,
a.site-door {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--target-min);
  min-height: var(--target-min);
  color: var(--text-2);
  border-radius: var(--r-1);
  text-decoration: none;
  list-style: none;
  cursor: pointer;
  transition: color var(--t-1) var(--ease), background-color var(--t-1) var(--ease);
}

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

.site-door > summary::before,
a.site-door::before {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask: url("icons/person.svg") center / contain no-repeat;
  mask: url("icons/person.svg") center / contain no-repeat;
}

.site-door > summary:hover,
a.site-door:hover,
.site-door[open] > summary {
  color: var(--text);
  background-color: var(--ink-2);
}

/* On the sign-in page the door is the page you are on: the gold ink. */
a.site-door[aria-current="page"] {
  color: var(--gold-2);
}

/* Signed in, the person opens the reader's own menu: a panel under the
 * glyph, aligned to the head's right edge, over the page. */
.site-door {
  grid-area: door;
  position: relative;
}

.site-door-menu {
  position: absolute;
  top: calc(100% + var(--sp-3));
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 14rem;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: var(--sp-3);
  background-color: var(--ink-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  box-shadow: var(--shadow-1);
}

.site-door-menu a,
.site-door-menu .linklike {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--target-min);
  padding: 0 var(--sp-4);
  border-radius: var(--r-1);
  color: var(--text-2);
  text-align: left;
  text-decoration: none;
  transition: color var(--t-1) var(--ease), background-color var(--t-1) var(--ease);
}

.site-door-menu a:hover,
.site-door-menu .linklike:hover {
  color: var(--text);
  background-color: var(--ink-2);
}

.site-door-menu a[aria-current="page"] {
  color: var(--gold-2);
  background-color: var(--gold-tint);
}

/* The way out, under a hairline, from the pages above it. */
.site-door-menu .nav-form {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

/* A desk: the pages stand in the row after the mark, at its start, with the
 * button and the door at its end — and on a screen wider than the column, the
 * mark at the column's left edge and the door at its right, while the glass
 * and its hairline run on to the window's. */
@media (min-width: 60rem) {
  .site-head {
    gap: var(--sp-6);
    padding: var(--sp-4) max(var(--sp-8), (100% - var(--measure-wide-canvas)) / 2);
  }
  .site-menu-panel {
    position: static;
    background-color: transparent;
    border-bottom: 0;
  }
  .site-head .site-cta {
    white-space: nowrap;
  }
  .site-menu {
    flex: 0 1 auto;
  }
  .site-menu-links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 var(--sp-6);
    padding: 0;
  }
  .site-menu.is-animated .site-menu-panel {
    display: block;
    overflow: visible;
    opacity: 1;
    transition: none;
  }
}

/* ON A DESK THE MENU IS THE ROW IT ALWAYS WAS: no control, and the pages
 * shown whether the disclosure is open or not. A browser that cannot reach a
 * disclosure's content to show it (one before `::details-content`) keeps the
 * control on a desk too, and its reader opens the row with one press. */
@supports selector(::details-content) {
  @media (min-width: 60rem) {
    .site-menu-toggle {
      display: none;
    }
    .site-menu::details-content {
      content-visibility: visible;
    }
  }
}

/* One row and room to spare: the head stays, and the browser keeps what it
 * scrolls to clear of it. Its height is the tallest thing in the row — the
 * mark, the button, the door — and its padding and hairline. */
@media (min-width: 60rem) and (min-height: 32rem) {
  html:has(> .surface--site) {
    --head-offset: calc(var(--target-min) + 2 * var(--sp-4) + 1px);
  }
  .site-head {
    position: sticky;
    top: 0;
  }
}

/* --- The public site: the sheet -------------------------------------------- */

/* The site's main is the column, with its gutter either side, and each block
 * on it sets its own measure inside that: the hero and a band at 72rem, a
 * wide band the whole column. Nothing on it paints a ground of its own past a
 * block, so holding it in draws no side. */
.surface--site .sheet:not(.sheet--doc) {
  max-width: calc(var(--measure-wide-canvas) + 2 * var(--gutter));
  padding: 0 var(--gutter) var(--sp-10);
}

.hero,
.band {
  width: 100%;
  max-width: var(--measure-site);
  margin: 0 auto;
}

/* The top of a page: the mark, the label, the title in the serif, the
 * sentence, the fine line and the one or two things to do. Centred, with air. */
.hero {
  padding: var(--sp-9) 0 var(--sp-8);
  text-align: center;
}

.hero-mark {
  margin: 0 0 var(--sp-6);
}

/* Centred by its margins, because the hero's text-align does not move a
 * block; the glow follows the logo's own outline, not a square. */
.hero-mark .symbol {
  margin: 0 auto;
  filter: drop-shadow(0 0 28px var(--gold-glow));
}

.hero-title {
  margin: 0 auto var(--sp-6);
  max-width: 22ch;
  font-family: var(--serif);
  font-size: var(--fs-6);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

/* THE REGISTRATION LINE: the signal, once, as a short rule under the title. */
.hero-title::after,
.sheet--doc > h1::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: var(--sp-6) auto 0;
  background-color: var(--signal);
}

.sheet--doc > h1::after {
  margin-left: 0;
}

.hero-lede {
  margin: 0 auto var(--sp-7);
  max-width: 36rem;
  font-size: var(--fs-3);
  line-height: 1.45;
  color: var(--text-2);
}

/* Under the fine line, nearer it than the lede is; with no fine line the
 * two margins collapse and the lede's, the larger, is the gap. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
  margin: var(--sp-5) 0 0;
}

.hero-note {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--fs-0);
  color: var(--text-3);
}

@media (min-width: 48rem) {
  .hero {
    padding: var(--sp-11) 0 var(--sp-10);
  }
  .hero-title {
    font-size: var(--fs-7);
  }
}

/* One section of a page. `raised` is a panel on the ground; `ruled` is a
 * rule above; `dark` is the ground itself, for a run between two raised. */
.band {
  padding: var(--sp-9) 0;
}

.band--ruled {
  border-top: 1px solid var(--line);
}

.band--raised {
  padding: var(--sp-8) var(--sp-6);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  margin-bottom: var(--sp-8);
}

/* The ground itself, said so: a run between two raised blocks. */
.band--dark {
  background-color: var(--ink-0);
}

/* A table or a grid that takes the whole column: on a very large screen,
 * edge to edge of the head's row. */
.band--wide {
  max-width: none;
}

.band-head {
  max-width: 40rem;
  margin: 0 0 var(--sp-7);
}

.band-title {
  margin: 0 0 var(--sp-4);
  font-family: var(--serif);
  font-size: var(--fs-5);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.005em;
}

.band-lede {
  margin: 0;
  font-size: var(--fs-2);
  color: var(--text-2);
}

.band-prose {
  max-width: 40rem;
  font-size: var(--fs-2);
  line-height: 1.6;
  color: var(--text-2);
}

@media (min-width: 48rem) {
  .band--raised {
    padding: var(--sp-9) var(--sp-9);
  }
  .band-title {
    font-size: var(--fs-6);
  }
}

/* --- The public site: cards --------------------------------------------- */

/* A grid of things with a title and a body each: the constituents, the
 * account's links, what a plan includes. One column on a phone, two at a
 * tablet, the asked-for number on a desk. */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin: 0 0 var(--sp-7);
}

@media (min-width: 40rem) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .cards--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cards--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.card {
  position: relative;
  display: block;
  min-width: 0;
  padding: var(--sp-6);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--t-2) var(--ease), transform var(--t-2) var(--ease), box-shadow var(--t-2) var(--ease);
}

.card.no-padding {
  padding: 0 !important;
}

.card--link:hover {
  border-color: var(--gold-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

/* A constituent's ordinal is a word somebody reads, so it is the gold that
 * reads (the deep one is for rules, never text). */
.card-n {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-6);
  color: var(--gold);
}

.card .eyebrow {
  margin-bottom: var(--sp-3);
}

.card-title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-2);
  font-weight: 600;
}

.card-body {
  color: var(--text-2);
}

.card-body > :last-child {
  margin-bottom: 0;
}

.card-meta {
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-0);
  color: var(--text-3);
}

/* Cards that are a list — the Journal's newest advisories on the front door —
 * sit one to an item, and each fills its item, so a row of them is as even
 * as a row of cards that are not. */
.cards > li > .card {
  height: 100%;
}

/* A figure read on its own: a signal on the operator's dashboard, the number
 * under its label. Proportional digits, because it stands alone rather than in
 * a column; the hero is the one figure the pane leads with. */
.figure {
  margin: 0;
  font-size: var(--fs-4);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--text);
}

.figure--hero {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-6);
}

/* --- The public site: the badges ---------------------------------------- */

/* THE BOTTLE'S BADGES: its four marks, a row in the product's card
 * under the price and over the button. Each is a drawing from /assets/badges,
 * 330 by 383, laid as a mask over the quiet ink as the head's person is, so it
 * takes its colour from this sheet and nowhere else; its name is a visually
 * hidden word inside it. All four across at every width, set to the card's end. */
.product-badges {
  justify-content: end;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 6rem));
  gap: var(--sp-6);
  margin: 0 0 var(--sp-7);
  padding: 0;
  list-style: none;
}

.product-badge {
  position: relative;
  aspect-ratio: 330 / 383;
  color: var(--text-2);
}

.product-badge::before {
  content: "";
  display: block;
  height: 100%;
  background-color: currentColor;
}

.product-badge--memory-and-cognition::before {
  -webkit-mask: url("badges/badge-memory-and-cognition.png") center / contain no-repeat;
  mask: url("badges/badge-memory-and-cognition.png") center / contain no-repeat;
}

.product-badge--mens-health::before {
  -webkit-mask: url("badges/badge-mens-health.png") center / contain no-repeat;
  mask: url("badges/badge-mens-health.png") center / contain no-repeat;
}

.product-badge--non-gmo::before {
  -webkit-mask: url("badges/badge-non-gmo.png") center / contain no-repeat;
  mask: url("badges/badge-non-gmo.png") center / contain no-repeat;
}

.product-badge--womens-health::before {
  -webkit-mask: url("badges/badge-womens-health.png") center / contain no-repeat;
  mask: url("badges/badge-womens-health.png") center / contain no-repeat;
}

/* --- The public site: the comparison ------------------------------------ */

.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
}

.compare caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 var(--sp-4);
  font-size: var(--fs-0);
  color: var(--text-3);
}

.compare th,
.compare td {
  padding: var(--sp-5) var(--sp-5);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
  border-bottom: 0;
}

.compare thead th {
  font-family: var(--mono);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  font-weight: 500;
  font-size: var(--fs-0);
  color: var(--text-3);
  background-color: var(--ink-2);
}

.compare tbody th {
  font-weight: 500;
  color: var(--text);
}

.compare td {
  color: var(--text-2);
}

/* Our column: the gold tint, and a gold edge on either side. */
.compare .compare-ours {
  background-color: var(--gold-tint);
  color: var(--text);
}

.compare thead .compare-ours {
  color: var(--gold);
}

.compare-yes {
  color: var(--gold);
  font-weight: 600;
}

.compare-no {
  color: var(--text-3);
}

/* --- The public site: the plans ----------------------------------------- */

.plan {
  display: flex;
  flex-direction: column;
  padding: var(--sp-7);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

/* The one the page recommends: a gold edge, and the glow it casts. */
.plan--featured {
  border-color: var(--gold-3);
  box-shadow: 0 0 0 1px var(--gold-3), 0 24px 64px var(--gold-glow);
}

.plan-title {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-3);
}

.plan-points {
  list-style: none;
  margin: 0 0 var(--sp-6);
  padding: 0;
  color: var(--text-2);
}

.plan-points li {
  padding: var(--sp-3) 0 var(--sp-3) var(--sp-6);
  border-top: 1px solid var(--line);
  position: relative;
}

.plan-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--sp-3) + 0.55em);
  width: 10px;
  height: 1px;
  background-color: var(--gold-3);
}

.plan-action {
  margin-top: auto;
}

.plan-action .btn {
  width: 100%;
}

.plan-note {
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-0);
  color: var(--text-3);
}

/* --- The public site: a button that sells ------------------------------- */

/* A BUTTON THAT SELLS, WITH THE MONEY-BACK LINE UNDER IT (#78), HELD TO ABOUT
 * THE BUTTON'S WIDTH (#165). From two cards across, the line wraps at a
 * measure of its own close to the buttons that sell — 20rem, a little wider
 * than the hero's in either language — instead of running the width of the
 * band or the page, in every placement. On a phone the column is already
 * close to the button, and the line keeps the whole of it. The one track may
 * be narrower than the button, so a button wider than a small phone's column
 * never drags the line out with it. In the hero both are centred. */
.sells {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--sp-4);
}

@media (min-width: 40rem) {
  .sells > .fine {
    max-width: 20rem;
  }
}

.hero .sells {
  justify-items: center;
}

/* The welcome's row of buttons: a grid's child shares no margin with what
 * stands above the block, so the row leaves its air to the lede's, as it did
 * before it stood in one, and does not drop by a step. */
.sells > .actions {
  margin-top: 0;
}

/* A price: the figure large and tabular, what it was struck through, what
 * it is per in the quiet ink, the note on its own line. */
.price {
  margin: 0 0 var(--sp-5);
  line-height: 1.2;
}

.price-now {
  font-size: var(--fs-5);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price-was {
  color: var(--text-3);
  font-size: var(--fs-2);
  text-decoration-color: var(--signal);
}

.price-per {
  color: var(--text-3);
  font-size: var(--fs-1);
}

.price-note {
  display: block;
  margin-top: var(--sp-3);
  font-size: var(--fs-0);
  color: var(--text-3);
}

/* --- The public site: the questions ------------------------------------- */

.faq {
  max-width: 44rem;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-5) 0;
  min-height: var(--ctl-h);
  font-size: var(--fs-2);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color var(--t-1) var(--ease);
}

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

.faq-item > summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: var(--fs-3);
  color: var(--gold);
  transition: transform var(--t-2) var(--ease);
}

.faq-item[open] > summary::after {
  transform: rotate(45deg);
}

.faq-item > summary:hover {
  color: var(--gold-2);
}

.faq-body {
  padding: 0 0 var(--sp-6);
  color: var(--text-2);
  max-width: 40rem;
}

.faq-body > :last-child {
  margin-bottom: 0;
}

/* --- The public site: the capture form ---------------------------------- */

.capture {
  max-width: 36rem;
  padding: var(--sp-7);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

.capture-title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-3);
  font-weight: 600;
}

.capture-lede {
  margin: 0 0 var(--sp-6);
  color: var(--text-2);
}

.capture-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: flex-end;
  margin-bottom: var(--sp-4);
}

.capture-row .field {
  flex: 1 1 14rem;
  margin: 0;
}

.capture-row .btn {
  flex: 1 0 auto;
}

@media (min-width: 30rem) {
  .capture-row .btn {
    flex: none;
  }
}

.capture .tick {
  font-size: var(--fs-0);
  color: var(--text-2);
}

.capture-status {
  margin: var(--sp-4) 0 0;
  color: var(--ok);
}

.capture-status:empty {
  display: none;
}

.capture--said {
  border-color: var(--gold-3);
}

.capture-said {
  margin: 0;
  color: var(--gold-2);
  font-size: var(--fs-2);
}

/* --- The public site: the foot ------------------------------------------ */

.site-foot {
  display: grid;
  gap: var(--sp-6);
  padding: var(--sp-9) var(--gutter) var(--sp-8);
  border-top: 1px solid var(--line);
  color: var(--text-3);
}

.site-foot-brand {
  display: grid;
  gap: var(--sp-2);
}

.site-foot-name {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-2);
  color: var(--gold);
}

.site-foot-line {
  margin: 0;
  color: var(--text-2);
}

.site-foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--sp-6);
}

.site-foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  color: var(--text-2);
  text-decoration: none;
}

.site-foot-nav a:hover {
  color: var(--gold-2);
}

.site-foot-fine {
  margin: 0;
  max-width: 64ch;
  font-size: var(--fs-0);
}

/* Two columns on a desk, between the column's edges on a wider screen; the
 * rule above them runs the window's width. */
@media (min-width: 60rem) {
  .site-foot {
    grid-template-columns: 1fr 1fr;
    padding-left: max(var(--sp-8), (100% - var(--measure-wide-canvas)) / 2);
    padding-right: max(var(--sp-8), (100% - var(--measure-wide-canvas)) / 2);
  }
  /* A page's own fine line comes last, under the others and not under the
   * mark: the offer page's word about its checkout. */
  .site-foot-note {
    grid-column: 2;
  }
}

/* --- The account ---------------------------------------------------------- */

/* The customer's compact head: the mark, the account's pages, the way
 * out. On a phone the pages wrap under the mark, every one of them in
 * sight, and the head scrolls away with the page; from a tablet up, with
 * the window tall enough to spare it, it is one row and it stays. Wider than
 * the column, the mark and the way out stand at the column's edges, under a
 * glass that still runs the window's width. */
.account-head {
  position: relative;
  z-index: var(--z-head);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-6);
  padding: var(--sp-3) max(var(--gutter), (100% - var(--measure-wide-canvas)) / 2);
  min-height: var(--strip-h);
  background-color: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  flex: 1 1 100%;
  order: 3;
}

.account-nav a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: 0 var(--sp-4);
  border-radius: var(--r-1);
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t-1) var(--ease), background-color var(--t-1) var(--ease);
}

.account-nav a:hover {
  color: var(--text);
  background-color: var(--ink-2);
}

.account-nav a[aria-current="page"] {
  color: var(--gold-2);
  background-color: var(--gold-tint);
}

.account-head .nav-form {
  margin-left: auto;
}

@media (min-width: 48rem) {
  .account-nav {
    flex: 1 1 auto;
    order: 0;
  }
}

@media (min-width: 48rem) and (min-height: 32rem) {
  html:has(> .surface--account) {
    --head-offset: var(--strip-h);
  }
  .account-head {
    position: sticky;
    top: 0;
  }
}

/* --- The console ---------------------------------------------------------- */

/* THE RAIL. A column beside the work on a desk; a strip above it on a
 * phone. Plain lists of links grouped under a label — nothing here needs
 * the script, and this block alone turns the one into the other. The strip
 * sticks while the window is tall enough to spare it; in a window too short
 * — a phone on its side, a laptop zoomed in — it scrolls away with the page. */
.rail {
  position: sticky;
  top: 0;
  z-index: var(--z-head);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--strip-h);
  padding: 0 var(--gutter);
  background-color: var(--ink-1);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail .brand {
  flex: none;
}

.rail-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.rail-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.rail-label {
  margin: 0 var(--sp-2) 0 0;
  color: var(--text-3);
  white-space: nowrap;
}

/* A page that named no menu sits in the run like any other, with no label. */
.rail-group--bare {
  gap: var(--sp-1);
}

.rail-group a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--target-min);
  padding: 0 var(--sp-4);
  border-radius: var(--r-1);
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  font-size: var(--fs-1);
  transition: color var(--t-1) var(--ease), background-color var(--t-1) var(--ease);
}

.rail-group a:hover {
  color: var(--text);
  background-color: var(--ink-2);
}

/* Where you are: the ink, the gold tint, and the gold bar on the edge. */
.rail-group a[aria-current="page"] {
  color: var(--gold-2);
  background-color: var(--gold-tint);
  box-shadow: inset 0 -2px 0 var(--gold);
}

.rail-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-left: auto;
  flex: none;
}

.rail-user {
  display: none;
  color: var(--text-3);
  overflow-wrap: anywhere;
}

/* The way out to the public site: a link of its own, as tall as any control. */
.rail-out {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  white-space: nowrap;
}

/* The console's sheet sits under the strip, so a sticky table head parks
 * under it too, and so does whatever the browser scrolls into view. */
.surface--admin {
  --stick: var(--strip-h);
}
html:has(> .surface--admin) {
  --head-offset: var(--strip-h);
}

@media (max-height: 32rem) {
  .surface--admin {
    --stick: 0px;
  }
  html:has(> .surface--admin) {
    --head-offset: 0px;
  }
  .rail {
    position: relative;
  }
}

/* On a desk the body is a grid: the rail down the left, the work and the
 * foot down the right. The rail is as tall as the window and scrolls on its
 * own when the list of pages is longer than it.
 *
 * THE RAIL AND THE WORK ARE THE COLUMN. Between two outer tracks that share
 * whatever the column leaves of the window — nothing, until the window is
 * wider than it — stand the rail and the work: the column's width, less the
 * rail's, which the work fills before an outer track takes a pixel. The
 * rail's ground spans the left track as well as its own, so the panel runs
 * to the window's edge, and pads its content in to the column's; a list and
 * the foot span the right track, so a list's content and the foot's rule
 * reach the column's right edge and the window's. A form stays in the work's
 * track, centred in it. */
@media (min-width: 64rem) {
  .surface--admin {
    --stick: 0px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--rail-w) minmax(0, calc(var(--measure-wide-canvas) - var(--rail-w))) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
  }
  html:has(> .surface--admin) {
    --head-offset: 0px;
  }
  /* `100%` here is the rail's own two tracks, so less the rail's width it is
   * what the column leaves of the window on the left. */
  .surface--admin .rail {
    grid-column: 1 / 3;
    grid-row: 1 / span 2;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-6);
    height: 100vh;
    height: 100dvh;
    padding: var(--sp-6) var(--sp-5);
    padding-left: max(var(--sp-5), 100% - var(--rail-w));
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow-x: hidden;
    overflow-y: auto;
  }
  .rail .brand {
    align-self: flex-start;
  }
  .rail-nav {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-6);
  }
  .rail-group {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
  }
  .rail-group ul {
    flex-direction: column;
  }
  .rail-label {
    margin: 0 0 var(--sp-1) var(--sp-4);
  }
  .rail-group a {
    display: flex;
    justify-content: space-between;
    white-space: normal;
  }
  .rail-group a[aria-current="page"] {
    box-shadow: inset 2px 0 0 var(--gold);
  }
  .rail-foot {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-3);
    margin: auto 0 0;
    padding-top: var(--sp-5);
    border-top: 1px solid var(--line);
  }
  .rail-user {
    display: block;
    font-size: var(--fs-0);
  }
  .surface--admin .sheet {
    grid-column: 3;
  }
  /* From the rail to the column's right edge, and its own padding past it. A
   * table wider than that scrolls sideways in its own box (`.scroller`). */
  .surface--admin .sheet--wide {
    grid-column: 3 / 5;
    max-width: calc(var(--measure-wide-canvas) - var(--rail-w) + var(--sp-8));
    margin-left: 0;
  }
  /* `100%` is the work's track and the right one, so less the work's share
   * of the column it is what the column leaves on the right. */
  .surface--admin .colophon {
    grid-column: 3 / 5;
    padding-left: var(--gutter);
    padding-right: max(var(--gutter), 100% - var(--measure-wide-canvas) + var(--rail-w));
  }
}

/* --- Layout --------------------------------------------------------------- */

.sheet {
  /* The one flexible item in the column: it takes all the room the head and
   * the foot leave behind, which holds the foot to the floor on a page too
   * short to need a scrollbar. */
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--sp-7) var(--gutter) var(--sp-9);
}

/* A list gets the window, up to the column: no window narrower than a desk
 * reaches it, so the cap is the desk's, with the desk's padding either side.
 * The console's own placement of a list is in its grid, above. */
.sheet--wide {
  max-width: none;
  padding: var(--sp-6) var(--gutter) var(--sp-9);
}

@media (min-width: 64rem) {
  .sheet--wide {
    max-width: calc(var(--measure-wide-canvas) + 2 * var(--sp-8));
    padding-left: var(--sp-8);
    padding-right: var(--sp-8);
  }
}

/* Prose somebody reads end to end: the legal pages, the sign-in flow. The
 * serif for the title, a document's measure and size, air above it. */
.sheet--doc {
  max-width: var(--measure-doc);
  padding-top: var(--sp-9);
  padding-bottom: var(--sp-10);
  font-size: var(--fs-2);
  line-height: 1.65;
}

.sheet--doc > h1 {
  font-family: var(--serif);
  font-size: var(--fs-5);
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-bottom: var(--sp-6);
}

.sheet--doc h2 {
  font-size: var(--fs-3);
  margin-top: var(--sp-8);
}

.sheet--doc section {
  margin-bottom: var(--sp-7);
}

.sheet--doc .lede {
  font-size: var(--fs-3);
}

.sheet--doc .fine {
  font-size: var(--fs-1);
}

@media (min-width: 48rem) {
  .sheet--doc > h1 {
    font-size: var(--fs-6);
  }
}

/* An article's furniture (ui-core's `breadcrumbs`, `byline` and
 * `editorialFigure`), set in a document's sheet. The trail and the byline are
 * fine print around the headline. `editorialFigure` draws the blog's own
 * `.article-figure` (below): it fills the column at its own aspect, and the
 * page reserves its box from the width and height the markup carries, so
 * nothing below it moves while it arrives. Nothing here moves at all. The
 * trail's own box, its ink and its links' target size are the kit's `.crumbs`
 * (below); this lays out the list inside it. */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs li + li::before {
  content: "/";
  margin-right: var(--sp-3);
  color: var(--text-3);
}

.crumbs [aria-current="page"] {
  color: var(--text-2);
}

.byline {
  margin: 0 0 var(--sp-6);
  font-size: var(--fs-1);
  color: var(--text-2);
}

/* --- The blog: an article read end to end --------------------------------- */

/* The index: one article to a row, dated, ruled apart, no bullets. */
.article-list {
  margin: var(--sp-8) 0;
  padding: 0;
  list-style: none;
}

.article-item {
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--line);
}

.article-item:last-child {
  border-bottom: 1px solid var(--line);
}

.article-item .fine {
  margin-bottom: var(--sp-3);
}

.article-item-title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-3);
}

.article-item-title a {
  color: var(--text);
  text-decoration: none;
}

.article-item-title a:hover {
  color: var(--gold);
}

.article-item p:last-child {
  margin-bottom: 0;
}

.article-feed {
  margin-top: var(--sp-7);
}

/* Where an article lives, over its title: a label that is also the way back. */
.article-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.article-meta {
  margin-bottom: var(--sp-7);
}

/* The one illustration: the page's whole measure, at its own proportions. */
.article-figure {
  margin: 0 0 var(--sp-8);
}

.article-figure img {
  display: block;
  width: 100%;
  border-radius: var(--r-1);
}

.article-figure figcaption {
  margin-top: var(--sp-4);
  font-size: var(--fs-0);
  color: var(--text-3);
}

/* A quotation in the body: set in from a hairline of gold, never italic by default. */
.article-body blockquote {
  margin: 0 0 var(--sp-6);
  padding: 0 0 0 var(--sp-6);
  border-left: 1px solid var(--gold-3);
  color: var(--text-2);
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-correction {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

/* The sources: what the article stands on, smaller and ruled off. */
.article-sources {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
  font-size: var(--fs-1);
}

.article-sources h2 {
  margin-top: 0;
  font-size: var(--fs-2);
}

.article-sources li {
  margin-bottom: var(--sp-3);
}

/* Who the article is brought to you by, just over the one thing to do next. */
.article-sponsor {
  margin: var(--sp-8) 0 0;
}

.article-sponsor + .article-actions {
  margin-top: var(--sp-4);
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}

/* The foot of the account and the console: its rule the window's width, its
 * words within the column. The console places its own, in its grid. */
.colophon {
  margin: 0;
  padding: var(--sp-6) max(var(--gutter), (100% - var(--measure-wide-canvas)) / 2) var(--sp-7);
  border-top: 1px solid var(--line);
  font-size: var(--fs-0);
  line-height: 1.6;
  color: var(--text-3);
}

.colophon p {
  margin: 0;
}

.colophon a {
  color: inherit;
}

/* The head of a page: what it is, and the one or two things done to all of
 * it. Ruled off, because everything under it is data. */
.titlebar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin: 0 0 var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}

.titlebar h1 {
  margin: 0;
}

.titlebar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* Breadcrumbs: where this is, in the fine ink. */
.crumbs {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-0);
  color: var(--text-3);
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  color: var(--text-2);
}

/* A stack of blocks with air between them, and nothing else. */
.stack {
  display: grid;
  gap: var(--sp-5);
}

/* --- Panels --------------------------------------------------------------- */

/* One subject, boxed, on the ground. A record page is a stack of these. */
.panel {
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--sp-6);
  margin: 0 0 var(--sp-5);
}

.panel > h2:first-child,
.panel > h3:first-child {
  margin-top: 0;
}

.panel > :last-child {
  margin-bottom: 0;
}

.panel h2 {
  font-size: var(--fs-2);
}

/* A strip of stated facts: label above value, mono value, no boxes. */
.kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: var(--sp-4) var(--sp-6);
  margin: 0 0 var(--sp-5);
  padding: 0 0 var(--sp-5);
  border-bottom: 1px solid var(--line);
}

.kv > div {
  min-width: 0;
}

.kv-key {
  display: block;
  color: var(--text-3);
  margin-bottom: var(--sp-1);
}

.kv-val {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
}

/* --- Forms ---------------------------------------------------------------- */

.field {
  display: block;
  margin-bottom: var(--sp-5);
  min-width: 0;
}

.label {
  display: block;
  color: var(--text-2);
  margin-bottom: var(--sp-2);
}

.optional {
  color: var(--text-3);
  letter-spacing: 0.08em;
}

.hint {
  font-size: var(--fs-0);
  color: var(--text-3);
  margin: var(--sp-2) 0 0;
}

/* An error in words: the signal lifted until a sentence in it reads, and
 * never the field's red edge alone. */
.error {
  font-size: var(--fs-0);
  color: var(--signal-text);
  font-weight: 500;
  margin: var(--sp-2) 0 0;
}

/* Something still to come back to. Not a fault, so not red. */
.attention {
  font-size: var(--fs-0);
  color: var(--warn);
  font-weight: 500;
  margin: var(--sp-2) 0 0;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  min-height: var(--ctl-h);
  padding: 0 var(--sp-4);
  font-family: var(--sans);
  font-size: var(--ctl-size);
  line-height: 1.3;
  color: var(--text);
  background-color: var(--ink-2);
  border: 1px solid var(--line-control);
  border-radius: var(--r-1);
  transition: border-color var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease), background-color var(--t-1) var(--ease);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--text-3);
}

/* A field you are typing in wears the ring every control does, set just off
 * its gold edge — an outline, so forced-colours mode keeps it. */
input:focus,
select:focus,
textarea:focus {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: 1px;
  border-color: var(--gold);
}

/* The typographic law reaches into the controls: a box that takes a value a
 * machine cares about is typed in mono. */
input[type="search"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[inputmode="numeric"],
input[inputmode="decimal"] {
  font-family: var(--mono);
}

textarea {
  resize: vertical;
  padding: var(--sp-3) var(--sp-4);
  line-height: 1.5;
  min-height: calc(var(--ctl-h) * 2);
}

/* A select draws its own chevron, in the gold, so it reads as ours. The
 * image is a data URI, which the policy admits beside the site's own. */
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: calc(var(--sp-4) * 3);
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
}

select option {
  background-color: var(--ink-1);
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-3);
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: var(--picker-filter);
}

/* Before .field--error, so on a field that is both, the red border wins. */
.field--attention input,
.field--attention select,
.field--attention textarea {
  border-color: var(--warn);
  background-color: var(--warn-tint);
}

.field--error input,
.field--error select,
.field--error textarea {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-tint);
}

/* The one-time code: six digits somebody is copying off a phone. */
.code-input {
  font-family: var(--mono);
  font-size: var(--fs-4);
  letter-spacing: 0.3em;
  text-align: center;
  min-height: calc(var(--ctl-h) + 12px);
}

/* A checkbox with words beside it, as one target at least as tall as any
 * control: the words are part of what you press. */
.tick {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  margin: 0 0 var(--sp-4);
  min-height: var(--target-min);
  cursor: pointer;
  line-height: 1.45;
}

input[type="checkbox"],
input[type="radio"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0.2em 0 0;
  accent-color: var(--gold);
  cursor: pointer;
}

/* A choice of several, as a group of ticks under one label. */
.choices {
  border: 0;
  padding: 0;
  margin: 0 0 var(--sp-5);
  min-width: 0;
}

.choices > legend {
  padding: 0;
  margin-bottom: var(--sp-2);
}

.choices .tick {
  margin-bottom: var(--sp-2);
}

/* A group of a template's fields: a box with its title on the edge. */
.group {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--sp-5) var(--sp-6) var(--sp-3);
  margin: 0 0 var(--sp-6);
  min-width: 0;
}

.group > legend {
  padding: 0 var(--sp-3);
  font-weight: 600;
}

.group > .hint {
  margin: 0 0 var(--sp-4);
}

/* Two across once there is room for two. A wide field takes the row. */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--sp-6);
}

@media (min-width: 40rem) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field--wide {
  grid-column: 1 / -1;
}

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

/* The default button is a raised surface with an edge: the thing to press
 * on a form. The primary one is gold on black with a gold edge, and there
 * is one on a page. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: var(--ctl-h);
  padding: 0 var(--sp-6);
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text);
  background-color: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  transition: background-color var(--t-1) var(--ease), border-color var(--t-1) var(--ease), color var(--t-1) var(--ease), transform var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease);
}

.btn:hover {
  background-color: var(--ink-3);
  border-color: var(--text-3);
  color: var(--text);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  font-family: var(--mono);
  font-size: var(--fs-0);
  letter-spacing: 0.12em;
  color: var(--gold-2);
  background-color: var(--ink-0);
  border-color: var(--gold);
}

.btn--primary:hover {
  color: var(--on-gold);
  background-color: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow);
}

.btn--quiet {
  background-color: transparent;
  color: var(--text-2);
  border-color: var(--line-2);
}

.btn--quiet:hover {
  background-color: var(--ink-2);
  color: var(--text);
}

.btn--danger {
  color: var(--signal-text);
  border-color: var(--signal-line);
}

.btn--danger:hover {
  background-color: var(--signal-tint);
  border-color: var(--signal);
  color: var(--signal-text);
}

/* The primary action on the site: a purchase, the hero's button. */
.btn--big {
  min-height: var(--ctl-h-primary);
  padding: 0 var(--sp-8);
  font-size: var(--fs-1);
}

.btn--primary.btn--big {
  font-size: var(--fs-0);
}

/* Small is the type and the padding, never the target: a small button is
 * as tall as any control. */
.btn--small {
  padding: 0 var(--sp-4);
  font-size: var(--fs-0);
}

.btn.is-busy {
  opacity: 0.7;
  cursor: progress;
}

/* A busy button's two words, stacked in one cell: the button is as wide as
 * the wider of them, so pressing it moves nothing, and the one not showing
 * is hidden from a reader too. The script builds the layers on the press. */
.btn-face {
  display: inline-grid;
}

.btn-face > * {
  grid-area: 1 / 1;
}

.btn-face-busy,
.is-busy .btn-face-idle {
  visibility: hidden;
}

.is-busy .btn-face-busy {
  visibility: visible;
}

/* What a form says when its answer is slow in coming: empty, and taking no
 * room, until there is something to say. Collapsed out of the layout, never
 * `display: none`: a status region hidden that way is not in the
 * accessibility tree, and a screen reader meeting it only when its sentence
 * arrives may not read it. Positioned, so an empty note is no flex item and
 * adds no gap to the row of buttons it sits in. */
.busy-note:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* A copy button that has just copied. */
.is-copied {
  color: var(--ok);
  border-color: var(--ok);
}

/* A control that LOOKS like a link is still a control. */
.linklike {
  display: inline;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--gold-2);
  text-decoration: underline;
  text-decoration-color: var(--gold-3);
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.linklike:hover {
  color: var(--gold);
}

/* Where a link-like control stands on its own — signing out, a note's pin
 * and remove — it is as tall as any control. Inside a sentence it is the
 * sentence's height, which is the documented exception to the target. */
.nav-form .linklike,
.note-controls .linklike {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
}

@media (pointer: coarse) {
  .linklike {
    min-height: var(--ctl-h);
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.inline-form {
  display: inline;
}

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

.nav-form {
  margin: 0;
}

/* --- The confirmation --------------------------------------------------------- */

/* The browser's own modal dialog, which the script builds when a form marked
 * `data-confirm` is first pressed: the question, what happens, Cancel and the
 * action. It waits — there is no timer — and the page behind it is inert. */
.confirm {
  width: min(30rem, calc(100% - 2 * var(--gutter)));
  padding: var(--sp-7);
  color: var(--text);
  background-color: var(--ink-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-2);
}

.confirm::backdrop {
  background-color: var(--scrim);
}

.confirm-q {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-3);
}

.confirm-more {
  color: var(--text-2);
}

.confirm .actions {
  justify-content: flex-end;
}

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

/* The flash: what the last POST did, or why it did nothing. A word, then the
 * sentence, then at most one place to go. */
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  margin: 0 0 var(--sp-5);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-2);
}

.notice-label {
  color: var(--gold);
}

.notice--ok {
  border-left-color: var(--ok);
}

.notice--ok .notice-label {
  color: var(--ok);
}

.notice--warning {
  border-left-color: var(--warn);
}

.notice--warning .notice-label {
  color: var(--warn);
}

.notice--error {
  border-left-color: var(--signal);
  background-color: var(--signal-tint);
}

.notice--error .notice-label {
  color: var(--signal-text);
}

.notice-action {
  margin-left: var(--sp-1);
}

/* --- Status --------------------------------------------------------------- */

/* A count of things waiting, on the rail: small, gold, and never the only
 * way to find out — the queue it counts says the same thing in words. */
.badge {
  display: inline-block;
  min-width: 1.6em;
  padding: var(--sp-1) var(--sp-3);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: var(--fs-0);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--gold-2);
  background-color: var(--gold-tint);
  border: 1px solid var(--gold-3);
}

/* Where a record is, as a word, with a dot in the colour its group wears.
 * The pipelines share one scale rather than each having its own: grey is
 * early or ours to do next, amber is waiting on somebody else, blue is out
 * in the world, green is landed, red is stopped. A word that appears in two
 * pipelines means the same thing in both and wears one colour. */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-1) var(--sp-4) var(--sp-1) var(--sp-3);
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background-color: transparent;
  font-family: var(--mono);
  font-variant-caps: all-small-caps;
  font-size: var(--fs-0);
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--text-2);
  white-space: nowrap;
  vertical-align: middle;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.9;
}

/* Early, or ours to do next. */
.status--placed,
.status--applied,
.status--queued,
.status--draft,
.status--new,
.status--pending,
.status--incomplete,
.status--queued-for-fulfillment {
  color: var(--text-2);
}

/* Open and needing a person: a ticket, a switch that is answering. */
.status--open,
.status--in-progress {
  color: var(--gold);
  border-color: var(--gold-3);
}

/* Waiting on somebody else: a customer, Stripe, the carrier, the warehouse. */
.status--waiting,
.status--fulfilling,
.status--submitted,
.status--scheduled,
.status--sending,
.status--trialing,
.status--past_due,
.status--low,
.status--preorder,
.status--stale,
.status--retrying {
  color: var(--warn);
  border-color: var(--warn-line);
  background-color: var(--warn-tint);
}

/* Out in the world and live. */
.status--shipped,
.status--sent,
.status--active,
.status--live {
  color: var(--live);
  border-color: var(--live-line);
  background-color: var(--live-tint);
}

/* Landed. */
.status--delivered,
.status--paid,
.status--available,
.status--in-stock,
.status--converted,
.status--verified,
.status--ok,
.status--done,
.status--replied {
  color: var(--ok);
  border-color: var(--ok-line);
  background-color: var(--ok-tint);
}

/* Stopped, one way or another. */
.status--cancelled,
.status--canceled,
.status--refunded,
.status--reversed,
.status--suspended,
.status--declined,
.status--failed,
.status--problem,
.status--unpaid,
.status--sold-out,
.status--bounced,
.status--revoked,
.status--refused {
  color: var(--signal-text);
  border-color: var(--signal-line);
  background-color: var(--signal-tint);
}

/* Set aside, or ended quietly. Grey, not red: nothing went wrong. */
.status--closed,
.status--withheld,
.status--suppressed,
.status--paused,
.status--unsubscribed,
.status--redacted,
.status--test,
.status--debug,
.status--skipped,
.status--expired,
.status--archived {
  color: var(--text-3);
  border-style: dashed;
}

/* A state the page was not told about. Dashed, so it is visibly not one of
 * the words above. */
.status--unknown {
  color: var(--text-3);
  border-style: dashed;
}

/* A flag on a list row: a count, in a colour, and the word. */
.flag {
  font-size: var(--fs-0);
  font-weight: 600;
  white-space: nowrap;
}

.flag--blocking {
  color: var(--signal-text);
}

.flag--warning {
  color: var(--warn);
}

.flag--info {
  color: var(--live);
}

/* A small mark that is not a status: a tag on a customer, a source. */
.tag {
  display: inline-block;
  padding: 0 var(--sp-3);
  border-radius: var(--r-1);
  border: 1px solid var(--line-2);
  font-size: var(--fs-0);
  color: var(--text-2);
  white-space: nowrap;
}

/* A percentage as a native progress element: the value is an attribute, so
 * there is no inline style. */
.meter {
  width: 4rem;
  height: 6px;
  vertical-align: middle;
  accent-color: var(--gold);
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background-color: var(--ink-3);
  overflow: hidden;
}

.meter::-webkit-progress-bar {
  background-color: var(--ink-3);
}

.meter::-webkit-progress-value {
  background-color: var(--gold);
}

.meter::-moz-progress-bar {
  background-color: var(--gold);
}

/* --- Filters, counts and paging ------------------------------------------- */

/* The state of the queue as a row of counters, each the filter that shows
 * it; and, on a record's page, the index of its sections. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-5);
  padding: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--target-min);
  padding: 0 var(--sp-4);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background-color: var(--ink-1);
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--fs-0);
  transition: color var(--t-1) var(--ease), border-color var(--t-1) var(--ease), background-color var(--t-1) var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: var(--text-3);
}

.chip[aria-current="page"] {
  color: var(--gold-2);
  border-color: var(--gold);
  background-color: var(--gold-tint);
}

/* A zero dims the label and never the figure. */
.chip--zero {
  color: var(--text-3);
}

.chip-n {
  font-family: var(--mono);
  color: var(--text-3);
}

.chip[aria-current="page"] .chip-n {
  color: var(--gold);
}

/* The filter row above a list: the search box, a select or two, the clear. */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-4);
  margin: 0 0 var(--sp-5);
}

.filters .field {
  margin: 0;
}

.filters-field {
  flex: 1 1 16rem;
}

.filters-clear {
  font-size: var(--fs-0);
  align-self: center;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  font-size: var(--fs-0);
}

.pager a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  text-decoration: none;
}

.pager-disabled {
  color: var(--text-3);
}

/* Nothing there, said once, where the something would have been. */
.empty {
  margin: 0 0 var(--sp-5);
  padding: var(--sp-7) var(--sp-5);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-2);
  text-align: center;
  color: var(--text-3);
}

/* --- Records -------------------------------------------------------------- */

/* The console's tables. Hairlines, tabular figures, a head that stays put,
 * and a ticked row that says so without colour being the only way. */
.record,
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: var(--fs-dense);
}

.record th,
.record td,
.table th,
.table td {
  text-align: left;
  padding: var(--row-pad-y) var(--sp-4);
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.record tbody tr:last-child td,
.table tbody tr:last-child td {
  border-bottom: 0;
}

.record thead th,
.table thead th {
  position: sticky;
  top: var(--stick);
  z-index: var(--z-raised);
  background-color: var(--ink-2);
  font-family: var(--mono);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.12em;
  font-weight: 500;
  font-size: var(--fs-0);
  color: var(--text-3);
  white-space: nowrap;
  border-bottom: 1px solid var(--line-2);
}

.record thead th:first-child,
.table thead th:first-child {
  border-top-left-radius: var(--r-2);
}

.record thead th:last-child,
.table thead th:last-child {
  border-top-right-radius: var(--r-2);
}

.record tbody tr:hover,
.table tbody tr:hover {
  background-color: var(--ink-2);
}

/* A row you arrived at with the keyboard, and a row in the selection. */
.record tbody tr:focus-within,
.table tbody tr:focus-within,
.record tbody tr:has(input[name="selected"]:checked),
.table tbody tr:has(input[name="selected"]:checked) {
  background-color: var(--gold-tint);
}

.record td .status,
.table td .status {
  vertical-align: baseline;
}

/* A value a machine cares about is one thing, whatever the column is worth. */
.record td.data,
.table td.data {
  white-space: nowrap;
}

/* Who a row is about: the address, and the name on a line of its own under
 * it. Neither ever breaks; the column grows to the longer of the two. */
.record td.who,
.table td.who {
  white-space: nowrap;
}

.who > .fine {
  display: block;
}

.record th.num,
.record td.num,
.table th.num,
.table td.num {
  text-align: right;
}

.record th.pick,
.record td.pick,
.table th.pick,
.table td.pick {
  text-align: center;
  width: 2.5rem;
}

.pick-hit {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: var(--ctl-h);
  margin: calc(-1 * var(--row-pad-y)) 0;
  cursor: pointer;
}

/* A value that would otherwise set the width of the table. */
.trunc {
  display: block;
  max-width: 36ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A column worth having on a desk and not worth a sideways scroll on a
 * phone; the table scrolls sideways rather than taking the page with it. */
@media (max-width: 90rem) {
  .col-wide {
    display: none;
  }
}

@media (max-width: 64rem) {
  .col-mid {
    display: none;
  }
}

.scroller {
  overflow-x: auto;
  margin: 0 0 var(--sp-5);
  -webkit-overflow-scrolling: touch;
}

/* A long list whose head sticks on a desk, where a box that scrolls would
 * hold the head instead of the window: there the table is as wide as it
 * needs, and only below the desk, where the head lets go, does it scroll
 * sideways in its box. The query is the exact complement of the one that
 * lets the head go, so at 64rem itself the box still scrolls. */
@media not all and (max-width: 64rem) {
  .scroller--narrow {
    overflow-x: visible;
  }
}

@media (max-width: 64rem) {
  .record thead th,
  .table thead th {
    position: static;
  }
}

/* A sortable column head: the whole cell is the control. */
.sort {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: calc(-1 * var(--row-pad-y)) calc(-1 * var(--sp-4));
  padding: var(--row-pad-y) var(--sp-4);
  min-height: var(--ctl-h);
  color: inherit;
  text-decoration: none;
  letter-spacing: inherit;
}

.sort:hover,
.record th[aria-sort] .sort,
.table th[aria-sort] .sort {
  color: var(--text);
}

.sort-dir {
  font-size: 0.6em;
}

/* A line somebody copies whole: a shipping block, a token shown once. */
.ship-block,
pre.data {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background-color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  font-family: var(--mono);
  font-size: var(--fs-dense);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The board: one column per queue, read across. */
.board {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin: 0 0 var(--sp-6);
}

@media (min-width: 48rem) {
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 80rem) {
  .board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.board-col {
  min-width: 0;
  padding: var(--sp-5);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}

.board-col > h2 {
  font-size: var(--fs-1);
  margin: 0 0 var(--sp-4);
}

/* --- Moves and the timeline ------------------------------------------------ */

/* One disclosure per move a record can make. Closed, a word; open, a form
 * with only its own fields in it. */
.moves {
  display: grid;
  gap: var(--sp-2);
  margin: var(--sp-5) 0;
}

.move {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background-color: var(--ink-1);
  margin: 0 0 var(--sp-4);
}

.move > summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--ctl-h);
  padding: var(--sp-3) var(--sp-5);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-2);
  transition: background-color var(--t-1) var(--ease);
}

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

.move > summary::before {
  content: "+";
  font-family: var(--mono);
  color: var(--gold);
  width: 1em;
}

.move[open] > summary::before {
  content: "−";
}

.move > summary:hover {
  background-color: var(--ink-2);
}

.move[open] > summary {
  border-bottom: 1px solid var(--line);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.move > form,
.move > div {
  padding: var(--sp-5);
}

/* What stands in the way of a move: the unmet preconditions, listed above a
 * button that is disabled until they are met. */
.gate {
  margin: 0 0 var(--sp-4);
  padding-left: var(--sp-6);
  color: var(--signal-text);
  font-size: var(--fs-0);
}

/* The record's story: a fixed column of dates on the left, read down. */
.timeline {
  list-style: none;
  margin: 0 0 var(--sp-5);
  padding: 0;
}

.entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2) var(--sp-6);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--line);
}

.entry > div {
  min-width: 0;
}

.entry > div > :last-child {
  margin-bottom: 0;
}

.entry-when {
  color: var(--text-3);
  white-space: nowrap;
}

@media (min-width: 40rem) {
  .entry {
    grid-template-columns: 7rem minmax(0, 1fr);
  }
}

/* A note on a record: who, when, what kind, and the words. */
.note {
  padding: var(--sp-5);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}

.note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-4);
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-0);
}

.note-kind {
  color: var(--gold);
}

.note-body {
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.note-links {
  margin: var(--sp-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-0);
}

.note-links .rel {
  color: var(--text-3);
}

.note--deleted {
  border-style: dashed;
  opacity: 0.75;
}

.note-controls {
  display: flex;
  gap: var(--sp-5);
  margin: var(--sp-4) 0 0;
  font-size: var(--fs-0);
}

.note-edit {
  margin: var(--sp-3) 0 0;
  font-size: var(--fs-0);
}

.note-edit > summary {
  cursor: pointer;
  color: var(--text-2);
}

.pinned {
  display: grid;
  gap: var(--sp-4);
  margin: 0 0 var(--sp-6);
}

.pinned .note {
  border-color: var(--gold-3);
}

/* --- The command centre --------------------------------------------------- */

/* Every part of the console, each a board of the pages it holds. */
.pane-area {
  margin: 0 0 var(--sp-8);
}

.pane-what {
  margin: 0 0 var(--sp-5);
  max-width: 60ch;
  color: var(--text-2);
}

.pane {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: var(--sp-4);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-5);
}

.pane > li {
  min-width: 0;
  padding: var(--sp-5) var(--sp-6);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  transition: border-color var(--t-2) var(--ease);
}

.pane > li:hover {
  border-color: var(--gold-3);
}

.pane h3 {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-1);
}

.pane h3 a {
  color: var(--text);
  text-decoration: none;
}

.pane h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.pane > li {
  position: relative;
}

.pane h3 a:hover {
  color: var(--gold-2);
}

.pane p {
  margin: 0;
  font-size: var(--fs-dense);
  color: var(--text-2);
}

/* --- The consent banner ----------------------------------------------------- */

/* The box a measured page asks its question in, in the house colours. Its
 * layout is its own stylesheet's (hrf-consent.css, published by its author and
 * shipped as published); what is set here is that stylesheet's custom
 * properties, every one on the banner's own root, so the house's values hold
 * whichever file the browser reads last. The two answers are the same weight
 * and the same size, because a refusal is not the lesser choice: gold for the
 * one that allows, the quiet button for the one that does not, and gold for
 * the focus ring like everywhere else. */
#cc-main {
  --cc-font-family: var(--sans);
  --cc-modal-border-radius: var(--r-2);
  --cc-btn-border-radius: var(--r-1);
  --cc-bg: var(--ink-1);
  --cc-primary-color: var(--text);
  --cc-secondary-color: var(--text-2);
  --cc-link-color: var(--gold-2);
  --cc-btn-primary-bg: var(--gold);
  --cc-btn-primary-color: var(--on-gold);
  --cc-btn-primary-border-color: var(--gold);
  --cc-btn-primary-hover-bg: var(--gold-2);
  --cc-btn-primary-hover-color: var(--on-gold);
  --cc-btn-primary-hover-border-color: var(--gold-2);
  --cc-btn-secondary-bg: var(--ink-2);
  --cc-btn-secondary-color: var(--text);
  --cc-btn-secondary-border-color: var(--line-2);
  --cc-btn-secondary-hover-bg: var(--ink-3);
  --cc-btn-secondary-hover-color: var(--text);
  --cc-btn-secondary-hover-border-color: var(--gold-3);
  --cc-separator-border-color: var(--line);
  --cc-toggle-on-bg: var(--gold);
  --cc-toggle-off-bg: var(--ink-3);
  --cc-toggle-on-knob-bg: var(--ink-0);
  --cc-toggle-off-knob-bg: var(--text-2);
  --cc-toggle-enabled-icon-color: var(--ink-0);
  --cc-toggle-disabled-icon-color: var(--ink-0);
  --cc-toggle-readonly-bg: var(--gold-3);
  --cc-toggle-readonly-knob-bg: var(--ink-0);
  --cc-toggle-readonly-knob-icon-color: var(--gold-3);
  --cc-section-category-border: var(--line);
  --cc-cookie-category-block-bg: var(--ink-2);
  --cc-cookie-category-block-border: var(--line);
  --cc-cookie-category-block-hover-bg: var(--ink-3);
  --cc-cookie-category-block-hover-border: var(--line-2);
  --cc-cookie-category-expanded-block-bg: var(--ink-2);
  --cc-cookie-category-expanded-block-hover-bg: var(--ink-3);
  --cc-overlay-bg: var(--scrim);
  --cc-webkit-scrollbar-bg: var(--ink-2);
  --cc-webkit-scrollbar-hover-bg: var(--gold-3);
  --cc-footer-bg: var(--ink-2);
  --cc-footer-color: var(--text-2);
  --cc-footer-border-color: var(--line);
  font-size: var(--fs-1);
}

#cc-main :focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

/* --- The public site: the synapses (#118) ----------------------------------- */

/* THE ONE ILLUSTRATION, AND THE ONE MOTION THAT IS NOT A REPLY. The same
 * synapse twice, side by side and in step: supplied, and depleted under
 * inflammatory signalling. The science page opens on it and the front door's
 * science band plays it. Every colour is a role and every motion is keyed to
 * `--t-beat`: the supplied synapse answers every beat, and the depleted one's
 * motions run four beats long so that it can fail on three of them. Under
 * `prefers-reduced-motion` every motion stops, and what is left is the still
 * the drawing's own attributes and the rules below draw: the supplied synapse
 * firing, the depleted one not. */
.synapses {
  margin: var(--sp-7) 0;
}

/* On the science page the figure leaves the document's measure, by up to
 * 6rem a side, and never closer to the window's edge than the gutter. */
.sheet--doc > .synapses {
  margin-inline: max(-6rem, calc((100% - 100vw) / 2 + var(--gutter)));
}

.synapses-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-6);
  margin: 0 0 var(--sp-4);
}

.synapses-show {
  margin: 0;
}

.synapses-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--sp-6);
}

.synapses-options .tick,
.synapses-pause {
  align-items: center;
  margin: 0;
}

.synapses-options input,
.synapses-pause input {
  margin: 0;
}

.synapses-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  max-width: 48rem;
}

.sheet--doc .synapses-stage {
  max-width: none;
}

/* One synapse shown on its own: both stand in one cell, the other unseen, so
 * neither motion restarts and the two are still in step when both return. */
.synapses:has(input[value="supplied"]:checked) .synapses-stage,
.synapses:has(input[value="depleted"]:checked) .synapses-stage {
  grid-template-columns: minmax(0, 1fr);
  max-width: 30rem;
  margin-inline: auto;
}

.synapses:has(input[value="supplied"]:checked) .synapse,
.synapses:has(input[value="depleted"]:checked) .synapse {
  grid-area: 1 / 1;
}

.synapses:has(input[value="supplied"]:checked) .synapse--depleted,
.synapses:has(input[value="depleted"]:checked) .synapse--supplied {
  visibility: hidden;
}

.synapse {
  min-width: 0;
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}

.synapse--depleted {
  border-color: var(--inflamed-tint);
}

/* The synapse's name in the serif and its environment under it in the quiet
 * ink: the words, never the colour, say which is which. */
.synapse-head {
  margin: 0 0 var(--sp-3);
  line-height: 1.3;
}

.synapse-name {
  display: block;
  font-family: var(--serif);
  font-size: var(--fs-3);
  font-weight: 500;
  color: var(--text);
}

.synapse-note {
  display: block;
  font-size: var(--fs-0);
  color: var(--text-3);
}

.synapse-drawing {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}

/* The two volumes, counted: under each drawing, how many of its signals the
 * receiving cell passed on, as a number and as a bar of one cell a beat. The
 * two bars are one length, so side by side the supplied one is plainly the
 * fuller; each cell lights as its beat fires, and standing still the bar is
 * the whole loop's count. */
.synapse-count {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  margin: var(--sp-3) 0 var(--sp-2);
}

.synapse-tally {
  display: grid;
  flex: 1 1 4rem;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--sp-1);
}

.synapse-tick {
  height: 0.75rem;
  background-color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--sp-1);
}

.synapse-tick.is-fired {
  background-color: var(--gold-2);
  border-color: var(--gold);
}

.synapse-count > p {
  flex: none;
  margin: 0;
  font-size: var(--fs-0);
  color: var(--text-2);
}

.synapse-count-n {
  font-size: var(--fs-3);
  color: var(--gold);
}

.synapses .fine {
  margin: var(--sp-4) 0 0;
}

/* What each drawn thing is, each beside a small drawing of it. */
.synapses-legend {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3) var(--sp-6);
  margin: var(--sp-5) 0 0;
  font-size: var(--fs-0);
  color: var(--text-2);
}

@media (min-width: 40rem) {
  .synapses-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .synapses-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.synapses-legend > li {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.synapses-key {
  flex: none;
  width: 24px;
  height: 24px;
}

/* The drawing. Cells are a raised surface edged in the membrane's ink; what
 * the sending cell releases is gold; what inflames is the oxide red, in a
 * spiked shape the gold messengers never take. */
.syn-cell {
  fill: var(--ink-2);
  stroke: var(--membrane);
  stroke-width: 1.5px;
}

.syn-ap,
.syn-spike {
  fill: none;
  stroke: var(--gold-2);
  stroke-linecap: round;
  stroke-dasharray: 16 200;
  stroke-dashoffset: 30;
}

.syn-ap {
  stroke-width: 6px;
}

.syn-spike {
  stroke-width: 5px;
}

.syn-mito {
  fill: var(--gold-tint);
  stroke: var(--gold-3);
  stroke-width: 1.5px;
}

.syn-cristae {
  fill: none;
  stroke: var(--gold-3);
  stroke-width: 1px;
}

.synapse--depleted .syn-mito,
.synapse--depleted .syn-cristae {
  opacity: 0.45;
}

.syn-vesicle-wall {
  fill: var(--gold-tint);
  stroke: var(--gold);
  stroke-width: 1px;
}

.syn-cargo,
.syn-messenger {
  fill: var(--gold-2);
}

.syn-receptor {
  fill: var(--ink-3);
  stroke: var(--membrane);
  stroke-width: 1px;
}

.syn-receptor.is-lit {
  fill: var(--gold-2);
}

.syn-receptor.is-faint {
  fill: var(--gold-3);
}

.syn-fire,
.syn-key-fire {
  fill: var(--gold-glow);
}

.syn-key-spike {
  stroke: var(--gold-2);
  stroke-width: 3px;
  stroke-linecap: round;
}

.synapse--depleted .syn-fire,
.syn-messenger--once {
  opacity: 0;
}

.syn-glia-arm {
  fill: none;
  stroke: var(--membrane);
  stroke-width: 1.5px;
  stroke-linecap: round;
}

.syn-glia-body {
  fill: var(--ink-2);
  stroke: var(--membrane);
  stroke-width: 1.5px;
}

.synapse--depleted .syn-glia-arm,
.syn-glia-swollen .syn-glia-arm {
  stroke: var(--inflamed);
  stroke-width: 3px;
}

.synapse--depleted .syn-glia-body,
.syn-glia-swollen .syn-glia-body {
  fill: var(--inflamed-tint);
  stroke: var(--inflamed);
}

.syn-haze {
  fill: var(--inflamed-tint);
}

.syn-cyto {
  fill: var(--inflamed);
  stroke: var(--inflamed);
  stroke-width: 1.4px;
  stroke-linecap: round;
}

.syn-trace-base {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1px;
}

.syn-trace {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5px;
  stroke-linejoin: round;
}

/* The cover rides left to right over the trace, a beat in every quarter of
 * its run, and writes the response as it goes; standing still it has gone. */
.syn-sweep {
  transform: translateX(216px);
}

.syn-sweep-cover {
  fill: var(--ink-1);
}

.syn-sweep-line {
  stroke: var(--gold-3);
  stroke-width: 1px;
  opacity: 0;
}

.syn-marker circle {
  fill: var(--ink-0);
  stroke: var(--gold);
  stroke-width: 1px;
}

.syn-marker text {
  fill: var(--gold);
  font-family: var(--mono);
  font-size: 0.6em;
}

/* The motion. Both synapses start with the page and every motion is a beat or
 * four beats long, so they stay in step for as long as the page is open. */
.synapse .syn-ap {
  animation: syn-ap var(--t-beat) ease-in infinite both;
}

.synapse .syn-sweep {
  animation: syn-sweep calc(var(--t-beat) * 4) linear infinite both;
}

.synapse .syn-sweep-line {
  animation: syn-shown var(--t-beat) step-end infinite;
}

.synapse--supplied .syn-vesicle--fuse {
  animation: syn-fuse var(--t-beat) var(--ease) infinite both;
}

.synapse--supplied .syn-messenger {
  animation: syn-cross var(--t-beat) linear infinite both;
}

.synapse--supplied .syn-messenger:nth-child(3n + 2) {
  animation-name: syn-cross-left;
}

.synapse--supplied .syn-messenger:nth-child(3n) {
  animation-name: syn-cross-right;
}

.synapse--supplied .syn-messenger:nth-child(4n + 1) {
  animation-delay: 40ms;
}

.synapse--supplied .syn-messenger:nth-child(4n + 3) {
  animation-delay: 80ms;
}

.synapse--supplied .syn-receptor {
  animation: syn-bind var(--t-beat) linear infinite both;
}

.synapse--supplied .syn-fire {
  animation: syn-fire var(--t-beat) var(--ease) infinite both;
}

.synapse--supplied .syn-spike {
  animation: syn-spike var(--t-beat) linear infinite both;
}

.synapse--depleted .syn-vesicle--fuse {
  animation: syn-fuse-sparse calc(var(--t-beat) * 4) var(--ease) infinite both;
}

.synapse--depleted .syn-messenger--twice {
  animation: syn-cross-sparse calc(var(--t-beat) * 4) linear infinite both;
}

.synapse--depleted .syn-messenger--once {
  animation: syn-cross-once calc(var(--t-beat) * 4) linear infinite both;
}

.synapse--depleted .syn-receptor--once {
  animation: syn-bind-once calc(var(--t-beat) * 4) linear infinite both;
}

.synapse--depleted .syn-receptor--twice {
  animation: syn-bind-twice calc(var(--t-beat) * 4) linear infinite both;
}

.synapse--depleted .syn-fire {
  animation: syn-fire-once calc(var(--t-beat) * 4) var(--ease) infinite both;
}

.synapse--depleted .syn-spike {
  animation: syn-spike-once calc(var(--t-beat) * 4) linear infinite both;
}

.synapse--supplied .synapse-tick.is-fired:nth-child(1),
.synapse--depleted .synapse-tick.is-fired:nth-child(1) {
  animation: syn-tally-1 calc(var(--t-beat) * 4) step-end infinite both;
}

.synapse--supplied .synapse-tick.is-fired:nth-child(2) {
  animation: syn-tally-2 calc(var(--t-beat) * 4) step-end infinite both;
}

.synapse--supplied .synapse-tick.is-fired:nth-child(3) {
  animation: syn-tally-3 calc(var(--t-beat) * 4) step-end infinite both;
}

.synapse--supplied .synapse-tick.is-fired:nth-child(4) {
  animation: syn-tally-4 calc(var(--t-beat) * 4) step-end infinite both;
}

.synapse--depleted .syn-cyto {
  animation: syn-drift calc(var(--t-beat) * 3) ease-in-out infinite alternate both;
}

.synapse--depleted .syn-cytokines > g:nth-child(odd) .syn-cyto {
  animation-duration: calc(var(--t-beat) * 2.5);
  animation-direction: alternate-reverse;
}

.synapse--depleted .syn-haze {
  animation: syn-haze calc(var(--t-beat) * 2) ease-in-out infinite alternate both;
}

.synapse--depleted .syn-glia {
  transform-box: fill-box;
  transform-origin: center;
  animation: syn-glia calc(var(--t-beat) * 2) ease-in-out infinite alternate both;
}

/* Paused by the box under the reader's hand, or by the script while the
 * figure is off the screen: every motion together, so nothing slips. */
.synapses:has(.synapses-pause input:checked) .synapse *,
.synapses.is-idle .synapse * {
  animation-play-state: paused;
}

/* A dash waits before its path starts and leaves past its end, clear of
 * both, where a round cap would leave a dot.
 *
 * A beat, as fractions of it: the signal arrives by 16%, a vesicle fuses by
 * 22%, the messengers cross from 20% to 46%, the receptors light from 44% to
 * 62%, and the receiving cell fires at 56%. */
@keyframes syn-ap {
  0% {
    stroke-dashoffset: 30;
  }
  16%,
  100% {
    stroke-dashoffset: -130;
  }
}

@keyframes syn-fuse {
  0%,
  12% {
    opacity: 1;
    transform: translateY(0);
  }
  22% {
    opacity: 0;
    transform: translateY(8px);
  }
  72% {
    opacity: 0;
    transform: translateY(0);
  }
  92%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes syn-cross {
  0%,
  20% {
    opacity: 0;
    transform: translate(0, -12px);
  }
  25% {
    opacity: 1;
  }
  46% {
    opacity: 1;
    transform: translate(0, 12px);
  }
  56%,
  100% {
    opacity: 0;
    transform: translate(0, 12px);
  }
}

@keyframes syn-cross-left {
  0%,
  20% {
    opacity: 0;
    transform: translate(2px, -12px);
  }
  25% {
    opacity: 1;
  }
  46% {
    opacity: 1;
    transform: translate(-5px, 12px);
  }
  56%,
  100% {
    opacity: 0;
    transform: translate(-5px, 12px);
  }
}

@keyframes syn-cross-right {
  0%,
  20% {
    opacity: 0;
    transform: translate(-2px, -12px);
  }
  25% {
    opacity: 1;
  }
  46% {
    opacity: 1;
    transform: translate(5px, 12px);
  }
  56%,
  100% {
    opacity: 0;
    transform: translate(5px, 12px);
  }
}

@keyframes syn-bind {
  0%,
  38% {
    fill: var(--ink-3);
  }
  44%,
  62% {
    fill: var(--gold-2);
  }
  78%,
  100% {
    fill: var(--ink-3);
  }
}

@keyframes syn-fire {
  0%,
  48% {
    opacity: 0;
  }
  56% {
    opacity: 1;
  }
  84%,
  100% {
    opacity: 0;
  }
}

@keyframes syn-spike {
  0%,
  52% {
    stroke-dashoffset: 30;
  }
  80%,
  100% {
    stroke-dashoffset: -130;
  }
}

/* Four beats, as fractions of the four: a beat is a quarter, and a moment a
 * fraction p into beat b is at b × 25% + p ÷ 4. The depleted synapse releases
 * on its first and third beats, fires on its first, and on its second and
 * fourth the signal arrives and nothing crosses. */
@keyframes syn-fuse-sparse {
  0%,
  3% {
    opacity: 1;
    transform: translateY(0);
  }
  5.5% {
    opacity: 0;
    transform: translateY(8px);
  }
  18%,
  50% {
    opacity: 1;
    transform: translateY(0);
  }
  53% {
    opacity: 1;
    transform: translateY(0);
  }
  55.5% {
    opacity: 0;
    transform: translateY(8px);
  }
  68%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes syn-cross-sparse {
  0%,
  5% {
    opacity: 0;
    transform: translateY(-12px);
  }
  6.25% {
    opacity: 1;
  }
  11.5% {
    opacity: 1;
    transform: translateY(12px);
  }
  14% {
    opacity: 0;
    transform: translateY(12px);
  }
  14.5%,
  55% {
    opacity: 0;
    transform: translateY(-12px);
  }
  56.25% {
    opacity: 1;
  }
  61.5% {
    opacity: 1;
    transform: translateY(12px);
  }
  64%,
  100% {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes syn-cross-once {
  0%,
  5% {
    opacity: 0;
    transform: translateY(-12px);
  }
  6.25% {
    opacity: 1;
  }
  11.5% {
    opacity: 1;
    transform: translateY(12px);
  }
  14%,
  100% {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes syn-bind-once {
  0%,
  9.5% {
    fill: var(--ink-3);
  }
  11%,
  15.5% {
    fill: var(--gold-2);
  }
  19.5%,
  100% {
    fill: var(--ink-3);
  }
}

@keyframes syn-bind-twice {
  0%,
  9.5% {
    fill: var(--ink-3);
  }
  11%,
  15.5% {
    fill: var(--gold-2);
  }
  19.5%,
  59.5% {
    fill: var(--ink-3);
  }
  61%,
  65.5% {
    fill: var(--gold-3);
  }
  69.5%,
  100% {
    fill: var(--ink-3);
  }
}

@keyframes syn-fire-once {
  0%,
  12% {
    opacity: 0;
  }
  14% {
    opacity: 0.6;
  }
  21%,
  100% {
    opacity: 0;
  }
}

@keyframes syn-spike-once {
  0%,
  13% {
    stroke-dashoffset: 30;
  }
  20%,
  100% {
    stroke-dashoffset: -130;
  }
}

/* A cell of the count lights as its beat's receiving cell fires — 56% into
 * the beat, so at 14%, 39%, 64% and 89% of the four — and every cell goes
 * dark as the loop starts over and the trace is swept clean. */
@keyframes syn-tally-1 {
  0% {
    background-color: var(--ink-3);
    border-color: var(--line);
  }
  14%,
  100% {
    background-color: var(--gold-2);
    border-color: var(--gold);
  }
}

@keyframes syn-tally-2 {
  0% {
    background-color: var(--ink-3);
    border-color: var(--line);
  }
  39%,
  100% {
    background-color: var(--gold-2);
    border-color: var(--gold);
  }
}

@keyframes syn-tally-3 {
  0% {
    background-color: var(--ink-3);
    border-color: var(--line);
  }
  64%,
  100% {
    background-color: var(--gold-2);
    border-color: var(--gold);
  }
}

@keyframes syn-tally-4 {
  0% {
    background-color: var(--ink-3);
    border-color: var(--line);
  }
  89%,
  100% {
    background-color: var(--gold-2);
    border-color: var(--gold);
  }
}

@keyframes syn-sweep {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(216px);
  }
}

@keyframes syn-shown {
  0%,
  100% {
    opacity: 1;
  }
}

@keyframes syn-drift {
  from {
    transform: translate(-3px, 2px);
  }
  to {
    transform: translate(4px, -4px);
  }
}

@keyframes syn-haze {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}

@keyframes syn-glia {
  from {
    transform: scale(0.94);
  }
  to {
    transform: scale(1.06);
  }
}

/* The mechanisms under the figure, each numbered as the drawing numbers it. */
.synapses-callouts {
  display: grid;
  gap: var(--sp-5);
  margin: 0 0 var(--sp-7);
}

.synapses-callout {
  position: relative;
  padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-9);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}

.synapses-callout > h2 {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-2);
}

.synapses-callout > p {
  color: var(--text-2);
}

.synapses-n {
  position: absolute;
  top: var(--sp-5);
  left: var(--sp-5);
  display: grid;
  place-items: center;
  width: 1.75em;
  height: 1.75em;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  line-height: 1;
}

.synapses-sources > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--target-min);
  font-family: var(--mono);
  font-size: var(--fs-0);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.14em;
  color: var(--gold-2);
  cursor: pointer;
  list-style: none;
}

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

.synapses-sources > summary::before {
  content: "+";
  width: 1em;
  color: var(--gold);
}

.synapses-sources[open] > summary::before {
  content: "−";
}

.synapses-refs {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-0);
  line-height: 1.5;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.synapses-refs > li {
  margin: 0 0 var(--sp-3);
}

.synapses-sources {
  margin: 0 0 var(--sp-5);
}

.synapses-callout > .synapses-sources {
  margin: 0;
}

.synapses-bridge {
  margin-bottom: var(--sp-8);
}

.synapses-bridge > h2 {
  margin-top: 0;
}

.synapses-bridge .chips {
  margin-top: var(--sp-4);
}

/* The front door's science band: the figure beside the way into the science
 * page — the callouts' headings, numbered as the drawing numbers them, each a
 * link to its callout, and the button. The figure first on a phone; on a
 * desk it takes three parts of five and the way in stands beside it. */
.synapses-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-6) var(--sp-8);
  align-items: center;
}

.synapses-teaser > .synapses {
  margin: 0;
}

@media (min-width: 64rem) {
  .synapses-teaser {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

.synapses-leads > .label {
  margin: 0 0 var(--sp-4);
  color: var(--gold-2);
}

.synapses-leads-list {
  display: grid;
  gap: var(--sp-3);
}

.synapses-lead {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--target-min);
  padding: var(--sp-4) var(--sp-5) var(--sp-4) var(--sp-9);
  background-color: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: var(--fs-2);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--t-1) var(--ease), background-color var(--t-1) var(--ease);
}

.synapses-lead:hover {
  border-color: var(--gold-3);
  background-color: var(--ink-2);
}

.synapses-lead > .synapses-n {
  top: calc(50% - 0.875em);
}

/* --- Utility -------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.list,
.plain {
  list-style: none;
  margin: 0 0 var(--sp-5);
  padding: 0;
}

.list > li {
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--line);
}

.list > li:first-child {
  border-top: 0;
}

/* --- Motion, pointer and contrast ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  html {
    scroll-behavior: auto;
  }
  .card--link:hover,
  .btn:active {
    transform: none;
  }
  /* The synapses stand still on their own frame, so there is nothing to pause. */
  .synapses-pause {
    display: none;
  }
}

@media (forced-colors: active) {
  .btn,
  .chip,
  .status,
  .badge,
  .tag,
  input,
  select,
  textarea,
  progress {
    border: 1px solid;
  }
  .record thead th,
  .record td,
  .table thead th,
  .table td,
  .compare th,
  .compare td {
    border-bottom: 1px solid;
  }
  .rail-group a[aria-current="page"],
  .site-nav a[aria-current="page"],
  .account-nav a[aria-current="page"],
  .site-door-menu a[aria-current="page"] {
    text-decoration: underline;
  }
  /* The menu's bars are grounds, which forced colours would paint the page's
   * own ground; kept from that and drawn in the theme's text ink, they stay
   * seen, the middle one still clear while the menu is open. */
  .site-menu-icon,
  .site-menu-icon::before,
  .site-menu-icon::after {
    forced-color-adjust: none;
    background-color: CanvasText;
  }
  /* The person is a mask over a fill, and forced colours would paint the
   * fill the page's own ground: it is painted in the system's ink instead. */
  .site-door > summary::before,
  a.site-door::before {
    forced-color-adjust: none;
    background-color: CanvasText;
  }
  /* The bottle's badges are masks over a fill in the same way. */
  .product-badge::before {
    forced-color-adjust: none;
    background-color: CanvasText;
  }
  .site-door-menu {
    border: 1px solid;
  }
}

/* --- Print ---------------------------------------------------------------- */

/* The one light surface: a console table on paper. Black on white, no
 * chrome, no control, every row and nothing else. */
@media print {
  :root {
    color-scheme: light;
  }
  body {
    display: block;
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .site-head,
  .site-foot,
  .account-head,
  .rail,
  .colophon,
  .skip,
  .actions,
  .move,
  .filters,
  .pager,
  .chips,
  .nav-form,
  form,
  .btn,
  .notice {
    display: none !important;
  }
  .sheet,
  .sheet--wide,
  .sheet--doc {
    max-width: none;
    padding: 0;
    margin: 0;
  }
  h1,
  h2,
  h3,
  h4,
  p,
  .lede,
  .fine,
  .hint,
  .kv-val,
  .kv-key,
  .card-body,
  .pane p,
  .pane-what {
    color: #000;
  }
  a {
    color: #000;
    text-decoration: none;
  }
  .panel,
  .card,
  .plan,
  .note,
  .board-col {
    background: none;
    border: 1px solid #999;
    box-shadow: none;
    break-inside: avoid;
  }
  .record,
  .table,
  .compare {
    background: #fff;
    border: 1px solid #999;
    border-radius: 0;
    color: #000;
  }
  .record thead th,
  .table thead th,
  .compare thead th {
    position: static;
    background: #eee;
    color: #000;
    border-bottom: 1px solid #000;
  }
  .record th,
  .record td,
  .table th,
  .table td,
  .compare th,
  .compare td {
    border-bottom: 1px solid #bbb;
    color: #000;
  }
  .record tbody tr:hover,
  .table tbody tr:hover {
    background: none;
  }
  .status,
  .badge,
  .chip,
  .tag {
    color: #000;
    background: none;
    border: 1px solid #000;
  }
  .status::before {
    display: none;
  }
  .col-mid,
  .col-wide {
    display: table-cell;
  }
  .scroller {
    overflow: visible;
  }
  /* No button is printed, so the line under one takes the column again. */
  .sells > .fine {
    max-width: none;
  }
  .hero-title::after,
  .sheet--doc > h1::after {
    background-color: #000;
  }
}
