/*
  D-90 design tokens. Source of truth for the website and any web collateral.
  See collateral/brand/brand-guide.html for usage rules.

  Fonts (Google Fonts):
  https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@500;700;800&family=Public+Sans:ital,wght@0,400;0,600;0,700;1,400&family=JetBrains+Mono:wght@500;700&display=swap
*/

:root {
  /* Core palette */
  --d90-charcoal: #22262C;   /* primary ink, logo outline */
  --d90-slate: #56616E;      /* secondary text, supporting graphics */
  --d90-mist: #DDE2E7;       /* lines, empty countdown cells, quiet fills */
  --d90-paper: #F7F8F9;      /* light page ground */
  --d90-white: #FFFFFF;      /* raised surfaces on paper */
  --d90-honey: #F2B705;      /* accent: progress, filled cells, primary buttons. Never text on light grounds */
  --d90-honey-deep: #8A6400; /* honey-family text and links on light grounds (5.1:1 on paper) */
  --d90-night: #15181C;      /* dark page ground */
  --d90-night-raised: #1E2227;

  /* Semantic roles, light theme */
  --bg: var(--d90-paper);
  --surface: var(--d90-white);
  --fg: var(--d90-charcoal);
  --fg-muted: var(--d90-slate);
  --line: var(--d90-mist);
  --accent: var(--d90-honey);
  --accent-ink: var(--d90-charcoal); /* text placed on honey */
  --accent-text: var(--d90-honey-deep);
  --mark-line: var(--d90-charcoal);
  --cell-empty: var(--d90-mist);

  /* Type */
  --font-display: "Roboto Slab", Rockwell, "Courier New", Georgia, serif;
  --font-body: "Public Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Type scale, ratio 1.25 from a 17px body */
  --text-xs: 0.75rem;   /* 12px  captions, legal */
  --text-sm: 0.875rem;  /* 14px  labels, meta */
  --text-base: 1.0625rem; /* 17px body */
  --text-lg: 1.328rem;  /* 21px  lead paragraph, H4 */
  --text-xl: 1.66rem;   /* 27px  H3 */
  --text-2xl: 2.075rem; /* 33px  H2 */
  --text-3xl: 2.594rem; /* 41px  H1 */
  --text-4xl: 3.242rem; /* 52px  display */
  --text-counter: clamp(4rem, 12vw, 8rem); /* the D-n counter */

  /* Shape and space */
  --radius-sm: 4px;   /* inputs, chips */
  --radius-md: 8px;   /* cards */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--d90-night);
    --surface: var(--d90-night-raised);
    --fg: #E9ECEF;
    --fg-muted: #A3ADB8;
    --line: #2E343B;
    --accent-text: var(--d90-honey);
    --mark-line: var(--d90-paper);
    --cell-empty: #2E343B;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: var(--d90-night);
  --surface: var(--d90-night-raised);
  --fg: #E9ECEF;
  --fg-muted: #A3ADB8;
  --line: #2E343B;
  --accent-text: var(--d90-honey);
  --mark-line: var(--d90-paper);
  --cell-empty: #2E343B;
  color-scheme: dark;
}
