/* plumbspec.org — one stylesheet for every page this site serves.
 *
 * **WHY ONE FILE AND NOT ONE PER PAGE.** The same argument the generated nav marker exists for, one
 * layer down: this site had two pages and their headers had already drifted. It now has five, and
 * four of them are the same design. Four copies of a palette is four places for a measured contrast
 * ratio to stop being measured — `build.py` inlines this once per page so there is one copy to edit
 * and no stylesheet request on a cold visit.
 *
 * **THE RATIOS BELOW ARE MEASURED, NOT ASSERTED.** Computed against WCAG 2.1 relative luminance for
 * every foreground token over the three grounds it can sit on, in both themes. AA body text is 4.5;
 * AA large (>=18.66px bold or >=24px regular) is 3.0.
 *
 *   LIGHT, worst of ground/panel/sunk      DARK, worst of the same
 *     ink       15.64  AA body               ink       12.65  AA body
 *     ink-2      9.02  AA body               ink-2      9.39  AA body
 *     muted      5.49  AA body               muted      6.26  AA body
 *     gold       5.16  AA body               gold       7.31  AA body
 *     gold-lg    3.48  AA LARGE ONLY         gold-lg    7.31  AA body
 *     gold-ink   7.38  AA body               gold-ink  11.03  AA body
 *     fault      6.54  AA body               fault      6.35  AA body
 *     ok         5.44  AA body               ok         7.79  AA body
 *
 * **THERE ARE TWO GOLDS AND THAT IS THE WHOLE REASON.** The first draft used #a87516 for everything
 * and it measures 3.48 in light mode — fine on a 30px figure, a failure on a 13px link, and this
 * site puts gold on both. `--gold` is #8a6212 (5.16, clears body text and a button label) and is
 * what anything small or interactive uses. `--gold-lg` is the lighter #a87516 and is permitted ONLY
 * on type at 24px and above, where 3.0 is the standard, and on borders, where contrast rules do not
 * apply because a border is not text. A small element reaching for `--gold-lg` is a bug.
 *
 * #8a6212 was already a brand value in the page this replaced, so the accessible choice is also the
 * consistent one.
 */

:root{
  --ground:#faf8f4; --panel:#fffdf9; --sunk:#f2eee6;
  --ink:#14161b; --ink-2:#3b4048; --muted:#5a6068; --rule:#ddd6c8;
  --gold:#8a6212; --gold-lg:#a87516; --gold-soft:#f0e4c8; --gold-ink:#5c4a24;
  --fault:#9b2c1f; --fault-soft:#f6e6e2;
  --ok:#2f6b4f;
  /* **NOTHING IS SHIPPED AND NOTHING IS FETCHED.** Three stacks, all resolved from faces already on
     the device. The first version of this site linked Archivo, Source Serif 4 and IBM Plex Mono from
     Google — 188 KB on every cold visit, blocked outright by `default-src 'self'` so the typography
     would have silently fallen back anyway, and a third-party request on a page arguing for
     verification to readers whose security people read response headers. Self-hosting fixed the
     policy and kept the weight; this fixes both.
     Source Serif was 65% of that payload, and Georgia is the better trade rather than the lesser
     one: it was designed for screen reading, has a large x-height, and is present on macOS, iOS,
     Windows and Android. The mono stack is the one the page this replaced already used. */
  --display:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --body:Georgia,"Iowan Old Style","Palatino Linotype","Times New Roman",serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
}
/* The un-stamped default is the common case — most visitors never set a theme, so
   `prefers-color-scheme` is the only signal. Guarded so an explicit light choice beats a dark OS. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --ground:#14161b; --panel:#1a1d23; --sunk:#1c1f26;
    --ink:#e6e1d6; --ink-2:#c8c3b8; --muted:#9aa0a8; --rule:#2b2f36;
    --gold:#d8a441; --gold-lg:#d8a441; --gold-soft:#241c0e; --gold-ink:#e3d2a8;
    --fault:#e08a7a; --fault-soft:#2a1a16;
    --ok:#7fc09c;
  }
}
/* Again under the stamp, so a toggle wins in both directions. */
:root[data-theme="dark"]{
  --ground:#14161b; --panel:#1a1d23; --sunk:#1c1f26;
  --ink:#e6e1d6; --ink-2:#c8c3b8; --muted:#9aa0a8; --rule:#2b2f36;
  --gold:#d8a441; --gold-lg:#d8a441; --gold-soft:#241c0e; --gold-ink:#e3d2a8;
  --fault:#e08a7a; --fault-soft:#2a1a16;
  --ok:#7fc09c;
}

