/* Marketing site. Everything here builds on tokens.css, base.css and
   components.css; no color is invented and no Departure size is off the
   11 / 22 / 33 / 44 grid. Every page inherits this sheet; page-only rules
   belong in a page's own sheet. */

:root {
  /* The marketing site's measure is 1180px; the app is laid out on 1080 and shares the token sheet. */
  --page-max: 1180px;

  /* Large filled areas get their own dimmed token: over the near-black page an
     alpha reads as luminance, so this darkens mass (Cy, the CTA) without
     touching small type. --ph-mass-o is the same number as an opacity, for a sprite. */
  --ph-mass: rgba(var(--ph-rgb), .84);
  --ph-mass-o: .84;
}

/* == the shared page head == */

.page-head { padding: var(--s9) 0 var(--s2); }
.page-head__text { gap: 14px; }
.page-head__text .lede { font: var(--t-body); color: var(--ph-mute); max-width: 48em; }

/* == Cy, in whole multiples of the 24px sprite == */

.cy--144 { width: 144px; height: 144px; }
.cy--216 { width: 216px; height: 216px; }
.cy--264 { width: 264px; height: 264px; }

/* == the marketing topbar: a full-bleed band over a 1180 row, so the mark lines up with the page's left margin == */
.topbar {
  display: block;
  height: auto;
  padding: 0;
  gap: 0;
  background: var(--ink);
  border-bottom: var(--line) solid var(--ph-l3);
  z-index: 50;
}
.topbar__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  height: var(--chrome-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--page-pad);
  overflow: hidden;
}
.topbar__nav {
  margin-left: 12px;
  border-left: var(--line) solid var(--ph-l2);
  padding-left: 14px;
  flex: 1 1 auto;
  scrollbar-width: none;
}
.topbar__nav::-webkit-scrollbar { display: none; }

/* == the topbar's right-hand side: persistent top chrome is the one exception
   to the 44px floor, so these run compact at 40px; nothing goes under 26px == */

.topbar__tune {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  height: 40px;
  padding: 0 var(--s2);
  border: var(--line) solid var(--ph-l4);
  background: none;
  color: var(--ph-dim);
  flex: none;
  white-space: nowrap;
  cursor: pointer;
}
.topbar__tune:hover { background: var(--ph-wash); }
.topbar__signin { flex: none; }
.topbar__order {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--s4);
  background: var(--ph-mass);
  color: var(--ink);
  font: var(--dm11);
  letter-spacing: var(--track-button);
  text-shadow: var(--px-bold);
  white-space: nowrap;
  flex: none;
  -webkit-font-smoothing: none;
}
.topbar__order:hover { background: var(--ph); color: var(--ink); }

/* Narrow chrome sheds the nicety first, then the secondary link; the order button and the nav always survive. */
@media (max-width: 1000px) { .topbar__tune, .tune { display: none; } }
@media (max-width: 640px) { .topbar__signin { display: none; } }

/* == the TUNE panel: a design-time affordance; every value it can reach is already the shipped default == */

.tune {
  position: fixed;
  right: 18px;
  top: 72px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: 266px;
  max-height: calc(100vh - 104px);
  background: var(--surface);
  border: var(--line) solid var(--ph-l5);
  overflow: hidden;
}
.tune[hidden] { display: none; }
.tune__bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--ph);
}
.tune__title {
  font: var(--dm11);
  color: var(--ink);
  letter-spacing: var(--track-button);
  text-shadow: var(--px-bold);
  -webkit-font-smoothing: none;
}
.tune__close {
  border: 0;
  background: none;
  padding: 0;
  font: var(--dm11);
  color: var(--ink);
  text-shadow: var(--px-bold);
  cursor: pointer;
  -webkit-font-smoothing: none;
}
.tune__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.tune__group {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding-bottom: 12px;
  border-bottom: var(--line) solid var(--ph-l2);
}
.tune__group:last-child { padding-bottom: 0; border-bottom: 0; }
.tune__row { display: flex; align-items: center; justify-content: space-between; }
.tune__label {
  font: var(--dm11);
  color: var(--ph-dim);
  letter-spacing: var(--track-micro);
  -webkit-font-smoothing: none;
}
.tune__note { font: var(--t-caption); color: var(--ph-mute2); }
.tune__grid { display: grid; gap: 4px; }
.tune__grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.tune__pick {
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: var(--line) solid var(--ph-l4);
  background: none;
  font: var(--dm11);
  color: var(--ph-dim);
  white-space: nowrap;
  cursor: pointer;
  -webkit-font-smoothing: none;
}
.tune__pick:hover { color: var(--ph-text); border-color: var(--ph-l5); }
.tune__pick[aria-pressed="true"] { background: var(--ph); border-color: var(--ph); color: var(--ink); text-shadow: var(--px-bold); }

