/* underway.now — the design system.
   Tokens first (palette from brand-assets/palette.md), then type, layout,
   components, and the header, footer and page pieces built from them. Every
   later page composes these; add a token before adding a one-off value. */

/* ------------------------------------------------------------------ fonts */

@font-face { font-family: Newsreader; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/newsreader-500.woff2) format("woff2"); }
@font-face { font-family: Newsreader; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/newsreader-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/space-grotesk-400.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/space-grotesk-500.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/space-grotesk-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/ibm-plex-mono-500.woff2) format("woff2"); }

/* ----------------------------------------------------------------- tokens */

:root {
  /* Brand palette. */
  --ink: oklch(24% 0.03 250);
  --paper: oklch(98% 0.004 250);
  --ember: oklch(68% 0.16 55);
  --slate: oklch(60% 0.02 250);
  /* Dark-mode additions. */
  --dark-surface: oklch(32% 0.032 250);
  --text-soft-dark: oklch(72% 0.02 250);
  --danger-dark: oklch(68% 0.14 25);

  /* Roles, light. Secondary text uses the brand board's 42% and 52% greys,
     not slate, which is too light for body-size text on paper. */
  --bg: var(--paper);
  --surface: oklch(100% 0 0);
  --text: var(--ink);
  --text-2: oklch(42% 0.02 250);           /* 8.0:1 on paper */
  --text-3: oklch(52% 0.02 250);           /* 5.2:1 on paper; labels */
  --line: oklch(88% 0.006 250);
  --line-soft: oklch(92.5% 0.005 250);
  --accent: var(--ember);
  --accent-hover: oklch(74% 0.15 58);      /* ink on it: 6.8:1 */
  --accent-text: oklch(52% 0.13 55);       /* ember as text on paper: 5.4:1 */
  --accent-wash: oklch(68% 0.16 55 / 9%);
  --accent-on-surface: oklch(52% 0.13 55); /* ember as text on a card */
  --on-accent: var(--ink);                 /* ink on ember: 5.4:1 */
  /* Focus ring, a darker ember: 4.25:1 on paper, 3.65:1 on the ink band. */
  --focus: oklch(58% 0.15 55);
  --header-bg: oklch(98% 0.004 250 / 82%);
  --shadow-card: 0 1px 2px oklch(24% 0.03 250 / 6%), 0 12px 40px -12px oklch(24% 0.03 250 / 18%);

  /* The ink band reads as ink in both themes. */
  --band-bg: var(--ink);
  --band-text: var(--paper);
  --band-text-2: var(--text-soft-dark);
  --band-line: oklch(100% 0 0 / 10%);
  /* A lighter ember for links on the band: 7.4:1 on ink, 5.7:1 on dark-surface.
     Plain ember is 4.2:1 on dark-surface, under AA for body text. */
  --band-link: oklch(76% 0.13 60);
  /* Form errors on the band; danger-dark is under AA on dark-surface. */
  --band-danger: oklch(76% 0.12 25);
  --band-field: oklch(100% 0 0 / 5%);
  --band-field-line: oklch(100% 0 0 / 28%);   /* 3:1 for a field's edge */
  --band-field-hover: oklch(100% 0 0 / 45%);
  --hero-wash: oklch(68% 0.16 55 / 14%);
  --brief-wash: var(--accent-wash);        /* the handoff's lit brief */
  --warn: oklch(50% 0.16 25);              /* a stale run stamp, as the app's */

  /* Type. */
  --font-display: Newsreader, Georgia, "Times New Roman", serif;
  --font-body: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --step-display: clamp(2.75rem, 1.55rem + 4.6vw, 5.25rem);   /* 44 → 84px */
  --step-h2: clamp(2rem, 1.45rem + 2.3vw, 3.25rem);           /* 32 → 52px */
  --step-h3: 1.25rem;
  --step-lede: clamp(1.125rem, 1.02rem + 0.45vw, 1.375rem);   /* 18 → 22px */
  --step-body: 1.0625rem;                                      /* 17px, 18px wide */
  --step-small: 0.9375rem;
  --step-label: 0.75rem;

  /* Space and shape. */
  --container: 1120px;
  --gutter: 16px;
  --section-y: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --header-h: 64px;

  /* Motion: slow and purposeful. */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 180ms;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --surface: var(--dark-surface);
    --text: var(--paper);
    --text-2: var(--text-soft-dark);         /* 6.6:1 on ink */
    --text-3: var(--text-soft-dark);
    --line: oklch(100% 0 0 / 12%);
    --line-soft: oklch(100% 0 0 / 7%);
    --accent-text: var(--ember);             /* 5.4:1 on ink */
    --accent-on-surface: oklch(76% 0.13 60); /* ember is 4.2:1 on dark-surface */
    --focus: var(--ember);                   /* 5.4:1 on ink, 4.2:1 on the dark-surface band */
    --accent-wash: oklch(68% 0.16 55 / 18%);
    --header-bg: oklch(24% 0.03 250 / 80%);
    --shadow-card: 0 1px 2px oklch(0% 0 0 / 30%), 0 16px 48px -16px oklch(0% 0 0 / 60%);
    /* Lifted so the band still reads as a band against an ink page. */
    --band-bg: var(--dark-surface);
    --band-line: oklch(100% 0 0 / 12%);
    --hero-wash: oklch(68% 0.16 55 / 20%);
    --brief-wash: oklch(68% 0.16 55 / 12%);  /* 18% reads muddy on dark-surface */
    --warn: var(--band-danger);              /* danger-dark is under AA on dark-surface */
    color-scheme: dark;
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --step-body: 1.125rem; }
}

/* ------------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
p { text-wrap: pretty; }

a { color: var(--accent-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

img, svg { display: block; max-width: 100%; }

::selection { background: oklch(68% 0.16 55 / 28%); color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ember);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------- type scale */

.display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-display);
  line-height: 1;
  letter-spacing: -0.03em;
}

.lede {
  font-size: var(--step-lede);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 34em;
}

.label {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* A label led by the bars motif: the section marker. */
.label--marker { display: inline-flex; align-items: center; gap: 12px; }

.measure { max-width: 68ch; }

/* ---------------------------------------------------------------- layout */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section + .section { border-top: 1px solid var(--line-soft); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ------------------------------------------------------------ bars motif */

/* The logo's three bars, right-aligned like the glyph's trail: the short
   top bar at full ember, then 0.6, then the long bottom bar at 0.35. A section marker beside a label, a divider on its own, a step marker
   when numbered. Size it with --bars-w. */
.bars {
  --bars-w: 22px;
  --bars-h: 3px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: calc(var(--bars-h) * 0.9);
  width: var(--bars-w);
  flex: none;
}
.bars > span {
  display: block;
  height: var(--bars-h);
  border-radius: var(--bars-h);
  background: var(--ember);
}
.bars > span:nth-child(1) { width: 48%; }
.bars > span:nth-child(2) { width: 83%; opacity: 0.6; }
.bars > span:nth-child(3) { width: 100%; opacity: 0.35; }

.bars--sm { --bars-w: 16px; --bars-h: 2px; }
.bars--lg { --bars-w: 72px; --bars-h: 9px; }

/* A divider: a hairline running into the bars, like the glyph's trail. */
.rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block: 48px;
}
.rule::before {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.75; cursor: progress; }

.btn-primary { background: var(--ember); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--accent-wash); border-color: oklch(68% 0.16 55 / 45%); }

