/* The marketing site.
 *
 * Brand Identity v1.0 governs this file. Two divergences from it, both recorded
 * in BRAND.md rather than left to be discovered:
 *   - Inter, not Aptos (decision 5 Sep 2026 — the product runs Inter)
 *   - the health ramp never appears here; it is product vocabulary, not brand
 *
 * The palette comes from /tokens.css. The terrain comes from /shared/, which is
 * the product's own renderer rather than a copy — the seam is documented in
 * server.js.
 */

/* ---------- Ground ----------
 * Two themes, and the brand supplies both ends: Ink is the dark field, Paper the
 * light one. This is NOT the product's four-ground system — a marketing site has
 * one surface, so the tenant/apex split does not apply and the tokens below are
 * the brand's own, not canvas.css's.
 *
 * site.js stamps [data-theme] before first paint; a page that painted first and
 * themed second would show one frame of the wrong palette, and the contour ramp
 * reads these same properties.
 *
 * ---- The scrolling field ----
 * The whole page is one gradient from top of scroll to bottom, and the terrain
 * runs over all of it. No section has its own background: bands would chop the
 * landscape into strips and undo the reason it is there.
 *
 * `--t` is scroll progress, 0 to 1, written by site.js on the root element.
 * The field is then interpolated between two values rather than being a
 * `background-image` gradient, because the terrain has to be re-tuned as the
 * ground moves — a fixed gradient image could not tell the contour ramp what
 * was behind it at any given moment.
 *
 * THE RANGE IS DELIBERATELY NARROW, and that is a measured decision rather than
 * timidity. A full Rule -> Paper run (218 luminance units) puts Signal Blue at
 * 3.63:1 on the dark end — below 4.5:1, so blue text would fail across most of
 * the page, and blue is the one colour in this identity that must never be
 * decorative. Between #F7F8FA and #ECEEF1 every pairing holds at every scroll
 * position: Ink 18.3 -> 16.5, Slate 5.5 -> 4.9, Signal Blue 4.7 -> 4.2 for
 * large text and 3:1 non-text throughout.
 *
 * The shift is meant to be felt rather than pointed at. "Quiet surface." */
:root {
  --t: 0;

  /* Dark: Ink, lifting very slightly. Mirrors light's gesture so the two themes
     read as one design at two times of day rather than two designs — the same
     reasoning the product's own themes are built on. */
  --field-top: #0b0d10;
  --field-bot: #171b21;
  --field:      var(--ink);          /* fallback before site.js runs */
  --field-2:    #12151a;             /* raised surfaces: cards, the menu panel */
  --on-field:   var(--paper);
  --muted:      rgb(247 248 250 / .62);
  --line:       rgb(247 248 250 / .13);
  --signal-on:  var(--signal-lit);

  /* The terrain ramp. canvas.css owns these for the product; the site sets its
     own because its grounds are the brand's, not the canvas's.
     Lifted WITH the ground, which is not optional — the product records this as
     something it had to fix twice: the terrain reads by contrast with what is
     behind it, not by its own value. site.js interpolates these too. */
  --contour-lo-top: 44, 52, 68;
  --contour-hi-top: 124, 158, 208;
  --contour-lo-bot: 56, 66, 84;
  --contour-hi-bot: 138, 172, 222;

  --page:     1180px;   /* content column max */
  --gutter:   28px;
}

:root[data-theme="light"] {
  --field-top: #f7f8fa;              /* Paper */
  --field-bot: #eceef1;
  --field:      var(--paper);
  --field-2:    #ffffff;
  --on-field:   var(--ink);
  --muted:      var(--slate);
  --line:       var(--rule);
  --signal-on:  var(--signal);

  --contour-lo-top: 206, 212, 220;
  --contour-hi-top: 116, 138, 178;
  --contour-lo-bot: 194, 201, 211;
  --contour-hi-bot: 104, 126, 168;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  /* The field itself. site.js writes --field on the root each frame by
     interpolating --field-top -> --field-bot across scroll progress, so this is
     one continuous wash over the whole document rather than a per-section
     background. Nothing else on the page paints a ground. */
  background: var(--field);
  color: var(--on-field);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  /* The terrain is fixed behind everything; the page scrolls over it. */
  position: relative;
}

/* ---------- The terrain ----------
 * Fixed, full-bleed, behind everything, and never interactive.
 *
 * Opacity is the whole discipline here. The product learned this the hard way:
 * the brightest contour once sat at 12.66:1 against the ground while a node
 * label sat at 13.44:1 — ground competing with subject, which is the one thing
 * a background must not do. A marketing page carries far more text than the
 * canvas, so it holds the terrain lower still.
 *
 * Brand Identity §08 is the other constraint: "neutral field, one meaningful
 * signal". The terrain qualifies as the field only while it stays quiet. */
#grid-reveal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  /* The ramp above is already tuned against the ground — the product's peak sits
     at ~7:1 while its text sits at ~13:1, and these match that relationship. So
     opacity here is a light final trim, not the mechanism. An earlier pass did
     the attenuation twice (a dim ramp AND a low opacity) and the terrain
     effectively disappeared. */
  opacity: .82;
}
:root[data-theme="light"] #grid-reveal { opacity: .70; }

/* Everything above the terrain. One stacking context, so no per-section z-index
   guessing. */
.page { position: relative; z-index: 1; }

/* A fixed pool of light, so the composition is lit wherever the renderer's own
 * lights happen not to be.
 *
 * The contour renderer runs three ambient patches that drift and respawn at
 * random, sized in SCREEN pixels (260-480px radius). On the canvas that is
 * correct — the environment reveals itself wherever it likes and the user pans
 * to it. On a fixed full-page background it means a 1440px viewport is lit in
 * one corner with the rest bare, and every part of this page is being read.
 *
 * Done in CSS rather than by reaching into contours.js, which is the same
 * decision /login made and for the same reason: that file lifts directly into
 * the real build and must not grow a website-shaped parameter. PLAN.md §5 flags
 * this as the seam to watch — if the site needs this twice, the renderer should
 * be vendored into WEB/ and allowed to diverge.
 *
 * The renderer's drifting lights still play over the top of this. */
.pool {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(64% 52% at 26% 34%,
      color-mix(in srgb, var(--on-field) 5%, transparent) 0%, transparent 68%),
    radial-gradient(52% 44% at 78% 62%,
      color-mix(in srgb, var(--on-field) 4%, transparent) 0%, transparent 70%);
}
:root[data-theme="light"] .pool {
  background:
    radial-gradient(64% 52% at 26% 34%,
      color-mix(in srgb, var(--ink) 4%, transparent) 0%, transparent 68%),
    radial-gradient(52% 44% at 78% 62%,
      color-mix(in srgb, var(--ink) 3%, transparent) 0%, transparent 70%);
}

/* A slight wash that keeps text legible over whatever the terrain is doing
   beneath it, heaviest behind the sticky nav where the two most overlap.
   Deliberately weak in the middle: a full scrim would flatten the terrain into a
   texture, which is the one thing this design is trying not to do. */
.veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--field) 82%, transparent) 0%,
    color-mix(in srgb, var(--field) 22%, transparent) 14%,
    color-mix(in srgb, var(--field) 22%, transparent) 86%,
    color-mix(in srgb, var(--field) 52%, transparent) 100%);
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ----------
 * Hierarchy through scale, spacing and position first — Brand Identity §06.
 * The product's seven-step scale is deliberately not inherited: it is tuned for
 * a dense data surface and a website wants display sizes the canvas has no use
 * for. BRAND.md §2 says so.
 *
 * Tracking tightens as size grows, which is the correction browsers get wrong. */
.display {
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -.028em;
  font-weight: 500;
}
.h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.14;
  letter-spacing: -.02em;
  font-weight: 500;
}
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
}

/* Uppercase micro-label. Tracking LOOSENS here — the opposite of the display
   rule above, and the reverse of what defaults give you. */
.eyebrow {
  font-size: .6875rem;          /* 11px */
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 600;
  color: var(--signal-on);
}
.eyebrow.quiet { color: var(--muted); }

.mono { font-family: var(--mono); }
.tabular { font-variant-numeric: tabular-nums; }

