:root{
  --paper:#FFFFFF;
  --panel:#FAFAFA;
  --panel-sky:#E8F3FA;
  --dash:#E2E2E2;
  --hairline:#D6D6D6;
  --edge:#8A8A8A;
  --ink:#0B0B0B;
  --ink-muted:#4A4A4A;
  --ink-faint:#6B6B6B;
  --sky:#A9D5EC;
  --sky-edge:#4C8FBA;
  --terminal-sky:#83C3E3;
  --night:#0B0B0B;
  --night-muted:#A8A8A8;
  --night-dash:#2F2F2F;
  --sans:'Hanken Grotesk',system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;
  --col:1260px;
  --inset:clamp(10px,2vw,24px);
  --pad:clamp(22px,3.2vw,44px);
  /* Vertical section padding. Doubled at every section boundary, so 60px here read as a
     120px void between one section's last line and the next heading — far more air than a
     long-form read wants. 38px puts that boundary at ~76px: still a clear break, not a gap. */
  --padv:clamp(24px,3vw,38px);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--sans);font-size:1.0625rem;line-height:1.55;font-weight:400;
  -webkit-font-smoothing:antialiased;
}
img,svg{max-width:100%;}
a{color:inherit;text-decoration:none;}
p,figure,pre,dl,dd{margin:0;}
::selection{background:var(--sky);color:var(--ink);}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px;}
.footer :focus-visible{outline-color:var(--paper);}
[id]{scroll-margin-top:84px;}

.vh{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;
}
.skip{
  position:absolute;left:-9999px;top:0;z-index:100;background:var(--ink);color:var(--paper);
  font-family:var(--mono);font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;
  padding:.75rem 1.1rem;
}
.skip:focus{left:0;}

.band{padding-inline:var(--inset);}
.col{
  max-width:var(--col);margin-inline:auto;
  /* Column edges stay ruled; the horizontal rule between sections is off — the vertical
     edges alone carry the sheet, and spacing separates the sections. */
  border-inline:1px dashed var(--dash);
}
.pad{padding:var(--padv) var(--pad);}
.tint{background:var(--panel);}
.tint-sky{background:var(--panel-sky);}

.display{
  font-size:clamp(2.45rem,6.4vw,5.6rem);font-weight:800;line-height:1.04;
  letter-spacing:-.035em;margin:0;overflow-wrap:break-word;text-wrap:balance;
}
.display .l{display:block;}
.hl{
  background:var(--sky);color:var(--ink);padding:.02em .18em;
  -webkit-box-decoration-break:clone;box-decoration-break:clone;
}
.h2{
  font-size:clamp(2.1rem,5vw,3.9rem);font-weight:700;line-height:1.06;
  letter-spacing:-.03em;margin:0;overflow-wrap:break-word;text-wrap:balance;
}
.h2--center{text-align:center;max-width:21ch;margin-inline:auto;}
/* Article section headings take the documented Title register rather than the Headline one:
   the landing page's section size is oversized for long-form reading, and DESIGN.md's
   "Big or Calm" rule forbids inventing a size between the two registers. */
.h2--section{font-size:1.22rem;line-height:1.3;letter-spacing:-.012em;}
.h3{font-size:1.22rem;font-weight:700;letter-spacing:-.012em;line-height:1.3;margin:0;}
.lead{font-size:1.1875rem;line-height:1.5;color:var(--ink-muted);max-width:52ch;margin:0;}
.lead--center{text-align:center;margin-inline:auto;}
.body{color:var(--ink-muted);max-width:60ch;margin:0;}
.fine{font-size:.9375rem;color:var(--ink-faint);margin:0;}
.stack>*+*{margin-top:1.1rem;}
.stack-lg>*+*{margin-top:1.7rem;}
.h3+.body{margin-top:.7rem;}
.tag+.body{margin-top:1rem;}

