/* GENERATED by scripts/build-css.mjs. Do not edit this file.
   Edit the source in assets/css/ and run `npm run css` in theme/signal-field. */

/* ---- fonts.css ---- */
/* PRD-002 and PRD-003: self hosted faces only.
   No Google Fonts and no third party font CDN, ever. CLAUDE.md stack table.

   PRD-036 amendment 1: Metropolis 400 and 700 are NOT here. They are the two
   preloaded weights, and they are declared in default.hbs beside their
   preloads, so the preload and the font request share one URL. */

@font-face {
  font-family: 'Metropolis';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/metropolis-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Metropolis';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/metropolis-600.woff2') format('woff2');
}

/* HarmonyOS Sans SC. The files are a manual owner step: SPEC.md 3.2 requires
   Huawei's official source with the licence. Until they are present these
   faces resolve to nothing and the stack falls through to PingFang SC or the
   system font.

   Required even in the English only build: Metropolis has no triangle glyphs,
   so every direction arrow on the site renders from this family.

   Split into two unicode-range groups per weight so an English page pulls the
   small arrow chunk and no CJK chunk at all. The CJK group exists for phase 2
   and for the Chinese name in the brand marks. Without it no Chinese character
   can ever resolve here, and 西格汇 falls through to an arbitrary system face. */

/* Arrows and geometric shapes. Loaded on English pages. */
@font-face {
  font-family: 'HarmonyOS Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/harmonyos-arrows-400.woff2') format('woff2');
  unicode-range: U+2190-21FF, U+25A0-25FF;
}
@font-face {
  font-family: 'HarmonyOS Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/harmonyos-arrows-500.woff2') format('woff2');
  unicode-range: U+2190-21FF, U+25A0-25FF;
}
@font-face {
  font-family: 'HarmonyOS Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/harmonyos-arrows-700.woff2') format('woff2');
  unicode-range: U+2190-21FF, U+25A0-25FF;
}

/* 西格汇 plus CJK punctuation, for the Chinese wordmark and the phase 2 seeds.
   Never loaded by an English page, because no character on one falls in these
   ranges. Full CJK coverage is a phase 2 job and wants per-range splitting,
   not one enormous chunk: the unsubsetted source is 8.5MB per weight. */
@font-face {
  font-family: 'HarmonyOS Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/harmonyos-brand-400.woff2') format('woff2');
  unicode-range: U+897F, U+683C, U+6C47, U+3000-303F, U+FF00-FFEF;
}
@font-face {
  font-family: 'HarmonyOS Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/harmonyos-brand-500.woff2') format('woff2');
  unicode-range: U+897F, U+683C, U+6C47, U+3000-303F, U+FF00-FFEF;
}
@font-face {
  font-family: 'HarmonyOS Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/harmonyos-brand-700.woff2') format('woff2');
  unicode-range: U+897F, U+683C, U+6C47, U+3000-303F, U+FF00-FFEF;
}

/* ---- tokens.css ---- */
/* ==========================================================================
   PRD-003: design tokens. Values verbatim from SPEC.md 3.1.

   THIS IS THE ONLY FILE IN THE THEME THAT MAY CONTAIN A HEX VALUE.
   Everything else uses var(). A grep test in the harness enforces it.

   Three families and their rules:
     --signal        the single headline figure per page, 24px and up, plus the
                     logo mark. Nothing else. Brand rule 2.
     --signal-text   links, small labels, the accent button.
     --signal-on-ink links and labels on Ink.
   Red never shows direction. Direction is the arrow glyphs, in Ink.
   ========================================================================== */

:root {
  /* Paper family */
  --paper: #F5F1EA;
  --surface: #FBF9F4;
  --line: #E2DCD0;
  --stone: #8C8579;

  /* Ink family */
  --ink: #111111;
  --ink-surface: #1B1B1B;
  --slate: #5E5950;
  --slate-light: #A39D91;
  --ink-line: #2C2C2C;

  /* Signal family */
  --signal: #FC2E1A;        /* mark + one headline figure per page, 24px+ only */
  --signal-text: #C81E0E;   /* links, small labels, accent button */
  --signal-on-ink: #FF5A47; /* links and labels on Ink */
  --signal-tint: #FCE8E4;   /* highlight rows, callouts, sparingly */

  /* Chart family. Data only, never UI chrome. */
  --harbour: #2F5D7C;
  --ochre: #A06F1F;
  --plum: #6B3F5E;
  --harbour-ink: #5B8DB8;
  --ochre-ink: #D9A441;
  --plum-ink: #B07AA1;

  /* Logo sprite fills */
  --mark: var(--signal);
  --word: var(--ink);

  /* ------------------------------------------------------------------------
     Fixed Ink family. SPEC.md 3.1, added 7 October 2025.

     Some surfaces are Ink in BOTH modes: the homepage hero, the tools panel
     and the SignaPress covers. Ink mode swaps --ink and --paper, so those
     surfaces would invert into a light box on a dark page. These five never
     change with mode.

     Use them ONLY on a permanently Ink surface. Anything that should follow
     the reader's mode uses the ordinary tokens above.
     ------------------------------------------------------------------------ */
  --ink-fixed: #111111;
  --ink-surface-fixed: #1B1B1B;
  --ink-line-fixed: #2C2C2C;
  --paper-fixed: #F5F1EA;
  --slate-fixed: #A39D91;

  /* PRD-032 amendment 6: the 1px hairline round every face of a SignaPress
     3D book, so a white book reads on Paper and a dark one on Ink. */
  --book-edge: rgba(17, 17, 17, 0.12);

  /* Type. SPEC.md 3.2.
     HarmonyOS stays in the stack in the English only build: Metropolis has no
     triangle glyphs, so every direction arrow renders from HarmonyOS. */
  --sans: 'Metropolis', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;

  /* Layout. SPEC.md 3.3. */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --grid-gap: 24px;

  /* Spacing scale. Use these, not arbitrary values. */
  --s1: 4px;  --s2: 8px;   --s3: 12px;  --s4: 16px;  --s5: 24px;
  --s6: 32px; --s7: 48px;  --s8: 64px;  --s9: 96px;  --s10: 140px;

  /* Radius 2px on controls, 0 on panels. No shadows anywhere. */
  --radius-control: 2px;
  --radius-panel: 0;

  /* Measure */
  --measure: 68ch;
  --body-col: 680px;
}

/* Ink mode. SPEC.md 3.1 says prefers-color-scheme only, with no manual toggle
   at launch, so there is deliberately no [data-theme] selector here. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111111;
    --surface: #1B1B1B;
    --line: #2C2C2C;
    --ink: #F5F1EA;
    --slate: #A39D91;
    --slate-light: #5E5950;
    --signal-text: #FF5A47;
    --signal-tint: #2C1B18;
    --word: var(--ink);
    --harbour: var(--harbour-ink);
    --ochre: var(--ochre-ink);
    --plum: var(--plum-ink);
    --book-edge: rgba(255, 255, 255, 0.10);
  }
}

/* ---- base.css ---- */
/* PRD-003: reset, type scale and layout constants.
   Every value here comes from tokens.css. No hex in this file. */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, canvas { max-width: 100%; }