.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 0.875rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  text-decoration: none;
}
.link-arrow::after { content: "→"; transition: transform var(--dur) var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
/* The one card that floats: the hero's. */
.card--raised { box-shadow: var(--shadow-card); border-radius: var(--radius-lg); }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.wordmark .glyph { width: 22px; height: 22px; color: var(--ember); }
.wordmark__text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.625rem;
  line-height: 1;
  letter-spacing: -0.01em;
  /* Newsreader sits high in its box; nudge the x-height onto the glyph. */
  transform: translateY(-1px);
}
.wordmark--small .glyph { width: 18px; height: 18px; }
.wordmark--small .wordmark__text { font-size: 1.375rem; }

.site-nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--line-soft); }
/* Just above the phone breakpoint, five links and the button share the row:
   tighter, and never wrapped onto two lines. */
.nav-link { white-space: nowrap; }
.wordmark .glyph { flex: none; }
@media (min-width: 720px) and (max-width: 879.98px) {
  .site-nav { gap: 0; }
  .nav-link { padding-inline: 8px; font-size: 0.875rem; }
}

.site-header__cta { margin-left: 8px; }

/* Shown only at phone widths with scripting enabled (below): without
   JavaScript it would be a control that does nothing. */
.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-button__bar {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform var(--dur) var(--ease);
}
.is-open .menu-button__bar:first-child { transform: translateY(3.25px) rotate(45deg); }
.is-open .menu-button__bar:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 719.98px) {
  .site-header__cta { margin-left: 0; }
}

/* No scripting: the nav stays in the page as a second header row. */
@media (max-width: 719.98px) and (scripting: none) {
  .site-header__inner { flex-wrap: wrap; height: auto; min-height: var(--header-h); padding-block: 12px 4px; }
  .site-nav { order: 3; flex-basis: 100%; margin-left: -12px; }
}

/* Scripting: the nav collapses behind the menu button from the first paint,
   decided by the media query rather than by script, so nothing shifts. */
@media (max-width: 719.98px) and (scripting: enabled) {
  .menu-button { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -24px oklch(0% 0 0 / 40%);
  }
  .is-open .site-nav { display: flex; }
  .site-nav .nav-link {
    padding: 14px 0;
    font-size: 1.0625rem;
    color: var(--text);
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
  }
  .site-nav .nav-link:last-child { border-bottom: 0; }
  .site-nav .nav-link:hover { background: transparent; }
}

@media (max-width: 379.98px) {
  .wordmark__text { font-size: 1.375rem; }
  .site-header__cta { padding-inline: 10px; }
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding-block: 64px 32px;
  font-size: var(--step-small);
}

.site-footer__grid {
  display: grid;
  /* On phones the second column sizes to the support address, so it never breaks. */
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px 32px;
}
.site-footer__brand { grid-column: 1 / -1; }

@media (min-width: 720px) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; column-gap: 24px; }
  .site-footer__brand { grid-column: auto; }
}

.site-footer__tagline { margin-top: 12px; color: var(--text-2); }

.site-footer__col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.site-footer__col .label { margin-bottom: 4px; }
.site-footer__col a {
  padding: 0;
  color: var(--text-2);
  font-size: var(--step-small);
  font-weight: 400;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.site-footer__col a:hover { color: var(--text); background: none; }

.site-footer__base {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--step-label);
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------ bands */

/* A full-width ink band: the invite section. Ink in both themes, lifted to
   dark-surface in dark mode so it still separates from the page. */
.band {
  background: var(--band-bg);
  color: var(--band-text);
  padding-block: var(--section-y);
}
.band .lede { color: var(--band-text-2); }
.band .label { color: var(--band-text-2); }
.band a:not(.btn) { color: var(--band-link); }
.band .btn-ghost { color: var(--band-text); border-color: var(--band-line); }

/* ------------------------------------------------------------------- home */

/* Section heads: the marker label over an editorial h2. */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: clamp(40px, 2rem + 3vw, 72px);
}
.section-head h2 { max-width: 15em; }

/* Hero: the pitch, and beside it (below it on phones) the live task card. */
.hero {
  padding-block: clamp(3.5rem, 1.5rem + 6vw, 7rem) clamp(4.5rem, 2rem + 7vw, 8.5rem);
  overflow-x: clip;
}
.hero__grid { display: grid; gap: 56px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.hero .display { max-width: 9em; }
.hero .actions { margin-top: 8px; }

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 56px; }
  .hero .display { font-size: clamp(4rem, 1rem + 5vw, 5.25rem); }
}

.demo { position: relative; margin: 0; isolation: isolate; }
/* The one gradient: a faint ember wash behind the card. */
.demo::before {
  content: "";
  position: absolute;
  inset: -22% -18%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--hero-wash), transparent);
  pointer-events: none;
}
.demo__stage { max-width: 468px; margin-inline: auto; padding-bottom: 20px; }
@media (min-width: 960px) { .demo__stage { margin-right: 0; } }

/* Two cards peek out beneath it: a queue, not a lone task. */
.task-stack { position: relative; }
.task-stack::before,
.task-stack::after {
  content: "";
  position: absolute;
  z-index: 0;
  height: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.task-stack::before { left: 14px; right: 14px; bottom: -9px; opacity: 0.8; }
.task-stack::after { left: 30px; right: 30px; bottom: -17px; opacity: 0.45; }

.task-card {
  position: relative;
  z-index: 1;
  padding: 20px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: opacity 450ms var(--ease), transform 450ms var(--ease);
}
.task-card.is-fading { opacity: 0; transform: translateY(6px); }
.task-card.is-instant,
.task-card.is-instant * { transition: none !important; }

.task-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease), color 300ms var(--ease);
}
.status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-chip[data-tone="briefed"] { color: var(--text); }
.status-chip[data-tone="working"] {
  color: var(--accent-on-surface);
  background: var(--accent-wash);
  border-color: transparent;
}
.status-chip[data-tone="working"]::before { animation: pulse 1.2s var(--ease) infinite; }
.status-chip[data-tone="move"] { color: var(--on-accent); background: var(--ember); border-color: var(--ember); }

/* Progress through the four states, in the bars' ember. */
.task-card__steps { display: inline-flex; gap: 4px; }
.task-card__steps > span {
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: var(--ember);
  transition: background-color 300ms var(--ease);
}
[data-state="1"] .task-card__steps > span:nth-child(n+2),
[data-state="2"] .task-card__steps > span:nth-child(n+3),
[data-state="3"] .task-card__steps > span:nth-child(4) { background: var(--line); }

