/*
 * massajio — Brand Book v1 front-end stylesheet
 *
 * The single front-end stylesheet. Rebuilt from the Brand Book v1 Part 5
 * transcription on card #22, comment 100. The PDF extraction mangled comment
 * delimiters and slashes; those are repaired here and nothing else is changed:
 * no value is rounded, corrected or "improved".
 *
 * Every colour, space, radius and shadow below is either a declaration inside
 * `:root` (transcribed from the book) or a `var()` reference to one. The only
 * literals in the file are in the token block, plus the small set of geometry
 * the book states in prose and no token carries (rule weights, the 4:5 frame,
 * the 16:6 opener, the 1.15fr/1fr hero, the 300px column). Each of those is
 * named in the comment beside it.
 *
 * Fonts: this card ships none. There is no `font-face` rule, no `url()` to a
 * font file, no binary and no third-party font import. The three family tokens
 * name the brand families with metric-compatible fallbacks, so the @font-face
 * block from #32/A1b resolves against the same names without a second
 * declaration. Until A1b, the site renders on those fallback stacks.
 *
 * `.brand-surface` (A3b, card 38) is a migrated surface's own element layer. It
 * exists because the legacy layer prints after this sheet while the migration
 * is in progress (#34/R1, D18), so at equal specificity the legacy `body`,
 * `h1`-`h6`, `a` and `:focus-visible` win on every surface, migrated or not.
 * The scope hands the book's element layer back to a surface that has been
 * rewritten in the brand vocabulary, without deleting or reordering anything.
 * A8 (#28) deletes the legacy layer and the scope collapses into the base
 * element layer above it.
 *
 * ONE SHELL, AND THE CONTENT FILLS IT (card 44). `.masthead`,
 * `.site-footer__inner`, `.home:not(body)`, `.archive:not(body)` and `.article`
 * are all `--grid-max` (1240px) boxes carrying the same `--space-4` inline
 * padding, so the chrome and the content beneath it resolve to one content box
 * — 1208px — and one left edge, at every viewport. Nothing inside the article
 * is capped narrower than that box any more: with a rail the body takes the
 * remainder beside the fixed 240px rail, and without one it takes the whole
 * shell. There is no per-surface chrome rule and no body class that selects
 * one: card 42's per-surface scoping is deleted rather than superseded, and its
 * `mj-grid-max` / `mj-no-rail` body classes are no longer emitted. Surfaces
 * whose *body* is still laid out by the legacy layer — the 404, `page.php`,
 * `archive-event.php` and `single-event.php` — keep that legacy body until A8
 * (#28); where each of them stands is named on card 44 rather than hidden in
 * this file.
 *
 * BODY-CLASS COLLISIONS (card 29). Three of the book's class names are also
 * class names WordPress puts on `<body>`, and a body class is not emitted by
 * any template — so the R2 class-coverage gate cannot see this family by
 * construction. On a tag archive, `<body>` carries `tag`, and the bare `.tag`
 * rule below turned the entire page into an 11px uppercase pill; `archive` and
 * `home` turned `<body>` into a centred 1240px box with 16px of its own side
 * padding, which put the masthead and the page body on two left edges. All
 * three are therefore written `.name:not(body)`. The class names in the markup
 * are unchanged, because the vocabulary is the book's and the Laravel
 * application inherits it. `brand-gate` job C8 checks this family and fails the
 * build if a new one appears.
 *
 * WHICH CORE NAMES ARE ACTUALLY A RISK, verified against core's
 * `get_body_class()` in `wp-includes/post-template.php` (WordPress 7.1 source)
 * rather than assumed: core emits `home`, `blog`, `archive`, `date`, `search`,
 * `attachment`, `error404`, `wp-singular`, `single`, `page`, `post-type-archive`,
 * `author`, `category`, `tag`, `paged` and the prefixed families. It does **not**
 * emit `post`, `event`, `singular` or `front-page`. So `.post` and `.event` —
 * the forum and events components — are deliberately left unguarded: nothing
 * puts those on `<body>`, and guarding them would be noise in the record of a
 * hazard that is not there.
 */

/* ==========================================================================
   Tokens
   ========================================================================== */