*{box-sizing:border-box}
/* `body` paints an explicit ground: a transparent body borrows whatever is behind it. */
body{margin:0; background:var(--ground); color:var(--ink);
  font-family:var(--body); font-size:17.5px; line-height:1.6; -webkit-font-smoothing:antialiased}
.wrap{max-width:1040px; margin:0 auto; padding:0 24px}
.measure{max-width:64ch}
h1,h2,h3,.eyebrow,.num,nav,button,label,th,.door b,.lockup{font-family:var(--display)}
h1,h2,h3{text-wrap:balance; line-height:1.15; margin:0}
a{color:var(--gold); text-decoration-thickness:1px; text-underline-offset:3px}
a:focus-visible,button:focus-visible,textarea:focus-visible{outline:2px solid var(--gold); outline-offset:3px}
.eyebrow{font-family:var(--display); font-size:12px; font-weight:600; letter-spacing:.14em;
  text-transform:uppercase; color:var(--muted); margin:0 0 16px}

/* ── masthead ─────────────────────────────────────────────────────────── */
header.top{border-bottom:1px solid var(--rule); background:var(--panel)}
header.top .wrap{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 24px}
.mark{display:flex; align-items:center; gap:11px; font-weight:700; letter-spacing:-.01em; font-size:17px;
  font-family:var(--display); color:var(--ink); text-decoration:none}
.mark svg{width:24px; height:24px; display:block}
header.top nav{display:flex; gap:20px; font-size:14px; font-weight:500; flex-wrap:wrap}
header.top nav a{color:var(--ink-2); text-decoration:none}
header.top nav a:hover,header.top nav a[aria-current="page"]{color:var(--gold)}
header.top nav a[aria-current="page"]{font-weight:600}
header.top nav details.get{position:relative; margin-left:auto}
header.top nav a.signin{font-weight:600}
header.top nav details.get summary{cursor:pointer; list-style:none; color:var(--gold-ink); font-weight:600}
header.top nav details.get summary::-webkit-details-marker{display:none}
header.top nav details.get summary::after{content:" \25BE"}
header.top nav details.get[open] summary,header.top nav details.get summary:hover{color:var(--gold)}
header.top nav details.get > div{position:absolute; right:0; top:calc(100% + 8px); z-index:10; display:flex;
  flex-direction:column; gap:8px; min-width:9rem; padding:10px 14px; background:var(--panel);
  border:1px solid var(--rule); border-radius:6px}
.crumb{font-family:var(--display); font-size:13px; color:var(--muted); padding:20px 0 0}
.crumb a{text-decoration:none}

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero{padding:34px 0 44px}
.hero h1{font-size:clamp(27px,3.4vw,40px); font-weight:700; letter-spacing:-.018em; max-width:30ch}
.hero .lede{font-size:clamp(17.5px,1.6vw,20px); color:var(--ink-2); margin:22px 0 0; max-width:62ch}
.hero .lede b{font-weight:600; color:var(--ink)}
.applies{font-family:var(--display); font-size:14px; color:var(--muted); margin:24px 0 0;
  padding-top:18px; border-top:1px solid var(--rule); max-width:66ch; line-height:1.6}
.applies b{color:var(--ink-2); font-weight:600}
.origin{font-family:var(--display); font-size:15.5px; color:var(--ink-2); margin:22px 0 0;
  padding:16px 18px; border-left:2px solid var(--gold-lg); background:var(--gold-soft);
  max-width:62ch; line-height:1.55}
.origin b{color:var(--ink); font-weight:600}
.origin i{font-style:italic}