.task-card__title {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--text);
  min-height: 1.35em;
}
.task-card__rest { visibility: hidden; }
/* Zero-width, so the line wraps exactly as the finished title does. */
.task-card__caret { display: none; position: relative; }
.task-card__caret::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.08em;
  width: 2px;
  height: 1.1em;
  background: var(--ember);
  animation: blink 1s steps(1) infinite;
}
.is-typing .task-card__caret { display: inline; }

/* A part of the card that arrives. It keeps its place while hidden, so the
   card stays its finished size and fills in rather than growing. */
.reveal {
  transition: opacity 500ms var(--ease), transform 500ms var(--ease), visibility 0s;
}
.reveal.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease), visibility 0s 300ms;
}

.task-card__slot { position: relative; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
/* A slot still to come shows two quiet placeholder lines, so the card
   reads as a brief being filled in rather than as empty. */
.task-card__slot::before,
.task-card__slot::after {
  content: "";
  position: absolute;
  left: 0;
  height: 8px;
  border-radius: 4px;
  background: var(--line-soft);
  opacity: 0;
  transition: opacity 300ms var(--ease);
  pointer-events: none;
}
.task-card__slot::before { top: 20px; width: 28%; }
.task-card__slot::after { top: 38px; width: 64%; }
.task-card__slot:has(> .reveal.is-hidden:first-child)::before,
.task-card__slot:has(> .reveal.is-hidden:first-child)::after { opacity: 1; }

.slot-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.slot-label--ember { color: var(--accent-on-surface); }
.slot-body { margin-top: 2px; font-size: 0.9375rem; line-height: 1.5; color: var(--text); }
.slot-body + .slot-label { margin-top: 10px; }

.activity { list-style: none; margin: 4px 0 0; padding: 0; }
.activity__line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 4px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-2);
}
.activity__line::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  transform: translateY(-2px);
}

.faux-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: var(--ember);
  color: var(--on-accent);
  font-size: 0.875rem;
  font-weight: 500;
}

@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Problem: the case, and beside it the handoff it is about. */
.split { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 88px; }
}
.split__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.split__copy h2 { max-width: 13em; }
.prose { display: flex; flex-direction: column; gap: 16px; max-width: 34em; margin-top: 8px; color: var(--text-2); }

/* The handoff: a task, a blank chat where a question is started and deleted
   unsent, then what Underway has the AI take. Flat, unlike the hero's lifted
   card: this is about the moment before the work, not the work moving. The
   markup is the first example finished; home.js cycles the four. Every
   example shares one grid cell, rows aligned by subgrid, so the card is the
   tallest example's size throughout and only opacity changes. */
.handoff { margin: 0; width: 100%; max-width: 468px; margin-inline: auto; }
@media (min-width: 960px) { .handoff { margin-right: 0; } }

.handoff__card {
  display: grid;
  grid-template-rows: auto auto auto;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.handoff__ex {
  grid-column: 1;
  grid-row: 1 / span 3;
  display: grid;
  grid-template-rows: subgrid;
  transition: opacity 450ms var(--ease), visibility 0s;
}
.handoff__ex:not(.is-current),
.handoff__ex.is-fading {
  opacity: 0;
  visibility: hidden;
  transition: opacity 450ms var(--ease), visibility 0s 450ms;
}
.handoff.is-instant * { transition: none !important; }

.handoff__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.handoff__count { display: none; margin-left: auto; letter-spacing: 0.06em; }
.handoff.is-live .handoff__count { display: inline; }

.handoff__task {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.handoff__task-text {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

.handoff__chat { padding: 18px 22px 0; }
.handoff__input {
  position: relative;
  margin-top: 8px;
  padding: 10px 50px 10px 14px;
  min-height: calc(3em + 20px);       /* two lines, as a chat composer is */
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-3);
  transition: color 300ms var(--ease);
}
[data-phase="chat"] .handoff__input { color: var(--text); }
.handoff__placeholder { display: none; position: absolute; left: 15px; top: 10px; color: var(--text-3); }
.handoff__input.is-empty .handoff__placeholder { display: block; }
.handoff__rest { visibility: hidden; }
/* Zero-width, as the hero's is, so the line wraps as the full text does. */
.handoff__caret { display: none; position: relative; }
.handoff__caret::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.12em;
  width: 1.5px;
  height: 1.1em;
  background: var(--text);
  animation: blink 1s steps(1) infinite;
}
[data-phase="chat"] .handoff__caret { display: inline; }
.handoff__input.is-keying .handoff__caret::after { animation: none; }
.handoff__send {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--line-soft);
  color: var(--text-3);
  font-size: 0.875rem;
  line-height: 1;
}

/* Lit once the chat is abandoned: the wash is the one ember fill. */
.handoff__brief {
  margin: 14px 12px 12px;
  padding: 14px 14px 16px;
  background: var(--brief-wash);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background-color 450ms var(--ease), border-color 450ms var(--ease);
}
[data-phase="chat"] .handoff__brief { background: transparent; border-color: var(--line-soft); }
.handoff__label--brief { color: var(--text); transition: color 450ms var(--ease); }
[data-phase="chat"] .handoff__label--brief { color: var(--text-3); }
.handoff__label--brief .bars { transition: opacity 450ms var(--ease); }
[data-phase="chat"] .handoff__label--brief .bars { opacity: 0.35; }

.handoff__lines { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.handoff__line {
  display: flex;
  align-items: baseline;
  gap: 11px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text);
}
.handoff__line::before {
  content: "";
  flex: none;
  width: 9px;
  height: 5px;
  margin-left: 1px;
  border-left: 2px solid var(--ember);
  border-bottom: 2px solid var(--ember);
  transform: translateY(-4px) rotate(-45deg);
}
.handoff__line--yours { margin-top: 4px; }

@media (max-width: 479.98px) {
  .handoff__task { padding: 18px 18px 16px; }
  .handoff__task-text { font-size: 1.1875rem; }
  .handoff__chat { padding: 16px 18px 0; }
  .handoff__brief { margin: 12px 8px 8px; padding: 12px 12px 14px; }
  .handoff__line { gap: 10px; font-size: 0.875rem; }
}
.handoff__line--yours::before { display: none; }
.handoff__yours {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ember);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(-1px);
}