:root{
  /* roles */
  --color-bg:#f7f5f0;
  --color-surface:#ffffff;
  --color-sunk:#efece4;
  --color-text:#16211f;
  --color-accent:#2f6f6b;
  --color-accent-2:#cfdd3f;
  --color-alert:#d8502a;
  --color-divider:color-mix(in srgb,#16211f 14%,transparent);
  /* neutral ramp — warm paper, faint green cast */
  --color-neutral-100:#f7f5f0; --color-neutral-200:#eae7df; --color-neutral-300:#d7d3c9;
  --color-neutral-400:#b8b3a8; --color-neutral-500:#999488; --color-neutral-600:#7a7569;
  --color-neutral-700:#5c584e; --color-neutral-800:#403d35; --color-neutral-900:#24221d;
  /* teal ramp, base at 500 */
  --color-accent-100:#e9f4f2; --color-accent-200:#cbe6e2; --color-accent-300:#a3d0ca;
  --color-accent-400:#6aa9a2; --color-accent-500:#2f6f6b; --color-accent-600:#275c59;
  --color-accent-700:#1e4a47; --color-accent-800:#163736; --color-accent-900:#0e2424;
  /* lime ramp, base at 500 */
  --color-accent-2-100:#f8fbdd; --color-accent-2-200:#f0f7b8; --color-accent-2-300:#e4ef85;
  --color-accent-2-400:#d9e75f; --color-accent-2-500:#cfdd3f; --color-accent-2-600:#a8b52c;
  --color-accent-2-700:#7f8a1f; --color-accent-2-800:#5a6216; --color-accent-2-900:#3a3f0f;
  /* alert — retractions, errors, destructive only */
  --color-alert-100:#fdece6; --color-alert-500:#d8502a; --color-alert-700:#93330f;
  /* type */
  --font-display:"Bricolage Grotesque",system-ui,sans-serif;
  --font-body:"Literata",Georgia,serif;
  --font-mono:"JetBrains Mono",ui-monospace,Menlo,monospace;
  /* space, 4px base */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-6:24px; --space-8:32px; --space-12:48px; --space-16:64px;
  --radius-sm:4px; --radius-md:10px; --radius-lg:20px;
  --shadow-sm:0 1px 2px color-mix(in srgb,#24221d 10%,transparent);
  --shadow-md:0 4px 14px color-mix(in srgb,#24221d 12%,transparent);
  --shadow-lg:0 16px 40px color-mix(in srgb,#24221d 18%,transparent);
  /* THE READING MEASURE, brand book revision 1.1 (card 41) — and NO LONGER THE
     ARTICLE'S COLUMN WIDTH. It is a stated 720px, not a `ch` length: it was
     `66ch`, which resolves to roughly 610-655px depending on the fallback face,
     and it was that resolution — inside a 1240px shell — that made the article
     column read as half the page.

     SINCE CARD 44 THE ARTICLE FILLS THE PAGE SHELL. The body track is
     `minmax(0,1fr)`, so it takes the remainder beside `--rail` or the whole
     shell when there is no rail, and this value NO LONGER CAPS THE ARTICLE'S
     READING COLUMN. A future reader must not assume prose is still pinned at 66
     characters per line, because it is not: the operator's 2026-11-02
     instruction ("content need to take full header space") widened it, and the
     characters-per-line cost is recorded in the pull request for card 44 rather
     than argued away in here.

     WHY IT WAS NOT TURNED INTO A MINIMUM, which the same card permitted. Above
     1000px the body track is the shell's content box minus the rail and the gap:
     `viewport − 32 (shell padding) − 48 (gap) − 240 (rail)` = `viewport − 320`.
     A `minmax(var(--measure),1fr)` track would therefore demand 720px at every
     viewport ≥ 1040px, and between 1001px and 1039px its 720px floor plus the
     288px of gap and rail is 1008px inside a 969-1007px content box: the grid
     would overflow the shell by up to 39px. A hard floor there buys a layout
     defect in exchange for a readability one, so the track stays
     `minmax(0,1fr)` and this token stays the fixed value it was declared as.

     WHAT IT STILL GOVERNS, unchanged and safe: `.measure`, `.dialog` and
     `.archive-empty`. Those are the readers of this token now. */
  --measure:720px;
  /* the article's citation rail, §3 of the book (§4 grid, revision 1.1:
     "720px + 240px citation rail"). Declared as a token by A6 (card 26) because
     the grid's two tracks must both come from tokens rather than from literals
     in a rule. It stays 240px when the article fills the shell: the body grows,
     the rail does not. */
  --rail:240px;
  /* layout — the book's 12-column maximum (§2), declared once. Not carried by
     the Part 5 transcription, so A3 states it here. A multiple of 4. Since card
     44 this is THE page shell: the one width the chrome and every migrated page
     body share, on every surface, and the width their content now fills rather
     than sits inside. The homepage's three-up grid (`.issue-grid`), the listing
     card grid (`.archive-grid`) and the event row (`.events-row`) are all laid
     out at this width — 1240 minus 32px of padding over three is ~403px a card —
     which is why the shell is this value and not a narrower one. */
  --grid-max:1240px;
  /* The book's mobile touch floor (§7), declared as a token because AC07
     measures against it in several places. 44 is not a 4px-scale step and that
     is the reason it is allowed: an accessibility floor outranks the scale. */
  --tap:44px;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after{
  box-sizing:border-box;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd{
  margin:0;
}

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}

body{
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  color:var(--color-text);
  background:var(--color-bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

img, picture, video, canvas, svg{
  display:block;
  max-width:100%;
  height:auto;
}

input, button, textarea, select{
  font:inherit;
  color:inherit;
}

button{
  cursor:pointer;
  background:none;
  border:0;
}

table{
  border-collapse:collapse;
  width:100%;
}

/* Headings — display face, oversized, tight */
h1, h2, h3, h4, h5, h6{
  font-family:var(--font-display);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-0.03em;
  text-wrap:balance;
}

h1{ font-size:clamp(40px,5.5vw,72px); }
h2{ font-size:clamp(28px,3.4vw,42px); }
h3{ font-size:26px; }
h4{ font-size:20px; }
h5{ font-size:16px; }
h6{
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
}

/* Links — accent-600, lime highlighter on hover */
a{
  color:var(--color-accent-600);
  text-decoration:underline;
}

a:hover{
  text-decoration-thickness:3px;
  text-decoration-color:var(--color-accent-2-500);
}

/* Focus — declared once, globally, never removed */
:focus-visible{
  outline:2px solid var(--color-accent);
  outline-offset:2px;
}

::selection{
  background:var(--color-accent-2-300);
}

figcaption{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-neutral-600);
}

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

/* ==========================================================================
   Brand surface — a migrated surface declares the book's element layer
   ==========================================================================

   WHY THIS EXISTS. While the migration is in progress the legacy layer prints
   AFTER this sheet (see the docblock on massajio_scripts() in functions.php;
   #34/R1, architecture D18). `base.css` declares `body`, `h1`-`h6`, `a` and
   `:focus-visible` with exactly the same specificity as the base rules above,
   and a later sheet wins a tie. So on every surface — migrated or not — the
   legacy element layer is authoritative: h1 at the legacy 32px sans-serif,
   links in the legacy sage with no underline, the focus ring in the legacy
   `--color-border-focus`.

   That is correct for an unmigrated surface and wrong for a migrated one: it
   makes "very close to the book" unreachable by class rules alone, because no
   class can out-rank an element selector the browser resolves first.

   So a migrated surface opts in by putting `.brand-surface` on its root. The
   rules below restate the book's element layer scoped to that root. They are
   what `.brand-surface` *adds*, not a second design system.

   SPECIFICITY, deliberately. The selectors use `:where()` so the scope itself
   contributes 0,1,0 and the element inside contributes nothing:
     - 0,1,0 beats the legacy layer's element rules (0,0,1), so the book wins
       on a migrated surface regardless of print order;
     - 0,1,0 ties this sheet's own component classes (`.nav-brand`, `.btn`,
       `.card-title`, `.tab`, `.thread-title`, `.event-title`), and every one of
       those is declared *later* in this file, so the component wins on source
       order. That is why a button is not underlined and the wordmark is ink.
       No component rule needed its specificity raised to beat this scope.

   `:focus-visible` needs one step more than that (it is itself a pseudo-class,
   0,1,0, so it would tie with the legacy rule), so it is written without
   `:where()`.

   WHAT IT IS NOT. Not a second element layer and not permanent. A8 (#28)
   deletes the legacy layer in one gated act; at that point there is no tie to
   break, the rules below are redundant, and the scope collapses into the base
   element layer at the top of this file. Nothing is deleted early, nothing is
   reordered, and R1/D18 is intact.
   ========================================================================== */

.brand-surface{
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
  color:var(--color-text);
}

.brand-surface :where(h1, h2, h3, h4, h5, h6){
  font-family:var(--font-display);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-0.03em;
  text-wrap:balance;
}

.brand-surface :where(h1){ font-size:clamp(40px,5.5vw,72px); }
.brand-surface :where(h2){ font-size:clamp(28px,3.4vw,42px); }
.brand-surface :where(h3){ font-size:26px; }
.brand-surface :where(h4){ font-size:20px; }
.brand-surface :where(h5){ font-size:16px; }
.brand-surface :where(h6){
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
}

.brand-surface :where(a){
  color:var(--color-accent-600);
  text-decoration:underline;
}

/* Hover needs 0,2,0 to beat the legacy `a:hover`, which is already 0,1,1 — the
   one place `:where()` cannot keep the scope at a single class.

   THE BOOK'S HOVER SIGNAL IS THE LIME UNDERLINE, NOT A COLOUR SHIFT, so the
   colour is restated here rather than inherited. A3b wrote `color:inherit` here
   and the comment claimed no colour change; the cascade did the opposite in
   both directions. `:where(a):hover` is 0,2,0 and beats `:where(a)` at 0,1,0,
   so `inherit` applied to *every* plain link on a brand surface and a body link
   went teal-600 -> its parent's ink on hover. Restating accent-600 is the
   accurate fix and makes the comment true: the word keeps its colour, and only
   the underline thickens and turns lime.

   The two chrome links are the exception, stated explicitly because they are
   the only links on a brand surface that own no colour: `.nav-brand` and
   `.nav-links a` set `color:var(--color-text)` below at 0,1,0, and this hover
   rule at 0,2,0 would otherwise repaint the wordmark and the four masthead
   items teal. Inheriting the parent's ink is what those two rules already mean,
   so `inherit` is right for them and wrong for prose; both are restated at
   0,3,0 below.

   Buttons and tags do own a colour, so their hover is restated to the value
   their own rule already declares — no hover ramp is invented. */
.brand-surface :where(a):hover{
  color:var(--color-accent-600);
  text-decoration-thickness:3px;
  text-decoration-color:var(--color-accent-2-500);
}

.brand-surface .nav-brand:hover,
.brand-surface .nav-links a:hover{
  color:inherit;
}

.brand-surface .btn-primary:hover{ color:var(--color-surface); }
.brand-surface .btn-secondary:hover,
.brand-surface .btn-ghost:hover{ color:var(--color-text); }
.brand-surface .tag-accent:hover{ color:var(--color-accent-700); }
.brand-surface .tag-outline:hover,
.brand-surface .tag-lime:hover{ color:var(--color-text); }

.brand-surface :focus-visible{
  outline:2px solid var(--color-accent);
  outline-offset:2px;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.measure{ max-width:var(--measure); }
.mono{ font-family:var(--font-mono); }
.display{ font-family:var(--font-display); font-weight:800; letter-spacing:-0.03em; }
.text-muted{ color:var(--color-neutral-600); }
.kicker{
  display:block;
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
}
.lede{ font-size:20px; }

/* Icon primitive — inc/icons.php emits `icon icon-<name>` on every inline SVG.
   The helper carries the size, the stroke and currentColor as attributes; this
   rule only stops the SVG being squeezed in a flex row or sitting off the text
   baseline. `icon-<name>` carries no styling of its own: it is a hook, not a
   look, and the class-coverage gate resolves the family to this base class. */
.icon{
  flex:none;
  vertical-align:middle;
}

/* Accessibility primitives the templates depend on */
.screen-reader-text{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border-width:0;
}

.skip-link{
  position:absolute;
  top:-100%;
  left:var(--space-4);
  z-index:50;
  padding:var(--space-2) var(--space-4);
  background:var(--color-accent);
  color:var(--color-surface);
  border-radius:var(--radius-md);
}

.skip-link:focus{
  top:var(--space-4);
}

/* ==========================================================================
   Evidence chip — the signature device
   Four <i> bars, the tier class fills the right number.
   Strong: teal-500 fill, 4 bars. Moderate: teal-200, 3.
   Limited: neutral-200, 2. Vibes: lime-300, 1.
   ========================================================================== */

.ev{
  display:inline-flex;
  align-items:center;
  gap:var(--space-1);
  padding:var(--space-1) var(--space-2);
  border-radius:999px;
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  line-height:1;
  text-transform:uppercase;
  letter-spacing:0.14em;
  white-space:nowrap;
}

.ev-bars{
  display:inline-flex;
  align-items:center;
  gap:var(--space-1);
  height:1em;
}

.ev-bars i{
  display:block;
  width:2px;
  height:1em;
  background:currentColor;
}

.ev-strong{
  background:var(--color-accent-500);
  color:var(--color-surface);
}

.ev-moderate{
  background:var(--color-accent-200);
  color:var(--color-text);
}

.ev-limited{
  background:var(--color-neutral-200);
  color:var(--color-text);
}

.ev-vibes{
  background:var(--color-accent-2-300);
  color:var(--color-text);
}

/* Unfilled bars: the fourth of moderate, the third and fourth of limited,
   the second to fourth of vibes. Reconstruction note: the transcription says
   which bars fill but not how an empty bar is drawn; one constant carries it. */
.ev-moderate .ev-bars i:nth-child(n+4),
.ev-limited .ev-bars i:nth-child(n+3),
.ev-vibes .ev-bars i:nth-child(n+2){
  opacity:0.3;
}

/* ==========================================================================
   Study callout, citations and the rail
   ========================================================================== */

.study{
  padding:var(--space-6);
  background:var(--color-sunk);
  border-radius:var(--radius-md);
}

.study-head{
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--color-neutral-600);
}

.study-title{
  font-family:var(--font-display);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-0.03em;
}

.study-finding{
  font-size:18px;
  line-height:1.7;
}

.study-stats{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-neutral-600);
}

.cite-ref{
  font-family:var(--font-mono);
  font-size:11px;
  vertical-align:super;
  color:var(--color-accent-700);
  text-decoration:none;
}

/* The rail's own type. Every note below inherits this 11px mono, which is the
   book's floor for a label (§2: mono never below 11px). */
.rail{
  font-family:var(--font-mono);
  font-size:11px;
  line-height:1.6;
  color:var(--color-neutral-600);
}

/* A note is a `<details>` (A6, card 26), not a paragraph: it carries the `id` a
   `.cite-ref` targets, and the same node has to work as a visible note in the
   240px column and as a collapsed disclosure on a narrow viewport. `open` is
   written in the markup by single.php, so the text is visible with no script at
   every width and a reader can still collapse it. */
.rail-note{
  display:block;
  padding-left:var(--space-3);
  border-left:1.5px solid var(--color-divider);
}

.rail-note + .rail-note{
  margin-top:var(--space-3);
}

/* The summary is the control: a visible label ("Note 1 · Author, year") and a
   tap target that clears the book's 44px floor (C7). The UA marker is replaced
   rather than left off — the underline is what says "this opens". */
.rail-note summary{
  display:flex;
  align-items:center;
  min-height:var(--tap);
  cursor:pointer;
  list-style:none;
  color:var(--color-accent-700);
  text-decoration:underline;
  text-decoration-thickness:1px;
}

.rail-note summary::-webkit-details-marker{
  display:none;
}

.rail-note summary:hover{
  text-decoration-thickness:3px;
  text-decoration-color:var(--color-accent-2-500);
}

.rail-note p{
  margin-top:var(--space-1);
  color:var(--color-text);
}

/* Span-built bar chart: heights come from the markup, one bar carries .hi.
   The container needs a stated height, because the bars' heights are a
   percentage OF it — with an auto height they would resolve to nothing and the
   chart would render as a flat line. `--space-16` (64px) is the book's largest
   spacing step and the smallest chart whose bars can actually be compared; it is
   not an invented magic number. */
.plot{
  display:flex;
  align-items:flex-end;
  gap:var(--space-1);
  height:var(--space-16);
}

.plot span{
  display:block;
  width:var(--space-3);
  background:var(--color-accent-200);
}

.plot span.hi{
  background:var(--color-accent-500);
}

.plot-caption{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-neutral-600);
  margin-top:var(--space-2);
}

/* The one teal "Bottom line" panel (A6, card 26).
   Inverse of the book's default direction: a teal field carrying paper, so it
   is `--color-surface` text on `--color-accent-500`. COMPUTED from those two
   token values, not measured: 5.8:1, which clears the 4.5:1 normal-text floor
   and matches the figure the book states for teal-500 on white. Body copy in
   accent is the other direction — `--color-accent-700` on paper, per §7.
   The lime `.sticker` on top carries ink, never white: the book's rule for lime
   (§2), and the reason the sticker is legible on the teal field. */
.bottom-line{
  margin-top:var(--space-8);
  padding:var(--space-6);
  background:var(--color-accent-500);
  color:var(--color-surface);
  border-radius:var(--radius-md);
  font-size:18px;
  line-height:1.7;
}

.bottom-line .sticker{
  margin-bottom:var(--space-3);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn{
  display:inline-flex;
  align-items:center;
  gap:var(--space-2);
  /* A button is a tap target before it is a shape: the book's 44px floor. */
  min-height:var(--tap);
  padding:var(--space-2) var(--space-4);
  border-radius:999px;
  font-family:var(--font-body);
  font-weight:600;
  line-height:1.6;
  text-decoration:none;
}

.btn-primary{
  background:var(--color-accent);
  color:var(--color-surface);
}

.btn-secondary{
  background:var(--color-surface);
  color:var(--color-text);
  border:1.5px solid var(--color-divider);
}

.btn-ghost{
  background:transparent;
  color:var(--color-text);
}

/* Lime carries ink, never white */
.btn-lime{
  background:var(--color-accent-2-500);
  color:var(--color-text);
}

.btn-icon{
  padding:var(--space-2);
  border-radius:999px;
  background:transparent;
  color:var(--color-text);
}

.btn-sm{
  padding:var(--space-1) var(--space-3);
  font-size:11px;
}

.btn-block{
  display:flex;
  width:100%;
  justify-content:center;
}

/* ==========================================================================
   Forms — the book's field spec: label above, mono caps, always visible,
   never placeholder-as-label. Native elements only; no script.
   ========================================================================== */

.field{
  display:flex;
  flex-direction:column;
  gap:var(--space-1);
  margin-bottom:var(--space-3);
}

.field .kicker{
  color:var(--color-neutral-600);
}

.input{
  width:100%;
  min-height:var(--tap);
  padding:var(--space-2) var(--space-3);
  background:var(--color-surface);
  color:var(--color-text);
  border:1.5px solid var(--color-divider);
  border-radius:var(--radius-md);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.6;
}

textarea.input{
  min-height:calc(var(--space-12) * 2);
  resize:vertical;
}

.search-form{
  display:flex;
  flex-direction:column;
}

.search-form .field{
  margin-bottom:var(--space-2);
}

/* ==========================================================================
   Tags
   ==========================================================================

   `.tag` is a WordPress core body class on a tag archive (get_body_class() in
   wp-includes/post-template.php), so the bare selector would apply this pill to
   <body> and render the whole page as 11px uppercase. `:not(body)` takes body
   out of the rule without renaming the book's class, which the markup keeps and
   the Laravel application inherits. brand-gate C8 fails the build if another
   brand class starts shadowing a core body class. */

.tag:not(body){
  display:inline-flex;
  align-items:center;
  gap:var(--space-1);
  padding:var(--space-1) var(--space-2);
  border-radius:999px;
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  line-height:1;
  text-transform:uppercase;
  letter-spacing:0.14em;
}

.tag-accent{
  background:var(--color-accent-100);
  color:var(--color-accent-700);
}

.tag-lime{
  background:var(--color-accent-2-300);
  color:var(--color-text);
}

.tag-outline{
  background:transparent;
  color:var(--color-text);
  border:1.5px solid var(--color-divider);
}

.tag-alert{
  background:var(--color-alert-100);
  color:var(--color-alert-700);
}

/* ==========================================================================
   Cards, elevation and content blocks
   ========================================================================== */

.card{
  padding:var(--space-6);
  background:var(--color-surface);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm);
}

.card-kicker{
  display:block;
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--color-neutral-600);
}

.card-title{
  font-family:var(--font-display);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-0.03em;
}

.card-body{
  font-size:16px;
  line-height:1.6;
}

.card-meta{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-neutral-600);
}

.card-outline{
  background:transparent;
  box-shadow:none;
  border:1.5px solid var(--color-divider);
}

.elev-sm{ box-shadow:var(--shadow-sm); }
.elev-md{ box-shadow:var(--shadow-md); }
.elev-lg{ box-shadow:var(--shadow-lg); }

.stat{
  display:flex;
  flex-direction:column;
  gap:var(--space-1);
}

/* The book puts a number in a stat card at display scale. The transcription
   carries the family and the weight but no size, so A4 states it: 40px, the
   lower bound of the h1 clamp and a 4px-scale step. Without it the value
   inherits the 16px body size and a stat card reads as a paragraph. */
.stat-value{
  font-family:var(--font-display);
  font-weight:800;
  font-size:40px;
  line-height:1.02;
  letter-spacing:-0.03em;
}

.stat-label{
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--color-neutral-600);
}

.frame{
  overflow:hidden;
  border-radius:var(--radius-md);
  background:var(--color-sunk);
}

.frame-tint img{
  filter:saturate(0.82);
}

/* Image placeholder — no photograph yet, never a guessed image */
.ph{
  background:var(--color-sunk);
  border-radius:var(--radius-md);
}

.byline{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-neutral-600);
}

