/* Ready Set Learn — shared design tokens
   Three beats, three colours: orange (ready), blue (set), green (learn/go). */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Lexend:wght@300;400;500;600;700&display=swap');

:root {
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Lexend', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* dark (default) */
  --bg: #0e1a1d;
  --bg-2: #122226;
  --surface: #16292e;
  --surface-2: #1c3238;
  --surface-3: #22403f;
  --line: #244149;
  --line-strong: #2f5661;
  --text: #e6f0ee;
  --text-2: #a9bdb9;
  --text-3: #7d9793;
  --green: #2ed19a;
  --green-ink: #06231a;
  --green-soft: rgba(46, 209, 154, .14);
  --blue: #4aa8ff;
  --blue-ink: #04182b;
  --blue-soft: rgba(74, 168, 255, .14);
  --orange: #ffa14a;
  --orange-ink: #2a1600;
  --orange-soft: rgba(255, 161, 74, .16);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, .14);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, .7);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .6);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius: 10px;
  --radius-sm: 7px;
  --focus: 0 0 0 3px rgba(74, 168, 255, .45);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f8f6;
  --bg-2: #eaf2ef;
  --surface: #ffffff;
  --surface-2: #f3f8f6;
  --surface-3: #e5efeb;
  --line: #d5e3df;
  --line-strong: #b9cfc9;
  --text: #0f2220;
  --text-2: #42605b;
  --text-3: #6d8783;
  --green: #0f9d6b;
  --green-ink: #ffffff;
  --green-soft: rgba(15, 157, 107, .12);
  --blue: #1f6fe0;
  --blue-ink: #ffffff;
  --blue-soft: rgba(31, 111, 224, .12);
  --orange: #e2740e;
  --orange-ink: #ffffff;
  --orange-soft: rgba(226, 116, 14, .14);
  --red: #d8413f;
  --red-soft: rgba(216, 65, 63, .12);
  --shadow: 0 18px 40px -24px rgba(16, 48, 40, .35);
  --shadow-sm: 0 6px 18px -12px rgba(16, 48, 40, .3);
  --focus: 0 0 0 3px rgba(31, 111, 224, .3);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

/* ---- brand mark: three starting lights ---- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.lights { display: inline-grid; grid-auto-flow: column; gap: 4px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.lights i:nth-child(1) { background: var(--orange); }
.lights i:nth-child(2) { background: var(--blue); }
.lights i:nth-child(3) { background: var(--green); }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--text-3); letter-spacing: 0; line-height: 1; margin-top: 3px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap; transition: transform .08s ease, background .15s ease, border-color .15s ease; text-decoration: none; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--green); color: var(--green-ink); }
.btn-primary:hover { background: var(--green); filter: brightness(1.08); }
.btn-blue { background: var(--blue); color: var(--blue-ink); }
.btn-blue:hover { background: var(--blue); filter: brightness(1.08); }
.btn-orange { background: var(--orange); color: var(--orange-ink); }
.btn-orange:hover { background: var(--orange); filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-xs { padding: 3px 9px; font-size: .78rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; border-radius: 50%; }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--text-2); }
.input, input.input, select.input, textarea.input { width: 100%; padding: 10px 13px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text); outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.input:focus { border-color: var(--blue); box-shadow: var(--focus); }
textarea.input { min-height: 96px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row > .field { flex: 1 1 160px; margin-bottom: 0; }
.hint { font-size: .82rem; color: var(--text-3); }
.error { color: var(--red); font-size: .88rem; }
.ok { color: var(--green); font-size: .88rem; }

/* ---- pills & tags ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-blue { background: var(--blue-soft); color: var(--blue); }
.pill-orange { background: var(--orange-soft); color: var(--orange); }
.pill-red { background: var(--red-soft); color: var(--red); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* ---- misc ---- */
.muted { color: var(--text-2); }
.small { font-size: .85rem; }
.mono { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
