/* Endless Studios — Game Check. Dark studio design system.
   Shared by index.html (student + teacher) and admin.html. */

:root {
  --bg: #FFFFFF;
  --bg-2: #F7F6F3;
  --surface: #FFFFFF;
  --surface-2: #F3F1ED;
  --line: rgba(20,18,24,0.13);
  --line-2: rgba(20,18,24,0.08);
  --text: #16141A;
  --text-2: #4B4753;
  --muted: #77727F;
  --orange: #FF6B00;
  --orange-2: #C24E00;   /* orange for text on white */
  --orange-soft: rgba(255,107,0,0.10);
  --found: #0B8454;    --found-soft: rgba(11,132,84,0.10);
  --almost: #A86200;   --almost-soft: rgba(255,170,40,0.16);
  --missing: #CC3333;  --missing-soft: rgba(204,51,51,0.09);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20,18,24,0.05), 0 8px 28px rgba(20,18,24,0.06);
  --glow: 0 0 0 1.5px rgba(255,107,0,0.55), 0 10px 36px rgba(255,107,0,0.16);
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text);
  background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* Ambient light: one warm source top-centre, a faint dot grid underneath. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% -10%, rgba(255,107,0,0.10), transparent 70%),
    radial-gradient(40% 40% at 94% 12%, rgba(255,107,0,0.05), transparent 70%),
    radial-gradient(36% 36% at 4% 30%, rgba(255,107,0,0.03), transparent 70%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(20,18,24,0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent);
          mask-image: radial-gradient(70% 60% at 50% 20%, #000, transparent);
}
.hidden { display: none !important; }
a { color: var(--orange-2); }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.15; font-weight: 600; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
::selection { background: rgba(255,107,0,0.25); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px; background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.brand img { height: 19px; display: block; }
.brand .product { font-weight: 600; font-size: 14px; padding-left: 14px; border-left: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.ai-tag { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-2); background: var(--orange-soft); padding: 3px 7px; border-radius: 6px; }
.topnav { display: flex; align-items: center; gap: 2px; }
.topnav a, .topnav button { font: inherit; font-size: 13px; font-weight: 500; color: var(--text-2); text-decoration: none; padding: 7px 13px; border-radius: 999px; border: none; background: none; cursor: pointer; }
.topnav a:hover, .topnav button:hover { background: var(--surface-2); color: var(--text); }
.topnav a.active { background: var(--text); color: var(--bg); }
.topnav .who { font-family: var(--mono); font-size: 11px; color: var(--muted); padding: 0 10px; }

.container { max-width: 1080px; margin: 0 auto; padding: 40px 24px 140px; }
.container.narrow, .narrow { max-width: 700px; margin-left: auto; margin-right: auto; }

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card h2 { font-size: 20px; margin-bottom: 6px; }
.card h3 { font-size: 14px; margin: 22px 0 10px; }
.eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hint, .section-hint { color: var(--muted); font-size: 13px; line-height: 1.55; margin-bottom: 14px; }
.note-line { font-size: 12px; color: var(--muted); margin-top: 6px; }

label { font-size: 12px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 6px; }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: #fff;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #A39EAB; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,107,0,0.16); background: #fff; }
select option { background: #fff; color: var(--text); }
textarea { width: 100%; min-height: 76px; line-height: 1.5; resize: vertical; }
input[type=file] { border: none; background: none; padding: 0; font-size: 12px; color: var(--text-2); }
input[type=checkbox] { accent-color: var(--orange); }
.field { margin-bottom: 16px; } .field input, .field select { width: 100%; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.row > div { flex: 1; min-width: 150px; } .row > div input, .row > div select { width: 100%; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 500; white-space: nowrap; margin-bottom: 10px; color: var(--text-2); }
.check input { width: auto; }

.btn { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent; background: var(--text); color: var(--bg); transition: transform .08s, background .15s, box-shadow .2s; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn.accent { background: linear-gradient(180deg, #FF7F1F, var(--orange)); color: white; box-shadow: 0 8px 28px rgba(255,107,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn.accent:hover { box-shadow: 0 10px 36px rgba(255,107,0,0.5), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--missing); border-color: rgba(204,51,51,0.35); }
.btn.danger:hover { background: var(--missing-soft); }
.btn.small { padding: 6px 12px; font-size: 12px; font-weight: 500; }
.link-btn { background: none; border: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--orange-2); cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }

.pill, .chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.pill.on, .chip.found { background: var(--found-soft); color: var(--found); }
.pill.hot, .chip.almost { background: var(--almost-soft); color: var(--almost); }
.chip.not_found { background: var(--missing-soft); color: var(--missing); }
.chip.not_checked { color: var(--muted); }
.chip.mono { font-family: var(--mono); font-weight: 500; font-size: 11px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #CFCBD4; flex: none; }
.dot.found { background: var(--found); }
.dot.almost { background: var(--almost); } .dot.not_found { background: var(--missing); }

.msg { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13px; line-height: 1.5; }
.msg.error { background: var(--missing-soft); color: var(--missing); } .msg.ok { background: var(--found-soft); color: var(--found); } .msg.warn { background: var(--almost-soft); color: var(--almost); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--mono); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
td { padding: 12px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr.off td { color: #A39EAB; }
.code { font-family: var(--mono); font-weight: 600; letter-spacing: 0.12em; }

/* ---------- the reviewer (AI presence) ---------- */
.orb { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(255,154,77,0.35), rgba(255,107,0,0.10) 60%, transparent 72%); }
.orb::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,107,0,0.45); }
.orb::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgba(255,107,0,0.16); animation: halo 3.2s ease-in-out infinite; }
.orb img { width: 60%; display: block; }
.orb.lg { width: 84px; height: 84px; } .orb.lg::after { inset: -12px; }
.orb.sm { width: 30px; height: 30px; } .orb.sm::after { display: none; }
.orb.busy img { animation: breathe 1.6s ease-in-out infinite; }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.12); opacity: .25; } }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
.spark { width: 13px; height: 13px; flex: none; }
.ai-label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-2); }
.ai-panel { position: relative; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,107,0,0.07), #fff 70%); box-shadow: var(--shadow); }
.ai-panel::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,107,0,0.8), rgba(255,107,0,0.18) 40%, rgba(20,18,24,0.12));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }

