/* Yeet design system.
   One three-color combo carries the brand: cobalt, butter yellow and cherry
   red, on a clean paper white (light) or a deep cobalt night (dark). Green,
   orange and purple stay around only as whiteboard marker colors. Bricolage Grotesque for display,
   Atkinson Hyperlegible Next (built for legibility, great for young readers)
   for everything you read, Shantell Sans for anything the tutor "writes". */

@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/fonts/atkinson-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/fonts/atkinson-500.woff2) format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/fonts/atkinson-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/fonts/atkinson-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Shantell Sans"; src: url(/fonts/shantell.woff2) format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --cobalt: #2340f0;
  --butter: #ffe27a;
  --cherry: #ff2d46;
  --paper: #fffef9;
  --paper-2: #f3f4fb;
  --card: #ffffff;
  --ink: #0d1b5e;
  --ink-2: #3e4a86;
  --ink-3: #737cab;
  --line: rgba(13, 27, 94, 0.11);
  --blue: var(--cobalt);
  --yellow: var(--butter);
  --red: var(--cherry);
  --orange: #ff7a1a;
  --green: #0f9f76;
  --purple: #7b5cff;
  --on-cobalt: var(--butter);
  --focus: #2340f0;
  --glass: rgba(255, 254, 249, 0.74);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --text: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, sans-serif;
  --hand: "Shantell Sans", "Comic Sans MS", cursive;

  /* Type scale (1.25 minor third, with display steps) */
  --t-xs: 0.8125rem; --t-sm: 0.9375rem; --t-md: 1.0625rem; --t-lg: 1.3125rem;
  --t-xl: 1.75rem; --t-2xl: clamp(2rem, 4vw, 2.75rem); --t-3xl: clamp(2.6rem, 6vw, 4.25rem); --t-hero: clamp(3rem, 8.4vw, 7.25rem);

  /* Radii by hierarchy: big surfaces round more */
  --r-xl: 32px; --r-lg: 22px; --r-md: 14px; --r-sm: 10px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(22, 32, 74, 0.06), 0 2px 8px rgba(22, 32, 74, 0.05);
  --shadow-2: 0 2px 6px rgba(22, 32, 74, 0.06), 0 18px 48px -12px rgba(22, 32, 74, 0.22);
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1.05);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #0a1240; --paper-2: #111a52; --card: #17215e; --ink: #fff8de; --ink-2: #c9cdea; --ink-3: #8f97c7;
  --line: rgba(255, 248, 222, 0.12); --cobalt: #2340f0; --blue: #8796ff; --butter: #ffe27a; --yellow: #ffe27a; --cherry: #ff4459; --red: #ff5b66;
  --orange: #ffa25c; --green: #4fe0b0; --purple: #b3a1ff; --on-cobalt: #ffe27a;
  --focus: #ffe27a; --glass: rgba(10, 18, 64, 0.72); --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 48px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --paper: #0a1240; --paper-2: #111a52; --card: #17215e; --ink: #fff8de; --ink-2: #c9cdea; --ink-3: #8f97c7;
  --line: rgba(255, 248, 222, 0.12); --cobalt: #2340f0; --blue: #8796ff; --butter: #ffe27a; --yellow: #ffe27a; --cherry: #ff4459; --red: #ff5b66;
  --orange: #ffa25c; --green: #4fe0b0; --purple: #b3a1ff; --on-cobalt: #ffe27a;
  --focus: #ffe27a; --glass: rgba(10, 18, 64, 0.72); --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 48px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-md)/1.55 var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 0.18em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--butter); color: #0d1b5e; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.02; margin: 0; text-wrap: balance; font-optical-sizing: auto; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); letter-spacing: -0.02em; line-height: 1.08; }
h3 { font-size: var(--t-xl); letter-spacing: -0.012em; line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: var(--t-lg); color: var(--ink-2); max-width: 36ch; line-height: 1.45; }
.muted { color: var(--ink-2); }
.hand { font-family: var(--hand); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons: feedback on press, not on release */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 52px; padding: 0 1.4em; border-radius: var(--r-pill); border: 0;
  background: var(--bg); color: var(--fg); font-weight: 700; font-size: var(--t-md); text-decoration: none; cursor: pointer;
  transition: transform 120ms ease-out, background-color 200ms, box-shadow 200ms; -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--bg) 70%, transparent); }