/* == reveal: JS adds .is-armed, so no-script keeps everything visible. State changes cut, they do not transition == */

.is-armed .reveal { opacity: 0; }
.is-armed .reveal.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .is-armed .reveal, .is-armed .reveal.is-in { opacity: 1; }
}

/* == generic marketing bits == */

.kicker { display: flex; align-items: baseline; gap: 12px; margin-bottom: var(--s4); }
.kicker__num { font: var(--dm11); color: var(--ph); -webkit-font-smoothing: none; }

.cardlist { display: flex; flex-direction: column; gap: var(--s2); }
.cardlist > li { list-style: none; font: var(--t-secondary); color: var(--ph-text2); }
ul.cardlist { margin: 0; padding: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s7); align-items: start; }

.tally { display: flex; align-items: center; gap: var(--s2); }
.tally__dot { width: 7px; height: 7px; flex: none; background: currentColor; }

/* == the atmosphere: a full-page starfield behind everything, the content
   and the footer in front of it == */

body { position: relative; }
#main, .sitefoot, .signoff { position: relative; z-index: 1; }

.stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* Two layers of phosphor behind a star mask, so the field re-tubes and the drift moves the mask. */
.stars__layer {
  position: absolute;
  inset: -40px;
  background-color: var(--ph);
  -webkit-mask-image: url("/assets/img/stars-dot.png");
  mask-image: url("/assets/img/stars-dot.png");
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
}
.stars__layer--near {
  opacity: .05;
  animation: drift 44s linear infinite;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}
.stars__layer--far {
  opacity: .08;
  animation: drift2 78s linear infinite;
  -webkit-mask-position: 96px 160px;
  mask-position: 96px 160px;
}
@keyframes drift {
  0% { -webkit-mask-position: 0 0; mask-position: 0 0; }
  100% { -webkit-mask-position: 0 512px; mask-position: 0 512px; }
}
@keyframes drift2 {
  0% { -webkit-mask-position: 96px 160px; mask-position: 96px 160px; }
  100% { -webkit-mask-position: 96px 672px; mask-position: 96px 672px; }
}
/* The twinkle pixels; each one's duration and delay are inline. */
.stars i {
  position: absolute;
  display: block;
  background: var(--ph);
  opacity: .28;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: .28; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.6); }
}
@media (prefers-reduced-motion: reduce) {
  .stars * { animation: none !important; }
}

/* == the sign-off band above the footer: the landscape, full bleed, bottom-aligned == */
.signoff { height: 170px; }
.signoff svg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  width: 100%;
  height: 110px;
  pointer-events: none;
}

/* == the corner Cy: one link to /preorder. Docked on the right-hand hill of
   the sign-off band, with his panel always showing; from 1400px he floats
   at the bottom right instead, never dropping below the landscape, and the
   panel shows on hover or focus, or at the ends of the page on a wide screen == */