/* PRD-036: a <picture> only chooses the file. It takes no box of its own, so
   the img inside lays out exactly as it did without it. */
picture { display: contents; }
img { height: auto; }

a { color: var(--signal-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* SPEC.md 10: visible 2px Ink outline. */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* --- Type scale. SPEC.md 3.2. ------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }

@media (max-width: 600px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
}

/* Hero display. Height is set by content, never 100vh. SPEC.md 5.3. */
.display {
  font-size: clamp(52px, 9vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 700;
}

/* Label: 12 to 13px, uppercase, +0.07em, 600.
   Chinese takes no uppercase and no tracking, which phase 2 handles with a
   :lang() override rather than a second class. */
.lbl {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate);
}

.dek { font-size: 19px; color: var(--slate); margin: var(--s3) 0 0; max-width: 62ch; }

/* Tabular numerals on anything that is a figure or sits in a data column. */
.num { font-variant-numeric: tabular-nums; }

/* Body measure. SPEC.md 3.2 caps body copy at 68ch, 5.4 at a 680px column. */
.body-col { max-width: var(--body-col); }
.body-col p { max-width: var(--measure); }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Layout. SPEC.md 3.3. ----------------------------------------------- */
.w { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.grid { display: grid; gap: var(--grid-gap); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 960px) {
  .g3, .g4, .g5 { grid-template-columns: repeat(2, 1fr); }
  .g2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .g3, .g4, .g5 { grid-template-columns: 1fr; }
}

/* Separation is a 1px rule. No shadows anywhere in this theme. */
.sec { padding-block: var(--s8); border-top: 1px solid var(--line); }
.sec--first { border-top: 0; }

/* --- Motion. Brand rule 7: arrive, settle, stay still. ------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Skip link. PRD-004. ------------------------------------------------- */
.skip {
  position: absolute;
  left: var(--s4);
  top: calc(-1 * var(--s9));
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius-control);
  font-size: 15px;
  font-weight: 600;
}
.skip:focus { top: var(--s4); text-decoration: none; }

/* ---- cards.css ---- */
/* PRD-001: the two Ghost card width classes gscan requires a theme to style.
   PRD-012 builds the full prose and Ghost card styling in prose.css. These
   two exist now because gscan treats their absence as an error, so the theme
   cannot pass its gate without them. */

.kg-width-wide {
  max-width: 1040px;
  margin-inline: auto;
}

.kg-width-full {
  max-width: 100%;
  margin-inline: 0;
}

/* ---- components.css ---- */
/* PRD-006: the component library. Every reusable piece the templates are built
   from lives here, defined once. Before this file existed there were three
   near-duplicate button rules, which is how they drifted to different heights.

   Every colour comes from tokens.css. No hex in this file. */

/* ==========================================================================
   Buttons
   Must render identically on <a> and <button>. They do not by default: a
   <button> does not inherit line-height from body, so without the explicit
   values below it renders about 8px shorter than an anchor with the same
   padding. Everything here that looks redundant is erasing a user agent
   default.
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-control);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn--sm { min-height: 34px; padding: 0 14px; font-size: 14px; }

/* Accent uses --signal-text, never --signal. Brand rule 2. */
.btn--acc { background: var(--signal-text); border-color: var(--signal-text); color: var(--surface); }
.btn--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ==========================================================================
   Forms. Ghost adds .loading, .success and .error to the form element, and all
   three must be styled or the reader gets a browser default mid-signup.
   ========================================================================== */
.field {
  font-family: inherit;
  font-size: 16px;            /* 16px stops iOS zooming the viewport on focus */
  line-height: 1.2;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
}
.field::placeholder { color: var(--slate-light); }
.field:disabled { opacity: 0.6; cursor: not-allowed; }

.form-row { display: flex; gap: var(--s2); max-width: 440px; }
.form-row .field { flex: 1; min-width: 0; }
@media (max-width: 440px) { .form-row { flex-direction: column; } }

.form-note { font-size: 13px; color: var(--slate); margin: var(--s2) 0 0; }
.form-msg { font-size: 14px; margin: var(--s2) 0 0; display: none; }
/* PRD-041. Underlined, because in 13px Slate text a link told apart by colour
   alone fails WCAG 1.4.1. Same treatment as .gate__alt a. */
.form-terms a { text-decoration: underline; }

/* Ghost toggles these classes on the form. */
.members-form.loading .btn { opacity: 0.6; pointer-events: none; }
.members-form.success .form-msg--success { display: block; color: var(--ink); }
.members-form.error .form-msg--error { display: block; color: var(--signal-text); }
.members-form.error .field { border-color: var(--signal-text); }

/* ==========================================================================
   Figure block.

   THE MOST IMPORTANT DEFAULT IN THE THEME. emphasis defaults to ink, so a
   caller that forgets gets the safe option. Brand rule 2 allows exactly one
   --signal figure per page, at 24px and up, and every listing card renders
   dozens of figures. If red were the default, a collection page would be
   forty violations.
   ========================================================================== */
.fig {
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 0;
  color: var(--ink);
}
.fig--ink { color: var(--ink); }
.fig--signal { color: var(--signal); }

.fig--sm { font-size: 36px; }
.fig--md { font-size: 52px; }
.fig--lg { font-size: 64px; }

/* Direction is the arrow glyph, in Ink. Red never encodes direction. */
.fig__dir { color: var(--ink); margin-right: 0.22em; font-size: 0.37em; vertical-align: 0.22em; }

.fig__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate);
  margin: var(--s2) 0 0;
}

/* Typographic fallback when a post has no figure in its excerpt. */
.tile--type {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 116px;
}
.tile--type span {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  /* --slate, not --slate-light. SPEC.md 3.1 rates --slate at 6.2:1 on Paper;
     --slate-light is for Ink surfaces and measured 2.39:1 here, below the 3:1
     minimum for large text. Caught by axe on /briefs/. */
  color: var(--slate);
}

/* ==========================================================================
   Cards. 0 radius, 1px rule, no shadow.
   ========================================================================== */
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-panel);
}
.card__tile { border-bottom: 1px solid var(--line); padding: var(--s5); background: var(--paper); }
.card__meta { padding: var(--s4) var(--s5) var(--s5); }
.card__title { font-size: 18px; margin: 0 0 var(--s2); }
.card__title a { color: var(--ink); }
.card__sub { font-size: 14px; color: var(--slate); margin: 0; }
.card--lead { grid-column: span 2; }
.card--lead .fig { font-size: 52px; }
@media (max-width: 600px) { .card--lead { grid-column: span 1; } }

