/* ============================================================================
   Basalt — brand tokens
   ----------------------------------------------------------------------------
   The single source of truth for colour, type, rhythm and the mark's own fill.
   Colour and rhythm are lifted from the fundraising page Theodor approved on
   2026-08-06 — the values here are the ones he signed off, not a
   reinterpretation of them. The exceptions, each with a reason:

     2026-08-07  --mute and --none moved: they measured under 4.5:1 (BRAND.md §2)
     2026-08-07  the mark became a redaction
     2026-08-07  the mark became a white hexagon, --mesh was deleted, and the
                 whole type system changed. See the two blocks below.

   Authority chain:
     web-design-taste skill  ->  PLAN.md section 7  ->  docs/BRAND.md  ->  this file.

   Three rules that outrank convenience:
     1. Zero saturated colour. The only chroma on the page is bone.
     2. No glow. Not behind the hero, not on a number, not on hover.
     3. Two font families. There is no third, and there is no mono.
   ========================================================================== */

/* ================================================================== fonts == */

/* Self-hosted, and that is load-bearing rather than tidy. The privacy section
   claims the network tab holds nothing from a third party, and a single request
   to Google's font CDN would falsify the one claim the page can prove in four
   seconds. Files are the Google Fonts latin and latin-ext subsets, downloaded
   2026-08-07. Latin alone is ~108 KB; latin-ext only downloads if a character in
   its range actually appears, which for English copy is never.

   The CDN host is deliberately NOT spelled out above. The gate for this rule is
   a grep for that hostname, and a comment quoting it is a hit — the build gates
   already reported themselves twice that way, which is worse than no gate. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrumentserif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrumentserif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Metric-matched fallbacks. font-display:swap paints the fallback first, so
   without these the headline visibly jumps when the real file lands.

   Every number below is MEASURED, on 2026-08-07, by setting the same 49-character
   string in both faces at 100px on a canvas and comparing widths and
   fontBoundingBox metrics. Do not edit them by eye; remeasure.

     Archivo          2391.76px   Segoe UI          2381.54px  ->  100.4%
     Instrument Serif 1769.40px   Georgia           2393.02px  ->   73.9%

   The serif number is the one that matters. Instrument Serif is a quarter
   narrower than Georgia, so an unadjusted fallback sets the 88px headline about
   a third too wide and reflows it onto a third line. */
@font-face {
  font-family: 'Archivo Fallback';
  src: local('Segoe UI'), local('Helvetica Neue'), local('Arial');
  size-adjust: 100.4%;
  ascent-override: 88%;
  descent-override: 21%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Instrument Serif Fallback';
  src: local('Georgia'), local('Times New Roman'), local('Times');
  size-adjust: 73.9%;
  ascent-override: 99%;
  descent-override: 31%;
  line-gap-override: 0%;
}

/* ---------------------------------------------------------------- palette -- */

:root {
  /* surfaces — separation is a value shift, not an outline */
  --bg:        #08090B;
  --surface:   #0E1014;
  --surface2:  #14161B;
  --surface3:  #1A1D23;

  /* the only border token. Load-bearing use only: table rows, timeline
     rows, footer rule. If you are reaching for a fourth, use a surface. */
  --line:      #22252B;

  /* text.
     --mute was #767C85 until 2026-08-07 and it measured 4.526:1 on --surface.
     That is not passing, it is 0.026 away from failing — and the moment film
     grain went over the page it failed, at every opacity down to 0.012. Lifted
     6 points per channel on the same hue: 4.92:1 clean, and 4.66:1 with the
     grain composited at three sigma below its mean, which is the worst pixel
     the page can produce. A token with no headroom breaks the first time
     anything is laid over it. */
  --text:      #F2F3F5;
  --dim:       #9BA1A9;
  --mute:      #7C828B;

  /* the one accent. Bone, not gold — gold is for products about money,
     this one is about not losing. */
  --bone:      #C9C3B6;
  --bone-dim:  #8E887A;

  /* status. Desaturated on purpose: these are instrument readings,
     not traffic lights. */
  --live:      #7E998A;
  --warn:      #A5926C;
  --none:      #7E848D;

  /* The mark's fill, and its OWN token on purpose. It equals --text today and
     that is a coincidence, not a relationship: tuning body-text contrast later
     must not silently repaint the logo. There is no plate token any more —
     the hexagon is one solid shape with nothing behind it. */
  --mk-ink:    #FFFFFF;
}