/* How it works: four steps on a shared hairline. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 44px 32px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.step__marker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-3);
}
.step p { color: var(--text-2); font-size: var(--step-small); line-height: 1.65; }

/* Why it's different. */
.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 880px) { .features { gap: 20px; } }
.feature {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 1.2rem + 1vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.feature h3 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.feature p { color: var(--text-2); font-size: var(--step-small); line-height: 1.65; }
.features__more { margin-top: 36px; }
/* Inline, so a wrapped line keeps the arrow beside its last word. */
.features__more .link-arrow { display: inline; }
.features__more .link-arrow::after { display: inline-block; margin-left: 6px; }

/* The range: two rows of captures drifting in opposite directions. Each
   track is its list twice, so -50% lands exactly where it began. */
.marquee {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 90s linear infinite; }
.marquee__row--reverse .marquee__track { animation-direction: reverse; animation-duration: 75s; }
.marquee:hover .marquee__track,
.marquee.is-paused .marquee__track,
.marquee.is-offscreen .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; margin: 0; padding: 0; list-style: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

.capture {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: 12px;
  padding: 11px 18px 11px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: var(--step-small);
  white-space: nowrap;
}
.capture__tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.marquee-toggle {
  display: inline-flex;
  margin-top: 28px;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.marquee-toggle[hidden] { display: none; }
.marquee-toggle:hover { color: var(--text); border-color: var(--text-3); }

/* Invite: the ink band, the pitch on the left and the form on the right. */
.invite { display: grid; gap: 48px; }
@media (min-width: 960px) {
  .invite { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 88px; align-items: start; }
}
.invite__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
@media (min-width: 960px) {
  .invite__intro { position: sticky; top: calc(var(--header-h) + 48px); }
}
.invite__intro .link-arrow { margin-top: 8px; }
.invite__panel {
  padding: clamp(22px, 1rem + 2.5vw, 40px);
  background: oklch(100% 0 0 / 3.5%);
  border: 1px solid var(--band-line);
  border-radius: var(--radius-lg);
}
.invite__noscript { color: var(--band-text); }

/* Without script the form could only reload the page: the noscript line
   stands in for it. */
@media (scripting: none) { .invite-form { display: none; } }

.invite-form { display: flex; flex-direction: column; gap: 28px; }
.invite-form[hidden] { display: none; }

.field { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field[hidden] { display: none; }
.field > legend { margin-bottom: 10px; }
.field__label { padding: 0; color: var(--band-text); font-size: var(--step-small); font-weight: 500; }
.field__optional {
  margin-left: 6px;
  color: var(--band-text-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.field__error { color: var(--band-danger); font-size: 0.875rem; }
.field__error:empty { display: none; }

.input {
  width: 100%;
  padding: 12px 14px;
  background: var(--band-field);
  border: 1px solid var(--band-field-line);
  border-radius: var(--radius-sm);
  color: var(--band-text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.input::placeholder { color: var(--band-text-2); opacity: 1; }
.input:hover { border-color: var(--band-field-hover); }
.input:focus-visible { outline-offset: 1px; border-radius: var(--radius-sm); }
.input[aria-invalid="true"] { border-color: var(--band-danger); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }

/* Radios and checkboxes as chips. The input stays over its chip, invisible,
   so it keeps its keyboard behavior and its label. */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; display: inline-flex; }
.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--band-field-line);
  border-radius: 999px;
  color: var(--band-text);
  font-size: var(--step-small);
  line-height: 1.25;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.choice:hover span { border-color: var(--band-field-hover); background: var(--band-field); }
.choice input:checked + span { background: var(--ember); border-color: var(--ember); color: var(--on-accent); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice input[aria-invalid="true"] + span { border-color: var(--band-danger); }

/* A multi-select chip carries a box, so it never reads as one of a set. */
.choice--multi span { padding-left: 12px; }
.choice--multi span::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--band-field-hover);
  border-radius: 4px;
  background: center / 11px no-repeat;
}
.choice--multi input:checked + span {
  background: oklch(68% 0.16 55 / 16%);
  border-color: var(--ember);
  color: var(--band-text);
}
.choice--multi input:checked + span::before {
  border-color: var(--ember);
  background-color: var(--ember);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.2 2.2 4.8-5' fill='none' stroke='%2314202d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.invite-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding-top: 4px; }
.invite-form__foot .btn { min-width: 190px; }
.invite-form__status { color: var(--band-text-2); font-size: var(--step-small); }
.invite-form__status[data-tone="error"] { color: var(--band-danger); }
.invite-form__status:empty { display: none; }

/* After step 1: the confirmation, then the optional step 2 under a rule. */
.invite-done { display: flex; flex-direction: column; gap: 32px; }
.invite-done[hidden] { display: none; }
.invite-done__head { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.invite-done__title {
  max-width: 18em;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--band-text);
  text-wrap: balance;
}
.invite-done__title:focus, .invite-more__done:focus { outline: none; }
.invite-more { display: flex; flex-direction: column; gap: 22px; padding-top: 28px; border-top: 1px solid var(--band-line); }
.invite-more[hidden] { display: none; }
.invite-more .field > legend { margin-bottom: 4px; }
.field__hint { color: var(--band-text-2); font-size: var(--step-small); }
.invite-more .btn-ghost { min-width: 120px; border-color: var(--band-field-line); }
.invite-more .btn-ghost:hover { border-color: var(--band-field-hover); background: var(--band-field); }
.invite-more__done {
  padding-top: 28px;
  border-top: 1px solid var(--band-line);
  color: var(--band-text);
  font-size: var(--step-small);
}
.invite-more__done[hidden] { display: none; }

/* Reduced motion: the cards are already still (home.js leaves the finished
   markup alone); the marquee's copies go and its rows wrap in place. */
@media (prefers-reduced-motion: reduce) {
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .marquee__track { width: auto; }
  .marquee__group { flex-wrap: wrap; row-gap: 10px; }
  .marquee__group[aria-hidden="true"] { display: none; }
  .capture { white-space: normal; }
  .marquee-toggle { display: none; }
}

/* ------------------------------------------------------- inner page heads */

/* The head of a page other than home: marker, editorial h1, lede. */
.page-head {
  padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem) clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
.page-head .container { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.page-head__title {
  max-width: 14em;
  font-size: clamp(2.5rem, 1.5rem + 3.8vw, 4.5rem);   /* 40 → 72px */
  line-height: 1.02;
  letter-spacing: -0.03em;
}

/* A closing call to action on the ink band. */
.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
}
.cta-band__inner > div { display: flex; flex-direction: column; gap: 16px; }
.cta-band h2 { max-width: 14em; }

/* ------------------------------------------------------------------ guide */

.guide { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: var(--section-y); }
@media (min-width: 960px) {
  .guide { grid-template-columns: 220px minmax(0, 1fr); gap: 72px; align-items: start; }
}
.guide__body { min-width: 0; max-width: 760px; }

/* Section nav: a sticky column on wide screens, a sticky strip on phones. */
.guide-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 10;
  margin-inline: calc(-1 * var(--gutter));
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-block: 1px solid var(--line-soft);
}
.guide-nav__label { display: none; }
.guide-nav__list {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 10px var(--gutter);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.guide-nav__list::-webkit-scrollbar { display: none; }
.guide-nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.guide-nav__num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.guide-nav__link:hover { color: var(--text); background: var(--line-soft); }
.guide-nav__link[aria-current] { color: var(--text); background: var(--accent-wash); }
.guide-nav__link[aria-current] .guide-nav__num { color: var(--accent-text); }

@media (min-width: 960px) {
  .guide-nav {
    top: calc(var(--header-h) + 40px);
    margin: 0;
    padding-top: 8px;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 0;
  }
  .guide-nav__label { display: block; margin-bottom: 16px; }
  .guide-nav__list {
    flex-direction: column;
    gap: 2px;
    padding: 0;
    overflow: visible;
    border-left: 1px solid var(--line);
  }
  .guide-nav__link {
    display: flex;
    margin-left: -1px;
    padding: 8px 0 8px 18px;
    border-left: 2px solid transparent;
    border-radius: 0;
    font-size: 0.9375rem;
    white-space: normal;
  }
  .guide-nav__link:hover { background: none; }
  .guide-nav__link[aria-current] { background: none; border-left-color: var(--ember); }
}

/* Sections: a numbered marker over an editorial h2, then body copy. */
.guide-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-block: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  border-bottom: 1px solid var(--line-soft);
  /* Clear the header, and on phones the nav strip under it. */
  scroll-margin-top: calc(var(--header-h) + 56px);
}
.guide-section:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 960px) {
  .guide-section { scroll-margin-top: var(--header-h); }
  .guide-section:first-child { padding-top: 8px; }
}
.guide-section h2 { max-width: 16em; font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); }
.guide-section > p:not(.label) { color: var(--text-2); max-width: 38em; }
.guide-section > .guide-section__intro { font-size: var(--step-lede); line-height: 1.5; max-width: 32em; margin-bottom: 8px; }
.guide-section__num { display: inline-flex; align-items: center; gap: 12px; color: var(--accent-text); }
.guide-section__num::before { content: ""; width: 24px; height: 1px; background: var(--ember); }
.guide-sub { margin-top: 24px; font-family: var(--font-display); font-size: 1.625rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.guide-section strong { color: var(--text); font-weight: 600; }

/* The brief: an example, laid out like the card in the app. */
.brief {
  align-self: stretch;
  margin: 12px 0 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.brief__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.brief__title { font-size: 1.125rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: var(--text); }
.brief__fields { margin: 0; }
.brief__field {
  display: grid;
  gap: 4px 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.brief__field:last-child { border-bottom: 0; }
@media (min-width: 640px) { .brief__field { grid-template-columns: 180px minmax(0, 1fr); } }
.brief__field dt { display: flex; flex-direction: column; gap: 2px; }
.brief__name {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.brief__field:first-child .brief__name { color: var(--accent-on-surface); }
.brief__hint { font-size: 0.8125rem; color: var(--text-3); }
.brief__field dd { margin: 0; font-size: var(--step-small); line-height: 1.6; color: var(--text); }

/* Where a task can be: the four states, linked. */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 0;
  margin: 8px 0 4px;
  padding: 0;
  list-style: none;
}
.flow .status-chip { background: var(--surface); }
.flow .status-chip[data-tone="working"] { background: var(--accent-wash); }
.flow .status-chip[data-tone="move"] { background: var(--ember); }
.flow .status-chip::before { animation: none; }
.flow__state { display: flex; align-items: center; }
/* The connector after each state but the last, drawn as a mask so it takes
   the theme's color; the first is two-way, since a task goes back and forth. */
.flow__state:not(:last-child)::after {
  content: "";
  flex: none;
  width: 36px;
  height: 8px;
  margin-inline: 8px;
  background: var(--text-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 8'%3E%3Cpath d='M0 3.5h31v1H0z'/%3E%3Cpath d='M30 0.5L36 4l-6 3.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 8'%3E%3Cpath d='M0 3.5h31v1H0z'/%3E%3Cpath d='M30 0.5L36 4l-6 3.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.flow .flow__state--both:not(:last-child)::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 8'%3E%3Cpath d='M5 3.5h26v1H5z'/%3E%3Cpath d='M30 0.5L36 4l-6 3.5zM6 0.5L0 4l6 3.5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 8'%3E%3Cpath d='M5 3.5h26v1H5z'/%3E%3Cpath d='M30 0.5L36 4l-6 3.5zM6 0.5L0 4l6 3.5z'/%3E%3C/svg%3E");
}

/* Phones: the states run down the page, so an arrow never starts a line. */
@media (max-width: 559.98px) {
  .flow { flex-direction: column; align-items: flex-start; gap: 0; }
  .flow__state { flex-direction: column; align-items: flex-start; }
  .flow__state:not(:last-child)::after {
    width: 8px;
    height: 22px;
    margin: 6px 0 6px 16px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 22'%3E%3Cpath d='M3.5 0h1v17h-1z'/%3E%3Cpath d='M0.5 16L4 22l3.5-6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 22'%3E%3Cpath d='M3.5 0h1v17h-1z'/%3E%3Cpath d='M0.5 16L4 22l3.5-6z'/%3E%3C/svg%3E");
  }
  .flow .flow__state--both:not(:last-child)::after {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 22'%3E%3Cpath d='M3.5 5h1v12h-1z'/%3E%3Cpath d='M0.5 16L4 22l3.5-6zM0.5 6L4 0l3.5 6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 22'%3E%3Cpath d='M3.5 5h1v12h-1z'/%3E%3Cpath d='M0.5 16L4 22l3.5-6zM0.5 6L4 0l3.5 6z'/%3E%3C/svg%3E");
  }
}

/* The three kinds of ask. */
.asks {
  align-self: stretch;
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.ask {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ask__kind { font-weight: 600; color: var(--text); }
.ask__body { font-size: var(--step-small); line-height: 1.55; color: var(--text-2); }
.ask__example {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  text-wrap: wrap;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--text);
}

@media (min-width: 720px) {
  /* Subgrid, so each card's example starts on the same line. */
  .asks { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; column-gap: 12px; row-gap: 0; }
  .ask { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; }
}

/* Two short subsections side by side. */
.guide-pair { align-self: stretch; display: grid; gap: 8px 40px; }
@media (min-width: 720px) { .guide-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-pair__item { display: flex; flex-direction: column; gap: 12px; }
.guide-pair__item p { color: var(--text-2); }

/* When to use it: plain prompt beside the queue. */
.compare-wrap { align-self: stretch; }
.compare {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--step-small);
}
.compare th {
  padding: 16px 20px 14px;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
}
.compare td { padding: 6px 20px 20px; vertical-align: top; }
.compare th.compare__plain { color: var(--text-3); border-bottom: 1px solid var(--line); }
.compare th.compare__queue {
  color: var(--accent-on-surface);
  background: var(--surface);
  border: 1px solid var(--ember);
  border-bottom-color: var(--line-soft);
  border-radius: var(--radius) var(--radius) 0 0;
}
.compare td.compare__queue {
  background: var(--surface);
  border: 1px solid var(--ember);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
.compare ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.compare li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  line-height: 1.45;
  border-bottom: 1px solid var(--line-soft);
}
.compare li:last-child { border-bottom: 0; }
.compare li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.5em;
  border-radius: 50%;
}
.compare__plain li { color: var(--text-2); }
.compare__plain li::before { border: 1px solid var(--text-3); }
.compare__queue li { color: var(--text); }
.compare__queue li::before { background: var(--ember); }
@media (max-width: 559.98px) {
  .compare th, .compare td { padding-inline: 14px; }
  .compare th { letter-spacing: 0.08em; }
}

/* A closing line set as a pull quote. */
.guide-callout,
.guide-section > p.guide-callout {
  margin-top: 16px;
  padding-left: 20px;
  border-left: 2px solid var(--ember);
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text);
  max-width: 24em;
}
.guide-callout em { font-style: italic; font-weight: 400; }

/* Writing a capture: three tips, then before-and-after pairs. */
.tips { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; max-width: 38em; }
.tip { display: flex; gap: 16px; color: var(--text-2); }
.tip__num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-3);
}

.rewrites {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  margin: 16px 0 8px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
}
.rewrite {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 10px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}
@media (min-width: 720px) {
  .rewrite { grid-template-columns: 120px 36px minmax(0, 1fr); align-items: center; gap: 12px; }
}
.rewrite__before {
  padding: 6px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-3);
}
.rewrite__arrow { position: relative; width: 28px; height: 1px; background: var(--ember); }
.rewrite__arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  border-left: 5px solid var(--ember);
  border-block: 3.5px solid transparent;
}
@media (max-width: 719.98px) {
  .rewrite__arrow { width: 1px; height: 16px; margin-left: 20px; }
  .rewrite__arrow::after { right: -3px; top: auto; bottom: -1px; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 5px solid var(--ember); border-bottom: 0; }
}
.rewrite__after {
  padding: 11px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--step-small);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
}