/* ==========================================================================
   Tag chips. Labels, never gates.
   ========================================================================== */
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; margin: 0 0 var(--s3); }
.chip {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 3px 8px;
  color: var(--slate);
}
.chip--member { border-color: var(--signal-text); color: var(--signal-text); }

/* ==========================================================================
   Tables and the Sources and method box
   ========================================================================== */
.t { width: 100%; border-collapse: collapse; margin: var(--s5) 0; font-size: 15px; }
.t th, .t td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.t td { font-variant-numeric: tabular-nums; }
.t th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate);
  font-weight: 600;
}
.t tr.is-highlight td { background: var(--signal-tint); }

.method {
  border: 1px solid var(--line);
  background: var(--signal-tint);
  padding: var(--s5);
  margin: var(--s6) 0;
  border-radius: var(--radius-panel);
}
.method .lbl { color: var(--signal-text); }
.method p { margin: var(--s3) 0 0; font-size: 15px; }

/* ==========================================================================
   PRD-014: collection listings and market pages
   ========================================================================== */
.sechead { padding: var(--s7) 0 var(--s5); }
.crumb { font-size: 13px; color: var(--slate); margin: 0 0 var(--s4); }
.crumb a { color: var(--slate); }
.byline { font-size: 14px; color: var(--slate); margin: var(--s4) 0 0; }

.filters {
  display: flex; gap: var(--s2); flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: var(--s4) 0; margin: 0 0 var(--s6);
}
.filters a {
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); border-radius: var(--radius-control);
  padding: 5px 10px; color: var(--ink);
}
.filters a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.pager {
  display: flex; align-items: center; gap: var(--s4); justify-content: center;
  border-top: 1px solid var(--line); padding: var(--s6) 0 0; margin: var(--s7) 0 0; font-size: 14px;
}
.pager .pages { color: var(--slate); }

.mkt { display: flex; align-items: center; gap: var(--s4); }
.mkt__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; flex: none;
  border: 1px solid var(--ink); border-radius: var(--radius-control);
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em; text-transform: uppercase;
}

/* --- PRD-012: brief ------------------------------------------------------- */
.brief { padding-block: var(--s6) 0; }
.figblock {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: var(--s6) 0; margin: var(--s6) 0;
}
.figblock[hidden] { display: none; }
.feature { margin: var(--s6) 0; }
/* Duotone per the brand kit: shadows Ink, highlights Paper. */
.feature img { width: 100%; filter: grayscale(1) contrast(1.08); }

/* The gate moved to gate.css at PRD-018, which owns it. */

.issue-page { padding-block: var(--s6) 0; }

/* PRD-015 and PRD-032: SignaPress, the shelf, the covers and the book page
   all live in press.css. */

/* --- PRD-042: the mobile brief feed --------------------------------------
   The "Next brief" link ends every brief and issue. It shows at 600px and
   below only, where assets/js/feed.js replaces it with the brief it points
   to. Above 600px the page is exactly as it was before PRD-042. */
.feed-next { display: none; }
@media (max-width: 600px) {
  .feed-next {
    display: block;
    margin-top: var(--s7);
  }
  .feed-next .prose { border-top: 1px solid var(--line); padding-top: var(--s5); }
}
.feed-next__lbl {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--slate);
  margin: 0;
}
.feed-next__link {
  display: block;
  min-height: 44px;
  margin-top: var(--s3);
  font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em;
  color: var(--signal-text);
  text-decoration: none;
}
.feed-next__all { min-height: 44px; margin-top: var(--s4); }

/* A brief the feed added. Its title was the page's h1 on its own page and is
   an h2 here, so the page keeps one h1. It looks the same as the h1. */
.feed-item { border-top: 1px solid var(--line); margin-top: var(--s7); }
.feed-item__lbl {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--slate);
  margin: var(--s5) 0 0;
}
.prose h2.feed-title { font-size: 32px; margin: 0; }
/* Buttons inside .prose would otherwise take the article's link colour
   (.prose a), which put red text on the red accent button. */
.prose a.feed-next__all { color: var(--ink); }
.members-form--portal { display: inline-flex; flex-direction: column; align-items: center; gap: var(--s2); }
.prose .members-form--portal a.btn--acc { color: var(--surface); min-height: 44px; }

/* ---- prose.css ---- */
/* PRD-012: body copy and every Ghost card type, on brand.
   Shared by post.hbs, custom-weekly-signal.hbs, custom-book.hbs and page.hbs,
   so a change here touches all four. */

.prose { max-width: var(--body-col); }
.prose > * { max-width: var(--measure); }
.prose > .kg-width-wide,
.prose > .kg-width-full,
.prose > figure,
.prose > table { max-width: none; }

.prose p { margin: 0 0 var(--s5); }
.prose h2 { font-size: 28px; margin: var(--s7) 0 var(--s4); }
.prose h3 { font-size: 20px; margin: var(--s6) 0 var(--s3); }
@media (max-width: 600px) { .prose h2 { font-size: 24px; } }

.prose ul, .prose ol { margin: 0 0 var(--s5); padding-left: var(--s5); }
.prose li { margin: 0 0 var(--s2); }

/* No italics. CLAUDE.md rule 4, and the brand kit's blockquote is upright. */
.prose blockquote {
  margin: var(--s5) 0;
  padding: var(--s1) 0 var(--s1) var(--s5);
  border-left: 2px solid var(--ink);
  font-style: normal;
  color: var(--ink);
}

.prose table { width: 100%; border-collapse: collapse; margin: var(--s5) 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.prose td { font-variant-numeric: tabular-nums; }
.prose th {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--slate); font-weight: 600;
}
.prose tr.is-highlight td { background: var(--signal-tint); }
/* Tables scroll rather than clip at phone width. */
@media (max-width: 600px) {
  .prose table { display: block; overflow-x: auto; }
}

/* Code is for method notes only. */
.prose code, .prose pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}
.prose pre {
  background: var(--surface); border: 1px solid var(--line);
  padding: var(--s4); overflow-x: auto; border-radius: var(--radius-panel);
}

.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--s7) 0; }
.prose a { color: var(--signal-text); }

/* --- Ghost card types. Every one of these must render on brand, which is
   why content/fixtures carries a post containing all of them. ------------- */
.prose figure { margin: var(--s6) 0; }
.prose figcaption {
  font-size: 13px; color: var(--slate); margin-top: var(--s3); text-align: center;
}
.prose .kg-image, .prose img { display: block; height: auto; }

