/* ═══════════════════════════════════════════════════════════════════════════
   CLASSIFIED ELEGANCE — the approved visual direction.

   WHY THIS FILE EXISTS. The design prototypes were built on Nocturne: a dark
   navy ground with a blurple #9184d9 accent. The approved spec asks for
   something else entirely, and names it (§6.1, listed again under §13 approved
   decisions): carbon, tidal slate, registry ivory, oxidised brass, bruise plum
   and proof red, a palette chosen because it "avoids generic black-and-gold
   luxury by using colder institutional slate, intimate plum, and proof-red
   amendment marks."

   Blurple on dark slate is also the single most recognisable machine-generated
   web palette there is, which is the other reason to leave it.

   This file is an OVERRIDE LAYER, not a rewrite. It loads after nocturne.css
   and redefines tokens only. Remove the one <link> and the site returns to
   Nocturne exactly, so the two can be compared rather than argued about.

   Load order, on every page:
       nocturne.css  ->  theme-classified.css  ->  site.css  ->  <page>.css

   CONTRAST. Every pairing below was measured in the browser against its real
   ground rather than eyeballed. Brass at full strength is 5.6:1 on carbon but
   only 4.0:1 on tidal slate, so small brass text on a surface uses the lighter
   ramp step rather than the mark colour. Proof red is a MARK, not a text
   colour: at 2.7:1 on carbon it fails outright, so the ramp carries lighter
   steps for the places it has to be read.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Spectral for display: a screen-first serif with a cool, documentary tone.
   IBM Plex Sans and Mono for records: institutional, faintly technical, and
   the right register for a page pretending to be a file. The book's own prose
   stack is NOT touched by this file. */
/* Fonts are requested from the PAGE HEAD, with preconnect, not by @import.
   An @import inside a stylesheet cannot even be DISCOVERED until this file
   has downloaded and parsed, so it serialises into a render-blocking chain:
   html -> css -> font css -> font files. The head carries one combined
   request for every family the site uses instead. */

:root {
  /* — grounds — */
  --color-bg: #0b1114;          /* carbon */
  --color-surface: #162126;     /* tidal slate, settled one step down from the
                                   spec's #203038 so that raised panels sitting
                                   ON a surface still have somewhere to go */
  --color-surface-raised: #203038;  /* tidal slate proper */
  --color-text: #e7e0d3;        /* registry ivory */
  --color-divider: color-mix(in srgb, #e7e0d3 14%, transparent);

  /* — the accent: oxidised brass —
     A line and mark colour. Never a flood, never a fill behind body text. */
  --color-accent: #a98554;
  --color-accent-2: #8e3e42;    /* proof red, the amendment mark */

  /* Neutrals run warm at the top and cool as they darken: paper on steel. */
  --color-neutral-100: #f4efe6;
  --color-neutral-200: #e7e0d3;
  --color-neutral-300: #cfc7b8;
  --color-neutral-400: #ada79b;
  --color-neutral-500: #999a93;
  --color-neutral-600: #6c7178;
  --color-neutral-700: #4e565d;
  --color-neutral-800: #364047;
  --color-neutral-900: #1b252b;

  /* Brass ramp. 400 and 300 are the readable steps; 500 is the mark. */
  --color-accent-100: #f7f1e6;
  --color-accent-200: #ecdfc6;
  --color-accent-300: #d9be8e;
  --color-accent-400: #c6a36f;
  --color-accent-500: #a98554;
  --color-accent-600: #8a6b41;
  --color-accent-700: #6a5232;
  --color-accent-800: #4a3a24;
  --color-accent-900: #2a2216;

  /* Proof red ramp, for re-registrations and amendment marks. */
  --color-accent-2-100: #fbeeed;
  --color-accent-2-200: #f2d3d1;
  --color-accent-2-300: #e0a9a4;
  --color-accent-2-400: #d4837c;
  --color-accent-2-500: #c2635f;
  --color-accent-2-600: #8e3e42;
  --color-accent-2-700: #6e3034;
  --color-accent-2-800: #4c2427;
  --color-accent-2-900: #2c1618;

  /* Bruise plum. The intimate register: used for the connections thread and
     nothing else, so that one colour on this page always means one thing. */
  --color-intimate: #4a2738;
  --color-intimate-line: #7d4a63;

  /* — type — */
  --font-heading: "Spectral", Charter, Georgia, serif;
  --font-heading-weight: 500;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* Book prose is unchanged and deliberately so: it is the edition's
     typography, not the interface's. */
  --font-prose: Charter, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;

  /* Elevation, re-derived on the carbon ground. */
  --shadow-sm: 0 0 0 1px #364047;
  --shadow-md: 0 0 0 1px #4e565d, 0 6px 18px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 0 0 1px #6c7178, 0 18px 44px rgba(0, 0, 0, 0.7);
}

/* ── Display typography ──────────────────────────────────────────────────────
   Spectral carries identity and emotion; Plex carries records. Headings take a
   touch more line-height than Nocturne's 1.12 because a serif at display size
   needs room for its descenders, and Spectral's are long. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.005em;
  line-height: 1.16;
}
h6 { font-family: var(--font-body); letter-spacing: 0.08em; }

body { font-family: var(--font-body); }

/* Numerals in interface chrome are monospaced, not merely tabular. A ledger
   look is the spec's own "financial-ledger geometry", and it separates the
   record-keeping layer from the prose layer at a glance. */
.tabular,
.progress-chip,
.reader-header__meta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── Section labels ──────────────────────────────────────────────────────────
   THE ONE STRUCTURAL CHANGE THIS FILE MAKES, and the reason is worth writing
   down. Every section on this site opens with a small uppercase wide-tracked
   accent label. That is exactly the rhythm that reads as machine-generated:
   the same micro-caps eyebrow above every single heading, colour and all.

   The copy is canon and does not change. What changes is the register. The
   labels become quiet mono file-headings with a short brass rule, which is
   what a registry actually looks like, and they stop competing with the
   headline they introduce. */
.kicker,
.section-label,
.home-strip__h,
.card-kicker,
.cast-card__kicker,
.archive-rail__label,
.archive-since__label,
.archive-empty__kicker,
.archive-header__label,
.archive-log__label {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--color-neutral-500);
  text-transform: uppercase;
}
/* Size is NOT set here. site.css owns it (13px, the size the handoff's <h6>
   labels were) and loads after this file, so a font-size here would be a dead
   rule that reads as intent. This block owns the layout that turns a label
   into a file heading: the text, then the rule running off to the right. */