.chip{
  display:inline-block;font-family:var(--mono);font-size:.78rem;font-weight:500;
  letter-spacing:.08em;text-transform:uppercase;color:var(--ink);background:var(--paper);
  border:1px solid var(--hairline);border-radius:2px;padding:.34rem .7rem;line-height:1;
}
.tag{
  display:inline-block;font-family:var(--mono);font-size:clamp(.6rem,1.5vw,.6875rem);
  font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--ink);
  background:var(--paper);border:1px solid var(--hairline);border-radius:2px;
  padding:.24rem .5rem;line-height:1.2;white-space:nowrap;
}
.tag--sky{background:var(--panel-sky);border-color:var(--sky-edge);}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.55rem;height:44px;
  padding:0 1.35rem;border-radius:2px;font-family:var(--mono);font-size:.78rem;font-weight:500;
  letter-spacing:.08em;text-transform:uppercase;line-height:1;white-space:nowrap;
  border:1px solid transparent;
  transition:background-color .14s ease,border-color .14s ease,color .14s ease;
}
.btn-primary{background:var(--ink);color:var(--paper);}
.btn-primary:hover{background:#000000;}
.btn-secondary{background:var(--paper);color:var(--ink);border-color:var(--edge);}
.btn-secondary:hover{border-color:var(--ink);}
.btn .arw{transition:transform .14s ease;}
.btn:hover .arw{transform:translateX(3px);}
.actions{display:flex;flex-wrap:wrap;gap:.75rem;}
.actions--center{justify-content:center;margin-top:2rem;}

.txt-link{
  font-family:var(--mono);font-size:.78rem;font-weight:500;letter-spacing:.08em;
  text-transform:uppercase;text-decoration:underline;text-underline-offset:3px;
  text-decoration-thickness:1px;display:inline-flex;align-items:center;gap:.4rem;
}
.txt-link .arw{transition:transform .14s ease;}
.txt-link:hover .arw{transform:translateX(3px);}

.bar{background:var(--sky);color:var(--ink);}
.bar-in{
  max-width:var(--col);margin-inline:auto;min-height:40px;padding:.5rem var(--pad);
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.4rem 1rem;
  font-size:.9375rem;text-align:center;
}

.nav{
  position:sticky;top:0;z-index:40;background:var(--paper);
  border-bottom:1px solid var(--hairline);padding-inline:var(--inset);
}
.nav-in{
  max-width:var(--col);margin-inline:auto;height:64px;display:flex;align-items:center;
  gap:1.5rem;padding-inline:var(--pad);
}
.mark{
  display:flex;align-items:center;gap:.6rem;font-weight:700;font-size:1.0625rem;
  letter-spacing:-.02em;
}
.mark svg{display:block;flex:none;}
.nav-links{display:flex;gap:1.7rem;margin-left:auto;}
.nav-links a{color:var(--ink-muted);font-size:1rem;transition:color .14s ease;}
.nav-links a:hover,.nav-links a[aria-current]{color:var(--ink);}
.nav-actions{display:flex;align-items:center;gap:.75rem;}

/* Cells are ruled only where the rule carries structure: the vertical edge between columns,
   and the horizontal edge of a multi-column grid row. A single-column stack gets no rules —
   there the line would sit between one block of prose and the next, which spacing handles. */
/* Single column by default, and explicitly a shrinkable one: an auto track (and a grid item's
   auto minimum) is floored at the content's min-width, so a wide figure like the chart would
   push the cell past the viewport and scroll the whole page sideways instead of scrolling
   inside its own viewport. */
.cells{display:grid;grid-template-columns:minmax(0,1fr);}
.cells>*{border-left:1px dashed var(--dash);min-width:0;}
.c2{grid-template-columns:repeat(2,minmax(0,1fr));}
.c2>*{border-top:1px dashed var(--dash);}
.c2>:nth-child(2n+1){border-left:0;}
.c3{grid-template-columns:repeat(3,minmax(0,1fr));}
.c3>*{border-top:1px dashed var(--dash);}
.c3>:nth-child(3n+1){border-left:0;}
/* The index is the one stack where a horizontal rule earns its place: it marks where one
   post ends and the next begins, which spacing alone would leave ambiguous. */
.post-list>*+*{border-top:1px dashed var(--dash);}
.cell{padding:clamp(20px,2.4vw,30px) var(--pad);}
.cell--tight{padding:clamp(16px,2vw,24px) var(--pad);}

.head{padding:clamp(52px,7vw,92px) var(--pad) clamp(34px,4.4vw,52px);text-align:center;}
.head--left{text-align:left;}
.head .chip{margin-bottom:1.4rem;}
.head .lead{margin-top:1.3rem;}

.footer{
  background:var(--night);color:var(--night-muted);--dash:var(--night-dash);
  padding-inline:var(--inset);
}
.footer .col{border-top:0;}
.footer .mark{color:var(--paper);}
.foot-grid{
  display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr));
  gap:2.4rem 1.5rem;padding:clamp(44px,5.5vw,72px) var(--pad) clamp(32px,4vw,48px);
}
.foot-brand p{color:var(--night-muted);max-width:34ch;margin-top:1rem;font-size:1rem;}
.foot-col h2{
  font-family:var(--mono);font-size:.78rem;font-weight:500;letter-spacing:.08em;
  text-transform:uppercase;color:var(--paper);margin:0 0 1.1rem;
}
.foot-col ul{list-style:none;margin:0;padding:0;display:grid;gap:.7rem;}
.foot-col a{color:var(--night-muted);font-size:1rem;transition:color .14s ease;}
.foot-col a:hover{color:var(--paper);}
.foot-bottom{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:1rem;border-top:1px dashed var(--night-dash);padding:1.4rem var(--pad) 2.2rem;
  font-size:.9375rem;color:var(--night-muted);
}
.status{
  display:inline-flex;align-items:center;gap:.5rem;font-family:var(--mono);
  font-size:.6875rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;
  color:var(--terminal-sky);border:1px solid var(--terminal-sky);border-radius:2px;
  padding:.3rem .65rem;
}
.status i{
  width:7px;height:7px;border-radius:999px;background:var(--terminal-sky);
  animation:pulse 3.2s ease-in-out infinite;
}
@keyframes pulse{0%,100%{opacity:1;}50%{opacity:.35;}}