.kg-gallery-container { display: flex; flex-direction: column; gap: var(--s3); }
.kg-gallery-row { display: flex; gap: var(--s3); }
.kg-gallery-image img { width: 100%; height: auto; }

.kg-callout-card {
  display: flex; gap: var(--s3);
  background: var(--surface); border: 1px solid var(--line);
  padding: var(--s4) var(--s5); margin: var(--s5) 0;
}
.kg-callout-text { margin: 0; }

.kg-toggle-card { border: 1px solid var(--line); padding: var(--s4) var(--s5); margin: var(--s5) 0; }
.kg-toggle-heading { display: flex; justify-content: space-between; align-items: center; }
.kg-toggle-heading-text { font-size: 17px; font-weight: 600; margin: 0; }
.kg-toggle-card-icon { background: none; border: 0; cursor: pointer; color: var(--slate); }
.kg-toggle-content { margin-top: var(--s3); }
.kg-toggle-card[data-kg-toggle-state="close"] .kg-toggle-content { display: none; }

.kg-bookmark-card { margin: var(--s5) 0; }
.kg-bookmark-container {
  display: flex; border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; color: var(--ink);
}
.kg-bookmark-content { padding: var(--s4) var(--s5); }
.kg-bookmark-title { font-weight: 600; }
.kg-bookmark-description { color: var(--slate); font-size: 14px; margin-top: var(--s2); }
.kg-bookmark-metadata { font-size: 13px; color: var(--slate); margin-top: var(--s3); }
.kg-bookmark-thumbnail img { height: 100%; object-fit: cover; }

.kg-button-card { margin: var(--s5) 0; display: flex; }
.kg-button-card.kg-align-center { justify-content: center; }
.kg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 20px; line-height: 1;
  border: 1px solid var(--ink); border-radius: var(--radius-control);
  font-weight: 600; color: var(--ink); text-decoration: none;
}
.kg-btn-accent { background: var(--signal-text); border-color: var(--signal-text); color: var(--surface); }

.kg-header-card { padding: var(--s7) var(--s5); margin: var(--s6) 0; border: 1px solid var(--line); }
.kg-header-card h2 { margin-top: 0; }

.kg-file-card { margin: var(--s5) 0; }
.kg-file-card-container {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  border: 1px solid var(--line); padding: var(--s4) var(--s5); text-decoration: none; color: var(--ink);
}
.kg-file-card-title { font-weight: 600; }
.kg-file-card-caption, .kg-file-card-filesize { font-size: 13px; color: var(--slate); }

.kg-embed-card { margin: var(--s6) 0; display: flex; justify-content: center; }
.kg-embed-card iframe { max-width: 100%; }

/* Ghost's own paywall marker, if it ever renders. */
.kg-nft-card, .kg-product-card { border: 1px solid var(--line); padding: var(--s5); margin: var(--s5) 0; }

.footnotes { font-size: 14px; color: var(--slate); border-top: 1px solid var(--line); margin-top: var(--s7); padding-top: var(--s4); }

/* ---- chrome.css ---- */
/* PRD-005: header and footer. Every colour from tokens.css. */

/* --- Header -------------------------------------------------------------- */
.hd {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
}

.hd__inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  padding-block: 18px;
}

/* INC-005: the wordmark never gives up width to the tools beside it. Below
   600px the tools make room instead, see the menu sheet section. */
.hd__logo { flex: none; }
.hd__logo svg { height: 21px; width: auto; display: block; }
@media (max-width: 960px) { .hd__logo svg { height: 17px; } }

.hd__nav { display: flex; gap: 22px; flex: 1; }
.hd__nav a { color: var(--ink); font-size: 15px; font-weight: 500; }
.hd__nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }

.hd__tools { display: flex; align-items: center; gap: var(--s3); margin-left: auto; }

/* Transparent variant, homepage only. The hero is Ink in BOTH modes, so these
   use the mode invariant tokens. Using --paper here inverts in Ink mode. */
.hd--over {
  background: transparent;
  border-bottom: 0;
  position: absolute;
  inset: 0 0 auto;
  --word: var(--paper-fixed);
}
/* INC-008: scoped to the bar, .hd__inner. The menu sheet is inside .hd--over
   too, on a Paper background, and these rules made its contents cream on
   cream on the homepage in light mode. */
.hd--over .hd__nav a,
.hd--over .hd__burger,
.hd--over .hd__inner .btn { color: var(--paper-fixed); border-color: var(--paper-fixed); }
.hd--over .hd__inner .btn--acc {
  background: var(--signal-text);
  border-color: var(--signal-text);
  color: var(--surface);
}

/* --- Mobile menu sheet --------------------------------------------------- */
.hd__burger { display: none; }
@media (max-width: 960px) {
  .hd__nav { display: none; }
  /* The burger is a .btn in the markup, so it inherits every alignment fix
     above. Only its visibility is handled here. */
  .hd__burger { display: inline-flex; }
}

.sheet {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 50;
  overflow: auto;
}
.sheet[hidden] { display: none; }
.sheet__inner { padding-block: var(--s5); }
.sheet__close { margin-bottom: var(--s6); }
.sheet nav { display: flex; flex-direction: column; gap: var(--s5); }
.sheet nav a { color: var(--ink); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }

/* INC-005: below 600px the header keeps the wordmark, Join and Menu, and
   Search and Sign in move into the sheet. The sheet shows them at every width
   it can open at, so rotating a phone past 600px with the sheet open never
   leaves them only in the header behind it. */
.sheet__tools { display: flex; gap: var(--s3); margin-bottom: var(--s6); }
@media (max-width: 600px) {
  .hd__wide { display: none; }
}

/* --- Footer -------------------------------------------------------------- */
.ft { border-top: 1px solid var(--line); padding: var(--s7) 0 var(--s6); background: var(--paper); }
.ft__logo { height: 26px; width: auto; display: block; }
.ft__position { margin: var(--s5) 0 0; max-width: 56ch; color: var(--slate); font-size: 15px; }
.ft__brand { margin: var(--s3) 0 0; font-weight: 600; }

.ft__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--grid-gap); margin-top: var(--s7); }
@media (max-width: 960px) { .ft__cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ft__cols { grid-template-columns: 1fr; } }

.ft__cols ul { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.ft__cols li { margin: 0 0 var(--s2); }
.ft__cols li a { color: var(--ink); font-size: 15px; }

.ft__base {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: var(--s7);
  padding-top: var(--s5);
  font-size: 13px;
  color: var(--slate);
}
.ft__base a { color: var(--slate); }

/* The sticky header would otherwise cover the first lines of content when the
   skip link jumps to #main, which defeats the keyboard path it exists for. */
#main { scroll-margin-top: 80px; }

/* Navigation list, rendered by partials/navigation.hbs. */
.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.nav a { color: var(--ink); font-size: 15px; font-weight: 500; }
.nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
.hd--over .hd__nav .nav a { color: var(--paper-fixed); }
.sheet .nav { flex-direction: column; gap: var(--s5); }
.sheet .nav a { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }

/* ---- page.css ---- */
/* PRD-016: static pages, the placeholder banner and the error page.
   Loaded on pages and errors only, not on every route. */

/* --- Static page ---------------------------------------------------------- */

.page { padding-block: var(--s7) var(--s8); }
.page__updated {
  margin-top: var(--s7);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--slate);
}