a { color: inherit; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  /* Not a solid bar: the terrain should read behind the nav, or the page starts
     with a lid on it. Backdrop blur does the legibility work instead. */
  background: color-mix(in srgb, var(--field) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: background .2s, border-color .2s;
}
.nav.stuck {
  background: color-mix(in srgb, var(--field) 92%, transparent);
  border-bottom-color: var(--line);
}

.nav-in {
  display: flex;
  align-items: center;
  gap: 34px;
  height: 66px;
}

/* The wordmark. currentColor SVG, so Ink on light and Paper on dark come from
   the same file — Brand Identity §04's first two "do"s, satisfied structurally.
   Sized by CAP HEIGHT, not bounding box: the measured box includes the 'y'
   descender at 32% of total height, and sizing to it renders the mark ~24%
   smaller than the text beside it. */
.brandmark {
  display: flex;
  align-items: center;
  flex: none;
  /* Clear space: at least the height of the lowercase k, all sides (§04). */
  padding: 6px 10px 6px 0;
}
.brandmark svg { display: block; height: 28px; width: auto; fill: currentColor; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
}

.nav-item { position: relative; }

.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  font: inherit;
  font-size: .875rem;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.nav-trigger:hover,
.nav-item.open .nav-trigger { color: var(--on-field); }
.nav-trigger .chev {
  width: 9px; height: 9px;
  transition: transform .2s;
  opacity: .6;
}
.nav-item.open .chev { transform: rotate(180deg); }

/* ---------- Mega-menu ----------
 * A panel, not a dropdown list: these are sections of a site, and a column
 * layout lets each carry a line of explanation. A bare list of links makes the
 * visitor guess what is behind each one. */
.mega {
  position: absolute;
  top: calc(100% + 10px);
  /* Left-aligned to its OWN trigger, not centred on it.
     Centring put half of a 560px panel to the left of its trigger, and the
     leftmost nav item ("Product") sits ~170px from the viewport edge — so the
     panel overflowed the page and was clipped. Left-alignment is also the
     conventional behaviour: a panel reads as belonging to the item it hangs
     under, and a centred one under a left-hand item does not.
     The right edge is guarded separately below, for the last item. */
  left: 0;
  min-width: 560px;
  /* Never wider than the viewport, whatever the nav does. The gutter keeps it
     off the edge on a narrow window rather than flush against it. */
  max-width: calc(100vw - var(--gutter) * 2);
  padding: 22px;
  background: var(--field-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px -18px rgb(0 0 0 / .5), 0 2px 8px rgb(0 0 0 / .18);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;

  /* Hidden by default without display:none, so a keyboard can still reach it
     mid-transition and the panel can animate. */
  opacity: 0;
  visibility: hidden;
  translate: 0 -6px;
  transition: opacity .16s, translate .16s, visibility .16s;
}
.nav-item.open .mega {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}
@media (prefers-reduced-motion: reduce) {
  .mega, .nav-item.open .mega { transition: none; translate: 0 0; }
}

/* Every panel left-aligns, including the last.
   Right-anchoring the final item was tried and was wrong here: this nav is
   clustered on the LEFT of the bar, so "Company" sits ~430px from the viewport
   edge and a right-anchored 560px panel lands at left:-126 — the same clipping
   defect, moved to the other side. Right-anchoring only helps a trigger that is
   actually near the right edge, which none of these are.
   The max-width above is what guards the right edge instead. */

.mega-col-h {
  grid-column: 1 / -1;
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 600;
  color: var(--muted);
  padding: 4px 10px 10px;
}
.mega a {
  display: block;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  transition: background .13s;
}
.mega a:hover { background: color-mix(in srgb, var(--on-field) 6%, transparent); }
.mega .m-t { font-size: .9375rem; font-weight: 500; }
.mega .m-d {
  font-size: .8125rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.45;
}

/* ---------- Buttons ----------
 * Label colours are measured, not chosen. On --signal white is 4.95:1 and Ink is
 * 3.93:1, which fails — so the fill's label is always light. On --signal-lit Ink
 * is 6.35:1 and white is 2.88:1, so it inverts. tokens.css carries the same note.
 *
 * The filled button is blue because a primary action IS a "selection" in the
 * brand's semantic list. A ghost button is not, so it stays neutral. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: .875rem;
  font-weight: 500;
  padding: 10px 17px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--signal); color: #fff; }
:root[data-theme="dark"] .btn--primary { background: var(--signal-lit); color: var(--ink); }
.btn--primary:hover { filter: brightness(1.08); }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--on-field); }
.btn--ghost:hover { border-color: color-mix(in srgb, var(--on-field) 34%, transparent); }

.btn--icon {
  padding: 9px;
  border-radius: 9px;
  border-color: transparent;
  color: var(--muted);
  background: none;
}
.btn--icon:hover { color: var(--on-field); background: color-mix(in srgb, var(--on-field) 8%, transparent); }
/* No `display` here, deliberately — see the theme-icon rules below. This
   selector is (0,2,1) and the .ico-* ones are (0,1,0), so a display value set
   here outranks them and BOTH theme glyphs render at once. The visibility of
   these two is owned entirely by the theme rules. */
.btn--icon svg { width: 15px; height: 15px; fill: currentColor; }

.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* The theme toggle shows the icon for the theme you would GET, not the one you
   are in — the control is a destination, not a status light. */
/* Exactly one icon at a time. Both rules must be stated: an earlier version set
   the pair only under [data-theme="dark"], so the light theme fell through to
   the base rule and showed BOTH glyphs side by side. */
.ico-sun,
.ico-moon { display: none; }
:root[data-theme="dark"]  .btn--icon .ico-sun  { display: block; }
:root[data-theme="light"] .btn--icon .ico-moon { display: block; }

#nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: min(92vh, 900px);
  display: flex;
  align-items: center;
  padding: 90px 0 70px;
}
/* The measure lives on the HEADLINE, not on the wrap. Putting max-width on the
   element that also carries .wrap made 34ch win over the 1180px page column and
   `margin-inline: auto` then centred that narrow strip — the headline wrapped one
   word per line, centred, which is not what any of this is. */
/* Two columns: the argument on the left, three installed units on the right.
   Collapses to one column below 900px, where the field would be too cramped to
   read and the copy needs the full measure. */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  gap: 48px;
  align-items: center;
}
.hero-in .display { max-width: 15ch; }
.hero-in .lead    { max-width: 34ch; }

/* ---------- The unit field ----------
 * Three installed units, one signalling. A hint of the interface rather than a
 * screenshot of it — see the note in index.html for why it cannot use the
 * product's health ramp.
 *
 * Positioned by percentage so the composition holds at any size, and the field
 * keeps an aspect ratio so the three never collapse onto each other. */
.field {
  position: relative;
  aspect-ratio: 1 / .92;
  /* Sized to hold the column rather than float in it. The units are placed by
     percentage, so the field's own box IS the composition — an undersized box
     leaves three small marks adrift in a large gap beside the copy, which is
     what a first pass did. */
  min-height: 420px;
  margin: 0 2%;
}
.unit {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  display: grid;
  place-items: center;
}

/* The quiet units. Slate, because they are the neutral field: they are not
   signalling and must not look like they are. */
/* One size variable drives the dot, the rings and the label offset, so the
   composition scales as one thing rather than three that have to be kept in
   step by hand. */
.field { --u: 19px; }

.dot {
  width: var(--u);
  height: var(--u);
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  background: color-mix(in srgb, var(--field) 70%, transparent);
  position: relative;
  z-index: 1;
}
.tag {
  position: absolute;
  top: calc(50% + 14px);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
  /* Above the rings. Without this the expanding ring passes over the label and
     the two read as a collision rather than as a unit that is emitting. */
  z-index: 2;
}

/* The signalling unit's label has to clear its own rings, and the clearance is
   arithmetic rather than taste: the ring is 11px and scales to 9x, so it reaches
   a radius of ~50px. A label 15px off the centre sits well inside that and reads
   as a collision no z-index can fix.
   Placed BELOW at more than the ring's reach — above would collide with the
   copy's baseline at this column height. */
/* Clearance is arithmetic, not taste, and it has to be redone whenever the ring
   scale changes — which is why it is written as a formula rather than a number.
   The ring box is u*1.35 and scales to 8.2, so its radius reaches
   u * 1.35 * 8.2 / 2 = u * 5.54. The label sits just outside that.
   A previous pass used a flat 5.4 and the ring passed straight through it. */
.unit--live .tag { top: calc(50% + var(--u) * 6.1); }

/* The one that is emitting.
   Blue here is doing exactly the work §05 reserves it for — an emerging signal
   — and it is the only blue in the composition, which is what makes it read. */
/* The signalling unit is larger as well as blue: it is the subject of the
   composition, and size is the channel doing that work where colour alone
   would just be a differently-coloured dot of the same weight. */
.unit--live .dot {
  width: calc(var(--u) * 1.35);
  height: calc(var(--u) * 1.35);
  border-color: var(--signal-on);
  background: var(--signal-on);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--signal-on) 15%, transparent);
}
.unit--live .tag { color: var(--signal-on); }

/* The product's radar grammar: a ring expands from the unit, fading as it
   reaches. Two rings, staggered by half a period, so the emission reads as
   continuous rather than as a repeating blink. */
.ring {
  position: absolute;
  width: calc(var(--u) * 1.35);
  height: calc(var(--u) * 1.35);
  border-radius: 50%;
  border: 1.5px solid var(--signal-on);
  opacity: 0;
  animation: emit 3.8s cubic-bezier(.16, .68, .3, .98) infinite;
}
/* Three rings on a third-period stagger rather than two on a half — the
   emission reads as continuous, and at this size two left a visible gap. */
.ring.r2 { animation-delay: 1.27s; }
.ring.r3 { animation-delay: 2.53s; }

@keyframes emit {
  0%   { transform: scale(1);  opacity: 0; }
  12%  { opacity: .5; }
  60%  { opacity: .14; }
  100% { transform: scale(8.2); opacity: 0; }
}

/* An earlier, weaker emission.
 * Same blue — this is the same KIND of thing, caught sooner — but a smaller
 * dot, one ring instead of three, and a slower, dimmer pulse. Degrees of the
 * one signal rather than a second signal, which is what keeps Brand Guide §08's
 * "one meaningful signal" true with four units on screen.
 *
 * A second colour was considered and rejected: red or amber here would import
 * the product's health ramp (BRAND.md §3), and it would also contradict the
 * pitch — "signal before outcome" means catching movement before it is a
 * warning, so an alert dot would advertise the opposite product. */