.avatar{
  display:inline-block;
  width:var(--space-8);
  height:var(--space-8);
  border-radius:999px;
  object-fit:cover;
}

.avatar-sm{
  width:var(--space-6);
  height:var(--space-6);
}

.avatar-lg{
  width:var(--space-12);
  height:var(--space-12);
}

/* Highlighter mark */
.mark{
  background:var(--color-accent-2-300);
  color:inherit;
  padding:0 var(--space-1);
}

.sticker{
  display:inline-block;
  padding:var(--space-1) var(--space-2);
  background:var(--color-accent-2-300);
  color:var(--color-text);
  border-radius:var(--radius-sm);
  box-shadow:var(--shadow-sm);
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
}

/* ==========================================================================
   Navigation
   One 1.5px ink rule under the masthead — the only hard line.
   The current section is marked by a lime highlighter swipe.
   ========================================================================== */

.nav{
  display:flex;
  align-items:center;
  gap:var(--space-6);
  /* The four items stay text and wrap rather than collapsing to icons on a
     narrow viewport. No disclosure, no icon-only trigger. */
  flex-wrap:wrap;
  padding-bottom:var(--space-2);
  border-bottom:1.5px solid var(--color-text);
}

/* The wordmark. AC08 (A3b): a logo is a tap target, so the box clears the
   book's 44px floor in both axes — `min-height:var(--tap)` vertically, and
   horizontally the name in `--font-display` is already far wider than 44px
   before the 4px side padding is added.
   `.nav-brand` is (0,1,0), the same as the `.brand-surface :where(a)` rule
   earlier in this file, and it is declared later — so the wordmark stays ink
   and un-underlined on a brand surface without any specificity trick. It sits
   on both the masthead and the footer wordmark, which is why the rule is not
   scoped to `.nav`. */