/* ---------- intake conversation ---------- */
.hello { text-align: center; padding: 36px 0 30px; }
.hello .orb { margin: 0 auto 26px; }
.hello h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; }
.hello h1 em { font-style: normal; background: linear-gradient(90deg, #FF6B00, #FF8F3D); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello p { color: var(--text-2); font-size: 17px; max-width: 520px; margin: 18px auto 0; line-height: 1.55; }
.hello.compact { padding: 6px 0 18px; } .hello.compact .orb, .hello.compact p { display: none; } .hello.compact h1 { font-size: 26px; }
.thread { display: flex; flex-direction: column; gap: 14px; }
.turn { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.turn .said-ai { font-size: 16px; line-height: 1.5; padding-top: 3px; }
.turn .said-ai small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.reply { justify-self: end; max-width: 86%; margin-left: 42px; align-self: flex-end; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 18px 18px 4px 18px; background: var(--orange-soft); border: 1px solid rgba(255,107,0,0.3); font-size: 14px; }
.reply button { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--orange-2); background: none; border: none; cursor: pointer; }
.composer { margin-left: 42px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.composer.focus { box-shadow: var(--glow); border-color: transparent; }
.composer .line { display: flex; gap: 10px; flex-wrap: wrap; }
.composer .line input, .composer .line select { flex: 1; min-width: 150px; }
.composer .actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.composer .actions .note-line { margin: 0; flex: 1; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { margin: 0; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; transition: all .15s; display: inline-flex; gap: 8px; align-items: center; }
.pick label:hover { border-color: rgba(20,18,24,0.4); color: var(--text); }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick label.on { background: var(--orange); border-color: var(--orange); color: white; box-shadow: 0 6px 20px rgba(255,107,0,0.3); }
.pick label.fixed { cursor: default; color: var(--found); border-color: rgba(11,132,84,0.3); background: var(--found-soft); }
.pick-detail { font-size: 12px; color: var(--muted); min-height: 34px; margin-top: 12px; line-height: 1.45; }
.drop-zone { border: 1.5px dashed rgba(20,18,24,0.25); border-radius: var(--radius); padding: 38px 20px; text-align: center; cursor: pointer; background: var(--bg-2); transition: all .15s; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--orange); background: var(--orange-soft); }
.drop-zone.has-file { border-style: solid; border-color: rgba(11,132,84,0.5); background: var(--found-soft); }
.drop-zone .icon { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; }
.drop-zone .text { font-weight: 600; font-size: 16px; } .drop-zone .sub { font-size: 12px; color: var(--muted); margin-top: 4px; word-break: break-all; }
.tips { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 12px 0 0; }
.tips li { position: relative; padding-left: 16px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.tips li::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.evidence-slot { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); }
.evidence-slot .what { flex: 1; }
.lookup { margin-top: 28px; display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.lookup input { padding: 7px 12px; font-size: 13px; width: 140px; border-radius: 999px; }

/* ---------- live analysis ---------- */
.live-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
.viewport { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #050507; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(20,18,24,0.18); }
.viewport img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.viewport img.show { opacity: 1; }
.viewport .idle { position: absolute; inset: 0; display: grid; place-items: center; }
.viewport .scan { position: absolute; left: 0; right: 0; height: 22%; top: -22%; background: linear-gradient(180deg, transparent, rgba(255,107,0,0.16) 80%, rgba(255,154,77,0.75)); animation: scan 2.4s linear infinite; mix-blend-mode: screen; }
@keyframes scan { to { top: 100%; } }
.viewport .hud { position: absolute; font-family: var(--mono); font-size: 11px; color: white; background: rgba(5,5,7,0.6); padding: 4px 8px; border-radius: 6px; backdrop-filter: blur(6px); }
.viewport .hud.tl { left: 12px; top: 12px; display: flex; gap: 8px; align-items: center; } .viewport .hud.tr { right: 12px; top: 12px; } .viewport .hud.bl { left: 12px; bottom: 12px; right: 12px; background: linear-gradient(90deg, rgba(5,5,7,0.8), rgba(5,5,7,0.3)); font-family: var(--font); font-size: 14px; padding: 9px 12px; }
.rec { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.viewport .corner { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(255,154,77,0.9); }
.corner.a { left: 10%; top: 14%; border-right: none; border-bottom: none; } .corner.b { right: 10%; top: 14%; border-left: none; border-bottom: none; }
.corner.c { left: 10%; bottom: 20%; border-right: none; border-top: none; } .corner.d { right: 10%; bottom: 20%; border-left: none; border-top: none; }
.bar { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin: 14px 0 0; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), #FFB37A);  transition: width .6s ease; }
.live-title { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.live-title h1 { font-size: 30px; } .live-title .sub { color: var(--muted); font-size: 14px; }
.log { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); padding: 6px 0; max-height: 520px; overflow: auto; }
.log .head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.log .group { padding: 10px 18px 2px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; align-items: center; animation: rise .3s ease both; }
.log .group.active { color: var(--orange-2); }
.log .entry { display: flex; gap: 10px; align-items: baseline; padding: 6px 18px; font-size: 13px; color: var(--text-2); animation: rise .3s ease both; }
.log .entry .dot { transform: translateY(-1px); }
.spinner { width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255,154,77,0.3); border-top-color: var(--orange-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- results ---------- */
.result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.result-head h1 { font-size: 38px; font-weight: 700; letter-spacing: -0.035em; }
.result-head .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.verdict-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 18px; padding: 26px; align-items: start; margin-bottom: 14px; }
.verdict-card .headline { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; margin: 6px 0 10px; }
.verdict-card .text { color: var(--text-2); font-size: 16px; line-height: 1.6; max-width: 62ch; }
.score { display: grid; grid-auto-flow: column; gap: 22px; align-self: center; text-align: center; padding-left: 22px; border-left: 1px solid var(--line); }
.score .n { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.score .l { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.score .found .n { color: var(--found); } .score .almost .n { color: var(--almost); } .score .not_found .n { color: var(--missing); }
.facts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.disclaimer { font-size: 12px; color: var(--muted); margin: 0 2px 26px; }
.progress-note { font-size: 13px; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; background: var(--found-soft); color: var(--found); }
.progress-note.flat { background: var(--surface-2); color: var(--text-2); }
.hitl-banner { font-size: 13px; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; background: var(--almost-soft); color: var(--almost); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.section-title h2 { font-size: 22px; } .section-title span { font-size: 13px; color: var(--muted); }

/* timeline: the recording with findings pinned to moments */
.timeline { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); padding: 18px; box-shadow: var(--shadow); }
.tl-main { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.tl-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #050507; cursor: zoom-in; }
.tl-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-stage .hud { position: absolute; left: 12px; top: 12px; font-family: var(--mono); font-size: 11px; color: white; background: rgba(5,5,7,0.65); padding: 4px 8px; border-radius: 6px; }
.tl-side { display: flex; flex-direction: column; min-height: 0; }
.tl-side .when { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 12px; }
.tl-side .pins { display: flex; flex-direction: column; gap: 8px; overflow: auto; max-height: 250px; padding-right: 4px; }
.pin { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); font-size: 13px; cursor: pointer; text-align: left; color: var(--text); font-family: inherit; width: 100%; transition: border-color .15s; }
.pin:hover { border-color: rgba(20,18,24,0.35); } .pin .dot { margin-top: 5px; }
.tl-empty { color: var(--muted); font-size: 13px; padding: 10px 2px; }
.strip { display: flex; gap: 6px; margin-top: 16px; overflow-x: auto; padding: 14px 2px 6px; }
.tick { position: relative; flex: none; width: 92px; cursor: pointer; }
.tick .marks { position: absolute; top: -11px; left: 0; right: 0; display: flex; gap: 3px; justify-content: center; height: 8px; }
.tick .marks i { width: 6px; height: 6px; border-radius: 50%; }
.tick img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 8px; opacity: .6; transition: opacity .15s, transform .15s; border: 1.5px solid transparent; }
.tick:hover img { opacity: .9; } .tick.on img { opacity: 1; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,0,0.25); }
.tick .t { font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: center; margin-top: 5px; } .tick.on .t { color: var(--orange-2); }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; width: fit-content; margin: 0 0 18px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 8px 16px; border: none; background: none; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--text); } .tabs button.active { background: var(--text); color: var(--bg); }
.tabs .count { font-family: var(--mono); font-size: 11px; font-weight: 500; opacity: .6; }

.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 14px; }
.next-card { margin: 0; padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.next-card:hover { transform: translateY(-3px); border-color: rgba(255,107,0,0.45); box-shadow: 0 14px 40px rgba(20,18,24,0.10); }
.next-card .num { font-family: var(--mono); font-size: 12px; color: var(--orange-2); }
.next-card .what { font-weight: 600; font-size: 17px; letter-spacing: -0.015em; line-height: 1.3; }
.next-card .how { font-size: 14px; color: var(--text-2); line-height: 1.55; flex: 1; }
.stretch { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 20px 22px; border-radius: var(--radius); border: 1px dashed rgba(255,107,0,0.5); background: rgba(255,107,0,0.05); }
.stretch .eyebrow { color: var(--orange-2); } .stretch .title { font-weight: 600; font-size: 16px; margin: 4px 0; } .stretch .body { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }

.area { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow); }
.area-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; user-select: none; }
.area-head:hover, .item-head:hover { background: var(--bg-2); }
.area-head .lvl { font-family: var(--mono); font-size: 11px; color: var(--muted); width: 22px; }
.area-head .name { font-weight: 600; flex: 1; } .area-head .dots { display: flex; gap: 5px; }
.area-head .tally { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 30px; text-align: right; }
.chev { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; flex: none; }
.open > .area-head .chev, .item.open > .item-head .chev { transform: rotate(90deg); }
.area-body { display: none; border-top: 1px solid var(--line-2); } .area.open > .area-body { display: block; }
.item { border-top: 1px solid var(--line-2); } .item:first-child { border-top: none; }
.item-head { display: flex; align-items: center; gap: 12px; padding: 13px 20px; cursor: pointer; }
.item-head .text { flex: 1; font-size: 14px; } .item-head .conf { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.item-detail { display: none; padding: 2px 20px 20px 52px; } .item.open > .item-detail { display: block; }
.saw { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.film { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.shot { position: relative; flex: none; width: 220px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: #050507; border: 1px solid var(--line); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; } .shot:hover img { transform: scale(1.04); }
.shot .t { position: absolute; left: 6px; bottom: 6px; font-family: var(--mono); font-size: 10px; color: white; background: rgba(5,5,7,0.72); padding: 2px 6px; border-radius: 5px; }
.callout { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--orange-soft); border: 1px solid rgba(255,107,0,0.22); font-size: 14px; line-height: 1.55; }
.callout .ai-label { margin-bottom: 4px; }
.item-actions { margin-top: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.dispute-note { font-size: 12px; background: var(--almost-soft); color: var(--almost); padding: 5px 10px; border-radius: 8px; }
.override { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 14px; border: none; background: transparent; cursor: pointer; color: var(--text-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active-yes { background: var(--found); color: #fff; } .seg button.active-no { background: var(--missing); color: #fff; }
.override input { font-size: 13px; padding: 7px 10px; min-width: 200px; flex: 1; }
.whole-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.whole-grid .card { margin: 0; padding: 22px; } .whole-grid .title { font-weight: 600; margin: 8px 0 6px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.qa { padding: 16px 20px; border-top: 1px solid var(--line-2); } .qa:first-child { border-top: none; } .qa .q { font-weight: 600; margin-bottom: 6px; } .qa .a { color: var(--text-2); font-size: 14px; line-height: 1.6; white-space: pre-wrap; }

/* ask dock */
.dock { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 25; width: min(720px, calc(100vw - 32px)); }
.dock-box { display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 14px; border-radius: 999px; background: rgba(255,255,255,0.97); border: 1px solid var(--line); backdrop-filter: blur(18px); box-shadow: 0 12px 40px rgba(20,18,24,0.14); transition: box-shadow .2s, border-color .2s; }
.dock-box:focus-within { box-shadow: var(--glow), 0 12px 40px rgba(20,18,24,0.14); border-color: transparent; }
.dock-box input { flex: 1; background: none; border: none; box-shadow: none !important; padding: 8px 4px; font-size: 15px; }
.dock-box .send { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--orange); color: white; cursor: pointer; display: grid; place-items: center; flex: none; }
.dock-box .send:disabled { opacity: .35; cursor: default; }
/* suggestions only appear while the student is in the ask box, so they never sit over the page */
.suggest { display: none; gap: 8px; overflow-x: auto; padding: 0 6px 10px; } .dock:focus-within .suggest { display: flex; }
.suggest button { flex: none; font: inherit; font-size: 12px; font-weight: 500; color: var(--text-2); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.97); box-shadow: 0 2px 10px rgba(20,18,24,0.08); cursor: pointer; }
.suggest button:hover { color: var(--text); border-color: var(--orange); }
.answers { max-height: min(46vh, 420px); overflow: auto; margin-bottom: 10px; padding: 6px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(20,18,24,0.18); }
.answers .bubble-q { margin: 10px 10px 6px auto; width: fit-content; max-width: 84%; padding: 9px 14px; border-radius: 16px 16px 4px 16px; background: var(--orange-soft); border: 1px solid rgba(255,107,0,0.3); font-size: 14px; }
.answers .bubble-a { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 12px 12px; font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.answers .close-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 2px; }
.typing { display: inline-flex; gap: 4px; padding-top: 8px; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--orange-2); animation: bounce 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

.review-bar { position: sticky; bottom: 16px; z-index: 20; margin: 22px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px 12px 22px; border-radius: var(--radius); background: var(--text); color: #fff; box-shadow: 0 12px 40px rgba(20,18,24,0.22); font-size: 14px; font-weight: 500; }
.review-bar .btn { background: var(--orange); color: #fff; } .review-bar .btn:hover { background: #E96000; }
.review-bar .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); } .review-bar .btn.ghost:hover { background: rgba(255,255,255,0.12); }

/* frame viewer */
.viewer { position: fixed; inset: 0; z-index: 100; background: rgba(5,5,7,0.94); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; padding: 24px; }
.viewer.active { display: flex; }
.viewer img { max-width: min(1280px, 92vw); max-height: 78vh; border-radius: 12px; box-shadow: 0 40px 120px rgba(0,0,0,0.8); }
.viewer .cap { color: #D8D4DD; font-size: 13px; text-align: center; max-width: 760px; } .viewer .cap b { font-family: var(--mono); font-weight: 500; color: white; }
.viewer button { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,0.12); color: white; font-size: 20px; cursor: pointer; }
.viewer button:hover { background: rgba(255,255,255,0.24); }
.viewer .prev { left: 20px; } .viewer .next { right: 20px; } .viewer .close { top: 20px; right: 20px; transform: none; }

/* ---------- teacher queue ---------- */
.queue-row { display: grid; grid-template-columns: 1fr auto auto auto 16px; gap: 14px; align-items: center; padding: 14px 10px; border-top: 1px solid var(--line-2); cursor: pointer; border-radius: 10px; }
.queue-row:hover { background: var(--bg-2); } .queue-row .team { font-weight: 600; } .queue-row .sub { font-size: 12px; color: var(--muted); }
.login-card { max-width: 400px; margin: 48px auto; }

/* ---------- admin ---------- */
.admin-tabs { margin-bottom: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; }
.stat .n { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; } .stat .l { font-size: 12px; color: var(--muted); }
.area-box { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; background: var(--bg-2); }
.item-box { border-top: 1px solid var(--line); padding: 14px 0 6px; } .item-box .id { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.setting { display: grid; grid-template-columns: 1fr 200px; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.setting .k { font-weight: 600; } .setting .d { font-size: 13px; color: var(--muted); margin-top: 2px; } .setting input, .setting select { width: 100%; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
main > section:not(.hidden) > *, #tabBody > *, #panel > *, .thread > * { animation: rise .4s cubic-bezier(.2,.7,.2,1) both; }
.next-grid > *:nth-child(2), .whole-grid > *:nth-child(2) { animation-delay: .06s; } .next-grid > *:nth-child(3), .whole-grid > *:nth-child(3) { animation-delay: .12s; }
.area.open > .area-body, .item.open > .item-detail { animation: rise .22s ease both; }
.viewer.active img { animation: rise .25s ease both; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 820px) {
  .topbar { padding: 12px 16px; } .brand .product { display: none; }
  .container { padding: 24px 16px 150px; }
  .live-grid, .tl-main { grid-template-columns: 1fr; }
  .verdict-card { grid-template-columns: 1fr; } .verdict-card > .orb { display: none; }
  .score { border-left: none; padding-left: 0; justify-content: start; border-top: 1px solid var(--line); padding-top: 16px; }
  .item-detail { padding-left: 20px; } .composer, .reply { margin-left: 0; } .turn { grid-template-columns: 1fr; } .turn > .orb { display: none; }
  .tips { grid-template-columns: 1fr; } .queue-row { grid-template-columns: 1fr auto; } .result-head h1 { font-size: 30px; }
}

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(20,18,24,0.22) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(20,18,24,0.18); border-radius: 8px; } ::-webkit-scrollbar-thumb:hover { background: rgba(20,18,24,0.32); }
.suggest, .film { scrollbar-width: none; } .suggest::-webkit-scrollbar, .film::-webkit-scrollbar { display: none; }
.log .head { position: sticky; top: -6px; z-index: 1; background: #fff; }

/* reviewer awareness */
.preflight { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; background: var(--found-soft); border: 1px solid rgba(11,132,84,0.25); animation: rise .3s ease both; }
.preflight.warn { background: var(--almost-soft); border-color: rgba(168,98,0,0.3); }
.focus-chip { flex: none; font: inherit; font-family: var(--mono); font-size: 11px; color: var(--orange-2); background: var(--orange-soft); border: 1px solid rgba(255,107,0,0.35); border-radius: 999px; padding: 5px 10px; cursor: pointer; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.focus-chip span { opacity: .7; margin-left: 4px; }
.insight { display: grid; grid-template-columns: 1fr 180px 44px; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.insight .lvl { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-right: 10px; }
.insight .tally { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; }
.meter { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); gap: 2px; }
.meter i { display: block; min-width: 0; } .meter .found { background: var(--found); } .meter .almost { background: var(--almost); } .meter .not_found { background: var(--missing); }
@media (max-width: 820px) { .insight { grid-template-columns: 1fr 70px 36px; } }
