/*
 * The look of the site. It starts from the page of the product itself: the same paper and ink, the same signal
 * colours for what can go, what waits and what is refused, the same sans-serif for running text and the same
 * monospace for IDs. On top of that the site sets its headings in a serif, as a logbook would, and gives each
 * of its three areas one of the signal colours: green for the product, blue for how it works, violet for the
 * documentation.
 *
 * Light or dark follows the system, or the choice made with the switch in the header, which theme.js writes
 * into the data-scheme attribute before the page is drawn. Every colour is a pair, light and dark.
 */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f6f5f1, #101214);
  --surface: light-dark(#ffffff, #181b1f);
  --raised: light-dark(#fbfaf7, #1e2227);
  --sunk: light-dark(#eeece5, #0b0d0f);
  --text: light-dark(#1d1f23, #e9eaec);
  --muted: light-dark(#5c616b, #a3a9b3);
  --line: light-dark(#e2dfd6, #2b3037);
  --line-strong: light-dark(#cfcbbf, #3b414a);
  --go: light-dark(#1a7a42, #4cc47f);
  --go-soft: light-dark(#e3f3e8, #153324);
  --wait: light-dark(#8a570b, #e0a94a);
  --wait-soft: light-dark(#fbf0d9, #3a2c12);
  --stop: light-dark(#b93029, #f0736c);
  --stop-soft: light-dark(#fbe6e4, #40201e);
  --busy: light-dark(#2a5bbd, #7ea6f5);
  --busy-soft: light-dark(#e4ecfb, #1b2a4a);
  --review: light-dark(#6f44b8, #b093f0);
  --review-soft: light-dark(#efe8fb, #2b2145);
  --idle: light-dark(#5f646d, #9096a0);
  --idle-soft: light-dark(#eeeeeb, #24282d);
  --bug: light-dark(#a8226a, #f28cbd);
  --code-bg: light-dark(#20242a, #15181c);
  --code-text: #e7e9ec;
  --code-muted: #9aa1ab;
  --code-line: light-dark(#20242a, #2b3037);
  --shadow: 0 1px 2px light-dark(rgb(20 20 30 / 0.06), rgb(0 0 0 / 0.4)), 0 10px 30px light-dark(rgb(20 20 30 / 0.08), rgb(0 0 0 / 0.35));
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", "Palatino Linotype", Palatino, "Book Antiqua", Cambria, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --accent: var(--go);
  --accent-soft: var(--go-soft);
  --top: 60px;
  --wide: 1240px;
}
:root[data-scheme="light"] { color-scheme: light; }
:root[data-scheme="dark"] { color-scheme: dark; }
:root[data-area="how"] { --accent: var(--busy); --accent-soft: var(--busy-soft); }
:root[data-area="docs"] { --accent: var(--review); --accent-soft: var(--review-soft); }
:root[data-area="none"] { --accent: var(--wait); --accent-soft: var(--wait-soft); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 20px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
main:focus-visible { outline: none; }
::selection { background: var(--accent-soft); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.quiet { color: var(--muted); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 10px; }

/* The signal: three lamps in a dark housing. The product's mark. */
.signal { display: inline-flex; gap: 4px; padding: 5px 7px; border-radius: 999px; background: light-dark(#1d1f23, #000000); border: 1px solid light-dark(#1d1f23, #3b414a); flex: none; }
.signal i { width: 8px; height: 8px; border-radius: 50%; background: #e0524b; }
.signal i:nth-child(2) { background: #e9b23d; }
.signal i:nth-child(3) { background: #43c178; }

/* ---- Header ---- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: calc(var(--wide) + 120px); margin: 0 auto; padding: 0 24px; min-height: var(--top); display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 1.32rem/1 var(--serif); letter-spacing: -0.01em; padding: 6px 4px; border-radius: 8px; }
.areas { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); }
.areas a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 15px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 550; white-space: nowrap; }
.areas a:hover { color: var(--text); }
.areas a[aria-current] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgb(20 20 30 / 0.12); }
.areas a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.areas a[data-area="product"][aria-current]::before { background: var(--go); }
.areas a[data-area="how"][aria-current]::before { background: var(--busy); }
.areas a[data-area="docs"][aria-current]::before { background: var(--review); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tool { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); text-decoration: none; font-size: 0.88rem; cursor: pointer; }
.tool:hover { color: var(--text); border-color: var(--line-strong); }
.tool kbd { font: 0.75rem/1 var(--mono); padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }
.scheme { width: 36px; padding: 0; justify-content: center; }
/* The search needs the script. Without it, its place in the header leads to the contents of the documentation, and says so. */
.when-script { display: none; }
.js .when-script { display: revert; }
.js .without-script { display: none; }
.when-dark { display: none; }
:root[data-scheme="dark"] .when-dark { display: block; }
:root[data-scheme="dark"] .when-light { display: none; }

/* ---- The frame of a page of "How it works" and of the documentation ---- */
.shell { max-width: calc(var(--wide) + 120px); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 236px minmax(0, 1fr) 208px; gap: 0 48px; align-items: start; }
.side, .onpage { position: sticky; top: var(--top); max-height: calc(100vh - var(--top)); overflow-y: auto; padding: 34px 0 40px; font-size: 0.9rem; scrollbar-width: thin; }
.side-fold > summary { display: none; }
.side ul, .onpage ul { list-style: none; margin: 0 0 18px; padding: 0; }
.side-title { margin: 0 0 6px; font: 600 0.7rem/1.4 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.side-title a { color: inherit; text-decoration: none; }
.side a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 7px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.side a:hover { color: var(--text); background: var(--sunk); }
.side a[aria-current="page"] { color: var(--text); font-weight: 600; background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.side a.open { color: var(--text); font-weight: 600; }
.side .side-children { margin: 2px 0 8px 2px; padding-left: 10px; border-left: 1px solid var(--line); }
.side .side-children a { font: 0.8rem/1.3 var(--mono); padding: 4px 10px; margin-left: 0; }
.onpage { padding-left: 18px; border-left: 1px solid var(--line); margin-top: 0; }
.onpage a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; line-height: 1.35; }
.onpage a:hover, .onpage a[aria-current] { color: var(--text); }
.onpage a[aria-current] { font-weight: 600; }
.onpage .level-3 a { padding-left: 14px; font-size: 0.84rem; }
.onpage code { font-size: 0.9em; padding: 0; border: 0; background: none; }
main { min-width: 0; }
.shell main { padding: 40px 0 72px; }

/* ---- Running text ---- */
.prose { max-width: 47rem; }
.prose > .table-scroll, .prose > .figure, .prose > pre, .prose > .ways, .prose > .cards { max-width: none; }
.page-head { margin-bottom: 30px; }
.crumbs { margin: 0 0 12px; font: 0.76rem/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.012em; line-height: 1.18; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.4vw, 2.9rem); margin: 0; }
h1 code { font-size: 0.86em; }
.prose h2 { font-size: 1.62rem; margin: 2.5em 0 0.6em; padding-top: 0.9em; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.24rem; margin: 2em 0 0.5em; }
.prose h4 { font-size: 1.05rem; margin: 1.6em 0 0.4em; }
.prose h3 code { font-size: 0.9em; }
.lead { margin: 16px 0 0; font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 42rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.page-head .lead { margin: 18px 0 0; }
.page-head .crumbs { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose li > ul, .prose li > ol { margin: 0.3em 0; }
.prose strong { font-weight: 650; }
.anchor { color: inherit; text-decoration: none; }
.anchor:hover::after { content: " #"; color: var(--accent); font-family: var(--mono); font-size: 0.8em; }
code { font: 0.86em/1.4 var(--mono); padding: 0.12em 0.36em; border-radius: 5px; background: var(--sunk); border: 1px solid var(--line); overflow-wrap: anywhere; }
a code { color: inherit; }
kbd { font: 0.82em/1 var(--mono); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--surface); }
pre { position: relative; margin: 0 0 1.25em; padding: 16px 18px; border-radius: 11px; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-line); overflow-x: auto; font: 0.84rem/1.6 var(--mono); tab-size: 2; scrollbar-color: #555c66 transparent; }
pre code { font: inherit; padding: 0; background: none; border: 0; color: inherit; overflow-wrap: normal; }
pre[data-terminal]:not([data-terminal="your"])::after { content: attr(data-terminal) " terminal"; position: absolute; top: 9px; left: 18px; font: 0.66rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--code-muted); }
pre[data-terminal]:not([data-terminal="your"]) { padding-top: 30px; }
pre[data-language]::before { content: attr(data-language); position: absolute; top: 7px; right: 12px; font: 0.66rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--code-muted); }
.copy { position: absolute; top: 6px; right: 8px; height: 26px; padding: 0 9px; border-radius: 6px; border: 1px solid #454c56; background: #2b3038; color: var(--code-text); font: 0.72rem/1 var(--sans); cursor: pointer; opacity: 0; transition: opacity 0.12s; }
pre:hover .copy, .copy:focus-visible { opacity: 1; }
pre:hover[data-language]::before, pre:focus-within[data-language]::before { content: none; }
@media (hover: none) { .copy { opacity: 1; } pre[data-language]::before { content: none; } }
.copy:focus-visible { outline-color: #9db8ff; }
blockquote.from-code { margin: 0 0 1.4em; padding: 16px 20px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; box-shadow: var(--shadow); }
blockquote.from-code p { margin: 0; }
blockquote.from-code footer { margin-top: 8px; font-size: 0.8rem; color: var(--muted); }
.from-code h3 { font-size: 1.12rem; }

.table-scroll { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; line-height: 1.5; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font: 600 0.7rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--raised); white-space: nowrap; }
tbody th { font-weight: 400; white-space: nowrap; }
.table-scroll.wide table { min-width: 880px; }
.matrix td, .matrix thead th { text-align: center; }
.matrix .yes { color: var(--go); font-weight: 650; }
.matrix .no { color: var(--muted); opacity: 0.75; }
.must { font: 600 0.68rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--stop); }
td .quiet { font-size: 0.86em; }
table code { white-space: nowrap; }
pre.wrap { white-space: pre-wrap; }
pre.wrap code { overflow-wrap: anywhere; }

.callout { margin: 0 0 1.4em; padding: 14px 18px 2px; border: 1px solid var(--line); border-left: 3px solid var(--busy); border-radius: 0 10px 10px 0; background: var(--surface); }
.callout-warn { border-left-color: var(--wait); }
.callout-today { border-left-color: var(--go); }
.callout-direction { border-left-color: var(--idle); border-style: dashed; border-left-style: solid; }
.callout-label { margin: 0 0 6px !important; font: 600 0.7rem/1.4 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--busy); }
.callout-warn .callout-label { color: var(--wait); }
.callout-today .callout-label { color: var(--go); }
.callout-direction .callout-label { color: var(--muted); }
/* Whether a row is true today, a direction that is not built, or some of each. A direction is drawn dashed, as what is not there yet. */
.horizon { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; font: 600 0.68rem/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; background: var(--go-soft); color: var(--go); }
.horizon.h-direction { background: none; border: 1px dashed var(--idle); color: var(--muted); }
.horizon.h-mixed { background: var(--wait-soft); color: var(--wait); }
.prose .horizon-list, .horizon-list { list-style: none; margin: 0 0 1.6em; padding: 0; border-bottom: 1px solid var(--line); }
.horizon-list li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 4px 30px; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.prose .horizon-list p, .horizon-list p { margin: 0; }
.horizon-list .horizon { margin-right: 6px; }
.horizon-list [data-horizon="direction"] > p:last-child, .horizon-list p[data-horizon="direction"] { color: var(--muted); }
.horizon-list.bridges li { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 0 0 1.6em; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; font-size: 0.9rem; }
.facts div { padding: 12px 16px; box-shadow: 0 0 0 0.5px var(--line); }
.facts dt { font: 600 0.68rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.facts dd { margin: 0; }
.ways { display: grid; gap: 0 18px; grid-template-columns: minmax(0, 1fr); }
.ways > div { min-width: 0; }
.way-name { margin: 0 0 6px !important; font: 600 0.7rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fold { margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.fold summary { padding: 12px 16px; cursor: pointer; font-weight: 600; }
.fold pre { margin: 0 12px 12px; white-space: pre-wrap; }

/* The lamp in front of a status. */
.lamp::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--idle); vertical-align: 0; }
.lamp.st-open::before { background: var(--go); }
.lamp.st-in_progress::before { background: var(--busy); }
.lamp.st-paused::before { background: var(--wait); }
.lamp.st-in_review::before { background: var(--review); }
.lamp.st-done::before { background: var(--go); box-shadow: 0 0 0 3px var(--go-soft); }
.lamp.st-cancelled::before { background: transparent; border: 2px solid var(--idle); }
.lamp.st-draft::before { background: transparent; border: 2px dashed var(--idle); }

/* ---- Pictures and diagrams ---- */
.figure { margin: 1.8em 0 2em; }
.figure figcaption { margin-top: 10px; font-size: 0.86rem; line-height: 1.5; color: var(--muted); max-width: 44rem; }
.frame { border: 1px solid var(--line-strong); border-radius: 13px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.frame img { width: 100%; }
.shot-phone { max-width: 300px; }
.shot-phone .frame { border-radius: 30px; border: 7px solid light-dark(#1d1f23, #33383f); }
.only-dark { display: none; }
:root[data-scheme="dark"] .only-dark { display: block; }
:root[data-scheme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme]) .only-dark { display: block; }
  :root:not([data-scheme]) .only-light { display: none; }
}
.diagram-scroll { overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 600px; height: auto; max-width: 760px; margin: 0 auto; }
.diagram { padding: 22px 22px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.diagram figcaption { padding-top: 12px; border-top: 1px dashed var(--line); }
svg text { font-family: var(--sans); fill: var(--text); }
svg .t-mono { font-family: var(--mono); }
svg .t-small { font-size: 11.5px; }
svg .t-muted { fill: var(--muted); }
svg .t-label { font: 600 10.5px var(--mono); letter-spacing: 0.08em; fill: var(--muted); }
svg .t-strong { font-weight: 650; }
svg .t-go { fill: var(--go); } svg .t-wait { fill: var(--wait); } svg .t-stop { fill: var(--stop); } svg .t-busy { fill: var(--busy); } svg .t-review { fill: var(--review); }
svg .box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.4; }
svg .box-raised { fill: var(--raised); stroke: var(--line-strong); stroke-width: 1.4; }
svg .box-sunk { fill: var(--sunk); stroke: var(--line); stroke-width: 1.2; }
svg .box-group { fill: var(--raised); stroke: var(--line-strong); stroke-width: 1.4; stroke-dasharray: 5 4; }
svg .box-go { fill: var(--go-soft); stroke: var(--go); stroke-width: 1.4; }
svg .box-wait { fill: var(--wait-soft); stroke: var(--wait); stroke-width: 1.4; }
svg .box-busy { fill: var(--busy-soft); stroke: var(--busy); stroke-width: 1.4; }
svg .box-stop { fill: var(--stop-soft); stroke: var(--stop); stroke-width: 1.4; }
svg .box-review { fill: var(--review-soft); stroke: var(--review); stroke-width: 1.4; }
svg .box-ink { fill: var(--code-bg); stroke: var(--code-line); stroke-width: 1.4; }
svg .t-ink { fill: var(--code-text); }
svg .wire { fill: none; stroke: var(--muted); stroke-width: 1.5; }
svg .wire-dash { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 4 4; }
svg .wire-go { fill: none; stroke: var(--go); stroke-width: 1.8; }
svg .wire-stop { fill: none; stroke: var(--stop); stroke-width: 1.8; }
svg .wire-wait { fill: none; stroke: var(--wait); stroke-width: 1.8; }
svg .wire-busy { fill: none; stroke: var(--busy); stroke-width: 1.8; }
svg .head { fill: var(--muted); } svg .head-go { fill: var(--go); } svg .head-stop { fill: var(--stop); } svg .head-wait { fill: var(--wait); } svg .head-busy { fill: var(--busy); }
svg .dot-go { fill: var(--go); } svg .dot-wait { fill: var(--wait); } svg .dot-busy { fill: var(--busy); } svg .dot-stop { fill: var(--stop); } svg .dot-review { fill: var(--review); } svg .dot-idle { fill: var(--idle); } svg .dot-bug { fill: var(--bug); }
/* The diagram of the statuses, which the build draws from the table of moves. */
.svg-statuses .move { stroke: var(--muted); stroke-width: 1.5; }
.svg-statuses .move-head { fill: var(--muted); }
.svg-statuses .status-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.4; }
.svg-statuses .status-name { font: 600 13px var(--mono); }
.svg-statuses .status-lamp { fill: var(--idle); }
.svg-statuses .st-open .status-lamp, .svg-statuses .st-done .status-lamp { fill: var(--go); }
.svg-statuses .st-in_progress .status-lamp { fill: var(--busy); }
.svg-statuses .st-paused .status-lamp { fill: var(--wait); }
.svg-statuses .st-in_review .status-lamp { fill: var(--review); }
.svg-statuses .st-done .status-box { fill: var(--go-soft); stroke: var(--go); }
.svg-statuses .st-cancelled .status-box { fill: var(--idle-soft); }

/* ---- Cards that lead to pages ---- */
.cards { list-style: none; margin: 0 0 1.6em; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.cards li { margin: 0; }
.card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s; }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.card-title { font: 600 1.08rem/1.25 var(--serif); }
.card-title::after { content: " →"; color: var(--accent); font-family: var(--sans); }
.card-says { font-size: 0.86rem; line-height: 1.45; color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 47rem; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; text-decoration: none; background: var(--surface); }
.pager a:hover { border-color: var(--accent); }
.pager-next { text-align: right; }
.pager-label { font: 600 0.68rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pager-title { color: var(--text); font-weight: 600; }

/* ---- Footer ---- */
.foot { margin-top: 40px; border-top: 1px solid var(--line); background: var(--raised); font-size: 0.88rem; }
.foot-in { max-width: calc(var(--wide) + 120px); margin: 0 auto; padding: 44px 24px 36px; display: grid; grid-template-columns: minmax(220px, 1fr) 2.4fr; gap: 28px 56px; }
.foot-brand p { margin: 14px 0 0; max-width: 26rem; color: var(--muted); }
.foot-brand strong { color: var(--text); font-family: var(--serif); font-size: 1.05rem; }
.foot-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-nav ul { list-style: none; margin: 0; padding: 0; }
.foot-nav li { margin: 4px 0; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--text); text-decoration: underline; }
.foot-note { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.foot-note a { color: inherit; }

/* ---- Search ---- */
.search { width: min(680px, calc(100vw - 24px)); max-height: min(78vh, 720px); margin: 9vh auto auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--surface); color: var(--text); box-shadow: 0 24px 80px rgb(0 0 0 / 0.35); overflow: hidden; }
.search[open] { display: flex; flex-direction: column; }
.search::backdrop { background: rgb(12 14 16 / 0.5); }
.search-form { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-form input { flex: 1; min-width: 0; padding: 8px 4px; border: 0; background: none; font-size: 1.05rem; color: var(--text); }
.search-form input:focus-visible { outline: none; }
.search-form:focus-within { box-shadow: inset 0 -2px 0 var(--accent); }
.search-close { height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--raised); color: var(--muted); font-size: 0.8rem; cursor: pointer; }
.search-status { margin: 0; padding: 10px 18px 6px; font-size: 0.82rem; color: var(--muted); }
.search-status:empty { display: none; }
.search-results { list-style: none; margin: 0; padding: 4px 8px 10px; overflow-y: auto; }
.search-results a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { background: var(--sunk); }
.search-where { display: block; font: 600 0.68rem/1.5 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.search-title { display: block; font-weight: 600; }
.search-text { display: block; font-size: 0.84rem; line-height: 1.45; color: var(--muted); }
mark { background: var(--wait-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---- The home page ---- */
.home { overflow-x: clip; }
.band { max-width: calc(var(--wide) + 48px); margin: 0 auto; padding: 0 24px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font: 600 0.74rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }
.eyebrow.e-wait::before { background: var(--wait); box-shadow: 0 0 0 4px var(--wait-soft); }
.eyebrow.e-stop::before { background: var(--stop); box-shadow: 0 0 0 4px var(--stop-soft); }
.eyebrow.e-busy::before { background: var(--busy); box-shadow: 0 0 0 4px var(--busy-soft); }
.eyebrow.e-review::before { background: var(--review); box-shadow: 0 0 0 4px var(--review-soft); }
.hero { padding: 64px 0 0; }
.hero-text { max-width: 54rem; }
.hero h1 { font-size: clamp(2.7rem, 1.4rem + 5.6vw, 5.4rem); line-height: 1.02; letter-spacing: -0.028em; }
.hero h1 em { font-style: italic; color: var(--go); }
.hero .lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.32rem); max-width: 44rem; margin-top: 26px; color: var(--text); }
.hero .lead + .lead { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }
.button { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.98rem; }
.button:hover { border-color: var(--text); }
.button.go { background: var(--text); border-color: var(--text); color: var(--bg); }
.button.go:hover { background: var(--go); border-color: var(--go); color: light-dark(#ffffff, #08130c); }
.hero-shot { position: relative; margin: 54px 0 0; }
.hero-shot .figure { margin: 0; }
.hero-shot .shot-phone { position: absolute; right: -14px; bottom: -42px; width: 21%; max-width: 250px; min-width: 150px; }
.hero-shot .shot-phone .frame { box-shadow: 0 24px 60px rgb(0 0 0 / 0.3); }

.horizons-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 34px 0 0; }
.horizons-pair article { padding: 20px 22px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.horizons-pair article[data-horizon="direction"] { border-style: dashed; border-color: var(--line-strong); background: none; }
.horizons-pair h2 { margin: 0 0 8px; font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); letter-spacing: -0.01em; }
.horizons-pair p { margin: 0; color: var(--muted); }
.horizons-pair .tag { margin: 0 0 12px; }
.horizons-pair .links { margin-top: 14px; font-size: 0.96rem; }
.limits { margin: 0; padding-left: 1.2em; max-width: 52rem; color: var(--muted); }
.limits li { margin: 0.35em 0; }

.station { padding: 96px 0 0; }
.home > .station:last-child { padding-bottom: 72px; }
.station h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); margin: 0 0 18px; max-width: 22ch; letter-spacing: -0.02em; }
.station > .band > p.say, .say { max-width: 44rem; font-size: 1.12rem; color: var(--muted); margin: 0 0 1em; }

.features { margin-top: 20px; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 64px; align-items: center; padding: 54px 0; border-top: 1px solid var(--line); }
.feature:first-child { border-top: 0; }
.feature:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature:nth-child(even) .feature-text { order: 2; }
.feature h3 { font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem); margin: 0 0 12px; }
.feature p { margin: 0 0 0.9em; color: var(--muted); }
.feature p strong { color: var(--text); }
.feature .more { font-weight: 600; text-decoration: none; }
.feature .more::after { content: " →"; }
.feature .more:hover { text-decoration: underline; }
.feature .figure { margin: 0; }
.feature .diagram { padding: 18px; }
.feature pre { margin: 0; font-size: 0.8rem; box-shadow: var(--shadow); }
.feature-show { min-width: 0; }
.tag { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 14px; padding: 4px 11px 4px 9px; border-radius: 999px; font: 600 0.72rem/1.4 var(--mono); letter-spacing: 0.05em; background: var(--go-soft); color: var(--go); }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag.t-wait { background: var(--wait-soft); color: var(--wait); }
.tag.t-stop { background: var(--stop-soft); color: var(--stop); }
.tag.t-busy { background: var(--busy-soft); color: var(--busy); }
.tag.t-review { background: var(--review-soft); color: var(--review); }
.tag.t-idle { background: var(--idle-soft); color: var(--idle); }

.also { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.also li { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.also h3 { margin: 0 0 6px; font-size: 1.12rem; }
.also p { margin: 0; font-size: 0.94rem; line-height: 1.5; color: var(--muted); }
.also a { display: block; margin-top: 8px; font-weight: 600; text-decoration: none; }
.also a::after { content: " →"; }
.also a:hover { text-decoration: underline; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 22px; align-items: start; }
.pair .figure { margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 22px 0 0; font-weight: 600; }
.links a { text-decoration: none; }
.links a::after { content: " →"; }
.links a:hover { text-decoration: underline; }
.say.fine { font-size: 0.98rem; margin-top: 26px; max-width: 52rem; }

.start { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 64px; align-items: start; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 46px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--go-soft); color: var(--go); font: 600 0.82rem var(--mono); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 36px; bottom: 4px; width: 2px; background: var(--line); }
.steps p { margin: 0 0 8px; }
.steps pre { margin: 0; }
.notyet { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px 40px; margin-top: 26px; }
.notyet h3 { font-size: 1.2rem; margin: 0 0 8px; }
.notyet ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.notyet li { margin: 0.3em 0; }

.plain { max-width: 46rem; margin: 0 auto; padding: 90px 24px 60px; }
.plain h1 { margin-bottom: 18px; }
.plain .eyebrow::before { background: var(--wait); box-shadow: 0 0 0 4px var(--wait-soft); }
.plain ul { padding-left: 1.2em; }

/* A hero that arrives: once, quietly, and not at all for those who asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero .eyebrow, .hero h1, .hero .lead, .hero .cta, .hero-shot { animation: arrive 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero h1 { animation-delay: 0.06s; }
  .hero .lead { animation-delay: 0.14s; }
  .hero .cta { animation-delay: 0.22s; }
  .hero-shot { animation-delay: 0.3s; }
  @keyframes arrive { from { opacity: 0; transform: translateY(14px); } }
  .signal i:nth-child(3) { animation: lamp 3.2s ease-in-out infinite; }
  @keyframes lamp { 50% { box-shadow: 0 0 0 3px rgb(67 193 120 / 0.28); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Narrower windows ---- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); gap: 0 40px; }
  .onpage { display: none; }
}
@media (max-width: 900px) {
  .feature, .feature:nth-child(even), .start, .pair { grid-template-columns: minmax(0, 1fr); }
  .also { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { padding: 40px 0; }
  .feature:nth-child(even) .feature-text { order: 0; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .horizon-list li, .horizon-list.bridges li { grid-template-columns: minmax(0, 1fr); }
  .horizons-pair { grid-template-columns: minmax(0, 1fr); }
  :root { --top: 0px; }
  body { font-size: 16.5px; }
  .top { position: static; }
  .top-in { padding: 10px 16px 12px; gap: 10px 12px; }
  .areas { order: 3; width: 100%; }
  .areas a { flex: 1; justify-content: center; padding: 8px 6px; font-size: 0.86rem; }
  .tool-word, .js .tool-word, .tool kbd, .js .tool kbd { display: none; }
  .tool { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .shell { display: block; padding: 0 16px; }
  .side { position: static; max-height: none; padding: 14px 0 0; overflow: visible; }
  .side-fold { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
  .side-fold > summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; font-size: 0.9rem; }
  .side-fold > summary::-webkit-details-marker { display: none; }
  .side-fold > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
  .side-fold[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
  .side-where { font: 600 0.68rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
  .side-here { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-lists { padding: 6px 14px 4px 24px; border-top: 1px solid var(--line); }
  .side a { padding: 8px 10px; }
  .shell main { padding: 26px 0 56px; }
  .band { padding: 0 16px; }
  .hero { padding-top: 40px; }
  .hero-shot { margin-top: 38px; }
  .hero-shot .shot-phone { position: static; width: auto; max-width: 250px; margin: 22px auto 0; }
  .station { padding-top: 68px; }
  .foot-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager span:empty { display: none; }
  .pager-next { text-align: left; }
  .prose h2 { font-size: 1.45rem; }
  th, td { padding: 9px 11px; }
  .table-scroll table { min-width: 540px; }
  .table-scroll.matrix table { min-width: 620px; }
  .diagram { padding: 14px 12px 12px; }
  /* A picture of a whole window keeps a size its words can be read at, and is moved sideways with a finger. */
  .prose .shot-window .frame { overflow-x: auto; }
  .prose .shot-window .frame img { width: 640px; max-width: none; }
  .plain { padding-top: 54px; }
}
@media (max-width: 560px) {
  .also { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .foot-nav { grid-template-columns: minmax(0, 1fr); }
  .brand { font-size: 1.22rem; }
}
@media print {
  .top, .side, .onpage, .foot, .pager, .copy, .skip { display: none !important; }
  .shell { display: block; }
  body { background: #ffffff; }
}
