:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #e8eff8;
  background: #090e1b;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #e8eff8;
  --muted: #8c9aaf;
  --quiet: #627087;
  --cyan: #66e4df;
  --cyan-bright: #9af9ef;
  --violet: #9d8aff;
  --panel: #111a2a;
  --panel-raised: #151f32;
  --line: rgba(165, 190, 218, .13);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 75% -5%, rgba(52, 94, 139, .18), transparent 38rem),
    radial-gradient(ellipse at 4% 52%, rgba(61, 58, 128, .08), transparent 28rem),
    #090e1b;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
.app-shell { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -1px;
  text-decoration: none;
}
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(112, 239, 223, .42);
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(102,228,223,.2), rgba(157,138,255,.2));
  box-shadow: inset 0 0 14px rgba(102,228,223,.1), 0 0 22px rgba(102,228,223,.1);
  color: var(--cyan-bright);
  font-size: 19px;
  font-weight: 800;
}
.brand-dot, .heading-period { color: var(--cyan); }
.main-nav { display: flex; align-items: center; gap: 5px; }
.nav-link {
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #91a0b5;
  font-size: 11px;
  font-weight: 600;
  transition: color .16s, border-color .16s, background .16s;
}
.nav-link:hover, .nav-link.active {
  border-color: rgba(125, 216, 225, .14);
  background: rgba(108, 174, 193, .08);
  color: #d3f5f2;
}
.account-controls, .user-panel { display: flex; align-items: center; gap: 12px; }
.topbar-note { display: flex; align-items: center; gap: 8px; color: #728198; font-size: 8px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
.status-dot, .pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.user-identity { display: grid; gap: 3px; max-width: 145px; }
.user-identity strong { overflow: hidden; color: #d2deed; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.user-identity small { color: var(--cyan); font-size: 8px; font-weight: 700; letter-spacing: .9px; }
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1px;
  transition: background .16s, border-color .16s, box-shadow .16s, transform .16s;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
  border-color: rgba(134, 250, 231, .38);
  background: linear-gradient(105deg, #57c8c8, #70d7b6);
  box-shadow: 0 0 22px rgba(79, 205, 197, .13);
  color: #061521;
}
.button-primary:hover { background: linear-gradient(105deg, #77e7e0, #8eeac4); box-shadow: 0 0 26px rgba(79, 205, 197, .24); }
.button-secondary {
  border-color: rgba(154, 171, 210, .2);
  background: rgba(173, 191, 224, .055);
  color: #dce5f2;
}
.button-secondary:hover, .button-outline:hover { border-color: rgba(102, 228, 223, .45); background: rgba(102,228,223,.09); }
.button-outline { border-color: rgba(154, 171, 210, .2); background: transparent; color: #cfdae9; }
.button-challenge { border-color: rgba(169,146,255,.24); background: rgba(148,120,255,.08); color: #d6cbff; }
.button-challenge:hover { border-color: rgba(169,146,255,.55); background: rgba(148,120,255,.15); }
.button-small { min-height: 34px; padding: 0 12px; font-size: 10px; }
.button-symbol { color: #08343b; font-size: 16px; }

.connection-banner {
  margin-top: 15px;
  padding: 11px 14px;
  border: 1px solid rgba(239, 183, 103, .23);
  border-radius: 7px;
  background: rgba(193, 139, 58, .08);
  color: #e0c596;
  font-size: 11px;
  line-height: 1.55;
}

main { min-height: calc(100vh - 142px); }
.page { padding: 42px 0 40px; }
.hero {
  min-height: 391px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px 66px;
  border: 1px solid rgba(146, 174, 211, .13);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 79% 48%, rgba(49, 104, 127, .19), transparent 31%),
    linear-gradient(112deg, #131c2c, #111a2a 56%, #121a2d);
  box-shadow: 0 24px 70px rgba(0,0,0,.2), inset 0 1px rgba(255,255,255,.025);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(147,171,210,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(147,171,210,.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, black, transparent 92%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; width: min(560px, 67%); }
.eyebrow {
  display: block;
  color: #7789a5;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.7px;
}
.hero .eyebrow { display: flex; align-items: center; gap: 9px; color: #91a4bc; }
.pulse-dot { display: inline-block; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .38; box-shadow: 0 0 2px var(--cyan); } }
h1, h2, p { margin: 0; }
.hero h1, .workspace-heading h1 {
  margin-top: 22px;
  color: #eff5fc;
  font-size: clamp(42px, 5vw, 61px);
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: -3.4px;
}
.hero h1 span {
  color: transparent;
  background: linear-gradient(100deg, #83f1e4 5%, #79d9ef 54%, #ad9dfb);
  background-clip: text;
}
.hero-description { max-width: 440px; margin-top: 18px; color: #9aa8bd; font-size: 13px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.hero-caption { display: flex; align-items: center; gap: 9px; margin-top: 25px; color: #64748e; font-size: 8px; font-weight: 700; letter-spacing: 1.6px; }
.caption-line { width: 22px; height: 1px; background: #4fc4bc; }
.hero-art { position: absolute; top: 50%; right: 69px; width: 296px; height: 296px; transform: translateY(-50%); }
.art-glow { position: absolute; inset: 45px; border-radius: 50%; background: #4fc8d0; filter: blur(80px); opacity: .13; }
.atom-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 228px;
  height: 93px;
  border: 1px solid rgba(116, 227, 233, .52);
  border-radius: 50%;
  box-shadow: 0 0 13px rgba(101,221,223,.07), inset 0 0 10px rgba(137,148,255,.04);
}
.orbit-a { transform: translate(-50%, -50%) rotate(0deg); }
.orbit-b { transform: translate(-50%, -50%) rotate(60deg); border-color: rgba(155,146,255,.45); }
.orbit-c { transform: translate(-50%, -50%) rotate(-60deg); border-color: rgba(120,206,230,.38); }
.atom-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(149, 246, 232, .6);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #5fced0, #445fa4 66%, #282d62);
  box-shadow: 0 0 28px rgba(92, 220, 220, .32), inset 0 0 18px rgba(233,255,255,.24);
  color: white;
  font-size: 19px;
  font-weight: 650;
  transform: translate(-50%, -50%);
}
.orbit-electron { position: absolute; z-index: 2; width: 9px; height: 9px; border-radius: 50%; background: #b6fff1; box-shadow: 0 0 13px 3px rgba(115,255,233,.57); }
.electron-a { top: 99px; left: 35px; }
.electron-b { top: 197px; right: 38px; background: #cabaff; box-shadow: 0 0 13px 3px rgba(174,151,255,.58); }
.electron-c { right: 81px; bottom: 30px; width: 7px; height: 7px; }
.art-label { position: absolute; color: #7185a3; font-size: 8px; font-weight: 650; letter-spacing: 1px; }
.label-one { top: 31px; right: 5px; }
.label-two { bottom: 25px; left: 17px; color: #8c88c7; }
.scanline { position: absolute; top: 50%; left: -12px; width: calc(100% + 24px); height: 1px; background: linear-gradient(90deg, transparent, rgba(109,234,226,.25), transparent); }
.hero-index { position: absolute; right: 21px; bottom: 18px; color: #56657d; font-size: 8px; letter-spacing: 1.4px; }

.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 39px 2px 16px; }
.section-heading h2, .saved-heading h2 {
  margin-top: 8px;
  color: #dce6f3;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.5px;
}
.section-heading > p { padding-bottom: 3px; color: #7988a0; font-size: 11px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-card {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(125deg, rgba(20,30,47,.95), rgba(16,25,40,.95));
  text-align: left;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.tool-card:hover { transform: translateY(-2px); border-color: rgba(112, 226, 218, .32); box-shadow: 0 12px 30px rgba(0,0,0,.18), 0 0 25px rgba(86,186,198,.05); }
.card-icon, .form-icon {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(97, 219, 211, .16);
  border-radius: 9px;
  background: rgba(88, 206, 199, .08);
  color: #89e8da;
  font-size: 18px;
}
.questions-card .card-icon { border-color: rgba(171,151,255,.19); background: rgba(137,114,232,.1); color: #c1b4ff; }
.challenge-card .card-icon, .challenge-emblem { border-color: rgba(171,151,255,.24); background: rgba(137,114,232,.1); color: #c1b4ff; }
.card-copy { display: grid; gap: 6px; }
.card-copy strong { color: #d9e3f0; font-size: 11px; font-weight: 650; }
.card-copy > span { color: #8796ad; font-size: 9px; line-height: 1.5; }
.card-arrow { margin-left: auto; color: #74859d; font-size: 15px; }
.privacy-note { margin: 17px 2px 0; color: #687891; font-size: 10px; }
.privacy-note span { margin-right: 5px; color: var(--cyan); }

.workspace-page { padding-top: 32px; }
.back-link { padding: 4px 0; border: 0; background: transparent; color: #8c9bb0; font-size: 11px; font-weight: 600; }
.back-link:hover { color: var(--cyan); }
.workspace-heading { margin: 22px 0 25px; }
.workspace-heading h1 { margin-top: 10px; font-size: clamp(32px, 4vw, 42px); letter-spacing: -2px; }
.workspace-heading > p, .workspace-heading div > p { margin-top: 9px; color: #8b9ab0; font-size: 12px; line-height: 1.6; }
.question-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.question-heading .button { flex: 0 0 auto; margin-bottom: 2px; }
.resource-layout { display: grid; grid-template-columns: 1fr; align-items: start; gap: 15px; }
.teacher-view .resource-layout { grid-template-columns: minmax(280px, .7fr) minmax(0, 1fr); }
.editor-card, .saved-section, .challenge-panel, .challenge-results {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(140deg, rgba(18,28,44,.96), rgba(15,24,39,.96));
  box-shadow: 0 12px 35px rgba(0,0,0,.12);
}
.editor-card { padding: 22px; }
.resource-list-section { min-width: 0; }
.form-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 21px; }
.form-heading h2 { color: #dce7f3; font-size: 16px; font-weight: 650; letter-spacing: -.3px; }
.form-heading p { margin-top: 4px; color: #7d8ca2; font-size: 10px; }
.form-icon { width: 36px; height: 36px; font-size: 17px; }
.question-icon { border-color: rgba(171,151,255,.19); background: rgba(137,114,232,.1); color: #c1b4ff; }
.editor-card > label:not(.file-picker), .auth-form > label, .question-fields > label, .answer-fields > label, .field-label {
  display: block;
  margin: 15px 0 7px;
  color: #b7c4d5;
  font-size: 10px;
  font-weight: 650;
}
.field-label { margin-top: 0; }
.optional { color: #77869a; font-size: 9px; font-weight: 400; }
.editor-card input:not([type="file"]), .editor-card textarea, .editor-card select, .auth-form input, .choice-editor input {
  width: 100%;
  border: 1px solid rgba(154, 178, 208, .15);
  border-radius: 6px;
  outline: 0;
  background: rgba(6, 12, 22, .45);
  color: #dce7f2;
  font-size: 11px;
  transition: border .16s, box-shadow .16s, background .16s;
}
.editor-card input:not([type="file"]), .auth-form input, .choice-editor input { height: 38px; padding: 0 10px; }
.editor-card textarea { min-height: 86px; padding: 10px; line-height: 1.6; resize: vertical; }
.editor-card select { height: 38px; padding: 0 10px; }
.editor-card select option { background: #111a2a; color: #e8eff8; }
.editor-card input:focus, .editor-card textarea:focus, .editor-card select:focus, .auth-form input:focus, .choice-editor input:focus {
  border-color: rgba(99, 222, 214, .58);
  background: rgba(9, 17, 29, .72);
  box-shadow: 0 0 0 3px rgba(79, 196, 190, .08);
}
.editor-card input::placeholder, .editor-card textarea::placeholder, .auth-form input::placeholder, .choice-editor input::placeholder { color: #617087; }
.form-footer { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; }
.form-footer .button { min-height: 36px; }
.form-actions { display: flex; gap: 7px; margin-left: auto; }
.form-message { color: #f0a59d; font-size: 10px; line-height: 1.55; }
.form-message:empty { display: none; }
.status-error { margin: 14px 0 0; padding: 9px 11px; border: 1px solid rgba(238,147,130,.18); border-radius: 6px; background: rgba(186,86,75,.08); }
.page-status { margin: -4px 0 14px; }
.saved-section { padding: 20px; }
.saved-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 15px; border-bottom: 1px solid rgba(170,190,220,.1); }
.saved-heading h2 { font-size: 17px; }
.count-badge { min-width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(102,228,223,.14); border-radius: 7px; background: rgba(102,228,223,.07); color: #97e9dc; font-size: 10px; font-weight: 700; }
.resource-list, .question-list { display: grid; gap: 11px; padding-top: 14px; }
.empty-state { min-height: 175px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #73839b; text-align: center; }
.empty-state > span { margin-bottom: 9px; color: #8a87ce; font-size: 25px; }
.empty-state strong { color: #acbbcd; font-size: 11px; font-weight: 650; }
.empty-state p { margin-top: 5px; color: #718097; font-size: 10px; }
.resource-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(158,183,214,.12);
  border-radius: 8px;
  background: rgba(8,15,27,.42);
}
.resource-icon { width: 37px; height: 40px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid rgba(102,228,223,.18); border-radius: 7px; background: rgba(102,228,223,.07); color: #90e7da; font-size: 9px; font-weight: 750; }
.resource-details { min-width: 0; flex: 1; }
.resource-title { color: #d5e0ed; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.resource-meta { margin-top: 5px; color: #7c8ba1; font-size: 9px; overflow-wrap: anywhere; }
.resource-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }

.question-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.question-fields, .answer-fields { min-width: 0; }
.choice-editor { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.choice-editor > span { width: 25px; height: 25px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid rgba(102,228,223,.17); border-radius: 6px; background: rgba(102,228,223,.07); color: #9beddf; font-size: 9px; font-weight: 700; }
.choice-editor input { flex: 1; min-width: 0; }
.file-picker { min-height: 62px; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px dashed rgba(125,203,204,.29); border-radius: 7px; background: rgba(66,151,157,.045); cursor: pointer; }
.file-picker:hover { border-color: rgba(122,231,219,.58); background: rgba(66,151,157,.09); }
.upload-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(102,228,223,.18); border-radius: 7px; background: rgba(102,228,223,.08); color: var(--cyan); font-size: 15px; }
.file-picker strong, .file-picker small { display: block; }
.file-picker strong { color: #c2d7dd; font-size: 10px; }
.file-picker small { margin-top: 3px; color: #74869a; font-size: 8px; }
.file-name { max-width: 130px; margin-left: auto; overflow: hidden; color: #9aaabd; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.form-hint { margin-top: 6px; color: #75859a; font-size: 9px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.visually-hidden:focus + .file-picker { outline: 3px solid rgba(91,212,205,.2); }
.question-list-intro { display: flex; align-items: center; justify-content: space-between; margin: 22px 1px 0; padding-bottom: 11px; border-bottom: 1px solid rgba(170,190,220,.1); }
.question-card { padding: 17px; }
.entry-card-top { display: flex; align-items: start; gap: 10px; }
.entry-title { flex: 1; color: #d5e0ed; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.entry-meta { margin-top: 4px; color: #7c8ba1; font-size: 8px; letter-spacing: .75px; }
.entry-actions { display: flex; align-items: center; gap: 3px; }
.entry-action { padding: 6px 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #91a5bd; font-size: 9px; }
.entry-action:hover { border-color: rgba(102,228,223,.2); background: rgba(102,228,223,.07); color: #a9f0e2; }
.entry-action.delete-action:hover { border-color: rgba(236,120,128,.2); background: rgba(236,120,128,.08); color: #ef9ea3; }
.question-prompt { margin-top: 14px; color: #d1dceb; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.legacy-warning { margin-top: 12px; color: #e7bd83; font-size: 10px; line-height: 1.6; }
.question-image { display: block; max-width: 100%; max-height: 360px; margin: 13px 0; border: 1px solid rgba(164,189,220,.13); border-radius: 7px; object-fit: contain; object-position: left; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.mcq-choice { min-height: 45px; position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid rgba(154,178,208,.13); border-radius: 7px; background: rgba(6,12,22,.32); cursor: pointer; transition: background .15s, border-color .15s; }
.mcq-choice:hover { border-color: rgba(102,228,223,.34); background: rgba(102,228,223,.045); }
.mcq-choice:has(input:checked) { border-color: rgba(102,228,223,.57); background: rgba(102,228,223,.08); }
.mcq-choice input { width: 13px; height: 13px; flex: 0 0 auto; margin: 0; accent-color: #69d7cd; }
.choice-letter { width: 22px; height: 22px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid rgba(102,228,223,.16); border-radius: 6px; color: #9ce8dc; font-size: 9px; font-weight: 700; }
.choice-text { color: #aebdd0; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.mcq-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; }
.text-button { display: block; margin: 10px auto 0; padding: 4px; border: 0; background: transparent; color: #93c9cc; font-size: 10px; }
.text-button:hover { color: #c4fffa; text-decoration: underline; }
.skip-button { margin: 0; color: #8798ae; }
.answer-feedback { margin-top: 15px; padding: 14px; border: 1px solid rgba(102,228,223,.16); border-radius: 7px; background: rgba(102,228,223,.045); }
.answer-incorrect .answer-feedback { border-color: rgba(240,175,114,.2); background: rgba(240,175,114,.045); }
.feedback-title { display: block; font-size: 11px; font-weight: 700; }
.feedback-good { color: #8ee8ce; }
.feedback-review { color: #f0c58f; }
.correct-answer, .explanation-copy { margin-top: 8px; color: #aab9cd; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }
.explanation-video { display: block; width: min(100%, 560px); max-height: 330px; margin-top: 12px; border-radius: 7px; background: #070b13; }
.video-link { display: inline-block; margin-top: 12px; color: #8ce2dc; font-size: 10px; }
.video-link:hover { color: #c6fff7; }
.skipped-message { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 6px; background: rgba(157,138,255,.07); color: #bdafd9; font-size: 10px; }
.skipped-message .text-button { margin: 0; }
.is-skipped { opacity: .8; }
.next-challenge { margin-top: 13px; }

.challenge-panel, .challenge-results { max-width: 650px; margin: 8px auto 45px; padding: 38px 28px; text-align: center; }
.challenge-emblem { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 17px; border: 1px solid rgba(171,151,255,.24); border-radius: 15px; background: rgba(137,114,232,.1); color: #c1b4ff; font-size: 24px; }
.challenge-panel .eyebrow, .challenge-results .eyebrow { color: #a79ad9; }
.challenge-panel h2, .challenge-results h2 { margin-top: 10px; color: #e3eaf5; font-size: 22px; font-weight: 650; letter-spacing: -.6px; }
.challenge-panel > p, .challenge-results > p { max-width: 410px; margin: 10px auto 19px; color: #91a0b6; font-size: 11px; line-height: 1.7; }
.challenge-panel .challenge-empty-message:empty { display: none; }
.challenge-panel .challenge-empty-message { margin-bottom: 0; color: #f0a59d; }
.challenge-session { max-width: 780px; margin: 0 auto; }
.challenge-progress { display: flex; justify-content: space-between; gap: 10px; color: #97a8be; font-size: 10px; }
.challenge-progress-track { height: 4px; overflow: hidden; margin: 10px 0 15px; border-radius: 5px; background: rgba(163,186,214,.12); }
.challenge-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5bcac8, #9d8aff); transition: width .2s; }

.auth-dialog {
  width: min(410px, calc(100% - 30px));
  max-width: none;
  padding: 25px;
  border: 1px solid rgba(152,178,211,.2);
  border-radius: 13px;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(74,114,174,.14), transparent 55%),
    #111a2a;
  box-shadow: 0 25px 95px rgba(0,0,0,.55), 0 0 40px rgba(76,186,192,.06);
  color: var(--ink);
}
.auth-dialog::backdrop { background: rgba(3,7,15,.74); backdrop-filter: blur(5px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; }
.dialog-close { width: 29px; height: 29px; border: 1px solid rgba(160,182,211,.14); border-radius: 7px; background: transparent; color: #9aabc0; font-size: 18px; }
.dialog-close:hover { background: rgba(255,255,255,.05); color: white; }
.dialog-copy { margin: 23px 0 19px; }
.dialog-copy h2 { margin-top: 9px; color: #edf3fa; font-size: 27px; font-weight: 700; letter-spacing: -1.2px; }
.dialog-copy p { margin-top: 7px; color: #8e9db3; font-size: 11px; line-height: 1.55; }
.auth-form > label { margin-top: 13px; }
.auth-form input { height: 40px; }
.auth-form .form-message { margin-top: 11px; }
.auth-submit { width: 100%; margin-top: 16px; }
.auth-hint { margin-top: 14px; color: #77879e; font-size: 9px; line-height: 1.55; text-align: center; }
.footer { min-height: 61px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: #6d7b91; font-size: 8px; letter-spacing: 1px; }
.footer > span:first-child { color: #a7bacb; font-size: 13px; font-weight: 750; letter-spacing: -.4px; }

@media (max-width: 900px) {
  .app-shell { width: min(100% - 38px, 720px); }
  .topbar { min-height: 72px; }
  .topbar-note { display: none; }
  .hero { min-height: 370px; padding: 38px 35px; }
  .hero-copy { width: 77%; }
  .hero-art { right: -72px; opacity: .68; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .teacher-view .resource-layout { grid-template-columns: 1fr; }
  .question-form-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
}

@media (max-width: 600px) {
  .app-shell { width: calc(100% - 26px); }
  .topbar { flex-wrap: wrap; gap: 7px; padding: 12px 0 10px; }
  .brand { gap: 7px; font-size: 17px; }
  .brand-mark { width: 27px; height: 27px; border-radius: 8px; }
  .account-controls { margin-left: auto; }
  .main-nav { order: 2; width: 100%; justify-content: space-between; }
  .nav-link { padding: 7px 6px; font-size: 9px; }
  .page { padding-top: 24px; }
  .hero { min-height: 405px; padding: 30px 21px; border-radius: 12px; }
  .hero-copy { width: 100%; }
  .hero h1 { font-size: 46px; letter-spacing: -2.7px; }
  .hero-art { top: 52%; right: -151px; opacity: .27; }
  .hero-description { max-width: 325px; font-size: 12px; }
  .hero-actions { align-items: stretch; flex-direction: column; width: min(100%, 255px); }
  .hero-actions .button { justify-content: space-between; }
  .hero-caption { margin-top: 19px; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; margin-top: 30px; }
  .section-heading h2 { font-size: 18px; }
  .tool-grid { grid-template-columns: 1fr; gap: 9px; }
  .tool-card { min-height: 82px; padding: 13px; }
  .workspace-heading { margin-top: 18px; }
  .workspace-heading h1 { font-size: 34px; }
  .question-heading { align-items: start; flex-direction: column; }
  .question-heading .button { margin: 0; }
  .editor-card, .saved-section { padding: 16px; }
  .form-footer { align-items: end; flex-wrap: wrap; }
  .form-footer .form-actions { width: 100%; justify-content: end; }
  .question-form-grid { grid-template-columns: 1fr; gap: 4px; }
  .choice-grid { grid-template-columns: 1fr; }
  .resource-card { align-items: start; flex-wrap: wrap; }
  .resource-actions { width: 100%; justify-content: end; }
  .file-name { max-width: 90px; }
  .challenge-panel, .challenge-results { padding: 27px 19px; }
  .footer { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
