/* ============================================================
   Cutting Straight — "Text & Apparatus" design tokens
   ------------------------------------------------------------
   Canonical source of truth for the visual system.
   Captured verbatim 2026-07-19 from the approved mockups:
     · study page — artifact b42a3e09-55e0-4fa4-983f-aa42fc8c5a45
     · home page  — artifact 42285c12-0e30-4a5f-b856-c599077a4949
   Both carried an identical token block; this file is that block.

   The idea: the Word is set in warm serif; ALL apparatus and
   chrome is mono. Colour is semantic, never decorative —
   indigo = the plumb line (grounding/authority), pine = settled,
   ochre = open/honest, brick = load-bearing warning, brass = the
   single controlled metallic accent.

   Four declaration blocks are required, in this order:
     1. :root                        — light defaults
     2. @media (prefers-color-scheme: dark)
     3. :root[data-theme="light"]    — explicit toggle
     4. :root[data-theme="dark"]     — explicit toggle
   Blocks 3 & 4 must beat the media query in BOTH directions,
   or the theme toggle breaks for users whose OS disagrees.
   ============================================================ */

:root {
  --paper:      #F3F2ED;   /* warm-neutral paper (deliberately not cream) */
  --surface:    #FBFAF6;   /* raised cards */
  --sunk:       #EBEAE2;   /* recessed wells — grounding lines, text notes */
  --ink:        #1B1D24;   /* blue-black */
  --ink-soft:   #52545E;   /* secondary text, faintly blue */
  --ink-faint:  #83848D;
  --rule:       #DAD8CF;   /* hairline */
  --rule-strong:#C4C2B7;
  --accent:     #294067;   /* deep indigo — the "straight line" */
  --accent-2:   #365a94;   /* indigo for links */
  --brass:      #9A7B3F;   /* single controlled metallic */
  --brass-ink:  #7E6431;   /* brass deep enough for body text (5:1 on paper) */
  --settled:    #2E6B4F;   /* pine — grounded */
  --settled-bg: #E4EDE7;
  --open:       #97640F;   /* ochre — honest */
  --open-bg:    #F1E8D6;
  --load-yes:   #9E392C;   /* brick — load-bearing warning */
  --load-partly:#97640F;
  --load-no:    #56756A;

  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Hoefler Text", Georgia, "Times New Roman", serif;
  --font-mono:  ui-monospace, "SF Mono", "SFMono-Regular", Menlo, "Cascadia Code", "Roboto Mono", Consolas, monospace;

  --measure: 63ch;
  --shadow:      0 1px 2px rgba(27,29,36,.05), 0 6px 22px rgba(27,29,36,.06);
  --shadow-lift: 0 2px 6px rgba(27,29,36,.06), 0 14px 40px rgba(27,29,36,.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #14161B;
    --surface:    #1B1E25;
    --sunk:       #101216;
    --ink:        #E8E6DE;
    --ink-soft:   #A6A7B0;
    --ink-faint:  #7C7E88;
    --rule:       #2A2D36;
    --rule-strong:#3A3E49;
    --accent:     #7FA6DE;
    --accent-2:   #9CBCEA;
    --brass:      #C9AC6E;
    --brass-ink:  #C9AC6E;
    --settled:    #74BF9A;
    --settled-bg: #17251F;
    --open:       #D7A552;
    --open-bg:    #26200F;
    --load-yes:   #DE8375;
    --load-partly:#D7A552;
    --load-no:    #8FB0A4;
    --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 26px rgba(0,0,0,.4);
    --shadow-lift: 0 2px 8px rgba(0,0,0,.5), 0 18px 48px rgba(0,0,0,.55);
  }
}

/* explicit toggle overrides — must beat the media query both directions */
:root[data-theme="light"] {
  --paper:#F3F2ED; --surface:#FBFAF6; --sunk:#EBEAE2;
  --ink:#1B1D24; --ink-soft:#52545E; --ink-faint:#83848D;
  --rule:#DAD8CF; --rule-strong:#C4C2B7;
  --accent:#294067; --accent-2:#365a94; --brass:#9A7B3F; --brass-ink:#7E6431;
  --settled:#2E6B4F; --settled-bg:#E4EDE7;
  --open:#97640F; --open-bg:#F1E8D6;
  --load-yes:#9E392C; --load-partly:#97640F; --load-no:#56756A;
  --shadow:0 1px 2px rgba(27,29,36,.05),0 6px 22px rgba(27,29,36,.06);
  --shadow-lift:0 2px 6px rgba(27,29,36,.06),0 14px 40px rgba(27,29,36,.10);
}

:root[data-theme="dark"] {
  --paper:#14161B; --surface:#1B1E25; --sunk:#101216;
  --ink:#E8E6DE; --ink-soft:#A6A7B0; --ink-faint:#7C7E88;
  --rule:#2A2D36; --rule-strong:#3A3E49;
  --accent:#7FA6DE; --accent-2:#9CBCEA; --brass:#C9AC6E; --brass-ink:#C9AC6E;
  --settled:#74BF9A; --settled-bg:#17251F;
  --open:#D7A552; --open-bg:#26200F;
  --load-yes:#DE8375; --load-partly:#D7A552; --load-no:#8FB0A4;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 8px 26px rgba(0,0,0,.4);
  --shadow-lift:0 2px 8px rgba(0,0,0,.5),0 18px 48px rgba(0,0,0,.55);
}

/* ============================================================
   BASE — the serif/mono split
   ============================================================ */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* every piece of apparatus and chrome is mono */
.mono { font-family: var(--font-mono); }

.label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px;
  background: var(--brass); display: inline-block;
}

/* original-language terms stay serif italic, never mono */
.gk { font-family: var(--font-serif); font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