.unit--early .dot {
  width: calc(var(--u) * 1.05);
  height: calc(var(--u) * 1.05);
  background: color-mix(in srgb, var(--signal-on) 55%, transparent);
  border-color: color-mix(in srgb, var(--signal-on) 70%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal-on) 9%, transparent);
}
.unit--early .tag { color: color-mix(in srgb, var(--signal-on) 72%, var(--muted)); }
.unit--early .ring {
  width: calc(var(--u) * 1.05);
  height: calc(var(--u) * 1.05);
  border-color: color-mix(in srgb, var(--signal-on) 62%, transparent);
  animation-duration: 5.6s;          /* slower: it is only beginning to move */
  animation-delay: .9s;
}
/* Its own clearance, from its own ring geometry: box u*1.05 scaling to 5.4
   reaches u*2.84, so the label sits just outside that. Smaller reach than the
   established signal, so it does not need the same gap. */
.unit--early .tag { top: calc(50% + var(--u) * 3.6); }

@keyframes emit-early {
  0%   { transform: scale(1);   opacity: 0; }
  14%  { opacity: .3; }
  100% { transform: scale(5.4); opacity: 0; }
}
.unit--early .ring { animation-name: emit-early; }

/* Stillness must not cost the signal.
 * The product makes this point explicitly: turning the animation off and
 * leaving the node looking ordinary means someone with reduced motion loses the
 * one mark saying this unit is signalling. Absence of a signal and absence of a
 * problem must not look the same.
 *
 * So reduced motion resolves the rings to a held state rather than removing
 * them — the unit still visibly emits, it simply does not move. */
@media (prefers-reduced-motion: reduce) {
  .ring    { animation: none; opacity: .34; transform: scale(3); }
  .ring.r2 { opacity: .2;  transform: scale(5.2); }
  .ring.r3 { opacity: .1;  transform: scale(7.4); }
  /* The early unit holds too, at its own weaker reach — so the difference
     between "moving" and "beginning to move" survives reduced motion. */
  .unit--early .ring { opacity: .22; transform: scale(3.2); }
}
.hero .eyebrow { margin-bottom: 22px; display: block; }
.hero .display { margin-bottom: 26px; }
.hero .lead { margin-bottom: 38px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* The brand's recurring device: a dot on a rule, marking a position on a line.
   It appears on the guide's cover and closing slides. Blue because it marks a
   position — "movement" and "selection" are both on §05's semantic list. */
.tick {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 58px;
}
.tick i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--signal-on);
  flex: none;
}
.tick span {
  height: 1px;
  width: 190px;
  background: linear-gradient(to right, var(--signal-on), transparent);
}

/* Sections fade up on arrival. Slight, because this is a document and a page
   where every block animates is hard to read. site.js adds .in; under reduced
   motion it adds .in to everything up front rather than leaving it hidden.

   Still true of TEXT. Since 21 Sep 2026 the diagrams have their own scroll-tied
   motion — see "SECTION MOTION" at the end of this file. */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s cubic-bezier(.22,.75,.28,1),
              transform .6s cubic-bezier(.22,.75,.28,1);
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none; }
}

/* ---------- Mobile ---------- */
/* The field needs room to read as a composition. Below this the hero is one
   column and the units sit under the copy rather than beside it. */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .field { --u: 14px; min-height: 320px; max-width: 440px; margin: 0; }
}

@media (max-width: 860px) {
  #nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 66px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--gutter) 22px;
    background: var(--field);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  body.nav-open .nav-links { display: flex; }
  .nav-trigger { width: 100%; justify-content: space-between; font-size: 1rem; padding: 13px 0; }
  .mega {
    position: static;
    translate: none;
    min-width: 0;
    grid-template-columns: 1fr;
    box-shadow: none;
    border: 0;
    background: none;
    padding: 0 0 8px 10px;
    opacity: 1;
    visibility: hidden;
    height: 0;
    overflow: hidden;
  }
  .nav-item.open .mega { visibility: visible; height: auto; translate: none; }
  .hero { min-height: 0; padding: 60px 0; }
  .hero-in .display, .hero-in .lead { max-width: none; }
}

/* ---------- Bands ----------
 * Sections have generous vertical space and NO background of their own. That is
 * the whole point of the scrolling field: a band with its own ground would chop
 * the landscape into strips, and the terrain would stop being one place. */
.band { padding: clamp(70px, 11vh, 130px) 0; }
.band-head { max-width: 58ch; }
.band-head .eyebrow { display: block; margin-bottom: 18px; }
.band-head .h2 { margin-bottom: 20px; }

/* A single sentence given the weight of a section. Larger than the lead and in
   the full text colour, because it is the claim rather than the explanation. */
.statement {
  margin-top: 46px;
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  line-height: 1.34;
  letter-spacing: -.015em;
  max-width: 30ch;
}

/* ---------- Lifecycle ----------
 * Install → Outcome, with the later stages marked. The blue is semantic: it
 * marks where the evidence becomes legible and the intervention is still
 * possible. If it did not mean that, it should not be blue (§05). */
.lifecycle {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
  margin-top: 52px;
  position: relative;
}
.lifecycle li {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-right: 8px;
}
/* The connecting rule sits behind the dots, drawn per item so it stops at the
   last one rather than running off the end. */
.lifecycle li::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 3px;
  height: 1px;
  background: var(--line);
}
.lifecycle li:last-child::before { right: calc(100% - 7px); }
.lifecycle li.on::before { background: color-mix(in srgb, var(--signal-on) 55%, transparent); }
.lifecycle i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  position: relative;
  z-index: 1;
}
.lifecycle li.on i { background: var(--signal-on); }
.lifecycle span {
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 600;
  color: var(--muted);
}
.lifecycle li.on span { color: var(--on-field); }

/* ---------- Sources ---------- */
.sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 50px;
}
.src {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--field-2) 62%, transparent);
}
.src-k { font-size: .9375rem; font-weight: 600; margin-bottom: 5px; }
.src-v { font-size: .8125rem; color: var(--muted); }

/* The one that is not a source but the result. Blue because it marks the
   resolved state — "evidence", on the semantic list. */
.src--out {
  border-color: color-mix(in srgb, var(--signal-on) 55%, transparent);
  background: color-mix(in srgb, var(--signal-on) 8%, transparent);
}
.src--out .src-k { color: var(--signal-on); }

/* ---------- Voice ---------- */
.says {
  margin-top: 46px;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  max-width: 62ch;
}
.say {
  background: var(--field);
  padding: 20px 22px;
  font-size: 1.0625rem;
  letter-spacing: -.008em;
}
/* A figure is blue because it is a forecast — the semantic test, applied. */
.fig { color: var(--signal-on); font-variant-numeric: tabular-nums; }


/* ---------- Footer ----------
 * Four columns: three of links mirroring the nav, and one for contact.
 * The link columns are auto-sized and the contact column takes the remainder,
 * because "Sectors" has six items and "Company" has two — equal columns would
 * leave a large hole under the short one. */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 56px 0 48px;
}
.foot-cols {
  display: grid;
  /* Equal link columns then a wider contact column. `1fr` on the links rather
     than `auto` is what spreads them across the footer — auto-sizing bunched
     all four against the left edge and left a third of the width empty. */
  grid-template-columns: repeat(3, 1fr) minmax(260px, 1.25fr);
  gap: 40px;
  align-items: start;
}
.foot-col { display: flex; flex-direction: column; align-items: flex-start; }

.foot-h {
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 600;
  color: var(--on-field);
  margin-bottom: 16px;
}
/* `:not(.btn):not(.foot-social a)` because this is a bare-element selector in a
   column that also contains a button and two icon links. Without the guard it
   flattens the button's padding to 5px 0 — which is what made it read as a
   full-width bar rather than a button, since a button with no horizontal
   padding has nothing holding its width in. */
.foot-col a:not(.btn):not(.foot-social a) {
  font-size: .875rem;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 0;
  transition: color .13s;
}
.foot-col a:not(.btn):not(.foot-social a):hover { color: var(--on-field); }

/* The contact column is wider and its content is prose, so it gets a measure. */
.foot-col--contact .foot-note { max-width: 30ch; margin-bottom: 16px; }
.foot-mail {
  font-size: .875rem;
  color: var(--signal-on) !important;   /* an address IS the contact point */
  margin-bottom: 18px;
}
/* `align-self: flex-start` because .foot-col is a COLUMN flex container, so its
   items stretch on the cross axis — which is the width. Without this the ghost
   button spans the whole column and reads as a bar rather than a button. */
.foot-btn { align-self: flex-start; margin-bottom: 22px; }

.foot-social { display: flex; gap: 8px; }
.foot-social a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  transition: color .13s, border-color .13s;
}
.foot-social a:hover { color: var(--on-field); border-color: color-mix(in srgb, var(--on-field) 30%, transparent); }
.foot-social svg { width: 14px; height: 14px; fill: currentColor; }

/* The base line, under a rule. Wordmark and one sentence — the legal block that
   would normally sit here is deliberately absent; see the note in index.html. */
