/* ============================================================
   Bible App — design tokens & base typography
   Editorial, Anthropic-inspired typography system.
   Self-hosted variable fonts: Source Serif 4, Inter, JetBrains Mono
   ============================================================ */

:root {
  /* ---- Color: Light (default) ---- */
  --bg: #faf9f7;          /* warm paper */
  --bg-elevated: #ffffff;
  --surface: #f3f1ec;     /* subtle inlay */
  --ink: #1c1a17;         /* near-black warm */
  --ink-soft: #5c5851;    /* secondary */
  --ink-faint: #9a958c;   /* tertiary */
  --line: #e4e1da;        /* hairline */
  --accent: #a24d3a;      /* burnt sienna — editorial accent */
  --accent-ink: #7a3527;
  --selection: #efe4da;
  /* Words of Jesus. Deliberately not derived from --accent: the accent is itself a
     warm red-brown, and "slightly different brown" would read as a rendering bug.
     This is a deeper, cooler red so the two never look like the same colour. */
  --wj: #a11d40;

  /* ---- Fonts ---- */
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* ---- Reading scale ---- */
  --fs-read: 1.05rem;      /* adjustable via [data-fs] */
  --fs-chapter: 1.28rem;
  --lh-read: 1.72;

  /* ---- Layout ---- */
  --sidebar-w: 264px;
  --header-h: 56px;

  /* ---- Radius / shadow ---- */
  --r-sm: 6px;
  --r-md: 10px;
  --shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 26, 23, 0.10);
}

[data-theme='dark'] {
  --bg: #171512;          /* warm charcoal */
  --bg-elevated: #1e1b17;
  --surface: #242019;
  --ink: #ece7dd;
  --ink-soft: #b3ab9d;
  --ink-faint: #6f685c;
  --line: #37322a;
  --accent: #d18a6e;      /* lighter terracotta on dark */
  --accent-ink: #e9b7a2;
  --selection: #4a3a2e;
  /* Lifted for legibility on the dark ground, and pushed away from the terracotta
     accent in hue so the two remain distinguishable. */
  --wj: #e8737f;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--selection); }

a { color: inherit; cursor: pointer; }
button { font-family: inherit; }