.cy--72 { width: 72px; height: 72px; }
.corner {
  position: absolute;
  right: max(28px, calc((100% - 1180px) / 2 + 28px));
  bottom: 18px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-height: 72px;
  color: var(--ph);
}
.corner__cy { flex: none; display: block; }
.corner__panel {
  position: relative;
  z-index: 1;
  background: var(--em);
  box-shadow: 0 0 0 1px var(--ph-l5);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 34px;
}
.corner__say { font: 400 12px/1.4 var(--face-mono); color: var(--ph-mute); }
.corner__go {
  font: var(--dm11);
  color: var(--ph);
  letter-spacing: 1px;
  text-shadow: var(--px-bold);
  white-space: nowrap;
  -webkit-font-smoothing: none;
}
@media (min-width: 1400px) {
  .corner {
    position: fixed;
    right: 24px;
    bottom: var(--corner-bottom, 20px);
    z-index: 1000;
    isolation: isolate;
    transform: translateZ(0);
  }
  .corner__panel { display: none; }
  .corner:hover .corner__panel,
  .corner:focus-visible .corner__panel,
  .corner.is-open .corner__panel { display: flex; }
}

/* == a service with no 1-bit sprite yet: a 32px hairline tile with two Departure letters == */
.svc {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px var(--ph-l4);
  font: var(--dm11);
  color: var(--ph);
  letter-spacing: 0;
  -webkit-font-smoothing: none;
}
.svc--22 { width: 22px; height: 22px; }
/* A service with a sprite: the design system's 32px art as a mask over the
   phosphor, so it re-tubes; --m names the file. .svc-icon--brand shows the
   art in its own colors instead. */
.svc-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: block;
  background: var(--ph);
  -webkit-mask: var(--m) center / 100% 100% no-repeat;
  mask: var(--m) center / 100% 100% no-repeat;
}
.svc-icon--22 { width: 22px; height: 22px; }
.svc-icon--brand {
  background: var(--m) center / 100% 100% no-repeat;
  -webkit-mask: none;
  mask: none;
  image-rendering: pixelated;
}

/* == the footer, on its own solid ground so the stars stop at it == */
.sitefoot { border-top: var(--line) solid var(--ph-l2); background: var(--ink); padding: 44px 0 52px; }
.sitemap {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.sitemap__brand { display: flex; flex-direction: column; gap: 12px; max-width: 280px; }
.sitemap__mark { display: flex; align-items: center; }
.sitemap__mark img, .topbar__mark img { display: block; width: 76px; height: 20px; image-rendering: pixelated; }
.sitemap__tag {
  margin: 0;
  font: 400 12px/1.6 var(--face-mono);
  color: var(--ph-mute2);
}
.sitemap__cols { display: flex; gap: 44px; flex-wrap: wrap; }
.sitemap__col { display: flex; flex-direction: column; gap: 10px; }
.sitemap__col .t-micro { color: var(--ph-dim); letter-spacing: 1px; }
.sitemap__col a { font: 400 13px/1.4 var(--face-mono); color: var(--ph-mute); }
.sitemap__col a:hover { color: var(--ph); }

/* 13px/1 rows are under the 44px hit floor, so the floor comes back where a finger is the pointer. */
@media (pointer: coarse) {
  .sitemap__col { gap: 0; }
  .sitemap__col a { min-height: var(--hit); display: inline-flex; align-items: center; }
}

/* == the flow diagram. The connectors are decoration: the cards are numbered
   and in reading order, so dropping the arrows below 900px loses nothing == */

.flow { display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: var(--s7); }
.flow > * { grid-column: 2; }
.flow > .flow__note { grid-column: 1; }

/* The note's row is a class rather than an inline style so the narrow layout can hand it back to auto placement. */
.flow__note {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  text-align: right;
  padding-right: var(--s1);
}
.flow__note--r1 { grid-row: 1; }
.flow__note--r5 { grid-row: 5; }
.flow__note--r7 { grid-row: 7; }
.flow__note-title {
  font: var(--dm11-title);
  letter-spacing: var(--track-micro);
  text-shadow: var(--px-bold);
  color: var(--ph);
  -webkit-font-smoothing: none;
}
.flow__note-body { font: var(--t-caption); color: var(--ph-mute2); }

.flow__step {
  background: var(--surface);
  box-shadow: 0 0 0 var(--line) var(--ph-l3);
  padding: var(--s5) var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  min-width: 0;
  width: 58%;
}
.flow__step--left { margin-left: 0; }
.flow__step--right { margin-left: 42%; }
.flow__step--mid { margin-left: 21%; }
.flow__step--wide { width: 100%; }
.flow__step--now { box-shadow: 0 0 0 var(--line) var(--ph); }
.flow__step--go { box-shadow: 0 0 0 var(--line) var(--go-l); }
.flow__step--no { box-shadow: 0 0 0 var(--line) var(--alert-l); }

.flow__head { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.flow__num { font: var(--dm11); color: var(--ph); -webkit-font-smoothing: none; }
/* A card title: 11px, pixel bold; hierarchy comes from color and case. */
.flow__who {
  font: var(--dm11-title);
  letter-spacing: var(--track-micro);
  text-shadow: var(--px-bold);
  color: var(--ph-bright);
  -webkit-font-smoothing: none;
}
.flow__step--go .flow__num, .flow__step--go .flow__who { color: var(--go); }
.flow__step--no .flow__num, .flow__step--no .flow__who { color: var(--alert); }

/* Where a vendor logo would go: two letters of the pixel face, no runtime fetch. */
.flow__chip {
  width: 24px;
  height: 24px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--line) solid var(--ph-l4);
  font: var(--dm11);
  color: var(--ph-dim);
  -webkit-font-smoothing: none;
}
.flow__big { font: var(--dm44); color: var(--ph); -webkit-font-smoothing: none; }
.flow__body { margin: 0; font: var(--t-body-sm); color: var(--ph-mute2); }
.flow__actor { display: flex; align-items: center; gap: var(--s3); }
.flow__actor-text { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }

.flow__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); }
.flow__pair > .flow__step { width: 100%; margin-left: 0; }