.foot-base {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.foot .brandmark { padding: 0; opacity: .8; }
.foot .brandmark svg { height: 22px; }
.foot-note { font-size: .8125rem; color: var(--muted); }

@media (max-width: 900px) {
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
  .foot-col--contact { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .foot-cols { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .lifecycle {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 16px;
  }
  .lifecycle li { flex-direction: row; align-items: center; gap: 12px; padding: 0; }
  .lifecycle li::before { display: none; }
  .says { max-width: none; }
}

/* ---------- Insights ----------
 * A card gallery with NO thumbnails, and that is a decision rather than an
 * omission. Brand Identity §09 uses photography sparingly and requires it to be
 * documentary — real equipment, real environments. There is no such library, and
 * generic stock would violate the guide's own AVOID list ("stock innovation
 * poses", "decorative blue filters"). A text-led card also suits §07: the
 * finding leads, not an illustration of it.
 *
 * If a real image library arrives, cards can take a 16:9 media slot above
 * .post-meta without the rest of this changing. */

.band--head { padding-bottom: 20px; }
.band--tight { padding-top: 34px; }

/* A smaller display size than the homepage hero: this is a page title, not a
   positioning statement, and matching the hero would make every page shout. */
.display--sm { font-size: clamp(2.1rem, 4vw, 3.1rem); }
.band--head .eyebrow { display: block; margin-bottom: 18px; }
.band--head .display--sm { margin-bottom: 20px; }

.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  /* Row gap larger than column gap. The cards are text blocks of unequal
     length, so vertical separation is what stops two rows reading as one wall
     of prose — the columns already have the card edges doing that work. */
  gap: 34px 26px;
}

.post {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--field-2) 55%, transparent);
  transition: border-color .16s, background .16s, transform .16s;
}
.post:hover {
  border-color: color-mix(in srgb, var(--on-field) 22%, transparent);
  background: color-mix(in srgb, var(--field-2) 88%, transparent);
  transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) { .post:hover { transform: none; } }

/* Metadata leads the card. The kind and the date are what let a reader triage a
   list of findings, so they sit above the title rather than under it. */
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: .6875rem;
}
.post-kind {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 600;
  color: var(--signal-on);
}
.post-date, .post-read { color: var(--muted); letter-spacing: .02em; }
.post-read::before { content: '· '; }

.post-t {
  font-size: 1.0625rem;
  line-height: 1.32;
  letter-spacing: -.012em;
  font-weight: 500;
  margin-bottom: 10px;
}
.post-d {
  font-size: .875rem;
  line-height: 1.55;
  color: var(--muted);
}

/* The lead post. Full width, larger title, and a read-on affordance — one item
   given weight, the same discipline as the hero's single signalling unit. */
.post--lead {
  padding: 38px;
  margin-bottom: 34px;
}
.post--lead .post-t {
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  max-width: 24ch;
  margin-bottom: 14px;
}
.post--lead .post-d { font-size: .9375rem; max-width: 62ch; }
.post-go {
  display: inline-block;
  margin-top: 20px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--signal-on);
}
.post-go::after { content: ' →'; }

.pager {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.pager-now { font-size: .8125rem; color: var(--muted); margin-right: auto; }

@media (max-width: 620px) {
  .post--lead { padding: 24px; }
}

/* ---------- Pre-launch landing page ----------
 * The root of kiyuki.ai until launch: one hero, no navigation.
 *
 * A landing page with a nav invites the visitor to go looking for pages that
 * are not ready. One thing to read, one thing to do.
 *
 * 14 Oct 2026 (Will Gray): no longer the root — landing.html is stored as
 * coming-soon.html (/coming-soon, noindex) and keeps body.landing, so these
 * rules still apply to it. Delete them with that file. */

/* Full viewport, so the hero is the page rather than the top of one. The bar
   and footer are pulled out of the flow's centring by the flex column. */
body.landing .page {
  min-height: 100vh;
  min-height: 100svh;      /* mobile browser chrome, which 100vh ignores */
  display: flex;
  flex-direction: column;
}

/* Same bar height as .nav-in, and set the same way. It was `padding: 22px 0`,
   which gave 79px against the nav's 66 — so the wordmark sat 6px lower on the
   landing page than on the others. Nothing about the mark itself differed
   (21px tall, same padding, both pages); it was the bar around it. */
.lp-bar { padding: 0; }
.lp-bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

/* The hero takes the remaining height and centres in it. */
.lp {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 40px 0 60px;
}

/* The landing page's hero stacks differently from the homepage's: lead, then
   button, then a longer explanatory note. The homepage's .lead has a 38px
   bottom margin tuned for a two-button row with nothing after it, which here
   leaves the lead crowding the button and the note floating away from it. */

/* The hero's vertical rhythm is set by three `.hero`-scoped rules, and the
   landing page's hero is `.lp`, not `.hero` — so it inherited none of them and
   both the eyebrow and the sub-line sat flush against the headline. The 3px
   that remained was incidental leading, not a margin.

   Matched to the homepage's values rather than invented: the two heroes carry
   the same eyebrow, the same headline and the same sub-line, and a visitor
   moving between them should not see the type reflow.

   `.lead` and `.hero-cta` below are the deliberate exceptions — this hero
   stacks differently, with a note after the button. */
.lp .eyebrow { margin-bottom: 22px; display: block; }

/* The landing headline is a full sentence — 61 characters against the
   homepage's 31 — so it cannot take the homepage's display size without
   running to four lines and pushing the CTA off the first screen. Scaled down
   and given a wider measure, it settles at two.

   `text-wrap: balance` stops the last line orphaning a word, and the explicit
   max-width in ch keeps the line length readable rather than letting it run
   to the column edge. */
/* The landing page gives its copy more room than the homepage does. The
   homepage's hero-grid splits 1fr / .82fr, which suits a three-word headline
   and leaves the unit field a real presence; here the copy is a sentence plus
   a lead plus two notes, and 591px of 1280 made it a narrow ribbon down the
   left. The field shrinks but stays as atmosphere, which is its job on this
   page — the homepage is where it earns more space.

   The headline keeps a measure so it wraps on meaning rather than running the
   full column width, but 30ch rather than the 26 that was squeezing it. */
/* Scoped to the two-column breakpoint. `.lp .hero-grid` is more specific than
   the `.hero-grid { grid-template-columns: 1fr }` that collapses the layout at
   900px, so unscoped it kept the two columns on a phone and squeezed the copy
   into 36% of a 390px screen. */
/* The landing page gives its copy more room than the homepage: 1.35fr/.65fr
   rather than 1fr/.82fr. The homepage's split suits a three-word headline
   beside a full-size unit field; here the copy is a headline, a lead and a
   note, and the field is atmosphere rather than the subject.

   This only works because --u now scales with the field's own width (see
   .field above) — with a fixed unit size the narrower column clipped the
   rightmost serial labels, which is what "SN-3187" was. */
/* 1060, not 1024: at exactly 1024 the wider copy column leaves the field just
   short of its rightmost label. Below this the homepage's 1fr/.82fr split
   applies, which fits — and the copy is already using ~60% of the viewport
   there, so nothing is lost. */
@media (min-width: 1060px) {
  /* 1.05fr, not 1.35. The copy's longest line is the lead at ~58ch, and a
     1.35fr column is far wider than that — the text ended around 580px while
     its column ran to 833, leaving 269px of nothing before the first unit.
     Measuring the block box hid this: the box always fills the column, so it
     reported a 63px gap the eye could not see. Measure the rendered text runs
     instead (Range.getClientRects) when checking this. */
  /* The gap was never the grid — DevTools showed the field column starting
     immediately after the copy column, as it should. It was that the copy
     COLUMN was ~105px wider than the copy TEXT, and the field then began after
     all of it.

     Capping .hero-in to the width its text actually uses removes that dead
     band. The lead is the longest line at ~52ch, so the cap is set there and
     the field takes the space that frees up.

     Measure this with Range.getClientRects on the text, not the element box —
     a block box always fills its column, which is why an earlier pass measured
     a 63px gap that was visibly 269. */
  .lp .hero-grid,
  .hero .hero-grid { grid-template-columns: auto minmax(0, 1fr); }
  /* 66ch since 21 Sep 2026: the headline became "Real-time intelligence for
     every business-critical decision." and at 52ch it ran to four lines. The
     field gives up the width; it is atmosphere here and still fits its labels. */
  .lp .hero-in,
  .hero .hero-in { max-width: 80ch; }

  /* The field is ATMOSPHERE on this page, not the subject — the homepage is
     where it earns full size. Shrinking --u shrinks the unit marks and their
     serial labels together, so the composition stays proportional inside the
     narrower column instead of clipping "SN-31877" against its edge. The
     max-width stops it stretching on a wide screen once the copy has taken
     its share. */
  /* --u shrinks the unit marks and their serial labels together, so the
     composition stays proportional in the narrower column instead of clipping
     "SN-31877" against its edge. */
  /* No max-width. The field was capped at 440px inside a ~550px column, so
     its unused width sat between the copy and the first unit — on top of the
     grid gap. Two empty bands stacking is why moving the units could fix
     either the gap or the balance but never both: at 16% of a 440px box the
     first unit starts 70px into the field, at 16% of the full column it
     starts 88px earlier.

     --u still shrinks the marks and labels so nothing clips at the right
     edge; the box is free to fill the space it has. */
  /* Unit scale only. The sizing rules that keep the field inside its track
     live outside this query — see below — because they must apply at every
     width, and this one starts at 1060. */
  .lp .field,
  .hero .field { --u: 15px; }
}
/* The headline measure is set in ch so it wraps on meaning rather than
   wherever the column happens to end. 30ch fitted "Intelligence for the
   installed lifecycle" at two lines; adding "layer" pushed it to three with a
   badly ragged last line, because `balance` then evens the first two and
   leaves the remainder long. 38ch restores two lines with room for a word or
   two more — check this measurement if the headline changes again. */
/* Shared by both heroes since 7 Sep, when the homepage took the landing page's
   copy. A 54-character headline needs a smaller display size and a wider
   measure than the three-word one this page used to carry — at the homepage's
   74px it ran to three lines with a badly ragged last one. */
.lp .display,
.hero .display {
  font-size: clamp(2.3rem, 3.7vw, 3.2rem);
  max-width: 38ch;
  text-wrap: balance;
}
.lp .lead, .hero .lead { max-width: 52ch; text-wrap: balance; }
/* Order on this page is headline -> lead -> note -> CTA, so the button is the
   last thing before the tick rather than sitting mid-column. The lead now
   carries the argument and gets a little more air after it; the note tucks up
   under it, and the CTA takes a clear gap so it reads as the conclusion rather
   than part of the paragraph. */
/* One measure for the landing copy (21 Sep 2026). The headline, lead and note
   each had their own max-width in ch of their own font size, so three blocks
   ended at three different right edges. --lp-h is the headline's font size;
   14em of it is the width the two-line headline actually sets to, and the two
   paragraphs take the same value so all three share a right edge at every
   viewport. If the headline changes, re-measure the 14. */
/* .hero joined on the same day: the homepage carries the landing page's hero
   copy, so it takes the landing page's measure. The note is landing-only. */
.lp, .hero { --lp-h: clamp(2.3rem, 3.7vw, 3.2rem); --lp-measure: calc(var(--lp-h) * 14); }
/* The headline gets 8% more room than the shared measure. At exactly 14em the
   two-line setting had ~7px of slack on Linux Chrome (710px of text in 717),
   and macOS sets Inter a touch wider — enough to tip it onto three lines,
   where `balance` then evens them out by stranding "Real-time" alone on the
   first. The lead and note keep the 14em measure, so the right edges still
   agree; this only stops the headline sitting on a knife-edge. */
.lp .display, .hero .display { font-size: var(--lp-h); max-width: calc(var(--lp-measure) * 1.08); }
/* And if it ever does go to three lines, the break must not fall inside
   "Real-time intelligence". Not below 600px: on a phone the phrase is wider
   than the screen and nowrap would overflow it. */
@media (min-width: 600px) { .nw { white-space: nowrap; } }
/* The lead and note scale WITH the headline rather than on their own clamp.
   On independent clamps the lead went to three lines around 1100px while the
   headline stayed at two, so the shared right edge only held on a wide screen.
   The floors keep both readable on a phone, where the column is the limit
   anyway. */
.lp .lead, .hero .lead,
.lp .lp-note { max-width: var(--lp-measure); text-wrap: balance; }
.lp .lead, .hero .lead { font-size: max(.95rem, calc(var(--lp-h) * .385)); }
.lp .lp-note { font-size: max(.85rem, calc(var(--lp-h) * .29)); }
.lp .display { margin-bottom: 26px; }
.lp .lead { margin-bottom: 18px; }
.lp .lp-note { margin-top: 0; }
.lp .hero-cta { margin-top: 32px; margin-bottom: 4px; }

.lp-note {
  margin-top: 22px;
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 42ch;
}
/* The tick sits closer here than on the homepage: there is less below it, so
   the homepage's 58px leaves the composition bottom-heavy. */
.lp .tick { margin-top: 40px; }

/* The landing page now carries two notes: the positioning line, then the
   pre-launch caveat. The second is subordinate to the first — same size, less
   weight of colour — so the eye reads the argument before the housekeeping. */
/* The field must not push the page wider than the viewport, and this cannot
   live inside the 1060px query: at 1024 the rule simply did not apply, which
   is why three attempts to cap the width there changed nothing — computed
   max-width stayed `none`.

   The overflow itself comes from pairing `aspect-ratio: 1/.92` with
   `min-height: 420px`: the floor forces a width of 420/.92 = 457px, against a
   408px grid track at 1024. Letting the height scale with the viewport lets
   the box shrink into whatever track it is given. */
/* Applies to EVERY page, not just the landing one. .field pairs
   `aspect-ratio: 1/.92` with `min-height: 420px`, so the height floor forces a
   width of 420/.92 = 457px — wider than the grid track at 1024, which
   overflowed the page and gave it a horizontal scrollbar. Scoping this to .lp
   fixed the landing page and left the homepage broken in exactly the same way,
   which is how it was found a second time. */
.field { min-height: min(420px, 38vw); max-width: 100%; }

.lp-note + .lp-note { margin-top: 14px; }
.lp-note--quiet { color: color-mix(in srgb, var(--muted) 72%, transparent); }

.lp-foot { padding: 0 0 34px; }

@media (max-width: 900px) {
  .lp { padding: 24px 0 44px; }
  /* The unit field goes BELOW the copy on narrow screens, and shrinks: at this
     width it is atmosphere rather than a composition to read. */
  body.landing .field { min-height: 260px; }
}

/* ---------- Cookie consent ----------
 * A bar at the bottom, not a modal. The distinction is deliberate: a modal
 * that blocks the page until you choose makes "Accept" the fast way out, and
 * consent obtained by obstruction is not consent. This can be ignored, and
 * the page beneath it is fully readable and usable while it sits there.
 *
 * For the same reason Accept and Decline are the SAME size and weight, one
 * ghost and one primary only because a two-button row needs a visual anchor.
 * Do not make Decline a text link — a dark pattern is a legal risk here, not
 * just a taste question.
 *
 * The markup is built in consent.js; this styles it. */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;              /* above the nav panel, below nothing else */
  padding: 0 var(--gutter) max(16px, env(safe-area-inset-bottom));
  /* Off-screen until .is-in. Not `display:none` — that cannot transition, and
     the element needs to be in the layout for the slide to have somewhere to
     come from. */
  transform: translateY(110%);
  transition: transform .32s cubic-bezier(.22, .61, .36, 1);
}
.consent.is-in  { transform: translateY(0); }
.consent.is-out { transform: translateY(110%); }