.prose{max-width:64ch;}
.prose p{color:var(--ink-muted);text-wrap:pretty;}
.prose p+p{margin-top:1.15rem;}
.prose a{
  color:var(--ink);text-decoration-line:underline;text-decoration-style:solid;
  text-decoration-thickness:1px;text-underline-offset:3px;
}
.prose a:hover{text-decoration-thickness:2px;}
.prose ul{list-style:none;margin:0;padding:0;}
.prose li{position:relative;padding-left:1.35rem;color:var(--ink-muted);}
.prose li+li{margin-top:.8rem;}
.prose li::before{content:'–';position:absolute;left:0;color:var(--ink);}

.table-wrap{overflow-x:auto;container-type:inline-size;}
.data-table{width:100%;min-width:34rem;border-collapse:collapse;}
.data-table th{
  background:var(--panel);color:var(--ink);font-family:var(--mono);font-size:.6875rem;
  font-weight:500;letter-spacing:.06em;text-transform:uppercase;text-align:left;
}
.data-table th,.data-table td{padding:.72rem .8rem;vertical-align:top;}
.data-table thead th:not(:first-child){text-align:right;}
.data-table td{
  color:var(--ink-muted);font-variant-numeric:tabular-nums;text-align:right;
}
.data-table tr:not(:last-child)>*{border-bottom:1px dashed var(--dash);}

/* Three columns do not fit a phone, and the scrolling wrapper then hides the rightmost one
   outright — on the cost table that is the cost. Once the wrapper is narrower than the table
   needs, stack each row into a header plus label/value pairs so no column can go missing.
   Keyed to the wrapper rather than the viewport: the two tables sit in containers of
   different widths, so they cross the threshold at different points. */
