/* The app's type and colour, lifted from app/lib/design/tokens.dart.
   Shared by the landing page and the maintenance console so the two cannot
   drift apart — keep it in step with the Dart. */

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/SourceSerif4.ttf') format('truetype-variations');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/fonts/Karla.ttf') format('truetype-variations');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/IBMPlexMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/IBMPlexMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}

:root {
  --ground: #FAF2E8;
  --ground-sunken: #F7EFE5;
  --ink: #261D17;
  --ink-muted: rgba(0, 0, 0, 0.62);
  --accent: #884B35;
  --on-accent: #FAF2E8;
  --surface: #FFFFFF;
  --rule: #E4DDD3;
  --rule-strong: #DFD8CE;
  --shadow: 0 1px 2px rgba(38, 29, 23, 0.05), 0 8px 24px rgba(38, 29, 23, 0.06);

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* Warm, never black — the app's dark theme, not a generic inversion. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #1D1713;
    --ground-sunken: #150F0B;
    --ink: #F1ECE6;
    --ink-muted: rgba(255, 255, 255, 0.70);
    --accent: #D9906F;
    --on-accent: #1D1713;
    --surface: #29231D;
    --rule: rgba(255, 255, 255, 0.14);
    --rule-strong: rgba(255, 255, 255, 0.18);
    /* Shadows do not read on a dark ground; surface brightness does the work. */
    --shadow: none;
  }
}