.nav-brand{
  display:inline-flex;
  align-items:center;
  min-height:var(--tap);
  padding:0 var(--space-1);
  font-family:var(--font-display);
  font-weight:800;
  letter-spacing:-0.03em;
  color:var(--color-text);
  text-decoration:none;
}

.nav-links{
  display:flex;
  align-items:center;
  gap:var(--space-6);
  flex-wrap:wrap;
  margin:0;
  padding:0;
  list-style:none;
}

.nav-links a{
  /* AC07: the link itself is the tap target, so the box clears 44px in both
     dimensions. The 4px side padding keeps a short word such as "Forum" at
     least 52px wide, which is why the floor is met in the horizontal axis too
     and not only vertically.
     `align-items:flex-end` is not cosmetic: the book draws the current-section
     swipe with `inset 0 -0.55em 0`, a band at the *bottom* of the box. Centring
     the text in a 44px box would leave that band floating below the word, so
     the glyphs sit low and the band stays behind the lower half of the text —
     the highlighter the book asks for, on a box tall enough to tap. */
  display:inline-flex;
  align-items:flex-end;
  min-height:var(--tap);
  padding:0 var(--space-1) var(--space-1);
  color:var(--color-text);
  text-decoration:none;
}

/* The swipe marks the current section. "page" is the destination itself,
   "true" is a page inside that section (a Papers article, say). Both are the
   same highlighter because they make the same statement: you are here. */
.nav a[aria-current="page"],
.nav a[aria-current="true"]{
  box-shadow:inset 0 -0.55em 0 var(--color-accent-2-400);
}

.tabs{
  display:flex;
  align-items:center;
  gap:var(--space-6);
  margin:0;
  padding:0;
  list-style:none;
}

.tab{
  display:inline-block;
  padding:var(--space-1) 0;
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--color-neutral-600);
  text-decoration:none;
}

.tab[aria-selected="true"],
.tab[aria-current="page"]{
  color:var(--color-text);
  box-shadow:inset 0 -0.55em 0 var(--color-accent-2-400);
}

