/* ---------- Theme: colours, type and spacing ----------
 * Every colour and size used elsewhere comes from here, so the look can be
 * changed in one place. Dark mode follows the device's setting.
 */

:root {
  --paper: #f7f3ec;
  --sheet: #fffdf9;
  --ink: #1d1c1a;
  --ink-soft: #57524a;
  --ink-faint: #8a8378;
  --rule: #e6dfd3;
  --accent: #1f5c58; /* deep teal: the colour of every mark */
  --accent-ink: #ffffff;
  --accent-soft: #dcebe8;
  --select: #fbe7a8;
  --slower: #e2ecf6;
  --slower-ink: #2d5a86;
  --faster: #f8e6d4;
  --faster-ink: #9a5420;
  --danger: #a3352b;
  --guide: #f1d98a;
  --shadow: 0 1px 2px rgb(40 30 10 / 6%), 0 8px 28px rgb(40 30 10 / 7%);

  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --measure: 40rem; /* the width of the page of script */
  --script-size: 1.3rem;
  --reading-size: 1.75rem;

  color-scheme: light;
}

/* Moving between the home page, the app and the privacy page: a soft crossfade,
   with the logo held still (browsers without this simply change page as usual). */
@view-transition {
  navigation: auto;
}

::view-transition-group(root) {
  animation-duration: 0.25s;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* The header is the same height on every page, so the logo never moves. */
:root {
  --head-height: 3.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16171a;
    --sheet: #1e2024;
    --ink: #ece8e1;
    --ink-soft: #b9b3a8;
    --ink-faint: #858076;
    --rule: #33363c;
    --accent: #7cc5bd;
    --accent-ink: #0f2624;
    --accent-soft: #23403d;
    --select: #5b4b17;
    --slower: #1f3247;
    --slower-ink: #9cc3ea;
    --faster: #47301d;
    --faster-ink: #f0b483;
    --danger: #ef8b80;
    --guide: #6a5717;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 28px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}
