/* Biblissima Textes — design tokens
   Base: direction C ("Index savant"): flat, typographic, hairline rules.
   Exception: the main search band uses direction A's deep blue (solid, no gradient).
   Accent is a rubric red (the colour of manuscript headings), used sparingly. */
:root {
  /* Surfaces */
  --bt-bg: #faf9f6;
  --bt-bg-sunken: #f0efea;
  --bt-surface: #ffffff;
  --bt-border: #dcdad3;
  --bt-border-strong: #a9a69d;

  /* Ink */
  --bt-ink: #1b1b1a;
  --bt-ink-soft: #3f3f3c;
  --bt-ink-faint: #62615c;

  /* Brand */
  --bt-navy: #17375e;
  --bt-navy-2: #0f2547;
  --bt-blue: #1f5a96;
  --bt-blue-soft: #e4edf7;
  --bt-accent: #a4262c;
  --bt-accent-bright: #e5908a;
  --bt-accent-soft: #f6e6e4;

  /* Search band (from direction A) */
  --bt-search-bg: #17375e;
  --bt-search-ink: #ffffff;
  --bt-search-ink-soft: #c3d1e3;

  /* Languages */
  --bt-lang-greek: #2e6a9e;
  --bt-lang-latin: #5a3a8e;
  --bt-lang-oldfr: #7e4a1e;
  --bt-lang-arabic: #1e7e5a;
  --bt-lang-hebrew: #7e2a5a;
  --bt-lang-other: #5c5650;

  /* State */
  --bt-focus: #1f5a96;
  --bt-hit: #ffe9a8;
  --bt-hit-active: #f6c453;
  --bt-success: #1e7e5a;
  --bt-danger: #b3261e;
  --bt-ok-soft: #e7f3ec;
  --bt-err-soft: #f6e8e8;
  --bt-on-navy: #ffffff;

  /* Type: sans for interface, serif only for the texts themselves */
  --bt-font-ui: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bt-font-text: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --bt-font-greek: 'GFS Didot', 'EB Garamond', 'Noto Serif', serif;
  --bt-font-arabic: 'Noto Naskh Arabic', serif;
  --bt-font-hebrew: 'Noto Serif Hebrew', serif;
  --bt-font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --bt-fs-xs: 0.75rem;
  --bt-fs-sm: 0.875rem;
  --bt-fs-md: 1rem;
  --bt-fs-lg: 1.25rem;
  --bt-fs-xl: 1.625rem;
  --bt-fs-2xl: 2.125rem;

  /* Space (4-pt) */
  --bt-s1: 4px; --bt-s2: 8px; --bt-s3: 12px; --bt-s4: 16px;
  --bt-s5: 24px; --bt-s6: 32px; --bt-s7: 48px; --bt-s8: 72px;

  --bt-radius: 2px;
  --bt-radius-lg: 3px;
  --bt-shadow: none;
  --bt-shadow-pop: 0 8px 30px rgba(0,0,0,.2);

  --bt-page: 1200px;
  --bt-header-h: 52px;
  --bt-crumb-h: 40px;
}

/* Dark mode: follows the system unless the visitor chose (data-theme on <html>, set by the header button) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bt-bg: #15171a; --bt-bg-sunken: #1c1f23; --bt-surface: #1f2328; --bt-border: #32363c; --bt-border-strong: #5b6068;
  --bt-ink: #ebe9e4; --bt-ink-soft: #cdcbc5; --bt-ink-faint: #a3a19b;
  --bt-navy: #8db7ea; --bt-navy-2: #b5d0f2; --bt-on-navy: #0f1c2e; --bt-blue: #8db7ea; --bt-blue-soft: #1d2a3b;
  --bt-accent: #e5908a; --bt-accent-bright: #f0aaa5; --bt-accent-soft: #3a2326;
  --bt-search-bg: #17375e;
  --bt-lang-greek: #7fb0e0; --bt-lang-latin: #b499e6; --bt-lang-oldfr: #d9a066; --bt-lang-arabic: #5fc7a0; --bt-lang-hebrew: #dd8fc0; --bt-lang-other: #aaa49c;
  --bt-focus: #8db7ea; --bt-hit: #5c4a14; --bt-hit-active: #8a6a10; --bt-success: #5fc7a0; --bt-danger: #f2897f; --bt-ok-soft: #17301f; --bt-err-soft: #3a1d1d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bt-bg: #15171a; --bt-bg-sunken: #1c1f23; --bt-surface: #1f2328; --bt-border: #32363c; --bt-border-strong: #5b6068;
  --bt-ink: #ebe9e4; --bt-ink-soft: #cdcbc5; --bt-ink-faint: #a3a19b;
  --bt-navy: #8db7ea; --bt-navy-2: #b5d0f2; --bt-on-navy: #0f1c2e; --bt-blue: #8db7ea; --bt-blue-soft: #1d2a3b;
  --bt-accent: #e5908a; --bt-accent-bright: #f0aaa5; --bt-accent-soft: #3a2326;
  --bt-search-bg: #17375e;
  --bt-lang-greek: #7fb0e0; --bt-lang-latin: #b499e6; --bt-lang-oldfr: #d9a066; --bt-lang-arabic: #5fc7a0; --bt-lang-hebrew: #dd8fc0; --bt-lang-other: #aaa49c;
  --bt-focus: #8db7ea; --bt-hit: #5c4a14; --bt-hit-active: #8a6a10; --bt-success: #5fc7a0; --bt-danger: #f2897f; --bt-ok-soft: #17301f; --bt-err-soft: #3a1d1d;
  }
}