/* What you need: three items, numbered by the bars. */
.needs {
  align-self: stretch;
  display: grid;
  gap: 12px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
  counter-reset: need;
}
@media (min-width: 720px) { .needs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.need {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  counter-increment: need;
}
.need::before {
  content: "0" counter(need);
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent-on-surface);
}
.need h3 { font-size: 1.0625rem; }
.need p { font-size: var(--step-small); line-height: 1.6; color: var(--text-2); }

/* Your rules: an example document. */
.rules-doc {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 0;
}
.rules-doc__body {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text);
}
.rules-doc__head { color: var(--accent-on-surface); font-weight: 500; }
.rules-doc__head::before { content: "## "; color: var(--text-3); }
.rules-doc__body ul { margin: 2px 0 14px; padding: 0; list-style: none; color: var(--text-2); }
.rules-doc__body ul:last-child { margin-bottom: 0; }
.rules-doc__body li { padding-left: 1.6em; text-indent: -1.6em; }
.rules-doc__body li::before { content: "- "; white-space: pre; color: var(--text-3); padding-right: 0.6em; }
.guide-sub--after { margin-top: 32px; }
.rules-doc--tight { margin-top: 8px; }

/* ------------------------------------------------------------------ setup */

/* The setup page runs on the guide's frame; these are its additions. */