@container (max-width:34rem){
  .data-table{min-width:0;}
  .data-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);}
  .data-table tr{display:block;}
  .data-table tbody tr:not(:last-child){border-bottom:1px dashed var(--dash);}
  .data-table tr:not(:last-child)>*{border-bottom:0;}
  .data-table th[scope="row"]{display:block;}
  .data-table td{display:flex;justify-content:space-between;align-items:baseline;gap:1.2rem;}
  /* The column header each value belonged to, restored as an inline label. */
  .data-table td::before{
    content:attr(data-label);flex:none;text-align:left;
    font-family:var(--mono);font-size:.6875rem;font-weight:500;
    letter-spacing:.06em;text-transform:uppercase;color:var(--ink);
  }
}

/* Inline sample of a dataset row: mono, like the config block, but flowing in prose. */
.sample{display:block;background:var(--panel);border:1px solid var(--hairline);border-radius:2px;
  padding:.7rem .9rem;font-size:.875rem;line-height:1.5;overflow-x:auto;}
.codeblock{
  background:var(--panel);color:var(--ink);border:1px solid var(--hairline);border-radius:2px;
  padding:1rem 1.1rem;font-family:var(--mono);font-size:.875rem;line-height:1.7;
  overflow-x:auto;text-transform:none;white-space:pre;
}
.post-meta{
  color:var(--ink-faint);font-family:var(--mono);font-size:.6875rem;font-weight:500;
  letter-spacing:.06em;text-transform:uppercase;
}
.figcap{color:var(--ink-faint);font-size:.9375rem;max-width:60ch;margin-top:1rem;}

.chart-viewport{overflow-x:auto;}
/* The SVG scales with its container, and the viewBox is only 720 units wide — left to fill
   a 1180px cell it magnifies every label by ~1.6x, so the chart's own type ends up larger
   than the prose it sits beside. Cap it near its natural size so the figure reads at the
   same weight as the page. */
.pipe-svg{display:block;width:100%;height:auto;min-width:560px;max-width:720px;}
.pipe-svg *{vector-effect:non-scaling-stroke;}
.pipe-mono{fill:var(--ink);font:500 9px var(--mono);letter-spacing:.05em;}
.chart-svg{display:block;width:100%;height:auto;min-width:620px;max-width:760px;}
.chart-svg *{vector-effect:non-scaling-stroke;}
.chart-mono{
  fill:var(--ink-faint);font:500 10px var(--mono);letter-spacing:.06em;
  paint-order:stroke;stroke:#FFFFFF;stroke-width:3px;stroke-linejoin:round;
}
.chart-name{fill:var(--ink);font:500 13px var(--sans);}

@media(max-width:900px){
  .nav-links{display:none;}
  .nav-actions{margin-left:auto;}
}
@media(max-width:820px){
  .c2,.c3{grid-template-columns:minmax(0,1fr);}
  .c2>:nth-child(n),.c3>:nth-child(n){border-left:0;}
}
@media(max-width:760px){
  .foot-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .foot-brand{grid-column:1/-1;}
}
@media(max-width:700px){.chart-x--odd{display:none;}}
@media(max-width:560px){
  .nav-in{gap:.5rem;padding-inline:.65rem;}
  .mark{white-space:nowrap;}
  .nav-actions{gap:.4rem;}
  .nav .btn{padding:0 .7rem;font-size:.7rem;letter-spacing:.05em;gap:0;}
  .nav .btn .arw{display:none;}
}
@media(max-width:420px){.foot-grid{grid-template-columns:minmax(0,1fr);}}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{
    animation-duration:.001ms!important;animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
  .status i{animation:none;opacity:1;}
}

/* Configuration table: the setting names read as labels, the values as data. */
.cfg-table th[scope="row"]{font-family:var(--mono);font-size:.78rem;letter-spacing:.04em;
  text-transform:uppercase;color:var(--ink-faint);font-weight:500;white-space:nowrap;}