.kicker,
.section-label,
.home-strip__h {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::after,
.section-label::after,
.home-strip__h::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right,
    color-mix(in srgb, var(--color-accent) 55%, transparent),
    transparent 70%);
}
/* The premise label is the page's own first line and keeps the brass. */
.premise .kicker { color: var(--color-accent-400); }

/* ── Components on the new ground ───────────────────────────────────────── */

/* Brass at mark strength is 4.0:1 on a surface, so button and link text takes
   the readable ramp step while borders keep the mark. */
.btn-primary { color: var(--color-accent-300); border-color: var(--color-accent); }
.btn-primary:hover {
  color: var(--color-accent-200);
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
}
.btn-ghost { color: var(--color-accent-300); }
.btn-ghost:hover { color: var(--color-accent-200); }
a { color: var(--color-accent-300); }
a:hover { color: var(--color-accent-200); }
:focus-visible { outline-color: var(--color-accent-300); }
::selection { background: color-mix(in srgb, var(--color-accent) 32%, transparent); }

.card { background: var(--color-surface); }
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-neutral { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.tag-outline { border-color: var(--color-accent); color: var(--color-accent-300); }

/* A re-registration is not an ordinary amendment, and the palette says so:
   proof red marks the moment a record's identity changes, brass marks every
   other revision. Colour reinforces the tag text here; it never carries the
   meaning alone, because the tag always names what it is. */
.tag-accent-2 { background: var(--color-accent-2-800); color: var(--color-accent-2-200); }

.progress-chip {
  color: var(--color-accent-300);
  border-color: color-mix(in srgb, var(--color-accent) 45%, transparent);
}
.progress-chip:hover { color: var(--color-accent-200); border-color: var(--color-accent); }

.dialog { background: var(--color-surface-raised); }
.dialog-backdrop { background: color-mix(in srgb, #05090b 72%, transparent); }

.site-nav__brand { letter-spacing: 0.3em; }
.site-nav__links a:hover,
.site-nav__links a[aria-current='page'] { color: var(--color-accent-300); }

/* The mobile nav lives in site.css: it is shell layout, not palette. */
