/* Lesson Forge — shared tokens and base styles. Sizes in rem; light first, dark follows the system.
   Two voices: the sans is the tool speaking, the serif is the curriculum content under review. */
:root {
  --paper: #f5f7f3;
  --surface: #ffffff;
  --sunk: #eaeee7;
  --ink: #17231e;
  --ink-2: #414f49;
  --ink-3: #5f6c66;
  --line: #cfd6cd;
  --line-2: #e2e7df;
  --board: #1f4d3f;
  --board-ink: #f1f5ef;
  --action: #0b6652;
  --action-ink: #ffffff;
  --action-soft: #dff1ea;
  --ai: #5a3ea6;
  --ai-soft: #ece7fa;
  --ok: #17703f;
  --ok-soft: #dff2e5;
  --wait: #7a4f00;
  --wait-soft: #fbefcc;
  --bad: #b3261e;
  --bad-soft: #fbe6e3;
  --grey-soft: #e8ebe5;
  --radius: .4rem;
  --shadow: 0 1px 2px rgba(23, 35, 30, .07), 0 6px 18px rgba(23, 35, 30, .07);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Bitstream Charter", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1512;
    --surface: #18211d;
    --sunk: #131b17;
    --ink: #e7ede9;
    --ink-2: #b6c2bb;
    --ink-3: #8d9a93;
    --line: #2c3a33;
    --line-2: #232f29;
    --board: #143328;
    --board-ink: #e7ede9;
    --action: #6fd3b7;
    --action-ink: #06221a;
    --action-soft: #17382f;
    --ai: #bca8f3;
    --ai-soft: #2a2248;
    --ok: #74d6a0;
    --ok-soft: #15341f;
    --wait: #f1c56a;
    --wait-soft: #3a2e10;
    --bad: #ff958a;
    --bad-soft: #41201d;
    --grey-soft: #232f29;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
h1, h2, h3 { font-family: var(--sans); font-weight: 750; line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--action); text-underline-offset: .16em; }
:focus-visible { outline: .19rem solid var(--ai); outline-offset: .15rem; border-radius: .2rem; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

.btn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 650; cursor: pointer;
       padding: .6rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--ink-3); background: var(--surface);
       color: var(--ink); text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.small { padding: .38rem .7rem; font-size: .85rem; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: default; }

.mark { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.12rem;
        letter-spacing: -.02em; color: inherit; text-decoration: none; }
.mark svg { width: 1.7rem; height: 1.7rem; flex: none; }

/* State is always a word; the tint only repeats it. */
.chip { display: inline-block; font-size: .75rem; font-weight: 650; line-height: 1; padding: .3rem .5rem;
        border-radius: .25rem; background: var(--grey-soft); color: var(--ink-2); white-space: nowrap; border: 1px solid transparent; }
.chip.wait { background: var(--wait-soft); color: var(--wait); }
.chip.go { background: var(--action-soft); color: var(--action); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.ai { background: var(--ai-soft); color: var(--ai); }
.chip.hand { background: transparent; border-color: var(--line); color: var(--ink-2); }

.content { font-family: var(--serif); }
.code { font-family: var(--mono); font-size: .86em; white-space: nowrap; }

.demo-bar { background: var(--sunk); color: var(--ink-2); font-size: .85rem; text-align: center; padding: .4rem 1rem;
            border-bottom: 1px solid var(--line); }
.demo-bar a { color: inherit; }
