/* Design tokens (colors, fonts, radius, shadow) for light + dark mode, the CSS reset,
   and a couple of layout-agnostic utility classes (.page, .empty-state) used everywhere. */

/* ---------- tokens ---------- */
:root {
  --ground: #e7e4d8;
  --surface: #f5f3ea;
  --surface-sunken: #dcd8c8;
  --ink: #21241d;
  --ink-muted: #5c6153;
  --line: #c7c2ac;

  --accent: #235e63;
  --accent-strong: #17454a;
  --accent-soft: rgba(35, 94, 99, 0.12);
  --on-accent: #f3f1e7;

  --good: #5c7a3a;
  --good-soft: rgba(92, 122, 58, 0.14);
  --warn: #a9762a;
  --warn-soft: rgba(169, 118, 42, 0.14);
  --danger: #a33b2e;
  --danger-soft: rgba(163, 59, 46, 0.14);

  --course-slate: #4a6fa5;
  --course-rose: #a5486b;
  --course-olive: #6d7a3a;
  --course-amber: #b5842a;
  --course-plum: #74588f;
  --course-rust: #a6552f;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 22, 16, 0.08), 0 6px 16px -8px rgba(20, 22, 16, 0.18);
  --font-display: "Fraunces", "Iowan Old Style", ui-serif, Georgia, serif;
  --font-body: "Work Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #12161a;
    --surface: #1a2024;
    --surface-sunken: #101417;
    --ink: #e8e4d6;
    --ink-muted: #9aa196;
    --line: #313a37;

    --accent: #4fa3a6;
    --accent-strong: #6fbfc2;
    --accent-soft: rgba(79, 163, 166, 0.16);
    --on-accent: #0c1213;

    --good: #9ab768;
    --good-soft: rgba(154, 183, 104, 0.16);
    --warn: #d19a4a;
    --warn-soft: rgba(209, 154, 74, 0.16);
    --danger: #d9695c;
    --danger-soft: rgba(217, 105, 92, 0.16);

    --course-slate: #7fa0d6;
    --course-rose: #cf7a9b;
    --course-olive: #a3b169;
    --course-amber: #d9ab5c;
    --course-plum: #a389c2;
    --course-rust: #cf8158;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 20px -10px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --ground: #12161a;
  --surface: #1a2024;
  --surface-sunken: #101417;
  --ink: #e8e4d6;
  --ink-muted: #9aa196;
  --line: #313a37;

  --accent: #4fa3a6;
  --accent-strong: #6fbfc2;
  --accent-soft: rgba(79, 163, 166, 0.16);
  --on-accent: #0c1213;

  --good: #9ab768;
  --good-soft: rgba(154, 183, 104, 0.16);
  --warn: #d19a4a;
  --warn-soft: rgba(209, 154, 74, 0.16);
  --danger: #d9695c;
  --danger-soft: rgba(217, 105, 92, 0.16);

  --course-slate: #7fa0d6;
  --course-rose: #cf7a9b;
  --course-olive: #a3b169;
  --course-amber: #d9ab5c;
  --course-plum: #a389c2;
  --course-rust: #cf8158;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 20px -10px rgba(0, 0, 0, 0.5);
}

/* ---------- reset-ish ---------- */
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page { max-width: 1440px; margin: 0 auto; padding: 0 24px 64px; }

/* ---------- shared utility: empty-state placeholder text ---------- */
.empty-state {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 0.88rem;
  padding: 14px 0;
}
.empty-state a, .empty-state button.link-btn { font: inherit; }