/* Before you start: the invite, beside the page's lede. */
.invite-note {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 40em;
  margin-top: 8px;
  padding: 18px 20px;
  background: var(--accent-wash);
  border-radius: var(--radius);
  font-size: var(--step-small);
  line-height: 1.55;
  color: var(--text-2);
}
.invite-note strong { color: var(--text); font-weight: 600; }
.invite-note__links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 4px; }
.invite-note__have { color: var(--text-2); }
.invite-note__have a { font-weight: 600; }

/* A long nav: three groups, tighter rows. */
.guide-nav__group { display: none; }
@media (min-width: 960px) {
  .guide-nav--long .guide-nav__group {
    display: block;
    margin: 14px 0 4px 18px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
  }
  .guide-nav--long .guide-nav__group:first-child { margin-top: 4px; }
  .guide-nav--long .guide-nav__link { padding-block: 5px; font-size: 0.875rem; }
}

/* A part's opening: the marker and a line on what follows. */
.part-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(3rem, 2rem + 3vw, 4.5rem) 0 8px;
  scroll-margin-top: calc(var(--header-h) + 56px);
}
.part-head:first-child { padding-top: 8px; }
.part-head .label { color: var(--accent-text); }
.part-head__intro { max-width: 34em; font-size: var(--step-lede); line-height: 1.5; color: var(--text-2); }

/* Part 1: the steps on a rail, each led by a numbered disc. */
.setup-steps { margin: 0; padding: 0; list-style: none; }
.setup-step {
  position: relative;
  padding-left: 64px;
  border-bottom: 0;
}
.setup-step::before {
  content: "";
  position: absolute;
  left: 21.5px;
  top: calc(clamp(3.5rem, 2.5rem + 3vw, 5.5rem) + 44px);
  bottom: calc(-1 * clamp(3.5rem, 2.5rem + 3vw, 5.5rem));   /* down to the next disc */
  width: 1px;
  background: var(--line);
}
.setup-step:first-child { padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.setup-step:first-child::before { top: calc(clamp(2rem, 1.5rem + 2vw, 3rem) + 44px); }
.setup-step:last-child::before { display: none; }
.setup-step:last-child { padding-bottom: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); border-bottom: 1px solid var(--line-soft); }
.setup-step__num {
  position: absolute;
  left: 0;
  top: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--ember);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--on-accent);
}
.setup-step:first-child .setup-step__num { top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.setup-step h2 { margin-top: 2px; }
@media (max-width: 559.98px) {
  .setup-step { padding-left: 48px; }
  .setup-step::before { left: 15.5px; top: calc(clamp(3.5rem, 2.5rem + 3vw, 5.5rem) + 32px); }
  .setup-step:first-child::before { top: calc(clamp(2rem, 1.5rem + 2vw, 3rem) + 32px); }
  .setup-step__num { width: 32px; height: 32px; font-size: 1.0625rem; }
}

/* A step's numbered actions. */
.do-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 38em;
  margin: 4px 0;
  padding: 0;
  list-style: none;
  counter-reset: do;
  color: var(--text-2);
}
.do-list > li { position: relative; padding-left: 36px; counter-increment: do; }
.do-list > li::before {
  content: counter(do);
  position: absolute;
  left: 0;
  top: 0.15em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--ember);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-text);
}

/* The check that closes a step. */
.guide-section > p.done-when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 8px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  border-radius: var(--radius-sm);
  color: var(--text);
  max-width: 38em;
}
.done-when__label {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-on-surface);
}
.done-when__label::before { content: "✓  "; white-space: pre; }