/* Contact addresses are selectable text, never a form: Ghost has no form
   backend, so a form would need a third party or would silently do nothing. */
.page .prose a[href^="mailto:"] { word-break: break-word; }

/* --- Placeholder banner --------------------------------------------------- */

/* Ink surface, not red. Brand rule 2 reserves red for the one figure, and a red
   banner on a legal page reads as an error rather than as "not written yet". */
.placeholder {
  margin: 0 0 var(--s6);
  padding: var(--s5);
  background: var(--ink-fixed);
  color: var(--paper-fixed);
  border: 0;
  max-width: var(--measure);
}
.placeholder p { margin: 0 0 var(--s3); color: var(--paper-fixed); }
.placeholder p:last-child { margin-bottom: 0; }
.placeholder__lbl {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-fixed);
}
.placeholder__act a { color: var(--paper-fixed); text-decoration: underline; }
.placeholder__act a:hover { text-decoration: none; }

/* --- Error page ----------------------------------------------------------- */

.err { padding-block: var(--s8) var(--s9); }
.err__code {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin: 0 0 var(--s3);
}
.err h1 { margin: 0 0 var(--s3); }
.err__msg { font-size: 14px; color: var(--slate); margin: 0 0 var(--s5); }

.err__ways {
  list-style: none;
  margin: var(--s6) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.err__ways li { margin: 0; border-bottom: 1px solid var(--line); }
.err__ways a,
.err__search {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--s4) 0;
  font: inherit;
  color: var(--signal-text);
  background: none;
  border: 0;
  cursor: pointer;
}
.err__ways a:hover,
.err__search:hover { color: var(--ink); }

.err__note {
  margin: var(--s7) 0 0;
  font-size: 14px;
  color: var(--slate);
}

/* ---- search.css ---- */
/* PRD-016: Ghost's own search, styled only where Ghost permits.

   sodo-search renders in a shadow root that a theme cannot reach, so almost
   nothing here is ours to style. Do NOT reimplement it: Ghost wires the index,
   the keyboard handling and the member state, and a hand rolled box would lose
   all three and drift on every Ghost release.

   What a theme controls is the TRIGGER, and the accent colour Ghost reads from
   site settings. Everything below is the trigger. */

[data-ghost-search] { cursor: pointer; }

[data-ghost-search]:focus-visible {
  outline: 2px solid var(--signal-text);
  outline-offset: 2px;
}

/* Ghost injects its own root element. Keep it above the header, which is the
   one layering decision the theme does own. */
#sodo-search-root { position: relative; z-index: 100; }

/* ---- members.css ---- */
/* PRD-017: member state, and the seam between the theme and Ghost's Portal.

   What is NOT here: the .members-form .loading/.success/.error rules. Those
   have lived in components.css since PRD-006 and moving them would change no
   behaviour, which makes it a refactor and a refactor needs its own document
   per CLAUDE.md. Not worth opening one to relocate six selectors. */

/* Portal renders in its own injected root, outside the theme's stacking
   context. Without this it can open BEHIND the sticky header, which reads as
   "the Join button does nothing". The header sits at a lower z-index on
   purpose; this is the one layering decision the theme owns here. */
#ghost-portal-root { position: relative; z-index: 3999999; }

/* Every Portal trigger is a theme element, so its focus ring is ours. Matches
   the search trigger in search.css: same affordance, same treatment. */
[data-portal]:focus-visible {
  outline: 2px solid var(--signal-text);
  outline-offset: 2px;
}

/* Signed in and signed out states are rendered server side by {{#if @member}},
   so there is nothing to hide with CSS. These two exist only to keep the
   header from reflowing when the button text changes length between
   "Sign in" and "Account". */
.hd__tools [data-portal="signin"],
.hd__tools [data-portal="account"] { min-width: 72px; text-align: center; }

/* A member reading a members-only page should not see a signup form offering
   what they already have. PRD-018 builds the gate itself; this is the shared
   rule both states rely on. */
.members-form[hidden] { display: none; }

/* ---- gate.css ---- */
/* PRD-018: the paywall panel.

   Nothing here controls access. Ghost truncates the body server side, so the
   withheld text is ABSENT from the HTML. These rules describe a panel that
   explains an absence, which is why the fade below is allowed to be purely
   decorative: there is nothing underneath it to reveal. */

.gate {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: var(--s6);
  margin: var(--s7) 0;
  text-align: center;
  border-radius: var(--radius-panel);
  position: relative;
}
.gate h2 { font-size: 22px; margin: 0 0 var(--s2); }
.gate p { color: var(--slate); margin: 0 auto var(--s5); max-width: 52ch; }
.gate p:last-child { margin-bottom: 0; }
.gate .members-form { display: inline-block; text-align: left; }

.gate__lbl {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 var(--s2);
}

/* The fade.
   
   It was 120px tall against a 48px top margin, so it washed out 72px of LIVE
   content above the panel: the last lines of the teaser, and on a paid post
   Ghost's own CTA with its working buttons, greyed out but still clickable
   because of pointer-events: none. Measured by code review 2026-10-08.
   
   Now it is exactly the height of the margin, so it only ever covers the gap
   it was drawn for. The comment that used to justify the overlap, that there
   is nothing underneath to reveal, was wrong: there is, it is just not the
   gated text. */
.gate::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 100%;
  height: var(--s7);
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--paper));
}

/* --- The closed gate, PRD-028 --------------------------------------------

   A post set to "Paid-members only" or "Specific tiers", which should never
   happen. No price, no benefits list, no button: the panel is a dead end by
   design. It needs no rules of its own, since .gate already carries the
   border, padding and centring, so this block exists only to say that the
   absence is deliberate rather than forgotten.

   Deleted with the paid gate: .gate__price, .gate__amt, .gate__per,
   .gate__benefits and .gate__soon. */

.gate__alt { font-size: 14px; margin-top: var(--s4); }
/* Underlined, not just coloured. axe `link-in-text-block`: a link inside a
   paragraph distinguished only by colour fails WCAG 1.4.1. Found by the
   rendered suite after the gate was rebuilt, 2026-10-08. */
.gate__alt a { color: var(--signal-text); text-decoration: underline; }
.gate__alt a:hover { text-decoration: none; }