.btn:active { transform: scale(0.97); transition-duration: 60ms; }
.btn.blue { --bg: var(--cobalt); --fg: var(--on-cobalt); }
.btn.cherry { --bg: var(--cherry); --fg: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cherry) 82%, #fff) 0%, var(--cherry) 55%, color-mix(in srgb, var(--cherry) 88%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), inset 0 -1px 0 rgba(0,0,0,.12), 0 10px 28px -10px rgba(255,45,70,.7); letter-spacing: -0.01em; }
.btn.cherry:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.36), inset 0 -1px 0 rgba(0,0,0,.12), 0 16px 36px -10px rgba(255,45,70,.8); transform: translateY(-1px); }
.btn.blue { background: linear-gradient(180deg, color-mix(in srgb, var(--cobalt) 85%, #fff) 0%, var(--cobalt) 60%); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 26px -12px rgba(35,64,240,.7); }
.btn.butter { --bg: var(--butter); --fg: #0d1b5e; }
.btn.orange { --bg: var(--orange); --fg: #1d1208; }
.btn.ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--ink-3); }
.btn.small { min-height: 40px; padding: 0 1em; font-size: var(--t-sm); }
.btn.big { min-height: 64px; padding: 0 1.8em; font-size: var(--t-lg); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* Forms */
label.field { display: grid; gap: 6px; font-weight: 600; font-size: var(--t-sm); }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="time"], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: var(--r-md);
  border: 2px solid var(--line); background: var(--card); color: var(--ink); font-size: var(--t-md);
  transition: border-color 150ms, box-shadow 150ms;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 20%, transparent); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.error { color: var(--red); font-weight: 600; font-size: var(--t-sm); min-height: 1.4em; }

/* Switch */
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background 200ms; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform 260ms var(--spring); }
.switch input:checked + span { background: var(--cobalt); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Glass bar (translucent chrome with content scrolling underneath) */
.glass { background: var(--glass); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); }
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 99; padding: 14px 22px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font-weight: 600; box-shadow: var(--shadow-2); transition: transform 420ms var(--out); max-width: calc(100vw - 32px); }
.toast:not(.on) { opacity: 0; transition: transform 420ms var(--out), opacity 300ms; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* Avatars (simple, friendly, drawn in CSS + emoji) */
.av { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 30%; font-size: 30px; background: var(--paper-2); flex: none; }
.av::before { content: "🦊"; }
.av-owl::before { content: "🦉"; } .av-cat::before { content: "🐱"; } .av-dog::before { content: "🐶"; } .av-dino::before { content: "🦕"; }
.av-bunny::before { content: "🐰"; } .av-panda::before { content: "🐼"; } .av-frog::before { content: "🐸"; } .av-robot::before { content: "🤖"; }
.av-octopus::before { content: "🐙"; } .av-turtle::before { content: "🐢"; } .av-bee::before { content: "🐝"; }
.av-fox { background: #ffe8d6; } .av-owl { background: #efe7ff; } .av-cat { background: #fff1c7; } .av-dog { background: #e6f0ff; } .av-dino { background: #dcf7ec; }
.av-bunny { background: #ffe6f1; } .av-panda { background: #eceff6; } .av-frog { background: #e4f7d9; } .av-robot { background: #e3ecff; } .av-octopus { background: #ffe3e0; } .av-turtle { background: #ddf5ef; } .av-bee { background: #fff3c4; }

/* Yeet's mark and the voice orb (shared by every page) */
.pip-mark { width: 30px; height: 30px; border-radius: 11px; background: var(--cobalt); position: relative; display: inline-block; box-shadow: inset 0 -4px 0 rgba(0,0,0,.14); }
.pip-mark::before, .pip-mark::after { content: ""; position: absolute; top: 11px; width: 5px; height: 7px; border-radius: 3px; background: var(--butter); animation: blink 5.5s infinite; }
.pip-mark::before { left: 9px; } .pip-mark::after { right: 9px; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
/* The voice: a soft orb with three breathing rings */
.orb { position: relative; width: 52px; height: 52px; border-radius: 50%; flex: none; background: radial-gradient(circle at 34% 28%, #fff4bf, #ffe27a 18%, #5b6dff 46%, #2340f0 72%); box-shadow: inset 0 -6px 14px rgba(0,0,0,.25); }
.orb i { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(224, 49, 63, .55); animation: ring 2.4s var(--out) infinite; opacity: 0; }
.orb i:nth-child(2) { animation-delay: .8s; } .orb i:nth-child(3) { animation-delay: 1.6s; }
.orb.quiet i { animation-play-state: paused; }
.orb.tiny { width: 34px; height: 34px; }
@keyframes ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

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