/* Which of the user's first tasks this step is. */
.guide-section > p.setup-step__tag { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: var(--step-small); color: var(--text-3); }
.setup-step__task { color: var(--text); font-weight: 500; }

/* The connector URL, with a Copy button once scripting is there. */
.copy-field {
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  max-width: 38em;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.copy-field__label { grid-column: 1 / -1; }
.copy-field__value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--text);
  user-select: all;
}
.copy-field__btn[hidden] { display: none; }
@media (max-width: 559.98px) {
  .copy-field { grid-template-columns: minmax(0, 1fr); }
  .copy-field__btn { justify-self: start; }
}

/* Part 2: an optional block, its number beside a badge. */
.option__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.badge {
  padding: 4px 10px;
  background: var(--accent-wash);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.badge--quiet { background: none; border: 1px dashed var(--line); color: var(--text-3); }

/* Callouts: a caution, and a dated aside for a detail of someone else's app. */
.note {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 38em;
  padding: 16px 20px 18px;
  border-radius: var(--radius);
  font-size: var(--step-small);
  line-height: 1.6;
  color: var(--text-2);
}
.note strong { color: var(--text); }
.note--caution { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--warn); }
.note--caution .note__label { color: var(--warn); }
.note--asof { border: 1px dashed var(--line); }

/* Kinds of things, as chips. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--step-small);
  color: var(--text);
}
.chips--plain li { background: none; border-style: dashed; color: var(--text-2); }

/* Symptom, then fix. */
.fixes { align-self: stretch; display: flex; flex-direction: column; margin: 0; border-top: 1px solid var(--line-soft); }
.fix { display: grid; gap: 6px 32px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
@media (min-width: 720px) { .fix { grid-template-columns: 240px minmax(0, 1fr); } }
.fix:last-child { border-bottom: 0; }
.fix dt { font-weight: 600; line-height: 1.4; color: var(--text); }
.fix dd { margin: 0; font-size: var(--step-small); line-height: 1.6; color: var(--text-2); }

/* Suggestions: the rewrite's after alone, without the rows' rules. */
.rewrites--plain { margin-top: 4px; border-top: 0; }
.rewrites--plain .rewrite { grid-template-columns: minmax(0, 1fr); padding: 5px 0; border-bottom: 0; }

/* What to press, at the foot of an ask card. */
.ask__press {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-on-surface);
}

/* Term and meaning, two columns on wider screens. */
.ref-list { align-self: stretch; display: flex; flex-direction: column; margin: 0; }
.ref-list > div { display: grid; gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.ref-list > div:last-child { border-bottom: 0; }
@media (min-width: 640px) { .ref-list > div { grid-template-columns: 150px minmax(0, 1fr); } }
.ref-list dt { font-weight: 600; color: var(--text); }
.ref-list dd { margin: 0; font-size: var(--step-small); line-height: 1.6; color: var(--text-2); }

/* Illustrations of Underway's own app: simplified, drawn in the site's
   tokens so they follow the theme. A change to what one shows in the app
   updates it here. */
.mock { align-self: stretch; display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.mock__caption { font-size: 0.875rem; color: var(--text-3); }
.mock__caption strong { color: var(--text-2); }

.mock--heads {
  gap: 0;
  padding: 16px 20px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.mock__state { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.mock__state--next { margin-top: 14px; }
/* The app's section heading (code/page.html .section-head), as drawn there. */
.mock__row { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; }
.mock__section { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-3); white-space: nowrap; }
.mock__count { font-weight: 600; font-size: 18px; color: var(--text); }
.mock__rule { flex: 1; height: 1px; background: var(--line); }
.mock__stamp { display: inline-flex; align-items: center; align-self: center; gap: 5px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); white-space: nowrap; }
.mock__info { display: inline-flex; align-self: baseline; color: var(--text-3); opacity: 0.75; }
/* An app icon named in running text, the size and color the app draws it. */
.inline-icon { display: inline-flex; vertical-align: -2px; color: var(--text-3); }
/* The app has the full phone width for this heading; the drawing has a step's
   column, so there the stamp drops below. */
@media (max-width: 479.98px) {
  .mock--heads { padding-inline: 14px; }
  .mock__row { flex-wrap: wrap; row-gap: 2px; }
  .mock__rule { flex-basis: 100%; height: 0; }
  .mock__stamp { margin-left: auto; }
}
.mock__stamp--stale { color: var(--warn); }
.mock__stamp svg { flex: none; }

.mock__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.mock__kind { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-on-surface); }
.mock__request { font-size: var(--step-small); line-height: 1.55; color: var(--text); }
.mock__more { font-size: 0.8125rem; color: var(--text-3); }
.mock__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.mock__input {
  flex: 1 1 160px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-3);
}
.mock__btn { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.8125rem; font-weight: 500; color: var(--text); white-space: nowrap; }
.mock__link { padding: 6px 4px; font-size: 0.8125rem; color: var(--text-3); }

/* A collapsed task row on the board (code/page.html .task-row), as drawn there. */
/* Straight on the page, as the board is: no frame. */
.mock.mock--wait { padding: 0; border: 0; border-radius: 0; }
/* The heading sits over the title, as on the board, with the row's line
   running 15px past both. */
.mock--wait > .mock__row { padding-inline: 15px; }
.mock__task { display: flex; align-items: center; gap: 14px; padding: 13px 15px; border-bottom: 1px solid var(--line); border-radius: 10px; }
.mock__task-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 22px; color: var(--text); }
.mock__task-end { display: flex; align-items: center; gap: 5px; flex: none; }
.mock__checkback { font-family: var(--font-mono); font-size: 11.5px; color: var(--ember); white-space: nowrap; }
.mock__task-done { display: flex; align-items: center; gap: 6px; flex: none; }
.mock__round {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--slate);
}
@media (max-width: 640px) {
  .mock__task { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; grid-template-areas: "title done" "end end"; align-items: start; }
  .mock__task-title { grid-area: title; }
  .mock__task-done { grid-area: done; }
  .mock__task-end { grid-area: end; margin-top: 4px; }
}