/* ── the pitch card, at the proportion of a 3x5 index card ───────────── */
.pitch{display:grid; grid-template-columns:1fr 360px; gap:40px; align-items:start; padding:46px 0 44px}
.pitch h1{font-size:clamp(27px,3.3vw,39px); font-weight:700; letter-spacing:-.018em; max-width:26ch}
.pitch .lede{font-size:clamp(17.5px,1.6vw,20px); color:var(--ink-2); margin:20px 0 0; max-width:54ch}
.pitch .lede b{color:var(--ink); font-weight:600}
/* The copy has to fit the card, which is the point of writing a pitch on one. */
.card{border:1px solid var(--rule); background:var(--panel); padding:24px 26px;
  aspect-ratio:5/3; display:flex; flex-direction:column; justify-content:space-between}
.card .eyebrow{color:var(--gold-ink); margin-bottom:12px}
.card p{margin:0; font-size:16px; line-height:1.52; color:var(--ink-2)}
.card p + p{margin-top:10px}
.card p b{color:var(--ink); font-weight:600}
.card .foot{font-family:var(--mono); font-size:11.5px; color:var(--muted);
  border-top:1px dashed var(--rule); padding-top:11px; margin-top:14px}
@media (max-width:900px){
  .pitch{grid-template-columns:1fr; gap:32px; padding:34px 0 30px}
  .card{aspect-ratio:auto}
}

/* ── sections ─────────────────────────────────────────────────────────── */
section{padding:52px 0; border-top:1px solid var(--rule)}
section h2{font-size:clamp(22px,2.3vw,28px); font-weight:700; letter-spacing:-.014em}
section h3{font-size:21px; font-weight:600; margin:36px 0 10px; letter-spacing:-.008em}
section p{margin:17px 0 0}
blockquote{margin:26px 0; padding:4px 0 4px 22px; border-left:2px solid var(--gold-lg);
  font-size:18.5px; color:var(--ink)}
blockquote cite{display:block; font-family:var(--display); font-size:13px; font-style:normal;
  color:var(--muted); margin-top:10px}

/* ── tables. Wide content scrolls in its own box so the page never does. ── */
.scroller{overflow-x:auto; margin:28px 0 0; border:1px solid var(--rule)}
table{border-collapse:collapse; width:100%; font-size:14.5px; min-width:520px; background:var(--panel)}
th,td{text-align:left; padding:11px 15px; border-bottom:1px solid var(--rule); vertical-align:top}
th{font-size:11.5px; font-weight:600; letter-spacing:.1em; text-transform:uppercase;
  color:var(--muted); background:var(--sunk)}
tr:last-child td{border-bottom:0}
/* Georgia's figures are old-style by default, which is wrong in a column of rates — the mono stack
   and `lining-nums` keep them aligned and the same height. */
td.n{font-family:var(--mono); font-variant-numeric:tabular-nums lining-nums; white-space:nowrap}
.lab{font-family:var(--mono); font-size:10px; text-transform:uppercase; letter-spacing:.06em;
  padding:1px 5px; border:1px solid var(--rule); color:var(--muted); white-space:nowrap}
.lab.m{color:var(--ok); border-color:var(--ok)}
.lab.e{color:var(--gold-ink); border-color:var(--gold)}

/* ── figures. `--gold-lg` is permitted here: 28px clears AA large at 3.0. ── */
.figs{display:grid; grid-template-columns:repeat(auto-fit,minmax(172px,1fr));
  gap:1px; background:var(--rule); border:1px solid var(--rule); margin:28px 0 0}
.fig{background:var(--panel); padding:20px}
.fig .num{display:block; font-size:30px; font-weight:700; letter-spacing:-.025em;
  color:var(--gold-lg); font-variant-numeric:tabular-nums lining-nums; line-height:1;
  font-family:var(--display)}
.fig .cap{display:block; font-family:var(--display); font-size:12.5px; color:var(--ink-2);
  margin-top:8px; line-height:1.4}
.fig .src{display:block; font-family:var(--mono); font-size:10.5px; color:var(--muted); margin-top:9px;
  text-transform:uppercase; letter-spacing:.06em}

