/* ============================================================
   PRECEDA — "The Reporter" design tokens (W2 SPECIMEN, not shipped)
   Two lighting conditions: Paper (day) and Lamp (night). D-003, D-007.
   One accent: oxblood (the binding). Gilt only for exclusivity marks.
   ============================================================ */

:root,
[data-theme="paper"] {
  /* Materials */
  --paper:          #F4EFE4;   /* the page */
  --paper-raised:   #FBF8F1;   /* a sheet lying on the page */
  --paper-sunken:   #ECE5D6;   /* the desk beneath */
  --paper-hover:    #EFE8DA;

  /* Ink */
  --ink:            #191512;   /* never pure black */
  --ink-2:          #4A423B;   /* secondary: headnotes, metadata */
  --ink-3:          #7D7268;   /* tertiary: folios, timestamps */
  --ink-4:          #ADA396;   /* placeholders, disabled */

  /* Rules (replace borders and cards) */
  --rule:           #D6CCBB;   /* a printed rule */
  --hairline:       #E7DFD0;   /* barely there */
  --rule-strong:    #B9AD99;

  /* Binding — the ONLY accent */
  --binding:        #6B1F2A;   /* SCC buckram oxblood */
  --binding-hover:  #561722;
  --binding-ink:    #5A1A24;   /* oxblood as text on paper */
  --binding-tint:   rgba(107, 31, 42, 0.07);

  /* Gilt — exclusivity marks only, never functional */
  --gilt:           #A8874F;
  --gilt-tint:      rgba(168, 135, 79, 0.12);

  /* Verification is typographic, not traffic-light */
  --verified-mark:  var(--binding);      /* a small oxblood pilcrow / tick */
  --flag-verify:    #8A5A12;             /* marginal [VERIFY] in a warm umber */
  --struck:         var(--ink-3);        /* phantom: struck through, greyed */
  --error:          #8C2F2F;

  /* Selection / focus */
  --selection:      rgba(107, 31, 42, 0.16);
  --focus:          rgba(107, 31, 42, 0.45);

  --shadow-sheet:   0 1px 0 rgba(25,21,18,0.06), 0 8px 24px rgba(25,21,18,0.06);

  color-scheme: light;
}

[data-theme="lamp"] {
  --paper:          #161210;
  --paper-raised:   #1E1915;
  --paper-sunken:   #100D0B;
  --paper-hover:    #241E19;

  --ink:            #EFE7D8;
  --ink-2:          #B9AD9B;
  --ink-3:          #82776C;
  --ink-4:          #554C43;

  --rule:           #352D27;
  --hairline:       #27211C;
  --rule-strong:    #4B4139;

  --binding:        #B24B57;   /* oxblood lifts under lamplight */
  --binding-hover:  #C55D68;
  --binding-ink:    #C9646F;
  --binding-tint:   rgba(178, 75, 87, 0.12);

  --gilt:           #C9A66B;
  --gilt-tint:      rgba(201, 166, 107, 0.12);

  --verified-mark:  var(--binding);
  --flag-verify:    #C9963F;
  --struck:         var(--ink-3);
  --error:          #C4585A;

  --selection:      rgba(178, 75, 87, 0.28);
  --focus:          rgba(178, 75, 87, 0.5);

  --shadow-sheet:   0 1px 0 rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.35);

  color-scheme: dark;
}

/* ---- Type roles (D-004). The family is a token; swap via data-serif. ---- */
:root, [data-serif="newsreader"] {
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --serif-name: "Newsreader";
}
[data-serif="source-serif"] {
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --serif-name: "Source Serif 4";
}
:root {
  --sans: "Inter", system-ui, -apple-system, sans-serif;   /* chrome only */
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; /* citations */

  /* Scale: one step at a time. Reading size is 17/1.55 on paper. */
  --t-12: 0.75rem;
  --t-13: 0.8125rem;
  --t-14: 0.875rem;
  --t-15: 0.9375rem;
  --t-17: 1.0625rem;
  --t-20: 1.25rem;
  --t-24: 1.5rem;
  --t-30: 1.875rem;
  --t-40: 2.5rem;
  --t-56: 3.5rem;
  --t-80: 5rem;

  --measure: 66ch;
}