/* THIS SITE IS DARK, AND THAT IS NOW THE WHOLE ANSWER. There was a full light
   palette here — fourteen tokens under an OS colour-scheme media query, and a
   light theme-attribute block beside its dark twin so a toggle could beat the
   OS in either direction. Removed 2026-08-11, deliberately.

   THE SELECTORS ARE DESCRIBED, NOT QUOTED, and that is the third time in one
   day this rule earned itself. A comment quoting the string somebody greps for
   turns "is the light theme gone" from a zero into a number that has to be
   reasoned about, and a check you have to reason about is a check that gets
   waved through. The bounty note quoted the banned grid function; the ledger
   note quoted the border token its own ration counts.

   The check that settles it is a light palette VALUE — every one of the
   fourteen is in this file's history and none is in this file. Whichever you
   pick, it reads zero, and it reads zero because nothing here names one. The
   first draft of this paragraph did, and made its own grep return one.

   THERE WAS NO TOGGLE, and there was never going to be one. `SiteHtml` pins
   `data-theme="dark"` on mount and nothing on the site ever writes anything
   else, so every light rule was unreachable from the first render — which is
   exactly why it rotted without anybody noticing. Measured before deleting it:
   the nav links resolved to 1.11:1 and 2.09:1 and the footer links to 3.09:1
   against the light `--bg`, on all six routes. Dead code that fails its own
   contrast gate is worse than no code, because the gate has to be run in a
   state the site cannot reach to see it, and a failure nobody can reach is a
   failure nobody fixes.

   The two consequences worth knowing:

   1. `:root` above IS the dark palette now, so there is no flash. Before this,
      a visitor on a light-preference OS got a light page for the frame or two
      between first paint and React's effect firing.
   2. Anything reassigning a token for a dark field — `.pic`, `.plate3` — is no
      longer defending against an inversion that can happen. It is still right,
      and for the original reason: those elements paint on `--art-field`, which
      is not `--bg` and never was. Do not delete those pins on the strength of
      this one.

   If a light theme is ever actually wanted, it comes back as a palette AND a
   control that sets the attribute, in the same commit, with the sweep run in
   both states. Half of it is what was here. */

/* ------------------------------------------------------------ the plate -- */
/* The artwork tokens. Declared ONCE, outside both theme blocks, and that is the
   decision rather than an oversight: a printed plate does not invert when the
   room gets brighter. The picture cards stay dark in the light theme, the way a
   photogravure stays dark on white paper — which is also what guarantees the
   white text on them can never fail, because the field it sits on cannot move.
   Any element that paints itself with these must ALSO pin its own text colours
   (see `.plate3` in pricing.html), because --dim in the light theme is a dark
   grey and would land on a near-black plate. */