@media (prefers-reduced-motion: reduce) {
  /* Consistent with the terrain, which holds still under the same setting. */
  .consent { transition: none; }
}

.consent-in {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
  justify-content: space-between;

  /* --field-2 is the raised-surface token, the same one the nav menu panel
     uses. It tracks the theme, so this needs no light/dark rules of its own. */
  background: var(--field-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  /* 30 Nov 2026 (Will Gray, "the banner is huge"): one line beside the
     buttons on a desktop, so the padding is modest — the 44px buttons set
     the height. */
  padding: 8px 8px 8px 16px;

  /* The one shadow on the site. It is here because this element floats over
     scrolling terrain and needs to read as detached from it; nothing else on
     the page has that problem. */
  box-shadow: 0 6px 28px rgb(0 0 0 / .22);
}

.consent-copy {
  font-size: .875rem;
  line-height: 1.45;
  color: var(--muted);
  flex: 1 1 280px;
  min-width: 0;
}

.consent-acts {
  display: flex;
  gap: 8px;
  flex: none;
}

/* The site's .btn is 43px tall, which is fine for a nav control and one short
   of the 44px WCAG 2.5.5 target size. These two are the only buttons on the
   site a visitor is REQUIRED to hit, and one of them is the one we would
   benefit from them missing — so they get the extra pixel rather than the
   benefit of the doubt. */
.consent-acts .btn { min-height: 44px; }

@media (max-width: 620px) {
  /* Full-width buttons rather than a cramped row. Both still equal. */
  .consent-in { padding: 10px 10px 10px 14px; }
  .consent-acts { width: 100%; }
  .consent-acts .btn { flex: 1; justify-content: center; }
}

/* The footer control that brings the choice back.
 *
 * TYPOGRAPHY. `font: inherit` is what a reset-styled button needs, but it is
 * also a SHORTHAND — it resets font-size to the inherited value and therefore
 * beat the .foot-note class the button also carries, rendering it at the
 * footer's 16px next to 13px text. The result read as the loudest thing in the
 * footer, which a preferences link is not. So the properties are set
 * individually and the size is taken from .foot-note's scale, not inherited.
 *
 * It is a control, so it stays underlined — but at the weight and colour of
 * the sentence beside it. */
.consent-reopen {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: .8125rem;        /* = .foot-note */
  font-weight: 400;
  line-height: inherit;
  letter-spacing: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  /* The underline should read as a hairline, not a rule. Muted text with a
     full-strength underline is the specific thing that made this shout. */
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: color .16s ease, text-decoration-color .16s ease;
}
.consent-reopen:hover {
  color: var(--on-field);
  text-decoration-color: currentColor;
}

/* Since 26 Nov 2026 (Will Gray) the footer's Cookie choices control is a
   cookie icon, not text: same button, same data-consent-reopen, its name in
   aria-label and title. A line icon (Lucide "cookie", ISC licence) in
   currentColor, 20px at a 1.5 stroke, in a 32px hit area; each footer sets
   its colour and hover (muted -> text here, as the text link was; the apex
   footers use their links' colours). */
.consent-reopen--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  text-decoration: none;
}
.consent-reopen--icon svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.consent-reopen:focus-visible {
  outline: 1.5px solid var(--signal-on);
  outline-offset: 2px;
  border-radius: 8px;
}