/* ── lists ────────────────────────────────────────────────────────────── */
ul.plain,ul.does{list-style:none; margin:20px 0 0; padding:0; display:flex; flex-direction:column; gap:13px}
ul.plain li,ul.does li{padding-left:20px; position:relative; font-size:17px; color:var(--ink-2)}
ul.plain li::before,ul.does li::before{content:""; position:absolute; left:0; top:.62em;
  width:7px; height:7px; border:1.5px solid var(--gold-lg)}
ul.plain b,ul.does b{color:var(--ink); font-weight:600}
ul.does b{font-family:var(--display); font-size:16px}

/* ── boxed asides ─────────────────────────────────────────────────────── */
.thesis,.caveat{background:var(--sunk); border:1px solid var(--rule); padding:24px 26px; margin:28px 0 0}
.thesis .eyebrow,.caveat .eyebrow{color:var(--gold-ink); margin-bottom:11px}
.thesis p,.caveat p{margin-top:12px}
.thesis p:first-of-type,.caveat p:first-of-type{margin-top:0}

/* ── doors to the other pages ─────────────────────────────────────────── */
.doors{display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:1px; background:var(--rule); border:1px solid var(--rule); margin:28px 0 0}
.door{background:var(--panel); padding:22px 22px 20px; text-decoration:none; color:inherit;
  display:flex; flex-direction:column; gap:9px}
.door:hover{background:var(--sunk)}
.door .eyebrow{margin:0 0 2px}
.door b{font-size:17px; font-weight:600; letter-spacing:-.008em; color:var(--ink)}
.door span{font-size:15px; color:var(--ink-2); line-height:1.5}
.door .go{font-family:var(--display); font-size:13px; font-weight:600; color:var(--gold); margin-top:auto}

/* ── the requirements check ───────────────────────────────────────────── */
.check{border:1px solid var(--rule); background:var(--panel); margin:28px 0 0; scroll-margin-top:20px}
.check-head{padding:24px 26px 0}
.check-head h3{font-size:22px; font-weight:600; margin:0; letter-spacing:-.01em}
.check-head p{font-size:15.5px; color:var(--muted); margin:11px 0 0; max-width:66ch}
.check-grid{display:grid; grid-template-columns:1fr 1fr; margin-top:22px}
.pane{padding:20px 26px 26px}
.pane + .pane{border-left:1px solid var(--rule)}
@media (max-width:860px){
  .check-grid{grid-template-columns:1fr}
  .pane + .pane{border-left:0; border-top:1px solid var(--rule)}
}
label{display:block; font-size:11.5px; font-weight:600; letter-spacing:.1em;
  text-transform:uppercase; color:var(--muted); margin-bottom:8px}
textarea{width:100%; min-height:200px; resize:vertical; padding:13px; background:var(--sunk);
  color:var(--ink); border:1px solid var(--rule); font-family:var(--mono); font-size:12.5px; line-height:1.62}
.row{display:flex; gap:9px; flex-wrap:wrap; margin-top:13px}
/* Gold as a BUTTON GROUND: #8a6212 under #faf8f4 label measures 5.16, which is why the
   button cannot use `--gold-lg` — that pairing is 3.79 and fails. */
button{font-family:var(--display); font-size:14px; font-weight:600; padding:10px 18px;
  cursor:pointer; border:1px solid var(--gold); background:var(--gold); color:#faf8f4}
button.ghost{background:transparent; color:var(--gold)}
button:hover{filter:brightness(1.08)}
.privacy{font-family:var(--display); font-size:12.5px; color:var(--muted); margin-top:12px}
.privacy b{color:var(--ok); font-weight:600}
#read{font-family:var(--mono); font-size:11.5px; color:var(--muted); margin:0 0 13px;
  padding-bottom:11px; border-bottom:1px dashed var(--rule)}
.verdict{font-family:var(--display); font-size:16.5px; font-weight:600; margin:0 0 15px; line-height:1.4}
.verdict em{font-style:normal; color:var(--fault)}
.verdict.clean em{color:var(--ok)}
ul.findings{list-style:none; margin:0; padding:0; display:flex; flex-direction:column;
  gap:11px; max-height:300px; overflow-y:auto}