:root {
  /* THE PAPER IS BLACK AGAIN, BECAUSE THE PICTURE THAT NEEDED IT BLUE IS GONE.

     It was blue slate for a real reason. The cloudscape kept reading as "too
     zoomed in, covers too much", and what was actually being seen was a big
     BLACK block: the cloud bodies were the darkest thing in that picture and
     they sat on near-black paper. Two attempts at rescaling the artwork changed
     nothing and one made it worse. Putting the paper on the blue the picture
     was made of stopped the masses reading as an absence. The hue was sampled
     rather than invented — the dark quarter of clouds1.jpg measures #1C2835 —
     and the value was taken down twice, ending level with --surface.

     THAT PICTURE WAS DELETED ON 2026-08-11 with the bounty artwork. Measured
     2026-08-12, both remaining artworks are pure line: every path in svg.peak
     and every path in the #rock symbol is `fill: none` with a bone stroke, and
     the only filled element in either is the plate rect, which is the field
     itself. There are no masses left anywhere on the site to read as a hole, so
     the fix is now solving a problem that cannot occur, and the one thing it
     cost is still being paid every frame.

     WHAT IT COST WAS THE INK. --art-ink-42 below is --art-ink at 42% composited
     over #0B0D11 — this value — and it was left resolved over it deliberately
     when the paper turned blue, because re-resolving over the blue took the
     brightest pixel a picture can produce from L=0.100 to L=0.104 and dropped
     --none from 4.68:1 to 4.57:1. So the ink and the paper have disagreed since
     the blue landed, and the six pinned ratios in .pic have been correct only
     because the mark is opaque. They are correct BY CONSTRUCTION again now.

     THE VALUE IS A TRUE NEUTRAL, AND IT WAS SOLVED RATHER THAN PICKED. Theodor
     sent a swatch, which is a colour and not a luminance, so the grey chosen is
     the one whose luminance MATCHES the near-black it replaces: L=0.00402
     against 0.00399. Every measured relationship on the page therefore holds
     within a rounding step — punch, the field against the page, the ceiling
     band against the field — and the only thing that actually changed is the
     hue. #0B0D11 still had six points of blue left in it (11/13/17); this has
     none.

     The ink below is still composited over #0B0D11 and is NOT re-derived, which
     leaves ink and paper 0.00003 of luminance apart. Re-deriving gives #5C5954
     against the pinned #5B5956 — one or two per channel — and it would mean
     regenerating every artwork to keep the generators' printed numbers true,
     for a difference nothing can measure. The blue was a different case: it put
     them 0.004 apart and cost --none 0.11 of ratio.

     Punch, mark against field: 2.78:1 here, 2.79:1 at the near-black, 2.73:1 at
     the blue both replace, 2.58:1 at #0F1722 and 2.41:1 at the first attempt
     #141E2B. Take the live number from artkit.punch(), which the generators
     print every run; these are the history, not the source.

     IF A PICTURE WITH DARK MASSES IS EVER ADDED BACK, THE BLUE COMES BACK WITH
     IT. This value is only safe while every artwork on the site is line.

     It is not a background colour for anything but artwork. */
  --art-field: #0D0D0D;
  --art-ink:   #C9C3B6;                  /* the ink. Bone, the only accent */
  --art-frame: rgba(201, 195, 182, .20); /* the plate mark, cut from the ink */
  /* THERE IS NO TOKEN HERE FOR A LINE BETWEEN THE TWO PICTURES, AND THAT IS
     THE ANSWER RATHER THAN AN OMISSION. Two were added and both are gone.

     --art-rule #272D35 was --art-ink at 12.7% over the field, sized to the
     1.298:1 that --line #22252B has against --bg. --art-cut was #000000, paired
     under it because black alone is only 1.17:1 against --art-field and nothing
     darker exists. Then ten pixels of solid black. Each was a better answer to
     "make the line visible" and none was an answer to what was actually wrong:
     two full-bleed pictures sharing one field read as ONE picture, and a rule
     between them at any weight is a seam in one picture rather than two things
     that are apart.

     What separates them now is a section - "The ceiling", on --surface2. If a
     future change puts the two pictures back to back, do not reach for a rule.
     sweep.js fails if they become siblings. */
  /* --art-ink at 42% composited over #0B0D11 — the paper, and it is the paper
     again — drawn opaque. 11 + .42(201-11), 13 + .42(195-13), 17 + .42(182-17).
     artkit.py computes the same three numbers on every run and prints them, so
     this line cannot drift from the pictures without the build saying so.

     IT WAS RESOLVED OVER A FIELD THE SITE NO LONGER USED, for as long as the
     paper was blue. Re-resolving it over that blue gives #5A5B5B, which takes
     the brightest pixel a picture can produce from L=0.100 to L=0.104 and drops
     --none from 4.68:1 to 4.57:1 — a contrast loss across every token, caused
     by a change that was only ever about the paper. (It got worse the lighter
     the blue was: over #0F1722 it was L=0.114 and 4.31:1, over the #141E2B
     first attempt L=0.123 and 4.06:1.) So the value was pinned here and the two
     disagreed, and the six ratios in .pic held only because the mark is opaque
     and what is behind it never entered the sum. The paper is back on this
     value, so the disagreement is gone rather than merely harmless.

     It exists because the artwork is no longer one layer. The pictures are cut
     into depth planes that move independently on pointer, and stacking three
     <g opacity=".42"> compounds: where all three carry ink the result is
     1-(1-.42)^3 = 0.80 of full ink, not 0.42. Measured on the first three-plane
     build, the brightest pixel went from L=0.100 to L=0.330 and the headline
     token fell from 6.29:1 to 2.49:1 — the one invariant these pictures have,
     broken by a layering change that looks purely structural. Pre-multiplied
     and opaque, overlap is idempotent and the ceiling is fixed at L=0.100
     however many planes cross. */
  --art-ink-42: #5B5956;
}