.mock--menu { align-items: flex-start; }
@media (min-width: 720px) {
  .mock--menu { flex-direction: row; align-items: flex-end; gap: 24px; }
  .mock--menu .mock__caption { max-width: 16em; }
}
.mock__menu {
  display: flex;
  flex-direction: column;
  width: 240px;
  max-width: 100%;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  font-size: 0.875rem;
}
.mock__item { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-2); }
.mock__item.is-lit { background: var(--accent-wash); color: var(--text); }
.mock__check { color: var(--accent-on-surface); }
.mock__group { padding: 8px 10px 4px; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.mock__sep { height: 1px; margin: 4px 6px; background: var(--line-soft); }

/* The closing band's two ways in. */
.cta-band__actions { align-items: flex-start; }

/* --------------------------------------------------------------- ai primer */

/* Small cards, two across: the layers around the model, the ways it fails. */
.tiles {
  align-self: stretch;
  display: grid;
  gap: 12px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.tile h3 { font-size: 1.0625rem; }
.tile p { font-size: var(--step-small); line-height: 1.6; color: var(--text-2); }

/* A ladder: numbered rungs joined by a rail, lowest first. */
.ladder {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  margin: 16px 0 8px;
  padding: 0;
  list-style: none;
}
.rung {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0 20px;
  padding-bottom: 36px;
}
.rung:last-child { padding-bottom: 0; }
.rung:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19.5px;
  top: 40px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.rung__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-on-surface);
}
.rung__body { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.rung__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.rung__body > p { max-width: 38em; color: var(--text-2); }
.rung__tag { display: block; margin-bottom: 4px; color: var(--text-3); }
.rung__task {
  padding-left: 16px;
  border-left: 2px solid var(--ember);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.4;
}
.rung__body > .rung__task { color: var(--text); }
.rung__task .rung__tag { font-style: normal; }
.rung__note { padding-left: 16px; border-left: 2px solid var(--line); font-size: var(--step-small); line-height: 1.6; }
.rung__body > .rung__seen {
  padding: 12px 16px;
  background: var(--line-soft);
  border-radius: var(--radius);
  font-size: var(--step-small);
  line-height: 1.6;
}
@media (max-width: 559.98px) {
  .rung { grid-template-columns: 32px minmax(0, 1fr); gap: 0 14px; }
  .rung__num { width: 32px; height: 32px; font-size: 0.6875rem; }
  .rung:not(:last-child)::before { left: 15.5px; top: 32px; }
  .rung__body { padding-top: 2px; }
}

/* A brief-shaped card that is not a brief: no field is lit but the one
   marked as the reader's. */
.brief--plain .brief__field:first-child .brief__name { color: var(--text-3); }
.brief--plain .brief__field--yours { background: var(--brief-wash); }
.brief--plain .brief__field--yours .brief__name { color: var(--accent-on-surface); }
.brief + .brief { margin-top: 4px; }

/* ------------------------------------------------------------------ about */

.essay {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 40rem;
  padding-bottom: var(--section-y);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.7;
  color: var(--text-2);
}
.essay__opener {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}
.essay__measure {
  margin: 12px 0;
  padding: 6px 0 6px 28px;
  border-left: 2px solid var(--ember);
}
.essay__measure p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text);
}
.essay .rule { margin-block: 32px 0; }

/* ------------------------------------------------------------------ legal */

/* Privacy, terms and the data page: the page head, then a contents list and
   numbered sections at a reading measure. Wide screens keep the contents in
   a sticky column; narrower ones show it as a card at the top. */
.legal-head .page-head__title { max-width: 16em; }
.effective-date {
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.legal-head .lede { max-width: 38em; }

.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding-bottom: var(--section-y);
}
@media (min-width: 1040px) {
  .legal { grid-template-columns: 240px minmax(0, 1fr); gap: 72px; align-items: start; }
}

.legal-toc {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.legal-toc .label { margin-bottom: 12px; }
.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px 32px;
  font-size: var(--step-small);
}
@media (min-width: 640px) and (max-width: 1039.98px) {
  .legal-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.legal-toc a {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  color: var(--text-2);
  text-decoration: none;
  line-height: 1.4;
}
.legal-toc a:hover { color: var(--text); }
.legal-toc__num {
  flex: none;
  min-width: 1.6em;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1040px) {
  .legal-toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
    padding: 0 0 0 20px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: none;
  }
}

.legal__body {
  min-width: 0;
  max-width: 68ch;
  color: var(--text-2);
  line-height: 1.7;
}
.legal-section { padding-block: 40px; border-top: 1px solid var(--line-soft); }
.legal-section:first-child { padding-top: 0; border-top: 0; }
.legal-section:last-child { padding-bottom: 0; }
.legal-section > * + * { margin-top: 16px; }
.legal-section h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(1.625rem, 1.35rem + 1vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.legal-section__num {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
.legal-section h3 { margin-top: 28px; font-size: 1.0625rem; color: var(--text); }
.legal-section h3 + p { margin-top: 8px; }
.legal-section strong { color: var(--text); font-weight: 600; }
.legal-section ul { padding-left: 1.25em; }
.legal-section li + li { margin-top: 8px; }
.legal-section li::marker { color: var(--ember); }
.legal-section code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--line-soft);
  color: var(--text);
}
/* A statement that has to be read exactly as written, set off. */
.legal-callout {
  padding: 16px 20px;
  border-left: 2px solid var(--ember);
  background: var(--accent-wash);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}
.legal-close { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }

/* A table that has to stay readable at 360px: on phones each row becomes a
   small card, its cells labeled from data-label. */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-small);
  line-height: 1.55;
}
.legal-table caption {
  caption-side: top;
  padding-bottom: 14px;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1.35rem + 1vw, 2.125rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.legal-table th, .legal-table td { padding: 14px 16px 14px 0; text-align: left; vertical-align: top; }
.legal-table th:last-child, .legal-table td:last-child { padding-right: 0; }
.legal-table thead th {
  padding-block: 0 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.legal-table tbody tr + tr th, .legal-table tbody tr + tr td { border-top: 1px solid var(--line-soft); }
.legal-table tbody th { font-weight: 600; color: var(--text); }
.legal-table td { color: var(--text-2); }
@media (max-width: 639.98px) {
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; }
  .legal-table caption { display: block; }
  .legal-table tbody tr { padding: 16px 0; border-top: 1px solid var(--line-soft); }
  .legal-table tbody tr:first-child { border-top: 1px solid var(--line); }
  .legal-table tbody tr + tr th, .legal-table tbody tr + tr td { border-top: 0; }
  .legal-table th, .legal-table td { padding: 0; }
  .legal-table td { margin-top: 8px; }
  .legal-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
  }
}

/* The data page: three tables, one after another, at a wider measure. */
.data-page { display: flex; flex-direction: column; gap: 64px; max-width: 920px; padding-bottom: var(--section-y); }
.data-page .legal-table th[scope="row"] { width: 26%; }
.data-page__note { max-width: 40em; margin-top: -36px; color: var(--text-2); }
.data-page__delete {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.data-page__delete h2 { font-size: clamp(1.625rem, 1.35rem + 1vw, 2.125rem); letter-spacing: -0.02em; line-height: 1.15; }
.data-page__delete p { color: var(--text-2); max-width: 40em; }
@media (max-width: 639.98px) {
  .data-page .legal-table th[scope="row"] { width: auto; }
  .data-page__delete { padding: 22px 20px; }
}

/* -------------------------------------------------------------------- 404 */

.not-found { display: flex; align-items: center; padding-block: clamp(5rem, 3rem + 10vw, 10rem); }
.not-found__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.not-found .bars { margin-bottom: 12px; }
.not-found .actions { margin-top: 8px; }

/* ----------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