@media (max-width: 600px) {
  .gate { padding: var(--s5) var(--s4); }
  .gate h2 { font-size: 20px; }
}

/* ---- membership.css ---- */
/* PRD-019: the membership page. One state since PRD-028: membership is free. */

.mem { padding-block: var(--s7) var(--s9); }
.mem__head { max-width: var(--measure); margin-bottom: var(--s5); }
.mem__head h1 { margin: 0 0 var(--s3); }
.mem__intro { margin-bottom: var(--s7); }
.mem__h { font-size: 22px; margin: 0 0 var(--s5); }

/* Still a list, so a screen reader announces it as one before reading it,
   even though PRD-028 left it with a single item. */
.mem__tiers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--grid-gap);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

/* One card. Without this the auto-fit column takes the full 1200px and the
   card reads as a page-wide banner rather than as a card. PRD-028. */
.mem__tiers--one { grid-template-columns: minmax(280px, 420px); }

.tier {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-panel);
  padding: var(--s6);
}
.tier__name { font-size: 20px; margin: 0 0 var(--s2); }
.tier__desc { color: var(--slate); margin: 0 0 var(--s5); font-size: 15px; }

.tier__price { display: flex; gap: var(--s2); align-items: baseline; margin: 0 0 var(--s2); }
/* Ink, not red. Brand rule 2 allows one red figure per page, and two tiers
   would mean two. A price is not this page's headline figure. */
.tier__amt { font-size: 36px; font-weight: 700; color: var(--ink); line-height: 1; }
.tier__per { font-size: 14px; color: var(--slate); }

