/* The "Paper" tokens of dush, from DushTheme.swift. Pick a color by what it paints. Each color is
   declared once with light-dark(): it follows the page's color-scheme, which is the OS's unless
   the visitor forces a theme — the header's toggle sets data-theme on <html> (see ts/theme.ts). */

:root {
  color-scheme: light dark;

  /* Paper */
  --sand: light-dark(#E9E2D5, #151413);
  --paper: light-dark(#F5F0E7, #1E1C1A);
  --sheet: light-dark(#FBF8F2, #26231F);
  --shelf: light-dark(#EEE7DB, #1A1917);
  --line: light-dark(#DDD4C5, #3A3631);

  /* Ink */
  --ink: light-dark(#2A2622, #F5F0E7);
  --graphite: light-dark(#6E655B, #B8AE9F);
  --pencil: light-dark(#8C8174, #7C7368);
  --teal-ink: light-dark(#0B6E6E, #5FD4CF);
  --orange-ink: light-dark(#B7431A, #FF9A6E);
  --teal-wash: light-dark(#BFDDD6, #1F4A46);
  --orange-wash: light-dark(#F2C3A8, #5A2E1C);
  --teal-button: #0B6E6E;

  /* Brand: the logo and the icon only */
  --brand-teal: #2ECCCC;
  --brand-orange: #FF6B35;

  /* Type */
  --font-serif: "Fraunces", "New York", ui-serif, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shape */
  --radius-tile: 4px;
  --radius-small: 8px;
  --radius-row: 10px;
  --radius-card: 14px;
  --radius-drop: 16px;
  --radius-capsule: 999px;
  --hairline: 1px;
  --dashed-stroke: 1.5px;

  /* Spacing scale: 2 · 4 · 6 · 8 · 10 · 12 · 14 · 16 · 18 · 20 · 24 · 32 */
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-7: 14px;
  --space-8: 16px;
  --space-9: 18px;
  --space-10: 20px;
  --space-11: 24px;
  --space-12: 32px;

  --page-width: 880px;
  --space-section: 112px;

  /* Lines: a sheet's outline is ink at 0.7, a quiet control's at 0.45 */
  --outline: color-mix(in srgb, var(--ink) 70%, transparent);
  --outline-quiet: color-mix(in srgb, var(--ink) 45%, transparent);

  /* Motion: small, quick and optional. None with prefers-reduced-motion. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-reveal: 700ms;
  --duration-fill: 900ms;
  --reveal-distance: 28px;
}

@media (max-width: 600px) {
  :root {
    --space-section: 72px;
  }
}

/* A theme chosen with the header's toggle wins over the OS: it only has to set color-scheme,
   and every light-dark() above follows. */
:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}