/* ------------------------------------------------------------------- type -- */

:root {
  /* TWO families. Instrument Serif sets display type and nothing else; Archivo
     sets every other thing on the site including all figures.

     Why there is no mono, recorded so it is not reintroduced: on 2026-08-07 the
     dotted zero was rejected. Seven monos were measured by scanning the
     horizontal centre line of the "0" and counting runs of ink — two runs is a
     clean counter, three means a dot or a slash sits in it. JetBrains Mono, IBM
     Plex Mono, Roboto Mono, Space Mono, Source Code Pro, DM Mono and Martian
     Mono ALL measured three. That is not bad luck: separating 0 from O is the
     entire purpose of a coding mono. Archivo measured two, and its tabular
     figures all measure the same width, which was the only thing the mono was
     actually needed for. Machine-state labels get their engineered register from
     the width axis and tracking instead — see .mach below. */
  --display: 'Instrument Serif', 'Instrument Serif Fallback', Georgia, serif;
  --sans:    Archivo, 'Archivo Fallback', 'Segoe UI', system-ui, sans-serif;

  --t-h1:    clamp(46px, 8vw, 88px);
  --t-h2big: clamp(36px, 5.6vw, 58px);
  --t-h2:    34px;
  --t-h3big: clamp(28px, 4.2vw, 40px);
  --t-h3:    26px;
  --t-lbl:   15px;
  --t-lede:  21px;
  --t-body:  17.5px;
  --t-small: 16px;
  --t-cap:   15px;
  --t-label: 11.5px;

  --lh-body: 1.63;

  /* deliberately uneven vertical rhythm — this is what creates hierarchy.
     Two adjacent sections must never share a value. */
  --pad-hero:   96px 0 124px;
  --pad-minor:  74px 0;
  --pad-major:  130px 0;
  --pad-opener: 120px 0 44px;

  --w-page:  1180px;   /* outer shell */
  --w-col:   660px;    /* the reading column */
  --w-prose: 34em;     /* hard ceiling on any paragraph */
}

/* ------------------------------------------------------- base + primitives -- */

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--bone); color: var(--bg); }

/* Display type is the serif, and it is the only place the serif appears.
   Instrument Serif ships weight 400 only — so nothing on this site may depend
   on a bold serif. Hierarchy below h1 comes from size and from Archivo's
   weight axis. */
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
  margin: 0 0 20px;
}
h1 { font-size: var(--t-h1); line-height: .98; letter-spacing: -.015em; margin-bottom: 28px; }
h2 { font-size: var(--t-h2big); line-height: 1.06; letter-spacing: -.012em; }

/* h3 is a sans subhead, not a small serif. A serif at 26px next to an 88px
   serif reads as the same voice repeated quietly, which flattens the page. */
h3 {
  font-family: var(--sans);
  font-variation-settings: 'wdth' 92, 'wght' 600;
  font-size: var(--t-h3);
  line-height: 1.24;
  letter-spacing: -.015em;
  margin: 0 0 20px;
}

/* the small bone label. Deliberately an h3, not an h4 — it looks subordinate,
   it is not structurally deeper, and skipping a heading level is the cheapest
   accessibility bug there is to avoid. */