/* The baseline problem the alignment fix leaves behind: a <button> is
   inline-block and aligns on its own box, so it sat a pixel or two off the
   text beside it whatever the size. Both footers lay their row out with
   flex + align-items:center, which resolves it — but the landing page's
   footer had no such row until the rule further down, and the homepage's
   .foot-base centres a 17px wordmark against 13px text. Nudging here rather
   than in either footer keeps the fix with the thing that needs it. */
.foot-base .consent-reopen,
.lp-foot .consent-reopen { align-self: center; }

/* Pushed to the end of the base row, away from the sentence it was crowding.
   `auto` rather than a fixed gap so it sits against the right edge on a wide
   footer and simply wraps on a narrow one. */
.foot-base .consent-reopen { margin-left: auto; }

@media (max-width: 620px) {
  /* Wrapped onto its own line, the auto margin would push it to the right on
     its own row, which looks like a mistake rather than a decision. */
  .foot-base .consent-reopen { margin-left: 0; }
}

/* ---------- The preferences panel ----------
 * A centred modal, opened from the footer or from the banner's "Choose what to
 * allow". The banner is deliberately NOT this — see the note above it — but a
 * surface the visitor sought out can take the middle of the screen. */
.cs-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;                /* above the consent bar, which is 60 */
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgb(4 6 9 / .58);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .2s ease;
}
.cs-scrim.is-in { opacity: 1; }

/* The page behind a modal must not scroll. */
html.cs-locked, html.cs-locked body { overflow: hidden; }

.cs-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - var(--gutter) * 2);
  overflow-y: auto;
  background: var(--field-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 26px 22px;
  /* The same two-layer shadow the nav's mega panel uses, so raised surfaces on
     this site read as one family rather than each inventing a depth. */
  box-shadow: 0 24px 60px -18px rgb(0 0 0 / .5), 0 2px 8px rgb(0 0 0 / .18);
  transform: translateY(8px) scale(.99);
  transition: transform .22s cubic-bezier(.22, .61, .36, 1);
}
.cs-scrim.is-in .cs-panel { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .cs-scrim, .cs-panel { transition: none; }
}

.cs-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  margin-bottom: 8px;
}
.cs-intro {
  font-size: .875rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 20px;
}

.cs-rows { display: flex; flex-direction: column; }

.cs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 16px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.cs-row:last-child { border-bottom: 1px solid var(--line); }

/* The row's name is a disclosure button (30 Nov 2026, Will Gray): the
   description is collapsed by default so the panel does not grow to a screen
   and a half. It opens the text only — the switch beside it is the consent
   control, and the two never trigger each other. The chevron turns to say
   open/closed by shape, not colour. */
.cs-toggle {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  padding: 4px 6px 4px 2px;
  margin-left: -2px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--on-field);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
@media (hover: hover) {
  .cs-toggle:hover { background: color-mix(in srgb, var(--on-field) 6%, transparent); }
}
.cs-toggle:focus-visible {
  outline: 2px solid var(--signal-on);
  outline-offset: 2px;
}
.cs-chev {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform .18s cubic-bezier(.22, .61, .36, 1);
}
.cs-toggle[aria-expanded="true"] .cs-chev { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) {
  .cs-chev { transition: none; }
}

/* Name and vendor wrap together, so a vendor pushed to a second line on a
   phone lines up under the name rather than under the chevron. */
.cs-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;
  min-width: 0;
}
.cs-name {
  font-size: .9375rem;
  font-weight: 500;
}
/* The vendor named beside the purpose, not buried in the description. Whose
   cookies these are is the disclosure; "Analytics" alone is a euphemism. */
.cs-vendor {
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 400;
  color: var(--muted);
}
.cs-desc {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--muted);
  /* Indented under the name, past the chevron. */
  padding-left: 22px;
  margin: 2px 0 10px;
  max-width: calc(46ch + 22px);
}
.cs-desc[hidden] { display: none; }

/* The privacy notice (30 Nov 2026): the last row, same disclosure, no switch.
   Short headed paragraphs in the descriptions' own type, so it reads as part
   of the panel rather than a legal page pasted into it. */
.cs-privacy h3 {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--on-field);
  margin: 12px 0 2px;
}
.cs-privacy h3:first-child { margin-top: 0; }
.cs-privacy p { margin: 0; }
.cs-privacy p + p { margin-top: 6px; }
.cs-privacy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.cs-privacy a:focus-visible {
  outline: 2px solid var(--signal-on);
  outline-offset: 2px;
  border-radius: 2px;
}
.cs-privacy .cs-updated {
  margin-top: 12px;
  font-size: .75rem;
}
.cs-always {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-size: .6875rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--muted);
  /* Sits where the switch would be; the disabled switch is hidden below. */
}

/* The switch. A real <input type="checkbox"> restyled, so it keeps keyboard
   focus, the space key, and correct announcement — none of which a div with a
   click handler gets right without work that is easy to get subtly wrong. */
/* The switch's own tap target: a label holding only the input, 44x44 so a
   thumb finds it, centred where the switch sits. Nothing else is inside it,
   so the name beside it never flips consent. */
.cs-hit {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
/* Inside the label the switch is its only child, not a cell of the row. */
.cs-hit .cs-switch { grid-column: auto; grid-row: auto; }
.cs-switch {
  grid-column: 2;
  grid-row: 1;
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--on-field) 18%, transparent);
  border: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background .18s ease, border-color .18s ease;
}
.cs-switch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--field-2);
  translate: 0 -50%;
  transition: translate .18s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 1px 3px rgb(0 0 0 / .35);
}
.cs-switch:checked {
  background: var(--signal-on);
  border-color: transparent;
}
.cs-switch:checked::after { translate: 18px -50%; }
.cs-switch:focus-visible {
  outline: 2px solid var(--signal-on);
  outline-offset: 3px;
}
/* Locked rows say "Always on" in words instead. A switch that cannot move is
   a control that lies about being one. */
.cs-switch:disabled { display: none; }

@media (prefers-reduced-motion: reduce) {
  .cs-switch, .cs-switch::after { transition: none; }
}

.cs-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 20px;
}
.cs-foot .btn { min-height: 44px; }
/* "Reject all" pushed away from the other two: it is the opposite action, and
   a row of three equal buttons makes it easy to hit by accident. It stays the
   same size and weight as Accept — separation, not diminishment. */
.cs-foot [data-panel="reject"] { margin-right: auto; }

@media (max-width: 520px) {
  .cs-foot { flex-direction: column-reverse; }
  .cs-foot .btn { width: 100%; justify-content: center; }
  .cs-foot [data-panel="reject"] { margin-right: 0; }
}

.cs-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.cs-x:hover { color: var(--on-field); background: color-mix(in srgb, var(--on-field) 8%, transparent); }
.cs-x svg { width: 15px; height: 15px; }

/* The way through from the banner to the panel. Inline in the copy, so it is
   styled as a link rather than a third button competing with Accept/Decline. */
.consent-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--on-field);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  white-space: nowrap;
}
.consent-link:hover { text-decoration-color: currentColor; }

/* The landing page's footer is a bare .wrap rather than the homepage's
   .foot-base grid, so the consent control needs the row it would otherwise
   have inherited. */
.lp-foot .wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

/* ---------- Shared modal chrome ----------
 * Owned by modal.js and used by every modal on the site. A per-modal class
 * prefix (.wl-, .cs-) adds only what differs — width, padding, its own type.
 * The scrim, the lock, the lift and the close button live here once, because
 * three copies of a focus-managed overlay is how the third one ends up subtly
 * worse than the first. */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgb(4 6 9 / .58);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .2s ease;
}
.modal-scrim.is-in { opacity: 1; }

html.modal-locked, html.modal-locked body { overflow: hidden; }

.modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - var(--gutter) * 2);
  overflow-y: auto;
  background: var(--field-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 30px 26px;
  box-shadow: 0 24px 60px -18px rgb(0 0 0 / .5), 0 2px 8px rgb(0 0 0 / .18);
  transform: translateY(8px) scale(.99);
  transition: transform .22s cubic-bezier(.22, .61, .36, 1);
}
.modal-scrim.is-in .modal-panel { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .modal-scrim, .modal-panel { transition: none; }
}

.modal-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  z-index: 1;
}
.modal-x:hover { color: var(--on-field); background: color-mix(in srgb, var(--on-field) 8%, transparent); }
.modal-x svg { width: 15px; height: 15px; }

@media (max-width: 520px) {
  .modal-panel { padding: 26px 20px 22px; }
}

/* ---------- The waitlist form ----------
 * Only what differs from the shared chrome above. */
.wl-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  line-height: 1.2;
  margin-bottom: 10px;
  padding-right: 28px;        /* clear of the close button */
}
.wl-intro {
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 22px;
}
.wl-mono { font-family: var(--mono); font-size: .9em; }

.wl-field { margin-bottom: 16px; }