.tier__benefits { list-style: none; margin: 0 0 var(--s6); padding: 0; }
.tier__benefits li {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.tier__benefits li:last-child { border-bottom: 0; }

.tier .members-form { margin-top: var(--s4); }

/* Shown instead of the signup form to someone already signed in. */
.tier__have { font-size: 15px; color: var(--slate); margin: var(--s4) 0 0; }
.tier__have a { color: var(--signal-text); text-decoration: underline; }
.tier__have a:hover { text-decoration: none; }

/* ---- press.css ---- */
/* ==========================================================================
   PRD-015 and PRD-032: SignaPress. The shelf, the covers, the book page.

   Covers are typographic CSS. Publisher artwork is never reproduced.

   The four shelf books take one kit colour each. Text on each is whichever
   of Ink or Paper passes 4.5:1, per mode, because Ink mode swaps --harbour and
   --plum to their lighter -ink values:
     harbour  Paper 6.26 | Ink mode: Ink 5.35
     plum     Paper 7.47 | Ink mode: Ink 5.53
     ochre    --ochre fails both (Ink 4.31, Paper 3.90), so --ochre-ink, Ink 8.40
     stone    Ink 5.17, both modes
   Chart colours on covers are an owner decision recorded in PRD-032.
   ========================================================================== */

/* --- The library index ---------------------------------------------------- */
.press__link { text-decoration: none; display: block; }
/* The note belongs to the shelf, not the footer: 24px (32px from 600px)
   under the shelf, then the page's own bottom padding before the footer
   divider. Padding, so it can never collapse into the footer. 64px from
   600px is the nearest token to the title-to-shelf gap; 48px on phones.
   The book pages already end with 64px (.book below). */
.press { padding-bottom: var(--s7); }
.press__suggest { margin: var(--s5) 0 0; font-size: 15px; }
/* The link is not the page's red: it takes the line's own text colour
   in every state, with a 1px underline that thickens on hover and a focus
   ring in the same colour. This link only; the global link style stays. */
.press__suggest a {
  color: inherit;
  text-decoration: underline; text-decoration-color: currentColor;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.press__suggest a:hover { text-decoration-thickness: 2px; }
.press__suggest a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (min-width: 600px) {
  .press { padding-bottom: var(--s8); }
  .press__suggest { margin-top: var(--s6); }
}

/* Flat by default: the grid fallback, phones, and reduced motion. The 3D
   shelf below is an enhancement on top of this, never a replacement. */
.shelf {
  list-style: none; padding: 0; margin: var(--s6) 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5);
}
@media (min-width: 600px) { .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.shelf__book { display: block; text-decoration: none; color: inherit; }
.shelf__book:hover { text-decoration: none; }

/* --- The 3D book: one box model for the shelf and the book page -----------
   PRD-032 amendments 3 to 6. Six faces around the centre of a box. --w, --d
   and --h are the book as the reader sees it; the faces are built at twice
   that (--fw, --fd, --fh) and the box is scaled by 0.5, so text on the faces
   is rasterised at 2x and stays crisp. --ratio is the front file's height over
   its width, set on the root from the book's data in press-book.hbs.

   Amendment 6: the back and spine are one flat colour, --b3-bg, the front
   cover's own background, with no filter or shading. --b3-ink is the spine
   type, kit Paper or Ink. Every face carries a 1px inset hairline,
   --book-edge, so a white book reads on Paper and a dark one on Ink without
   changing its size. --b3-hair is 1px at reader scale, 2px on the 2x faces. */
[data-b3-root] {
  --w: 260px; --d: 32px; --ratio: 1.5; --ts: 1; --b3-hair: 1px;
  --h: calc(var(--w) * var(--ratio));
  --fw: calc(var(--w) * 2); --fd: calc(var(--d) * 2); --fh: calc(var(--fw) * var(--ratio));
}

.b3 { display: block; position: relative; }
.b3__face {
  display: block; position: absolute; top: 0; left: 0; overflow: hidden;
  box-shadow: inset 0 0 0 var(--b3-hair) var(--book-edge);
}
.b3__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* The image would paint over the front's own inset shadow, so the front's
   hairline is drawn on a layer above it. */
.b3__front::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  box-shadow: inset 0 0 0 var(--b3-hair) var(--book-edge);
}

/* Flat, by default: the front alone, at the cover's own proportions. This is
   the shelf below 600px and under reduced motion. */
.b3__front { position: relative; width: 100%; aspect-ratio: 1 / var(--ratio); }
.b3__back, .b3__spine, .b3__fore, .b3__top, .b3__bottom { display: none; }

.b3__back, .b3__spine { background-color: var(--b3-bg); color: var(--b3-ink); }

/* Spine type: the title only (amendment 9), reading top to bottom from 24px
   below the head of the spine, so every title on the shelf starts at the
   same height. Line-height is the spine's width, so the text sits centred
   across it. Sizes are reader sizes times two, the face build scale, and do
   not shrink with the shelf: 13px semibold. Never cut: if the title does not
   fit the spine's length, book3d.js steps it down to 11px (--b3-title), and
   only then wraps it to two columns (is-two). The size is capped so the
   glyphs keep at least 3px clear of both spine edges. */
.b3__spinetitle {
  flex: 1 1 0; min-inline-size: 0; text-align: start;
  font-size: min(calc(var(--b3-title, 13px) * 2), calc((var(--fd) - 12px) / 1.25));
  font-weight: 600; letter-spacing: -0.01em;
}
.b3__spinetitle.is-two { line-height: calc(var(--fd) / 2); }

/* The solid object: always on the book page, and on the 3D shelf below. */
.b3-stage { --b3-hair: 2px; }
.b3-stage .b3 {
  position: absolute; display: block;
  width: var(--fw); height: var(--fh);
  left: calc(50% - var(--fw) / 2); top: calc(50% - var(--fh) / 2);
  transform-style: preserve-3d;
}
.b3-stage .b3__face { display: block; position: absolute; top: 0; left: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.b3-stage .b3__front { width: var(--fw); height: var(--fh); aspect-ratio: auto; transform: translateZ(calc(var(--fd) / 2)); }
/* The hinge: 1px, 6px in from the spine, a quarter Ink. On the face, over the image. */
.b3-stage .b3__front::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 12px; width: 2px; z-index: 1;
  background: color-mix(in srgb, var(--ink-fixed) 25%, transparent);
}
.b3-stage .b3__back {
  width: var(--fw); height: var(--fh);
  transform: rotateY(180deg) translateZ(calc(var(--fd) / 2));
}
.b3-stage .b3__spine {
  width: var(--fd); height: var(--fh); box-sizing: border-box;
  left: calc((var(--fw) - var(--fd)) / 2);
  transform: rotateY(-90deg) translateZ(calc(var(--fw) / 2));
  writing-mode: vertical-rl; text-orientation: mixed;
  display: flex; flex-direction: row; align-items: stretch;
  padding-top: calc(24px * 2); padding-bottom: calc(32px * var(--ts));
  line-height: var(--fd);
}
/* The page block: off-white with fine page lines across its depth. */
.b3-stage .b3__fore, .b3-stage .b3__top, .b3-stage .b3__bottom {
  --page-line: color-mix(in srgb, var(--slate-fixed) 35%, var(--paper-fixed));
  background: repeating-linear-gradient(90deg, var(--paper-fixed) 0 4px, var(--page-line) 4px 6px);
}
.b3-stage .b3__fore {
  width: var(--fd); height: var(--fh); left: calc((var(--fw) - var(--fd)) / 2);
  transform: rotateY(90deg) translateZ(calc(var(--fw) / 2));
  filter: brightness(0.95);
}
.b3-stage .b3__top, .b3-stage .b3__bottom {
  width: var(--fw); height: var(--fd); top: calc((var(--fh) - var(--fd)) / 2);
  background: repeating-linear-gradient(180deg, var(--paper-fixed) 0 4px, var(--page-line) 4px 6px);
}
.b3-stage .b3__top { transform: rotateX(90deg) translateZ(calc(var(--fh) / 2)); }
.b3-stage .b3__bottom { transform: rotateX(-90deg) translateZ(calc(var(--fh) / 2)); }

/* --- The 3D shelf ----------------------------------------------------------
   Each book rests turned 90 degrees, spine to you, in a slot as wide as the
   spine. On hover or keyboard focus the slot widens to the cover and the
   book turns to face you. The translateZ keeps the showing face on the
   shelf's plane. Shelf books are 200 wide, so the depth and the spine type
   scale with them: 32px at the book page's 260 becomes about 25px.

   Only above 600px and only when motion is allowed. No drag on the shelf. */
@media (min-width: 600px) and (prefers-reduced-motion: no-preference) {
  .shelf { display: flex; align-items: flex-end; gap: var(--s3); }
  .shelf .shelf__book { --w: 200px; --d: calc(32px * 200 / 260); --ts: calc(200 / 260); --b3-hair: 2px; }
  /* The same solid object, for the shelf. */
  .shelf .b3 {
    position: absolute; display: block;
    width: var(--fw); height: var(--fh);
    left: calc(50% - var(--fw) / 2); top: calc(50% - var(--fh) / 2);
    transform-style: preserve-3d;
  }
  .shelf .b3__face { display: block; position: absolute; top: 0; left: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
  .shelf .b3__front { width: var(--fw); height: var(--fh); aspect-ratio: auto; transform: translateZ(calc(var(--fd) / 2)); }
  /* The hinge: 1px, 6px in from the spine, a quarter Ink. On the face, over the image. */
  .shelf .b3__front::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 12px; width: 2px; z-index: 1;
    background: color-mix(in srgb, var(--ink-fixed) 25%, transparent);
  }
  .shelf .b3__back {
    width: var(--fw); height: var(--fh);
    transform: rotateY(180deg) translateZ(calc(var(--fd) / 2));
  }
  .shelf .b3__spine {
    width: var(--fd); height: var(--fh); box-sizing: border-box;
    left: calc((var(--fw) - var(--fd)) / 2);
    transform: rotateY(-90deg) translateZ(calc(var(--fw) / 2));
    writing-mode: vertical-rl; text-orientation: mixed;
    display: flex; flex-direction: row; align-items: stretch;
    padding-top: calc(24px * 2); padding-bottom: calc(32px * var(--ts));
    line-height: var(--fd);
  }
  /* The page block: off-white with fine page lines across its depth. */
  .shelf .b3__fore, .shelf .b3__top, .shelf .b3__bottom {
    --page-line: color-mix(in srgb, var(--slate-fixed) 35%, var(--paper-fixed));
    background: repeating-linear-gradient(90deg, var(--paper-fixed) 0 4px, var(--page-line) 4px 6px);
  }
  .shelf .b3__fore {
    width: var(--fd); height: var(--fh); left: calc((var(--fw) - var(--fd)) / 2);
    transform: rotateY(90deg) translateZ(calc(var(--fw) / 2));
    filter: brightness(0.95);
  }
  .shelf .b3__top, .shelf .b3__bottom {
    width: var(--fw); height: var(--fd); top: calc((var(--fh) - var(--fd)) / 2);
    background: repeating-linear-gradient(180deg, var(--paper-fixed) 0 4px, var(--page-line) 4px 6px);
  }
  .shelf .b3__top { transform: rotateX(90deg) translateZ(calc(var(--fh) / 2)); }
  .shelf .b3__bottom { transform: rotateX(-90deg) translateZ(calc(var(--fh) / 2)); }
  .shelf .shelf__book {
    position: relative; flex: none;
    width: var(--d); height: var(--h);
    perspective: 1600px;
    transition: width 450ms ease-out;
  }
  .shelf .shelf__book:hover, .shelf .shelf__book:focus-visible { width: var(--w); }
  .shelf .b3 {
    transform: scale(0.5) translateZ(calc(var(--fw) / -2)) rotateY(90deg);
    transition: transform 450ms ease-out;
  }
  .shelf .shelf__book:hover .b3,
  .shelf .shelf__book:focus-visible .b3 { transform: scale(0.5) translateZ(calc(var(--fd) / -2)) rotateY(0deg); }
}

/* --- The book page: rotatable ---------------------------------------------
   Drag, touch and keys are book3d.js. pan-y leaves vertical touch drags to
   the page, so the book never traps scrolling on a phone. */
.b3-stage {
  display: block; position: relative;
  width: var(--w); height: var(--h);
  margin: var(--s5) auto var(--s6);
  perspective: 1400px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none; -webkit-user-select: none;
}
.b3-stage.is-moving { cursor: grabbing; }
.b3-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: var(--s5); }
.b3-stage .b3 {
  transform: scale(0.5) rotateX(var(--rx, -8deg)) rotateY(var(--ry, 30deg));
  transition: transform 250ms ease-out;
}
.b3-stage.is-moving .b3 { transition: none; }
.b3-stage .b3__img { pointer-events: none; -webkit-user-drag: none; }