h3.lbl {
  font-size: var(--t-lbl);
  font-variation-settings: 'wdth' 74, 'wght' 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bone);
  margin: 52px 0 14px;
}

p { margin: 0 0 20px; max-width: var(--w-prose); }

/* Machine state — domains, status words, readings. This is what used to be the
   mono. The engineered register comes from narrowing the width axis and opening
   the tracking, not from a second family. */
.mach {
  font-family: var(--sans);
  font-variation-settings: 'wdth' 70, 'wght' 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: var(--t-label);
}

/* A literal string the machine would print — a domain, a path, a command.
   Narrowed but not tracked or capitalised, because a domain is read, not
   scanned. */
.lit {
  font-family: var(--sans);
  font-variation-settings: 'wdth' 84, 'wght' 500;
  letter-spacing: .01em;
}

/* Every number on every surface. Tabular so a column of them lines up and reads
   as instrumentation rather than as copy — that alignment was the only real
   argument for a mono, and Archivo does it with a clean zero. */
.n {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.eyebrow {
  font-family: var(--sans);
  font-variation-settings: 'wdth' 72, 'wght' 500;
  font-size: var(--t-label);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 18px;
}

.lede { font-size: var(--t-lede); line-height: 1.5; color: var(--dim); max-width: 31em; }
.cap  { font-size: var(--t-cap);  line-height: 1.55; color: var(--mute); max-width: var(--w-prose); }

.hero   { padding: var(--pad-hero); }
.minor  { padding: var(--pad-minor); }
.major  { padding: var(--pad-major); }
.opener { padding: var(--pad-opener); }

/* ------------------------------------------------------------------ mark -- */

/* One drawing, one cut, one fill. A solid flat-top hexagon has no interior
   detail to lose, so unlike the redaction it replaced there is no second file
   for small sizes — the same SVG serves 16px and 240px. Ratio 48 : 41.57. */
.mark { display: block; }
.mark polygon { fill: var(--mk-ink); }

/* ---------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-variation-settings: 'wdth' 88, 'wght' 600;
  font-size: 15px; letter-spacing: .01em;
  padding: 14px 24px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--text); color: var(--bg);
  text-decoration: none;
  transition: opacity .18s ease;
}
.btn:hover { opacity: .86; }
.btn:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
.btn.ghost { background: transparent; color: var(--dim); padding-left: 0; padding-right: 14px; }
.btn.ghost:hover { color: var(--text); opacity: 1; }

/* -------------------------------------------------------------- status dot -- */

.st {
  font-family: var(--sans);
  font-variation-settings: 'wdth' 70, 'wght' 600;
  font-size: var(--t-label);
  letter-spacing: .15em; text-transform: uppercase;
}
.st::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  margin-right: 10px; background: currentColor; vertical-align: .1em;
}
.st.live { color: var(--live); }
.st.warn { color: var(--warn); }
.st.none { color: var(--none); }

/* ------------------------------------------------------------------ table -- */

.data {
  width: 100%; border-collapse: collapse; margin: 32px 0 22px;
  font-family: var(--sans); font-size: 14.5px; line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.data th {
  text-align: left; color: var(--bone);
  font-variation-settings: 'wdth' 72, 'wght' 600;
  font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase;
  padding: 0 16px 11px 0; border-bottom: 1px solid var(--line);
}
.data td { padding: 13px 16px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--dim); }
.data td:first-child { color: var(--text); }
.data th.n, .data td.n { white-space: nowrap; color: var(--text); }
.data th:last-child, .data td:last-child { padding-right: 0; }

/* ---------------------------------------------------------------- motion -- */

/* Opacity plus a short translate. Nothing bounces, nothing parallaxes,
   nothing loops. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 240ms ease-out both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 960px) {
  :root {
    --t-body: 17px;
    --pad-hero:   44px 0 84px;
    --pad-minor:  60px 0;
    --pad-major:  88px 0;
    --pad-opener: 84px 0 34px;
  }
}
