/* GradeAI design tokens - from the Website Design master prompt (Apple x Microsoft x Claude x InVideo x Lovable) */
/* Fonts are self-hosted (no third-party requests, friendlier for school privacy rules) */
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/fonts/newsreader-latin-opsz-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(/fonts/newsreader-latin-opsz-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(/fonts/caveat-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(/fonts/caveat-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", "Lora", Georgia, serif;

  --bg: #FFFFFF; --bg-subtle: #F5F5F7; --bg-warm: #F9F8F5;
  --surface: #FFFFFF; --surface-raised: #FFFFFF;
  --ink: #1D1D1F; --ink-2: #6E6E73; --ink-3: #86868B;
  --border: rgba(0,0,0,0.08); --border-strong: rgba(0,0,0,0.16);
  --accent: #0071E3; --accent-hover: #0062C4; --accent-ink: #FFFFFF; --accent-soft: rgba(0,113,227,0.10);
  --link: #0066CC; --chip-bg: #E6EFFD; --chip-ink: #2A446F;
  --warm-accent: #D97757; --warm-soft: #FBEDE6;
  --green: #1E8E3E; --green-soft: #E6F4EA; --amber: #B26A00; --amber-soft: #FFF4DE; --red: #D93025; --red-soft: #FCE8E6;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-2xl: 28px; --r-pill: 999px;
  --sh-sm: 0 0 2px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.14);
  --sh-md: 0 2px 2px -1px rgba(0,0,0,.04), 0 4px 4px -2px rgba(0,0,0,.02), 0 12px 32px rgba(0,0,0,.08);
  --sh-lg: 3px 5px 30px rgba(0,0,0,.22);
  --hl: inset 0 1px 0 rgba(255,255,255,.8);

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1200px;
}

[data-theme="dark"] {
  --bg: #141414; --bg-subtle: #191919; --bg-warm: #191919;
  --surface: #1F1F1F; --surface-raised: #303030;
  --ink: rgba(255,255,255,0.93); --ink-2: rgba(255,255,255,0.57); --ink-3: rgba(255,255,255,0.40);
  --border: rgba(255,255,255,0.08); --border-strong: rgba(255,255,255,0.20);
  --accent: #2997FF; --accent-hover: #4AA8FF; --accent-soft: rgba(41,151,255,0.14);
  --link: #2997FF; --chip-bg: rgba(41,151,255,0.14); --chip-ink: #A9CCFF;
  --warm-soft: rgba(217,119,87,0.16);
  --green-soft: rgba(30,142,62,0.2); --amber-soft: rgba(178,106,0,0.22); --red-soft: rgba(217,48,37,0.2);
  --sh-md: 0 0 0 1px rgba(255,255,255,0.06); --hl: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 17px; line-height: 1.5; letter-spacing: -0.01em;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; inset-inline-start: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: var(--r-pill); }
.skip:focus { top: 8px; }
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: 0; }
.muted { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Brand ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; font-size: 19px; color: var(--ink); letter-spacing: -0.02em; text-decoration: none !important; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #0071E3 0%, #6C5CE7 55%, #D97757 100%); display: grid; place-items: center; }
.logo-mark svg { width: 17px; height: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  border-radius: var(--r-pill); padding: 11px 21px; font-size: 17px; font-weight: 500; line-height: 1.2; cursor: pointer;
  transition: background .15s var(--ease), transform .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
  text-decoration: none !important; white-space: nowrap; min-height: 44px;
}
.btn:active { transform: scale(.98); }
.btn-sm { padding: 8px 15px; font-size: 14px; min-height: 32px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-subtle); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { opacity: .88; }
.btn-danger { background: transparent; border-color: rgba(217,48,37,.4); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-chev { font-size: 17px; font-weight: 400; color: var(--link); }
.link-chev::after { content: " ›"; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px;
  background: var(--chip-bg); color: var(--chip-ink); border: 1px solid rgba(42,68,111,.12); font-size: 14px; white-space: nowrap;
}
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; line-height: 18px; background: var(--bg-subtle); color: var(--ink-2); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--accent-soft); color: var(--accent); }
.badge.warm { background: var(--warm-soft); color: var(--warm-accent); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label { font-size: 14px; font-weight: 500; }
.field .help { font-size: 12px; color: var(--ink-2); }
.field .err { font-size: 12px; color: var(--red); display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.input, input[type=text].input, input[type=email].input, input[type=password].input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

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