.flow__cx {
  display: block;
  width: 100%;
  height: auto;
  max-width: 1000px;
  margin: 0 auto;
  fill: var(--ph-dim);
}

/* == the device panel, at true 320x240. Geometry and colors are the shipped
   firmware's (apps/firmware/src/display/theme.h and card_geometry.h). The
   palette is literal hex on purpose: the glass is calibrated hardware, not a
   theme, so the tube picker must not reach it == */

.dev-frame { overflow-x: auto; }
/* A caption belongs beside the panel, never inside it. */
.dev-cap { font: var(--t-caption); color: var(--ph-mute2); margin: var(--s2) 0 0; max-width: 320px; }

.dev {
  --pnl:      #FFA200;  /* theme::kPhosphor    bands, primary type */
  --pnl-dim:  #C67D00;  /* theme::kPhosphorDim micro and field labels */
  --pnl-rule: #AD6D00;  /* theme::kPayloadRule the 2px payload border */
  --pnl-slot: #6B4500;  /* theme::kSlotEmpty   empty slots, spent blocks */
  --pnl-dead: #4A4A4A;  /* theme::kInactive    dead legend cells only */

  width: 320px;
  height: 240px;
  flex: none;
  background: #000;
  color: var(--pnl);
  display: flex;
  flex-direction: column;
  font-family: var(--face-pixel);
  box-shadow: 0 0 0 var(--line) var(--ph-l4);
  -webkit-font-smoothing: none;
}
.dev--go { background: var(--go); color: #000; }
.dev--alert { background: var(--alert); color: #000; }

/* Signal and battery: 1-bit like the sprites; a bar is drawn or it is not. */
.dev__meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.dev__meter i { width: 4px; background: currentColor; }
.dev__meter i:nth-child(1) { height: 6px; }
.dev__meter i:nth-child(2) { height: 12px; }
.dev__meter i:nth-child(3) { height: 18px; }
.dev__batt { width: 22px; height: 14px; border: 2px solid currentColor; padding: 2px; margin-left: 6px; }
.dev__batt > span { display: block; height: 100%; width: 60%; background: currentColor; }

.dev__band {
  height: 36px;
  flex: none;
  background: var(--pnl);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font: var(--dm11);
  letter-spacing: var(--track-button);
  text-shadow: var(--px-bold);
  white-space: nowrap;
}
.dev__band--go { background: var(--go); }
.dev__band--alert { background: var(--alert); }

/* The severity rule under the band: 1px dim ordinarily, 2px alert when raised. */
.dev__sev { height: 2px; flex: none; background: #000; border-top: 1px solid var(--pnl-dim); }
.dev__sev--alert { background: var(--alert); border-top-color: var(--alert); }

/* Content: 8px margins, 169px tall, y 44 to 213. */
.dev__body {
  flex: none;
  height: 169px;
  margin: 6px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.dev__body--center { justify-content: center; gap: 12px; align-items: flex-start; }
.dev__body--mid { justify-content: center; gap: 10px; }
.dev__body--row { flex-direction: row; align-items: center; gap: 12px; }

/* The 1px row the cell legend leaves at y 213. A full-width legend band eats it. */
.dev__hr { height: 1px; flex: none; background: #000; margin-top: auto; }

/* The payload box: the only region an integration can address. It cannot set a
   color, touch an edge, or write in a band, and there is no markup here that
   would let it try. */
.dev__payload {
  position: relative;
  border: 2px solid var(--pnl-rule);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dev__tab {
  position: absolute;
  top: -8px;
  left: 7px;
  background: #000;
  padding: 0 4px;
  font: var(--dm11);
  color: var(--pnl-rule);
  letter-spacing: 1px;
}
.dev__kicker { font: var(--dm11-title); color: var(--pnl-dim); letter-spacing: 1px; }
.dev__micro { font: var(--dm11); color: var(--pnl-dim); letter-spacing: 1px; }
.dev__subject { font: var(--dm33); }
.dev__field { display: flex; gap: 10px; font: var(--dm22-num); color: var(--pnl-dim); }
.dev__flabel { color: var(--pnl-slot); }
.dev__mid { font: var(--dm22-num); }
/* the countdown digits: 66, the one size the guide adds for the device */
.dev__huge { font: 400 66px/1 var(--face-pixel); }
.dev__shout { font: 400 22px/1.15 var(--face-pixel); }
.dev__shout-xl { font: var(--dm33); }
.dev__stack { display: flex; flex-direction: column; gap: 8px; }

.dev__quorum {
  height: 26px;
  flex: none;
  background: var(--pnl);
  color: #000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 7px;
  font: var(--dm11);
  letter-spacing: var(--track-button);
  text-shadow: var(--px-bold);
  margin-top: auto;
}

/* Four legend cells at 80px each, or one band across the width. The band's 3px
   rule is the same color as its type, as the firmware draws it. */
.dev__keys { height: 26px; flex: none; display: flex; background: #000; }
.dev__keys--band { height: 27px; border-top: 3px solid currentColor; margin-top: auto; }
.dev__keys--ink { border-top-color: #000; background: #000; }
.dev__keys > * {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font: var(--dm11);
}
.dev__keys__one { flex: 1; }
.dev__keys .k-info { color: var(--info); }
.dev__keys .k-go { color: var(--go); }
.dev__keys .k-alert { color: var(--alert); }
/* No function is two hyphens in gray, drawn in CSS so the rendered page's prose carries none. */
.dev__keys .k-off { color: var(--pnl-dead); }
.dev__keys .k-off::before { content: "--"; }

/* Masked entry: filled blocks, never digits. */
.dev__slots { display: flex; gap: 7px; }
.dev__slot {
  width: 30px;
  height: 38px;
  border-bottom: 3px solid var(--pnl-slot);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dev__slot--in { border-bottom-color: var(--pnl); }
.dev__slot i { display: block; width: 18px; height: 18px; background: var(--pnl); margin-bottom: 4px; }

.dev__drain { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.dev__drain i { display: block; height: 18px; border: 2px solid var(--pnl-slot); }
.dev__drain i.is-lit { background: var(--pnl); border-color: var(--pnl); }

.dev__field-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  min-height: 0;
}
.dev__field-full--row { flex-direction: row; align-items: center; gap: 14px; }

/* == a tabbed walkthrough. site.js wires [data-steps]; without the script every panel is simply visible == */

.steps { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--line); }
.steps__rail { display: flex; flex-direction: column; gap: var(--line); background: var(--ph-l2); }
.steps__tab {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--hit);
  padding: var(--s2) var(--s3);
  background: var(--surface);
  border: 0;
  color: var(--ph-dim);
  font: var(--dm11-title);
  letter-spacing: var(--track-button);
  text-align: left;
  cursor: pointer;
  -webkit-font-smoothing: none;
}
.steps__tab:hover { background: var(--ph-wash2); color: var(--ph); }
.steps__tab[aria-selected="true"] {
  background: var(--ph-wash2);
  box-shadow: inset 2px 0 0 var(--ph);
  color: var(--ph);
  text-shadow: var(--px-bold);
}
.steps__tab:focus-visible { outline: var(--line) solid var(--ph); outline-offset: -3px; }
.steps__num { font: var(--dm11); color: var(--ph); flex: none; -webkit-font-smoothing: none; }
.steps__panel {
  background: var(--surface);
  padding: var(--s5);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--s6);
  align-items: center;
}
/* display:grid outranks the user agent's [hidden] rule, so say it here. */
.steps__panel[hidden] { display: none; }
.steps__copy { display: flex; flex-direction: column; gap: var(--s3); }

/* == docs == */

.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s7); align-items: start; }
.docs__rail { display: flex; flex-direction: column; position: sticky; top: calc(var(--chrome-h) + var(--s5)); }
.docs__rail a {
  padding: var(--s2) var(--s2);
  min-height: var(--hit);
  display: flex;
  align-items: center;
  font: var(--dm11-title);
  color: var(--ph-dim);
  -webkit-font-smoothing: none;
}
.docs__rail a:hover { background: var(--ph-wash); color: var(--ph); }
.docs__rail a[aria-current="true"] { background: var(--ph); color: var(--ink); }
.docs__body { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
/* the topbar is sticky, so an anchored section must clear it */
.docs__body > [id], .sec[id] { scroll-margin-top: calc(var(--chrome-h) + var(--s4)); }
.docs__body h2 { font: var(--t-modal); color: var(--ph-bright); -webkit-font-smoothing: none; }
.codeblock { border: var(--line) solid var(--ph-l3); background: var(--surface); padding: var(--s4); overflow-x: auto; }
.codeblock__label { font: var(--dm11); color: var(--ph-dim); margin-bottom: var(--s3); display: block; -webkit-font-smoothing: none; }
.codeblock pre { border: 0; padding: 0; background: none; }

/* == prose (legal, long copy) == */

.prose { max-width: var(--measure); display: flex; flex-direction: column; gap: var(--s4); }
.prose h2 { font: var(--dm11-title); text-shadow: var(--px-bold); color: var(--ph-bright); margin-top: var(--s4); -webkit-font-smoothing: none; }
.prose p, .prose li { font: var(--t-body-sm); color: var(--ph-mute); margin: 0; }
.prose ul { margin: 0; padding-left: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }

/* == narrow == */

@media (max-width: 900px) {
  .split, .docs, .steps, .steps__panel { grid-template-columns: 1fr; }
  .steps__rail { flex-direction: row; overflow-x: auto; }
  .steps__tab { white-space: nowrap; }
  .steps__tab[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--ph); }
  .docs__rail { position: static; flex-direction: row; overflow-x: auto; }

  /* The diagram goes to one column, arrows dropped; the numbered cards still read in order. */
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow > *, .flow > .flow__note { grid-column: 1; }
  .flow__note { grid-row: auto; text-align: left; padding: 0 0 var(--s2); }
  .flow__cx { display: none; }
  .flow__step { width: 100%; margin-left: 0 !important; }
  .flow__pair { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
}