/* ==========================================================================
   Masthead and footer — page chrome (A3, card 25)
   The masthead is `.masthead > .nav`: `.nav` owns the single 1.5px ink rule and
   the flex row, `.masthead` owns the measure and the page padding. Nothing in
   either block draws a second border.
   ========================================================================== */

/* AC07 — the chrome and the body share one left edge and now one box.
   THE SHELL IS ONE WIDTH, ON EVERY SURFACE (card 44). `.masthead`,
   `.site-footer__inner` and `.article` are all `--grid-max` (1240px) boxes
   carrying the same `--space-4` inline padding and centred on the viewport, so
   all three resolve to one content-left AND one 1208px content box at every
   viewport. 1240 is the width the homepage's three-up grid (`.issue-grid`), the
   listing card grid (`.archive-grid`) and the event row (`.events-row`) are
   built for — the design those surfaces were drawn at — and it is now the only
   width the page shell has. The content beneath the chrome fills that box rather
   than sitting inside it at a narrower measure; where a legacy body still does
   not, card 44 names it.

   WHAT THIS REPLACES, AND WHY IT IS A DELETION RATHER THAN AN OVERRIDE. A3b
   first aligned the chrome to `var(--width-wide)` (64rem) because the page
   bodies were still laid out by the legacy `.massajio-container` at that
   measure. A4/A7 then widened it per surface through an `mj-grid-max` body
   class, and card 42 narrowed it again on a single post so that the chrome took
   the article's own measured box (1056px with a rail, 768px without one). The
   result was three or four distinct masthead widths across the site, visible as
   a horizontal step as a reader moved between pages. The operator reported that
   on 2026-11-02, and the right answer is one width everywhere rather than a
   better rule for choosing between widths. So the per-surface rules, the
   `@media`/`@supports` mirrors of them, and the body class that selected them
   are all gone: one mechanism survives, and it is the base pair below.

   `--width-wide` is legacy-owned and this sheet no longer reads it: it stays
   declared in the legacy token block for the legacy sheets, and the legacy
   layer itself is untouched until A8 (#28). */
.masthead{
  max-width:var(--grid-max);
  margin:0 auto;
  padding:var(--space-4) var(--space-4) 0;
}

/* The links cluster takes the auto margin, so the search control sits at the
   far right of the masthead whatever the wordmark's width. */
.masthead__nav{
  margin-right:auto;
}

.masthead__search{
  position:relative;
}

/* A native disclosure: no script, keyboard operable, and the control is the
   visible word "Search" rather than a bare glyph. The marker is replaced, not
   hidden — the word is the affordance. */
.masthead__search summary{
  display:inline-flex;
  align-items:center;
  gap:var(--space-1);
  min-height:var(--tap);
  padding:0 var(--space-2);
  list-style:none;
  cursor:pointer;
}

.masthead__search summary::-webkit-details-marker{
  display:none;
}

.masthead__search[open] summary svg{
  transform:rotate(180deg);
}

/* No z-index: the panel is absolutely positioned inside the masthead's own
   stacking context, so it paints above the in-flow page without borrowing a
   token from the legacy block that A8 deletes. */
.masthead__search-panel{
  position:absolute;
  right:0;
  width:min(20rem,calc(100vw - var(--space-12)));
  padding:var(--space-4);
  background:var(--color-surface);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-md);
}

/* C1 (carried from A3b) — the footer must sit on the masthead's content-left,
   and where the side padding lives is what decides that. If the outer box
   carries the padding while `__inner` re-centres a narrower max-width inside
   it, the two boxes resolve to two different left edges. The side padding
   therefore lives on `__inner` beside the max-width, so `.site-footer__inner`
   and `.masthead` are both `max-width + padding` boxes centred on the viewport
   and their content starts on the same pixel. Since card 44 both are
   `--grid-max`. No top or bottom padding moved. */
.site-footer{
  padding:var(--space-12) 0 var(--space-8);
}

.site-footer__inner{
  display:flex;
  flex-direction:column;
  gap:var(--space-4);
  max-width:var(--grid-max);
  margin:0 auto;
  padding:0 var(--space-4);
}

.site-footer__brand{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:var(--space-3);
}

.site-footer__issue{
  color:var(--color-neutral-600);
}

.site-footer__fine{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-neutral-600);
}

/* ==========================================================================
   Forum
   ========================================================================== */

.thread-row{
  display:flex;
  align-items:baseline;
  gap:var(--space-4);
  padding:var(--space-4) 0;
  border-bottom:1.5px solid var(--color-divider);
}

.thread-title{
  font-family:var(--font-display);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-0.03em;
  color:var(--color-text);
  text-decoration:none;
}

.thread-meta{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-neutral-600);
}

.thread-count{
  margin-left:auto;
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-neutral-600);
}

.post{
  padding:var(--space-6) 0;
  border-bottom:1.5px solid var(--color-divider);
}

.post-head{
  display:flex;
  align-items:center;
  gap:var(--space-3);
}

.post-body{
  font-size:18px;
  line-height:1.7;
}

.post-actions{
  display:flex;
  align-items:center;
  gap:var(--space-4);
}

.post-op{
  border-left:1.5px solid var(--color-accent);
  padding-left:var(--space-4);
}

.badge-role{
  display:inline-flex;
  align-items:center;
  padding:var(--space-1) var(--space-2);
  border-radius:999px;
  background:var(--color-accent-100);
  color:var(--color-accent-700);
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  line-height:1;
  text-transform:uppercase;
  letter-spacing:0.14em;
}

.badge-role.rmt{
  background:var(--color-accent-2-300);
  color:var(--color-text);
}

/* ==========================================================================
   Events
   ========================================================================== */

.event{
  display:flex;
  align-items:flex-start;
  gap:var(--space-4);
  padding:var(--space-4) 0;
  border-bottom:1.5px solid var(--color-divider);
}

.datechip{
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:var(--space-12);
  padding:var(--space-2);
  background:var(--color-sunk);
  border-radius:var(--radius-sm);
  font-family:var(--font-mono);
  line-height:1;
}

.datechip .m{
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--color-neutral-600);
}

.datechip .d{
  font-family:var(--font-display);
  font-weight:800;
  letter-spacing:-0.03em;
  color:var(--color-text);
}

.event-title{
  font-family:var(--font-display);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-0.03em;
  color:var(--color-text);
  text-decoration:none;
}

.event-meta{
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-neutral-600);
}

/* ==========================================================================
   Table — mono numeric columns, ink header rule, hairlines,
   teal-100 hover, no zebra, no vertical rules
   ========================================================================== */

.table{
  width:100%;
  border-collapse:collapse;
}

.table th{
  padding:var(--space-3) var(--space-4);
  border-bottom:1.5px solid var(--color-text);
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
  text-align:left;
  color:var(--color-text);
}

.table td{
  padding:var(--space-3) var(--space-4);
  border-bottom:1.5px solid var(--color-divider);
  font-family:var(--font-mono);
  font-size:11px;
  color:var(--color-text);
}

.table tbody tr:hover{
  background:var(--color-accent-100);
}

/* ==========================================================================
   Dialog — decisions with consequences
   ========================================================================== */

.dialog-backdrop{
  position:fixed;
  inset:0;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:var(--space-6);
  background:color-mix(in srgb,var(--color-neutral-900) 55%,transparent);
}

.dialog{
  width:100%;
  max-width:var(--measure);
  padding:var(--space-6);
  background:var(--color-surface);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);
}

.dialog-title{
  font-family:var(--font-display);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-0.03em;
}