.cfg-table td{font-variant-numeric:tabular-nums;}

/* Budget levers: each one its own ruled cell. Bulleted, not numbered — they are things to
   spend on next in no particular order, and numbering would imply a sequence. */
.levers{margin:0;}
.levers dt{margin-bottom:.45rem;}
.levers dd{margin:0;max-width:60ch;color:var(--ink-muted);font-size:1.0625rem;line-height:1.55;}

/* The responsibility diagram is a lane table rather than a single chain, so it carries far more
   type per unit width than the grader pipe did. Hold its floor higher, or the 9px labels shrink
   below legibility on a narrow cell before the viewport scroller takes over. */
.pipe-svg--lanes{min-width:660px;}
/* Lane bands are structure, so they are dashed (the Dash/Solid Split); every box is an object and
   stays solid. */
.pipe-rule{stroke:var(--dash);stroke-width:1;stroke-dasharray:4 4;}
.pipe-lane{fill:var(--ink-faint);font:500 9px var(--mono);letter-spacing:.05em;}

/* `.prose ul` zeroes the list's own margin, which out-specifies the stack rule and collapses the
   gap between a paragraph and the list that follows it. Restore the stack's spacing for that case. */
.stack-lg>ul,.stack-lg>ol{margin-top:1.7rem;}
.stack>ul,.stack>ol{margin-top:1.1rem;}

/* An equation is neither chrome nor prose: it is an artifact quoted exactly, so it takes the
   verbatim-code treatment — Panel fill, solid hairline, mono uppercase caption above — and is set
   in the browser's math font rather than either brand face. */
.eq-cap{
  font-family:var(--mono);font-size:.6875rem;font-weight:500;letter-spacing:.06em;
  text-transform:uppercase;color:var(--ink-faint);margin:0 0 .55rem;
}
.eq-cap+.eq{margin-top:0;}
/* Sized to the widest equation, not to the cell: a full-width panel around a 680px equation is
   mostly empty box. max-width keeps it inside a narrow viewport, where the scroller takes over. */
.eq{
  background:var(--panel);border:1px solid var(--hairline);border-radius:2px;
  padding:1.15rem 1rem;overflow-x:auto;width:max-content;max-width:100%;
}
/* Left-aligned, not centred: the equation is read alongside the table and the paragraph either side
   of it, and a centred block breaks the left edge they share. */
.eq math{display:block;margin-inline:0;width:max-content;max-width:none;text-align:left;font-size:1.0625rem;color:var(--ink);}
.eq math+math{margin-top:1rem;}
/* Without a math font MathML falls back to the page sans, which sets an integral sign at the wrong
   weight; name the math faces explicitly and let the browser's own default close the list. */
.eq math{font-family:'STIX Two Math','Latin Modern Math','Cambria Math',math,serif;}

/* Citation marker: an engineering annotation, so mono — but a reference number is a readout, not a
   sentence, and it sits on the baseline rather than as a superscript so it never disturbs leading. */
.prose a.cite{
  font-family:var(--mono);font-size:.6875rem;letter-spacing:.04em;color:var(--ink);
  text-decoration:none;padding-inline:.06em;
}
.prose a.cite:hover{text-decoration:underline;text-underline-offset:3px;}

/* References: numbered, because the prose points at them by number. The marker is mono and the
   entry is body copy — same split as everywhere else. */
.refs{list-style:none;margin:0;padding:0;counter-reset:ref;}
.prose .refs li{position:relative;padding-left:2.6rem;color:var(--ink-muted);}
.prose .refs li+li{margin-top:.95rem;}
.prose .refs li::before{
  counter-increment:ref;content:'[' counter(ref) ']';position:absolute;left:0;top:.25em;
  font-family:var(--mono);font-size:.6875rem;font-weight:500;letter-spacing:.06em;color:var(--ink);
}
.refs .note{display:block;color:var(--ink-faint);font-size:.9375rem;margin-top:.15rem;}