.wl-label {
  display: block;
  font-size: .8125rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.wl-hint {
  font-size: .8125rem;
  color: var(--muted);
  margin: -2px 0 6px;
}

.wl-input {
  width: 100%;
  font: inherit;
  font-size: .9375rem;
  color: var(--on-field);
  background: color-mix(in srgb, var(--on-field) 4%, transparent);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  transition: border-color .16s ease, background .16s ease;
}
.wl-input:hover { border-color: color-mix(in srgb, var(--on-field) 26%, transparent); }
.wl-input:focus {
  outline: none;
  border-color: var(--signal-on);
  background: color-mix(in srgb, var(--on-field) 6%, transparent);
}
.wl-input:focus-visible { outline: 2px solid var(--signal-on); outline-offset: 2px; }
/* An invalid field is marked with colour AND a message — never colour alone,
   which a red-green colourblind visitor cannot see. */
.wl-input.is-bad { border-color: #e5484d; }
/* The optional message (15 Oct 2026): same field, taller, grows by hand
   only downwards so the modal's width never changes. */
.wl-textarea { display: block; min-height: 6.5em; line-height: 1.5; resize: vertical; }

.wl-err {
  font-size: .8125rem;
  color: #e5484d;
  margin-top: 5px;
  min-height: 0;
}
.wl-err:empty { display: none; }

/* The consent tickbox. Left-aligned with its text, not centred on it: the
   label runs to three lines and a centred box drifts into the middle of the
   paragraph. */
.wl-field--check { margin-top: 20px; }
.wl-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.wl-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--on-field) 6%, transparent);
  cursor: pointer;
  position: relative;
  flex: none;
}
.wl-check input:checked {
  background: var(--signal-on);
  border-color: transparent;
}
.wl-check input:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--field-2);
  border-width: 0 2px 2px 0;
  rotate: 45deg;
}
.wl-check input:focus-visible { outline: 2px solid var(--signal-on); outline-offset: 2px; }
/* The unsubscribe line under the consent label: smaller and muted, indented
   to start where the label text starts (18px box + 10px gap). */
.wl-check-note {
  margin: 4px 0 0 28px;
  font-size: .75rem;
  line-height: 1.5;
  color: var(--muted);
}

.wl-acts {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.wl-acts .btn { min-height: 44px; }
.wl-acts .btn[disabled] { opacity: .6; cursor: default; }

.wl-form-err {
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.wl-form-err:empty { display: none; }
.wl-form-err a { color: var(--signal-on); }

/* Narrow screens: the form's actions stack, and the panel loses some of its
   padding. `.modal-panel` already narrows itself at this width — these are the
   waitlist form's own adjustments on top. */
@media (max-width: 520px) {
  .wl-acts { flex-direction: column-reverse; }
  .wl-acts .btn { width: 100%; justify-content: center; }
}


/* ══════════════════════════════════════════════════════════════════════════
   SECTION MOTION — added 21 Sep 2026
   ══════════════════════════════════════════════════════════════════════════
   Each section on /home has its own movement, and all of it is tied to SCROLL
   POSITION rather than fired once: scroll back up and it runs backwards.
   site.js measures each [data-scrub] block against the viewport and lights its
   [data-step] children in order by adding .lit; everything visual is here.

   This deliberately reverses the older note above [data-reveal] ("a page where
   every block animates is hard to read"). The answer to that worry is that
   only the DIAGRAMS move — headings and body copy still use the one slight
   fade — so the text is never something you wait for.

   THE HIDDEN STATES ARE GATED ON .scrub-ready, which site.js sets on <html>.
   No script, a script error, or reduced motion: the class is never set, or
   every step is lit at once, and the page simply shows everything. A diagram
   must never be invisible because an animation did not run. */

/* ---------- 1 · Hero units: arrive in order, leave in order ----------
   ARRIVE: a load animation, staggered by --i. `backwards`, not `both` — a
   `forwards` fill would pin opacity at 1 and the scroll-out below could never
   take over.
   LEAVE: site.js writes --away (0 at the top → 1 after ~half a screen) on the
   field. Each unit's opacity is that value offset by its index, so they go
   one at a time in the order they came; the field also lifts a little faster
   than the page, which is the parallax. */
.field .unit:nth-child(1) { --i: 0; }
.field .unit:nth-child(2) { --i: 1; }
.field .unit:nth-child(3) { --i: 2; }
.field .unit:nth-child(4) { --i: 3; }
@keyframes unit-in {
  from { opacity: 0; scale: .4; }
  to   { opacity: 1; scale: 1; }
}
.field .unit {
  animation: unit-in .7s cubic-bezier(.22,.75,.28,1) backwards;
  animation-delay: calc(.35s + var(--i, 0) * .28s);
  opacity: clamp(0, calc(1 - (var(--away, 0) * 5.5 - var(--i, 0))), 1);
}
.field { translate: 0 calc(var(--away, 0) * -70px); }

/* ---------- 2 + 5 · Timelines draw left to right ----------
   Each stop fades in and its rule draws from the left, so the line appears to
   travel. The rule belongs to the stop it LEAVES, which is why they share a
   step rather than alternating. */
.scrub-ready .lifecycle li {
  transition: opacity .45s ease, translate .45s cubic-bezier(.22,.75,.28,1);
}
.scrub-ready .lifecycle li::before {
  transform-origin: left center;
  transition: transform .6s cubic-bezier(.22,.75,.28,1) .1s;
}
.scrub-ready .lifecycle li:not(.lit) { opacity: 0; translate: -14px 0; }
.scrub-ready .lifecycle li:not(.lit)::before { transform: scaleX(0); }

/* ---------- 3 · What it reads: two columns ---------- */
.reads {
  display: grid;
  /* Systems LEFT, argument RIGHT at two columns (reversed 21 Sep 2026), which
     also alternates with section 4 below, where the visual is on the right.
     Placement is by grid AREA, not DOM order: the markup stays heading →
     systems, so one column — and a screen reader — still gets the heading
     first. Do not "fix" this by reordering the HTML. */
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  grid-template-areas: "sources head";
  column-gap: clamp(40px, 7vw, 110px);
  align-items: center;
}
.reads-head { grid-area: head; }
.reads .sources {
  grid-area: sources;
  grid-template-columns: 1fr 1fr;   /* two columns of three */
  margin-top: 0;
}
/* Inside .reads the description is a sentence, not a one-word label. */
.reads .src-v { font-size: .875rem; line-height: 1.5; }
.reads .src-k { margin-bottom: 7px; }

/* The six arrive from the left edge, now that they sit on that side. */
.scrub-ready .reads .src {
  transition: opacity .5s ease, translate .5s cubic-bezier(.22,.75,.28,1),
              border-color .25s ease, background-color .6s ease;
}
.scrub-ready .reads .sources .src:not(.lit) { opacity: 0; translate: -26px 0; }
/* Hover: border and title take Signal Blue. Scoped to .lit so a block that
   has not arrived yet cannot flash blue under a passing cursor, and to
   devices that actually hover, so a tap on a phone does not leave one stuck. */
.reads .src { transition: border-color .25s ease; }
.reads .src-k { transition: color .25s ease; }
@media (hover: hover) {
  .reads .src:hover,
  html:not(.scrub-ready) .reads .src:hover {
    border-color: color-mix(in srgb, var(--signal-on) 70%, transparent);
  }
  .reads .src:hover .src-k { color: var(--signal-on); }
}

/* ---------- 4 · Evidence before answers: the node panel ----------
   A redrawing of the product's node panel — see the long note in index.html
   for why it is drawn here rather than imported, and who decided it.

   .pm ("product mock") is a SEALED SCOPE. The four ramp colours are declared
   on it and used only inside it: BRAND.md §3 bans them as page decoration and
   allows them inside a depiction of the product, and scoping the custom
   properties is what makes that rule structural rather than a promise.
   The values are the product's, copied — not linked — per this repo's
   standalone rule. If the product's ramp changes, this goes stale quietly;
   that is the accepted cost of an illustration. */
.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  column-gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.pm {
  --pm-c: #ff5b6e;   /* critical */
  --pm-r: #e8b33a;   /* at risk  */
  --pm-h: #3fd0f0;   /* healthy  */
  --pm-n: #4a7ba8;   /* no data  */
  --pm-panel: #161b23;
  --pm-inset: #1e242e;
  margin: 0;
}
[data-theme="light"] .pm {
  --pm-c: #c2102c; --pm-r: #a35c04; --pm-h: #12627f; --pm-n: #7a8794;
  --pm-panel: #f6f7f9;
  --pm-inset: #e6e8ec;
}
.pm-c { background: var(--pm-c); } .pm-r { background: var(--pm-r); }
.pm-h { background: var(--pm-h); } .pm-n { background: var(--pm-n); }

/* The hero's unit, reused: .ring / .dot / .tag and the unit--live rules above
   do the drawing. This only gives it a box and a size.

   It lives under the copy in the left column. The box is sized from the ring
   arithmetic rather than by eye: the rings reach u * 5.54 from the centre and
   the tag hangs at u * 6.1 below it, so the box is 2 * 5.54u wide and tall
   enough for the tag's line as well. */
.pm-node {
  --u: 17px;
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--u) * 11.1);
  height: calc(var(--u) * 11.1);
  margin-top: 30px;
  margin-bottom: calc(var(--u) * 1.4);   /* the tag sits outside the box */
}