.dialog-body{
  font-size:16px;
  line-height:1.6;
}

.dialog-actions{
  display:flex;
  align-items:center;
  gap:var(--space-3);
  justify-content:flex-end;
}

/* ==========================================================================
   Article — the page shell, filled (card 44)
   ==========================================================================

   THE BOX IS THE PAGE SHELL, AND THE CONTENT FILLS IT. `.article` is the same
   `--grid-max` (1240px) box with the same `--space-4` inline padding as
   `.masthead`, `.site-footer__inner`, `.home:not(body)` and
   `.archive:not(body)`, centred on the viewport exactly as they are. So the
   article's content box IS the chrome's content box — 1208px — and the
   masthead's first pixel and the article's first text pixel share one x on every
   article, at every viewport, with or without a rail.

   NOTHING INSIDE IT IS CAPPED NARROWER. `.article-header`, `.article-opener` and
   `.article-grid` are ordinary block children of `.article`, so they are full
   width of that 1208px content box: no `max-width`, no `margin-inline`.
   `.article-grid` is two columns with a rail and the body track takes the
   remainder — 1208 − `--rail` (240) − `--space-12` gap (48) = **920px** at a
   1240px viewport — and one column with the body on the full 1208px when there
   is no rail. In both states the composition's right edge lands on the shell's
   right edge (x = 1224 at a 1240px viewport): fill, not breath.

   THIS IS A DELIBERATE DEVIATION FROM BRAND BOOK REVISION 1.1, recorded as a
   deviation rather than presented as what the designer wrote. Revision 1.1 (card
   41) put the article in a measured column and centred it with
   `margin-inline:auto` on a narrow box. Card 44 v1 kept one 1240px shell but
   capped the reading composition at 1008px (`--measure` 720 + gap 48 + rail 240)
   and flushed it left, leaving 200px of the shell unused beside a rail and 488px
   of it unused without one. The operator's 2026-11-02 refinement — "content need
   to take full header space, for now I see that on all pages header wider then
   the content" — is that leftover being read from the outside as a second width,
   so the cap is deleted and the content grows to the shell as instructed. The
   operator's instruction outranks both the designer's centring and v1's cap; what
   it costs is stated in the pull request for card 44, not argued away here.

   THE COST, ON THE RECORD. The reading column is no longer the designer's ~66
   characters. At the 18px/1.7 body size a 920px track is roughly 84 characters
   per line and a 1208px one roughly 111. `--measure` therefore no longer caps
   the article's column: its token comment in `:root` says what it still governs
   and why a hard minimum was rejected.

   WHY `--space-4` AND NOT `--space-6` FOR THE INLINE PADDING. The chrome's
   inline padding is `--space-4` (16px). A 1240px article with 24px padding would
   put its content at 24px against the masthead's 16px — the same defect 8px
   smaller. The two edges have to be the same number, so they are the same token.
   `padding-block-start` stays `--space-12` (card 41's one stated addition;
   without it the h1 sits flush on the masthead rule).

   ONE MECHANISM FOR "NO RAIL". `single.php` emits `<aside class="rail">` only
   when the post has notes or a chart, and `:not(:has(>.rail))` switches the grid
   to a single track. That is the whole of the no-rail handling, and it decides
   how many tracks there are rather than a width. The `.article-shell` wrapper,
   the `.article-grid--solo` modifier, card 42's `mj-no-rail` body class and card
   44 v1's `.article:not(:has(.rail))` max-width rule are all gone: they were
   further mechanisms for the same state, and a duplicated state is what the last
   two incidents were made of.

   NO LITERAL OF ITS OWN except the designer's two, both named at their rule.
   ========================================================================== */

.article{
  width:100%;
  max-width:var(--grid-max);
  margin-inline:auto;
  padding-inline:var(--space-4);
  /* ADDED on card 41, the single stated deviation from the designer's block.
     The `.article-shell` this replaces carried the article's 48px top gap
     (`padding: var(--space-12) var(--space-4) 0`); without it the h1 sits flush
     on the masthead rule. A token, on the 4px scale, and horizontal composition
     is untouched. */
  padding-block-start:var(--space-12);
}

.article-grid{
  display:grid;
  /* THE BODY TAKES THE REMAINDER BESIDE THE FIXED RAIL (card 44), so the
     composition's right edge lands on the shell's right edge: 1208 − 240 − 48 =
     920px at a 1240px viewport. `minmax(0, …)` rather than a bare `1fr` keeps
     the track able to shrink below its content instead of overflowing.
     THE FLOOR IS 0, NOT `var(--measure)`, and that is a measurement rather than
     a preference: above 1000px this grid's box is `viewport − 320` (32px shell
     padding + 48px gap + 240px rail), so a 720px floor would demand 1008px of a
     969-1007px content box between 1001px and 1039px viewports and push the grid
     39px past the shell. `--measure`'s token comment states the same decision. */
  grid-template-columns:minmax(0,1fr) var(--rail);
  gap:var(--space-12);
  align-items:start;
}

/* `>` is deliberate: the rail is a direct child of the grid, so a `.rail`
   nested inside the body cannot disable the two-column arrangement. One column
   means the body IS the shell's content box — 1208px at a 1240px viewport, 968px
   at 1000px and 736px at 768px, which is where this arrangement switches. */
.article-grid:not(:has(>.rail)){
  grid-template-columns:minmax(0,1fr);
}

/* 96px is the designer's literal (brand book revision 1.1), kept as a literal
   because it is a statement about the masthead's height, not a spacing step. */
.article-grid>.rail{ position:sticky; top:96px; }

.article-body{
  font-size:18px;
  line-height:1.7;
}

/* The body's own block rhythm. `css/article.css` gave this to
   `.massajio-article__body`; the reading column needs the same paragraph and
   list spacing or consecutive paragraphs run together. Values are the book's
   spacing steps, and nothing here touches type size — that stays the 18/1.7
   rule above. */
.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body figure{
  margin-bottom:var(--space-4);
}

.article-body h2,
.article-body h3,
.article-body h4{
  margin-top:var(--space-8);
  margin-bottom:var(--space-3);
}

.article-body ul,
.article-body ol{
  padding-left:var(--space-6);
}

.article-body li{
  margin-bottom:var(--space-2);
}

.article-body blockquote{
  padding-left:var(--space-4);
  border-left:1.5px solid var(--color-accent);
}

.article-body img{
  border-radius:var(--radius-md);
}

.dropcap::first-letter{
  float:left;
  margin-right:var(--space-2);
  font-family:var(--font-display);
  font-weight:800;
  font-size:4.4em;
  line-height:1.02;
  color:var(--color-accent);
}

/* Below 1000px the rail stops being a column and reads as a full-width list of
   disclosures below the body (A6 AC02, revision 1.1).

   WHY THE RAIL IS NOT HIDDEN. The book's §3 says citations move into
   `<details>` on mobile; the Part 5 CSS expressed that as
   `.article-grid .rail{ display:none }`. That rule cannot stand once a note is
   a `<details>`: every `.cite-ref` in the body points at `#rail-note-N`, and a
   `display:none` rail makes every citation link on a phone jump to an element
   that renders nothing. A citation that leads nowhere is worse than a long
   page. Revision 1.1 states the same intent as `position:static` plus the
   separator below, so the rail is never hidden at any width.

   THE SEPARATOR IS INK, NOT DIVIDER WEIGHT — `1.5px solid var(--color-text)`,
   the designer's literal from revision 1.1. The rule this replaces used
   `--color-divider`; the change is flagged to the designer on card 41 and is
   implemented as written rather than quietly softened.

   THE COMPOSITION IS NOT CAPPED HERE EITHER (card 44). One column, so the grid
   is a single `minmax(0,1fr)` track and the body is the shell's content box:
   968px at a 1000px viewport and 736px at 768px. Card 44 v1 capped the header,
   opener and grid at `var(--measure)` inside this block; that cap is deleted
   rather than narrowed, because a 720px composition under a full-width chrome is
   the reported defect at a second breakpoint. The `.article` BOX does not
   change: it is the page shell at every width, which is why there is no
   `.article` rule in here. */