ul.findings li{border-left:3px solid var(--fault); background:var(--fault-soft); padding:10px 13px}
ul.findings li.note{border-left-color:var(--gold-lg); background:var(--gold-soft)}
.quoted{font-family:var(--mono); font-size:12.5px; color:var(--ink); display:block;
  margin-bottom:6px; word-break:break-word}
.why{font-family:var(--display); font-size:13px; color:var(--ink-2); display:block}
.tag{font-family:var(--display); font-size:10.5px; font-weight:600; letter-spacing:.09em;
  text-transform:uppercase; color:var(--fault); display:block; margin-bottom:5px}
li.note .tag{color:var(--gold-ink)}

/* ── inline code: the cost section sets the one-annotation example in it ─── */
code{font-family:var(--mono); font-size:.86em; background:var(--sunk);
  padding:1px 5px; border:1px solid var(--rule); line-height:1.9}
td code{display:inline-block; border:0; background:none; padding:0; line-height:1.75}

/* ── the AI support box ───────────────────────────────────────────────────
 * **DELIBERATELY NOT A CHAT WIDGET.** It does not float, follow the scroll, pop open uninvited,
 * carry an avatar, or claim to be a person with a name. It is a panel in the document flow that a
 * reader meets once, where a question would naturally occur to them, and it looks like the rest of
 * the page rather than like something bolted to it.
 *
 * The tag is two words and is styled as a tag rather than a sentence, because `web1-sr3` is explicit
 * that the obligation is discharged in a glance and that the explanation is what readers skip.
 */
.askbox{border:1px solid var(--rule); border-left:3px solid var(--gold); background:var(--panel);
  padding:22px 24px; margin:30px 0 0; max-width:none}
.askbox .tag-ai{color:var(--gold-ink); margin:0 0 10px; letter-spacing:.16em}
.ask-line{font-family:var(--display); font-size:15.5px; line-height:1.55; color:var(--ink-2);
  margin:0; max-width:64ch}
.ask-line b{color:var(--ink); font-weight:600}
form.ask{display:flex; gap:9px; margin:16px 0 0; max-width:34rem}
form.ask input{flex:1 1 auto; min-width:0; padding:11px 13px; background:var(--sunk);
  color:var(--ink); border:1px solid var(--rule); font-family:var(--body); font-size:16px}
form.ask input::placeholder{color:var(--muted); opacity:1}
form.ask button{flex:0 0 auto}
.ask-eg{font-family:var(--display); font-size:12px; font-weight:600; letter-spacing:.12em;
  text-transform:uppercase; color:var(--muted); margin:18px 0 9px}
ul.ask-sugg{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:1px;
  background:var(--rule); border:1px solid var(--rule); max-width:42rem}
ul.ask-sugg li{margin:0; background:var(--panel)}
ul.ask-sugg a{display:block; padding:10px 13px; font-family:var(--body); font-size:15.5px;
  color:var(--ink-2); text-decoration:none}
ul.ask-sugg a::before{content:"→ "; color:var(--gold); font-family:var(--display)}
ul.ask-sugg a:hover{background:var(--sunk); color:var(--ink)}
.ask-soon{font-family:var(--display); font-size:14px; color:var(--muted); margin:14px 0 0;
  padding-top:13px; border-top:1px dashed var(--rule); max-width:64ch}
.ask-cta{margin:13px 0 0}
.ask-cta .cta{margin-top:0; font-size:14.5px; padding:10px 17px}

/* ── footer ───────────────────────────────────────────────────────────── */
footer{border-top:1px solid var(--rule); background:var(--panel); padding:40px 0;
  font-size:14.5px; color:var(--muted)}
footer .wrap{display:flex; gap:28px; justify-content:space-between; flex-wrap:wrap}
footer p{margin:0 0 8px}
footer a{color:var(--gold)}
.fine{font-family:var(--display); font-size:13px; color:var(--muted); margin-top:15px}
.cta{display:inline-block; margin-top:22px; font-family:var(--display); font-weight:600;
  font-size:15.5px; border:1px solid var(--gold); color:var(--gold); padding:12px 20px; text-decoration:none}
.cta:hover{background:var(--gold); color:#faf8f4}

@media (prefers-reduced-motion:reduce){*{transition:none!important; animation:none!important}}