.pm-panel {
  position: relative; z-index: 2;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--pm-panel);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / .55);
  overflow: hidden;
  font-size: .875rem;
}
.pm-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.pm-chip {
  width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  color: var(--pm-c);
  background: color-mix(in srgb, var(--pm-c) 18%, transparent);
}
.pm-chip svg { width: 14px; height: 14px; }
.pm-title { font-weight: 600; font-size: .9375rem; }
.pm-x { margin-left: auto; color: var(--muted); font-size: 1.1rem; line-height: 1; }

.pm-status { padding: 14px; border-bottom: 1px solid var(--line); display: grid; gap: 9px; }
.pm-status-l { display: flex; align-items: center; gap: 8px; }
.pm-status-l b { font-weight: 500; }
.pm-status-l span, .pm-legend { font-family: var(--mono); font-size: .8125rem; color: var(--muted); }
.pm-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pm-bar { display: flex; gap: 3px; height: 8px; }
.pm-bar i { border-radius: 3px; }
.pm-legend { display: flex; gap: 16px; }
.pm-legend span { display: inline-flex; align-items: center; gap: 7px; }

.pm-chat { padding: 16px 14px 6px; display: grid; gap: 8px; }
.pm-msg {
  max-width: 92%;
  padding: 9px 12px;
  border-radius: 10px 10px 10px 3px;
  background: var(--pm-inset);
  line-height: 1.45;
}
.pm-msg--me {
  justify-self: end;
  border-radius: 10px 10px 3px 10px;
  background: color-mix(in srgb, var(--signal-on) 22%, var(--pm-inset));
}
.pm-msg--rec { margin-top: 4px; border-left: 2px solid var(--signal-on); border-radius: 3px 10px 10px 3px; }
.pm-msg--rec b { color: var(--signal-on); font-weight: 600; }
.pm-reading {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.pm-reading span {
  padding: 3px 7px; border-radius: 5px;
  border: 1px solid var(--line);
}
.pm-foot { padding: 8px 14px 14px; display: grid; gap: 10px; }
.pm-sugg { display: flex; flex-wrap: wrap; gap: 7px; }
.pm-sugg span {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--pm-inset);
  font-size: .75rem; font-weight: 500; color: var(--muted);
}
.pm-input { display: flex; gap: 8px; }
.pm-input span {
  flex: 1; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--pm-inset);
  color: var(--muted);
}
.pm-input i {
  width: 36px; border-radius: 8px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--pm-inset);
  font-style: normal; color: var(--muted);
}
/* THE SEQUENCE. Node, then the panel opens from it, then the conversation.

   Unlit messages COLLAPSE rather than holding their space. They held it at
   first, which kept the panel a fixed height but left a blank band between
   the last message and the suggestion chips until the recommendation arrived
   — it read as a layout fault. So the panel now grows as the conversation
   does, the way a chat does.

   That is why .proof-grid aligns to the top: centred, a growing panel would
   shift its own top edge, and the top edge is what site.js measures. */
.proof-grid { align-items: start; }
.scrub-ready .pm-chat > [data-step] {
  max-height: 140px;
  overflow: hidden;
  transition: opacity .5s ease, translate .5s cubic-bezier(.22,.75,.28,1),
              max-height .5s cubic-bezier(.22,.75,.28,1),
              padding .5s ease, margin .5s ease;
}
.scrub-ready .pm-chat > [data-step]:not(.lit) {
  max-height: 0; padding-block: 0; margin-block: -4px;  /* eats the grid gap */
}
.scrub-ready .pm [data-step],
.scrub-ready .pm-node {
  transition: opacity .5s ease, translate .5s cubic-bezier(.22,.75,.28,1),
              scale .5s cubic-bezier(.22,.75,.28,1), border-color .5s ease;
}
.scrub-ready .pm [data-step]:not(.lit) { opacity: 0; translate: 0 10px; }
.scrub-ready .pm-node:not(.lit) { opacity: 0; scale: .6; }
.scrub-ready .pm .pm-panel { transform-origin: left center; }
.scrub-ready .pm .pm-panel:not(.lit) { translate: -24px 0; scale: .96; }
/* The suggestion that was "clicked" lights when the question is asked. */
.pm-sugg span { transition: color .4s ease, border-color .4s ease; }
.pm:has(.pm-reading.lit) .pm-sugg-on,
html:not(.scrub-ready) .pm-sugg-on {
  color: var(--on-field);
  border-color: color-mix(in srgb, var(--signal-on) 60%, transparent);
}

/* ---------- 6 · The close: a second hero ----------
   Layout comes from .hero itself. These are only the differences: its units
   arrive on scroll rather than on load, and it does not need a full screen of
   height under a page that is already ending. */
.hero--close { min-height: 0; padding: clamp(70px, 11vh, 130px) 0 clamp(90px, 14vh, 170px); }
/* Units LEFT, copy RIGHT — the mirror of the top hero, for variety (21 Sep
   2026). Done with `order` inside the two-column breakpoint only, so below
   900px, where .hero-grid is one column, the DOM order stands and the copy
   comes first. The column tracks are swapped to match: the hero's tracks are
   positional (copy-sized, then the rest), and reordering the items without
   swapping them would hand the field the copy's track. */
@media (min-width: 901px) {
  .hero--close .hero-grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); }
  .hero--close .field { order: -1; }
}
@media (min-width: 1060px) {
  .hero--close .hero-grid { grid-template-columns: minmax(0, 1fr) auto; }
}
.hero--close .field .unit { animation: none; }
.scrub-ready .hero--close .field .unit {
  transition: opacity .6s ease, scale .6s cubic-bezier(.22,.75,.28,1);
}
.scrub-ready .hero--close .field .unit:not(.lit) { opacity: 0; scale: .4; }

/* ---------- 2 + 5 · Centred timeline sections ----------
   The two sections that are heading → timeline → statement have no second
   column, so left-aligned they hugged the viewport edge and left the right
   half empty. Centred, like the close.

   The timeline has to be REDRAWN for this, not just shifted: left-aligned,
   each stop's dot sits at the start of its column and its rule runs the
   column's width. Centred, the dot sits mid-column, so the rule runs from
   this dot's centre to the next one's — half a column each side — and the
   last stop has none. Still drawn left to right by the scrub. */
/* Wider measures than the left-aligned bands. A narrow column reads fine
   against a margin; centred in a 1100px field it looks pinched. */
.band--center .band-head { margin-inline: auto; text-align: center; max-width: 78ch; }
.band--center .lead { margin-inline: auto; max-width: 62ch; text-wrap: balance; }
/* HIERARCHY. Elsewhere .statement is larger than the lead and in full text
   colour — "the claim rather than the explanation". Here it comes AFTER the
   diagram as a closing remark, and at that size it outranked the lead under
   the heading, which is the more important sentence. So in these sections it
   is plain paragraph text: body size, muted, quieter than the lead. */
.band--center .statement {
  margin-inline: auto;
  text-align: center;
  text-wrap: balance;
  max-width: 66ch;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--muted);
}
.band--center .lifecycle { max-width: 920px; margin-inline: auto; }
@media (min-width: 721px) {
  .band--center .lifecycle li { align-items: center; text-align: center; padding-right: 0; }
  .band--center .lifecycle li::before { left: 50%; right: -50%; }
  .band--center .lifecycle li:last-child::before { display: none; }
}
/* Stacked (phone), the stops are a vertical list; centre the list as a block
   but keep each row's dot-then-label reading left to right. */
@media (max-width: 720px) {
  .band--center .lifecycle { width: fit-content; }
}

/* ---------- One column ---------- */
@media (max-width: 900px) {
  .reads { grid-template-columns: 1fr; grid-template-areas: "head" "sources"; row-gap: 36px; }
  /* One column of blocks only on a phone; a tablet still has room for two. */
  .reads .sources { grid-template-columns: 1fr 1fr; }
  .proof-grid { grid-template-columns: 1fr; row-gap: 40px; }
  .pm-node { --u: 12px; margin-top: 22px; }
}

/* Reduced motion: site.js lights every step up front; this removes the
   movement that would otherwise play once as it does so. */
@media (prefers-reduced-motion: reduce) {
  .field .unit { animation: none; opacity: 1; }
  .field { translate: none; }
  .scrub-ready [data-step],
  .scrub-ready .lifecycle li::before { transition: none !important; }
}
@media (max-width: 560px) {
  .reads .sources { grid-template-columns: 1fr; }
}

/* LibreDesk support widget (help.kiyuki.ai/widget.js, v2.9.0): the script sets
   a 90%-black drop shadow inline on its launcher button and its chat panel.
   No class or id on the button, so it is matched by its aria-controls, which
   points at the panel's id. !important is needed to beat the inline style.
   Re-check these selectors after a LibreDesk upgrade.
   The launcher's icon is the inbox's logo_url, set in LibreDesk, not here:
   https://kiyuki.ai/brand/kiyuki-chat-paper.png (coloured launcher) or
   kiyuki-chat-blue.png (light launcher) since 26 Oct 2026 (was
   kiyuki-mark-paper.png). */
button[aria-controls^="libredesk-widget-"] {
  filter: drop-shadow(0 1px 2px rgba(9, 14, 21, .14)) drop-shadow(0 4px 10px rgba(9, 14, 21, .10)) !important;
}
iframe[id^="libredesk-widget-"] {
  box-shadow: 0 2px 6px rgba(9, 14, 21, .08), 0 12px 32px rgba(9, 14, 21, .14) !important;
}