@media(max-width:1000px){
  .article-grid{ grid-template-columns:minmax(0,1fr); }
  .article-grid>.rail{
    position:static;
    border-top:1.5px solid var(--color-text);
    padding-top:var(--space-6);
  }
}

/* The `:has()` fallback, added on card 41 and required rather than optional.

   The `:not(:has(…))` rule above is an INVALID SELECTOR on a browser without
   `:has()`, and an invalid selector invalidates its whole rule — it is dropped,
   not merely unmatched. The grid would then stay two-column with an empty 240px
   track and a 48px gap beside the body: ~288px of void, which is the reported
   defect in a milder form. So those readers get the sub-1000px arrangement on
   every article instead — one column, rail below the body behind the ink rule,
   never hidden.

   The composition is full width here too (card 44): card 44 v1's
   `max-width:var(--measure)` on the header, the opener and the grid is deleted,
   so a browser without `:has()` gets the same filled shell in one column rather
   than a 720px column inside it. The rail stays visible below the body, and
   nothing is hidden.

   Residual, stated rather than hidden: a browser too old for `@supports
   selector()` does not evaluate this block either, and keeps the degraded state
   above. Every browser that supports `:has()` (all current engines, since 2023)
   supports `@supports selector()`, so the two conditions coincide in practice.

   This block's preludes begin with `@`, so the class-coverage gate skips them as
   at-rules but still collects the ordinary rules inside, which is correct: it is
   what keeps `.article-grid` and `.rail` defined. */
@supports not selector(:has(*)){
  .article-grid{ grid-template-columns:minmax(0,1fr); }
  .article-grid>.rail{
    position:static;
    border-top:1.5px solid var(--color-text);
    padding-top:var(--space-6);
  }
}

/* --------------------------------------------------------------------------
   Article header and the 16:6 opener (A5, card 27)

   Everything above the body column, plus the body column itself since A6
   (card 26).

   NO WRAPPER ANY MORE. Through A6 these rules sat inside `.article-shell`, a
   `--grid-max` (1240px) box. Brand book revision 1.1 moved the measure onto
   `.article` itself — the template's root, which is also the header's, the
   opener's and the grid's parent — and card 44 moved that root out to the page
   shell. One box, one left edge: the header, the opener and the grid are the
   shell's 1208px content box, filled, with no cap and no separate measure.
   -------------------------------------------------------------------------- */

/* The header region: topic tag, headline, standfirst and the meta row, stacked.
   It owns the gap down to the opener's frame — the opener declares no top
   margin of its own — so the space between the hairline and the image is
   stated in one place rather than in two rules that can drift apart. */
.article-header{
  margin-bottom:var(--space-6);
}

/* The book's headline measure. A display h1 is set oversized and allowed to
   break oddly; 16ch is what keeps it a headline rather than a paragraph. It is
   a MAXIMUM, so a short title still sets on one line, and no hard line break is
   written into the template. Declared on the class rather than relying on the
   element layer, which is legacy `base.css` until A8. */
.article-header__title{
  font-family:var(--font-display);
  font-size:clamp(40px,5.5vw,72px);
  font-weight:800;
  line-height:1.02;
  letter-spacing:-0.03em;
  text-wrap:balance;
  max-inline-size:16ch;
  margin:var(--space-3) 0 var(--space-4);
}

/* The lede is the standfirst, not a second headline: 60ch in the body face at
   the book's lede size. Same mechanism as the title — a maximum, no `<br>`. */
.article-header .lede{
  max-inline-size:60ch;
  margin-bottom:var(--space-6);
}

/* Byline row: author, date and the evidence chip when the article has one.
   `baseline` rather than `center` so the chip's pill sits on the text baseline
   instead of being vertically centred against a taller row. The chip is
   `inline-flex` already, so it needs no rule of its own here. */
.article-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:var(--space-3);
}

/* The one rule in the header region, closing the meta block. Divider weight on
   a divider colour — the masthead's 1.5px ink rule stays the product's only
   hard line. */
.article-header__rule{
  margin:var(--space-4) 0 0;
  border:0;
  border-top:1.5px solid var(--color-divider);
}

/* The 16:6 opener in the book's tinted frame. `object-fit:cover` crops to the
   ratio without distortion; `.frame` supplies the radius, the clipping and the
   sunk background that the no-image case shows through, so a placeholder and a
   photograph occupy the same box and the layout cannot collapse. Its width is
   the shell's content box — 1208px at a 1240px viewport, full width either way. */
.article-opener{
  aspect-ratio:16 / 6;
}

.article-opener img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* ==========================================================================
   Homepage — magazine-home (A4, card 24)

   The card's seven-section contract, minus the masthead and footer A3 already
   owns: issue line, hero, "In this issue", "Vibes Only", "Coming up". Every
   value below is a token except four pieces of geometry the book states in
   prose and no token carries — the hero's 1.15fr/1fr, its 4:5 frame, the 3px
   ink rule that closes it, and the 300px "Vibes Only" column. 300 is a
   4px-scale multiple; the rest are fractions and a stated rule weight.
   ========================================================================== */

/* The page measure: `--grid-max` and the same side padding as `.masthead` and
   `.site-footer__inner`, so all three share one left edge and one content box
   (AC07). Since card 44 that is the page shell's width on every surface, not a
   width this page opts into, and the grids inside it (`.issue-grid`,
   `.events-row`) already fill it — which is why nothing here had to widen when
   the article did.

   `home` is a WordPress core body class on the front page (get_body_class()),
   so the bare selector also matched `<body>` and gave it a centred 1240px box
   with 16px of its own side padding — putting the masthead and the page body on
   two left edges 16px apart, which is the F2 step A3b removed. `:not(body)`
   takes `<body>` out of the rule and leaves the book's class name in the markup
   for the Laravel application to inherit. brand-gate C8 covers this family. */
.home:not(body){
  max-width:var(--grid-max);
  margin:0 auto;
  padding:var(--space-8) var(--space-4) var(--space-12);
}

.home-issue{
  margin-bottom:var(--space-6);
  color:var(--color-neutral-600);
}

/* 1.15fr / 1fr, the book's hero. Stacks to one column below 900px, where a 4:5
   frame would otherwise take the whole viewport. */
.home-hero{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:var(--space-8);
  align-items:start;
}

/* The 4:5 opener, in the book's tinted frame. When the chosen article has no
   featured image the frame renders empty — `.frame`'s own sunk background —
   rather than a placeholder photograph. No image is invented. */
.home-hero__media{
  aspect-ratio:4 / 5;
}

.home-hero__img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.home-hero__title{
  margin:var(--space-3) 0 var(--space-4);
}

.home-hero__actions{
  display:flex;
  flex-wrap:wrap;
  gap:var(--space-3);
  margin-top:var(--space-6);
}

/* The rule that closes the hero — 3px of ink, the section's full stop. The
   masthead's 1.5px line stays the only hard line in the chrome. */
.home-hero__rule{
  margin:var(--space-8) 0 0;
  border:0;
  border-top:3px solid var(--color-text);
}

.home-section{
  margin-top:var(--space-12);
}