/* --- Covers --------------------------------------------------------------- */
/* Ink in BOTH modes, so the Fixed Ink family. Using --ink here inverts. */
.cover {
  background: var(--ink-fixed); color: var(--paper-fixed);
  border: 1px solid var(--ink-line-fixed);
  aspect-ratio: 2 / 3; padding: var(--s4);
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: var(--radius-panel);
}
.cover--image { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; border: 1px solid var(--line); }
/* Amendment 10: a shelf book's real front, flat, at the file's own ratio.
   The hairline sits inside the edge, as on the 3D book's faces.
   PRD-036: the ratio is the ORIGINAL file's, set by press-cover-kit.hbs as
   --front-ratio. The 400 and 800 px files are whole pixels, so their own
   ratio is off by a hair, and on a 205px cover that moved the rest of the
   homepage down a pixel. auto is the fallback, the behaviour before. */
.cover--front {
  display: block; width: 100%; height: auto; aspect-ratio: var(--front-ratio, auto);
  padding: 0; border: 0; background: none;
  outline: 1px solid var(--book-edge); outline-offset: -1px;
}
.cover__top { display: flex; align-items: center; gap: var(--s2); }
.cover__top svg { height: 16px; width: auto; --mark: var(--signal); --word: var(--paper-fixed); }
.cover__label {
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate-fixed); font-weight: 600;
}
.cover__title { font-size: 18px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.cover__author { font-size: 12px; color: var(--slate-fixed); margin: var(--s2) 0 0; }

/* --- The book page: rotatable ---------------------------------------------
   Drag, touch and keys are book3d.js. pan-y leaves vertical touch drags to
   the page, so the book never traps scrolling on a phone. */
.b3-stage {
  display: block; position: relative;
  width: var(--w); height: var(--h);
  margin: var(--s5) auto var(--s6);
  perspective: 1400px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none; -webkit-user-select: none;
}
.b3-stage.is-moving { cursor: grabbing; }
.b3-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: var(--s5); }
.b3-stage .b3 {
  transform: scale(0.5) rotateX(var(--rx, -8deg)) rotateY(var(--ry, 30deg));
  transition: transform 250ms ease-out;
}
.b3-stage.is-moving .b3 { transition: none; }
.b3-stage .b3__img { pointer-events: none; -webkit-user-drag: none; }

/* --- Covers --------------------------------------------------------------- */
/* Ink in BOTH modes, so the Fixed Ink family. Using --ink here inverts. */
.cover {
  background: var(--ink-fixed); color: var(--paper-fixed);
  border: 1px solid var(--ink-line-fixed);
  aspect-ratio: 2 / 3; padding: var(--s4);
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: var(--radius-panel);
}
.cover--image { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; border: 1px solid var(--line); }
/* Amendment 10: a shelf book's real front, flat, at the file's own ratio.
   The hairline sits inside the edge, as on the 3D book's faces.
   PRD-036: the ratio is the ORIGINAL file's, set by press-cover-kit.hbs as
   --front-ratio. The 400 and 800 px files are whole pixels, so their own
   ratio is off by a hair, and on a 205px cover that moved the rest of the
   homepage down a pixel. auto is the fallback, the behaviour before. */
.cover--front {
  display: block; width: 100%; height: auto; aspect-ratio: var(--front-ratio, auto);
  padding: 0; border: 0; background: none;
  outline: 1px solid var(--book-edge); outline-offset: -1px;
}
.cover__top { display: flex; align-items: center; gap: var(--s2); }
.cover__top svg { height: 16px; width: auto; --mark: var(--signal); --word: var(--paper-fixed); }
.cover__label {
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate-fixed); font-weight: 600;
}
.cover__title { font-size: 18px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.cover__author { font-size: 12px; color: var(--slate-fixed); margin: var(--s2) 0 0; }

/* Kit colour covers: title and authors, set at the foot. Slate would fail
   contrast on a colour, so the author takes the cover's own text colour. */
.cover--kit { border: 0; justify-content: flex-end; }
.cover--kit .cover__title, .cover--kit .cover__author { display: block; }
.cover--kit .cover__author { font-size: 13px; color: inherit; }

.cover--harbour { background: var(--harbour); color: var(--paper-fixed); }
.cover--plum    { background: var(--plum);    color: var(--paper-fixed); }
.cover--ochre   { background: var(--ochre-ink); color: var(--ink-fixed); }
.cover--stone   { background: var(--stone);   color: var(--ink-fixed); }
@media (prefers-color-scheme: dark) {
  .cover--harbour, .cover--plum { color: var(--ink-fixed); }
}

/* --- The book page -------------------------------------------------------- */
.book { padding-block: var(--s6) var(--s8); }
.book__head { display: grid; grid-template-columns: 1fr; gap: var(--s5); align-items: start; }
@media (min-width: 600px) { .book__head { grid-template-columns: 260px 1fr; gap: var(--s7); } }
.book__cover { min-width: 0; }
.book__meta { max-width: var(--measure); }
.book__meta h1 { margin: 0; }
.book__subtitle { font-size: 20px; line-height: 1.3; margin: var(--s2) 0 0; }
.book__authors { font-weight: 700; margin: var(--s5) 0 0; }
.book__pub { color: var(--slate); margin: var(--s1) 0 0; }
.book__why { font-size: 18px; margin: var(--s6) 0 0; }
.book__note { margin: var(--s2) 0 var(--s5); }

.book__about p { margin: 0 0 var(--s3); }
.book__about p:last-child { margin-bottom: 0; }

/* The buy button is the plain outline .btn, like the header's Search and Sign
   in, so the header Join stays the only red on the page. Owner decision. */

/* Ink, not the red link colour. */
.book__back { margin: var(--s6) 0 0; font-size: 15px; }
.book__back a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