.home-section__head{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:var(--space-4);
  margin-bottom:var(--space-6);
}

/* Three-up. One-up below 768px, which is what the 390px rendering shows. */
.issue-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--space-6);
}

/* 1fr / 300px, collapsing to one column below 900px — the same breakpoint the
   article rail uses, so the two asymmetric templates collapse together. */
.vibes{
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:var(--space-8);
  align-items:start;
}

.vibes__aside{
  display:flex;
  flex-direction:column;
  gap:var(--space-4);
}

/* The ungraded list. A hairline between items, none after the last: the same
   treatment `.thread-row` and `.event` carry, so a list reads as a list. */
.home-list{
  margin:var(--space-6) 0 0;
  padding:0;
  list-style:none;
}

.home-list li{
  padding:var(--space-4) 0;
  border-bottom:1.5px solid var(--color-divider);
}

.home-list li:last-child{
  border-bottom:0;
}

.home-list .card-title{
  margin-bottom:var(--space-2);
}

.home-list .card-meta{
  display:flex;
  align-items:center;
  gap:var(--space-2);
}

/* Three-up event row, in the component layer's `.event`/`.datechip`. */
.events-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--space-6);
}

/* The "In this issue" sort control. Native radios behind visible mono-caps
   labels, no script: the order is decided on the server (inc/home.php), so the
   group needs nothing but a submit button. The selected option carries the same
   lime highlighter the masthead uses for the current section, so "this is the
   one in effect" reads the same way twice and is never colour alone — the radio
   itself is still the native control. The legend is the group's accessible name
   and is screen-reader only, because the two labels beside the radios are the
   visible words and a placeholder is never used as a label. */
.seg{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--space-2);
  margin:0;
  padding:0;
  border:0;
}

.seg-opt{
  display:inline-flex;
  align-items:center;
  gap:var(--space-1);
  min-height:var(--tap);
  padding:0 var(--space-2);
  cursor:pointer;
}

.seg-opt input{
  accent-color:var(--color-accent);
}

.seg-opt input:focus-visible{
  outline:2px solid var(--color-accent);
  outline-offset:2px;
}

.seg-label{
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.14em;
  color:var(--color-neutral-600);
}

.seg-opt input:checked + .seg-label{
  color:var(--color-text);
  box-shadow:inset 0 -0.55em 0 var(--color-accent-2-400);
}

/* 900px: the hero and the "Vibes Only" column stack, and the two stat cards sit
   side by side on their own row rather than becoming two full-width blocks. */
@media (max-width:899px){
  .home-hero,
  .vibes{
    grid-template-columns:minmax(0,1fr);
  }
  .vibes__aside{
    flex-direction:row;
    flex-wrap:wrap;
  }
  .vibes__aside > *{
    flex:1 1 240px;
  }
}

/* 768px: the two three-up grids fall to one column. */
@media (max-width:767px){
  .issue-grid,
  .events-row{
    grid-template-columns:minmax(0,1fr);
  }
}

/* ==========================================================================
   Listings — archive, blog index and search results (A7, card 29)

   One surface rendered by one part (`templates/parts/listing.php`): a heading
   block, a card grid, a pager and an empty state. Every card inside the grid is
   the existing `.card` component, so nothing here styles a card — this section
   styles only the boxes around them.

   The measure is `--grid-max` with the same `--space-4` side padding as
   `.masthead`, `.site-footer__inner`, `.home` and `.article`, so the listing and
   the chrome share one left edge AND one content box. Since card 44 that is the
   page shell's width on every surface rather than a measure this listing had to
   declare; the boxes still on a legacy measure are the surfaces A8 (#28)
   retires.
   ========================================================================== */

/* `archive` is a WordPress core body class on every archive page
   (get_body_class()), so the bare selector also matched `<body>` and gave it
   this box's max-width and padding — the same two-left-edges defect as `.home`.
   `:not(body)` leaves the book's class name in the markup and takes `<body>`
   out of the rule. brand-gate C8 covers this family. */
.archive:not(body){
  max-width:var(--grid-max);
  margin:0 auto;
  padding:var(--space-8) var(--space-4) var(--space-12);
}

/* The heading block. The `h1` is the section name and there is exactly one per
   listing; the count sits below it in mono, because it is data rather than a
   subtitle. No rule of its own — the masthead's 1.5px ink line stays the
   product's only hard line, so the count's hairline is divider weight. */
.archive-head{
  margin-bottom:var(--space-8);
}

.archive-head__title{
  margin:var(--space-3) 0 var(--space-4);
}

.archive-head__lede{
  max-inline-size:60ch;
}

.archive-head__meta{
  margin-top:var(--space-4);
  padding-top:var(--space-3);
  border-top:1.5px solid var(--color-divider);
}

/* Three-up, matching `.issue-grid` so a grid of cards looks the same wherever a
   reader meets one. Two-up below 900px and one-up below 768px: the card is a
   text card, and a 66ch-ish excerpt at 390px in a two-up grid is unreadable. */
.archive-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--space-6);
}

@media (max-width:899px){
  .archive-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:767px){
  .archive-grid{
    grid-template-columns:minmax(0,1fr);
  }
}

/* AC11 (card 29) — the category pill inside a card is a touch target on this
   surface. Scoped to the grid, not to `.tag` and not to `.card .tag`: the
   homepage's and the article header's pills keep their inline size, so nothing
   outside a listing moves. This selector has an ancestor, so it can never match
   `<body>` and needs no guard of its own. */
.archive-grid .tag{
  min-height:var(--tap);
}

/* The empty state. A real panel at the reading measure, not a centred apology:
   on this site an empty result is the normal state, so it gets the same surface
   treatment as a card and a next step that actually works. `--measure` is still
   the right token here — this panel is a block of prose, and it is one of the
   three consumers the token kept when the article stopped using it as a column
   width. */
.archive-empty{
  max-width:var(--measure);
  padding:var(--space-6);
  background:var(--color-surface);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-sm);
}

.archive-empty .card-title{
  margin-bottom:var(--space-3);
}

.archive-empty .card-body{
  margin-bottom:var(--space-3);
}

.archive-empty .card-body strong{
  color:var(--color-text);
}

.archive-empty .search-form{
  margin-top:var(--space-4);
}

/* Pagination. The markup wraps core's own `paginate_links()` anchors, so the
   class names here (`page-numbers`, `current`, `dots`) are WordPress's, not
   invented: this is the one place the brand layer styles a core-generated class,
   and it does it once rather than reimplementing core's permalink building. The
   current page is a `<span aria-current="page">` in the markup, so the state is
   stated for assistive technology as well as shown: ink field, paper glyph.
   Each target is `--tap` square, which is the book's 44px touch floor and the
   reason the numbers are laid out as boxes rather than as an inline run of text. */
.pagination{
  margin-top:var(--space-8);
}

.pagination ul{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:var(--space-2);
  margin:0;
  padding:0;
  list-style:none;
}

.pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:var(--tap);
  min-height:var(--tap);
  padding:0 var(--space-2);
  border-radius:var(--radius-sm);
  font-family:var(--font-mono);
  font-size:11px;
  font-weight:600;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--color-text);
  text-decoration:none;
}

.pagination a.page-numbers{
  border:1.5px solid var(--color-divider);
}

.pagination a.page-numbers:hover{
  text-decoration:underline;
  text-decoration-thickness:3px;
  text-decoration-color:var(--color-accent-2-500);
}

.pagination .page-numbers.current{
  background:var(--color-text);
  color:var(--color-surface);
}

.pagination .page-numbers.dots{
  min-width:0;
  border:0;
}
