:root {
  color-scheme: light;
  font-family: Inter, ui-rounded, "Arial Rounded MT Bold", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #1f2c3a;
  --muted: #647181;
  --green: #167d6b;
  --green-dark: #0d6657;
  --green-soft: #e6f6f1;
  --yellow: #ffe8a5;
  --card: rgba(255, 255, 255, .94);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 0%, #ffe5ef 0, transparent 28rem),
    radial-gradient(circle at 94% 8%, #d9f6ef 0, transparent 30rem),
    linear-gradient(145deg, #f8fbff, #fffaf0);
}
button { font: inherit; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.app-shell { width: min(900px, calc(100% - 28px)); margin: 0 auto; padding: 18px 0 54px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.back-link, .done-back { color: var(--green-dark); font-weight: 850; text-decoration: none; }
.bank-button { padding: 9px 14px; border: 1px solid #cce0da; border-radius: 999px; color: var(--green-dark); background: rgba(255,255,255,.88); font-weight: 850; cursor: pointer; }
.screen { animation: arrive .25s ease both; }
.quiz-heading, .bank-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 20px 2px 22px; }
.eyebrow, .topic-label { margin: 0 0 7px; color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 900; }
h1 { margin: 0; font-size: clamp(36px, 7vw, 58px); line-height: 1; letter-spacing: -.055em; }
.score-pill { display: flex; gap: 7px; align-items: center; padding: 10px 16px; border-radius: 999px; color: var(--green-dark); background: white; box-shadow: 0 8px 24px rgba(31, 74, 68, .11); font-size: 18px; }
.progress-row { display: grid; grid-template-columns: auto minmax(130px, 330px); justify-content: space-between; align-items: center; gap: 18px; margin: 0 3px 14px; color: #586575; font-size: 13px; font-weight: 850; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: #dce8e4; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #20a68e, #79c987); transition: width .3s ease; }
.question-card { min-height: 530px; padding: clamp(24px, 5vw, 46px); border: 1px solid rgba(31, 44, 58, .08); border-radius: 30px; background: var(--card); box-shadow: 0 22px 70px rgba(42, 68, 75, .12); text-align: center; }
.question-card h2 { max-width: 700px; margin: 0 auto; font-size: clamp(23px, 4vw, 34px); line-height: 1.24; letter-spacing: -.025em; }
.question-display { min-height: 80px; display: grid; place-items: center; margin: 14px 0 8px; }
.question-display:empty { min-height: 28px; }
.formula { padding: 15px 22px; border-radius: 18px; background: #f0f7f5; font-size: clamp(25px, 5vw, 38px); font-weight: 900; font-variant-numeric: tabular-nums; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 680px; margin: 12px auto 0; }
.choice-button { min-height: 66px; padding: 12px 15px; border: 2px solid #dde8e5; border-radius: 17px; color: #263541; background: #fff; box-shadow: 0 5px 15px rgba(35, 65, 61, .05); font-size: clamp(17px, 3vw, 21px); font-weight: 850; cursor: pointer; transition: transform .12s ease, border-color .12s ease, background .12s ease; }
.choice-button:hover { transform: translateY(-1px); border-color: #8cc9bb; }
.choice-button.selected { border-color: var(--green); color: #075c4d; background: var(--green-soft); box-shadow: 0 0 0 3px rgba(22,125,107,.1); }
.choice-button:disabled { opacity: 1; cursor: default; }
.choice-button.correct { border-color: #18845f; color: #075b41; background: #dff7e9; box-shadow: 0 0 0 3px rgba(24,132,95,.12); }
.choice-button.correct::after { content: '  ✓'; }
.choice-button.incorrect { border-color: #d65d70; color: #8a2637; background: #fff0f2; box-shadow: 0 0 0 3px rgba(214,93,112,.11); }
.choice-button.incorrect::after { content: '  ✕'; }
.selection-note { min-height: 24px; margin: 16px 0 10px; color: var(--muted); font-size: 14px; font-weight: 750; }
.selection-note.feedback { max-width: 680px; min-height: 0; margin: 16px auto 13px; padding: 14px 17px; border-radius: 14px; font-size: 16px; line-height: 1.45; }
.selection-note.feedback strong { display: block; margin-bottom: 3px; font-size: 19px; }
.feedback-correct { color: #075b41; background: #e4f8ed; }
.feedback-incorrect { color: #81283a; background: #fff0f2; }
.next-button { min-width: 190px; min-height: 52px; padding: 12px 24px; border: 0; border-radius: 15px; color: white; background: linear-gradient(135deg, #1b9c84, #116d5d); box-shadow: 0 12px 27px rgba(17,109,93,.24); font-weight: 900; cursor: pointer; }
.next-button:disabled { color: #7b8784; background: #dfe6e4; box-shadow: none; cursor: default; }
.next-button.compact { min-width: 130px; }
.clock { width: min(220px, 58vw); filter: drop-shadow(0 8px 18px rgba(30,70,64,.12)); }
.clock-face { fill: #fffefa; stroke: #264f49; stroke-width: 4; }
.minute-mark { stroke: #aab9b5; stroke-width: 1.2; }
.hour-mark { stroke: #375e57; stroke-width: 3; stroke-linecap: round; }
.clock text { fill: #253d39; font-size: 12px; font-weight: 850; text-anchor: middle; }
.hour-hand { stroke: #263d3a; stroke-width: 7; stroke-linecap: round; }
.minute-hand { stroke: #df5d70; stroke-width: 4; stroke-linecap: round; }
.clock-pin { fill: #263d3a; }
.done-screen { max-width: 760px; margin: 45px auto 0; text-align: center; }
.hero-icon { display: grid; place-items: center; width: 82px; height: 82px; margin: 0 auto 15px; border-radius: 27px; background: white; box-shadow: 0 18px 50px rgba(26,87,76,.15); font-size: 42px; transform: rotate(-3deg); }
.intro { max-width: 680px; margin: 15px auto 23px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.review-list { display: grid; gap: 11px; margin: 22px 0; text-align: left; }
.review-list > h2 { margin: 0 0 2px; font-size: 19px; }
.review-list article, .perfect-note { margin: 0; padding: 17px 19px; border: 1px solid #e1e8e6; border-radius: 17px; background: white; }
.review-list article > span { color: var(--green); text-transform: uppercase; letter-spacing: .08em; font-size: 10px; font-weight: 900; }
.review-list article strong { display: block; margin: 6px 0 9px; }
.review-list article p { margin: 3px 0; color: #4d5a67; }
.review-list article small { display: block; margin-top: 8px; color: #68757e; line-height: 1.4; }
.done-back { display: block; margin-top: 18px; }
.reward-text { display: inline-block; margin: -7px auto 10px; padding: 12px 18px; border-radius: 999px; color: #6f4b00; background: #fff0b8; font-weight: 900; }
.bank-screen { padding-top: 8px; }
.bank-lock { max-width: 620px; margin: 65px auto; padding: 38px 28px; border: 1px solid #dce7e3; border-radius: 28px; background: rgba(255,255,255,.94); box-shadow: 0 18px 55px rgba(33,70,64,.12); text-align: center; }
.lock-icon { margin-bottom: 12px; font-size: 42px; }
.text-button { display: block; margin: 16px auto 0; border: 0; color: var(--green-dark); background: none; font-weight: 850; cursor: pointer; }
.lock-message { min-height: 22px; color: #a43747; font-weight: 800; }
.bank-heading { align-items: center; }
.bank-heading .intro { margin: 12px 0 0; }
.bank-list { display: grid; gap: 12px; }
.bank-list details { overflow: hidden; border: 1px solid #dce7e3; border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 8px 25px rgba(33,70,64,.06); }
.bank-list summary { display: flex; justify-content: space-between; gap: 15px; padding: 18px 20px; cursor: pointer; font-size: 18px; font-weight: 900; }
.bank-list summary b { color: var(--green); font-size: 13px; }
.bank-list ol { margin: 0; padding: 0 22px 20px 50px; }
.bank-list li { padding: 10px 0; border-top: 1px dashed #dce5e2; }
.bank-list li p { margin: 0 0 5px; font-weight: 750; }
.bank-list li small { color: #65727b; line-height: 1.45; }
.quiz-footer { display: flex; justify-content: center; gap: 9px; margin-top: 34px; color: #7b8784; font-size: 12px; }
.quiz-footer button { padding: 0; border: 0; color: var(--green-dark); background: none; font-weight: 800; text-decoration: underline; cursor: pointer; }
@keyframes arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .app-shell { width: min(100% - 18px, 900px); padding-top: 7px; }
  .quiz-heading { align-items: center; margin-top: 12px; }
  .score-pill { padding: 8px 12px; }
  .progress-row { grid-template-columns: 1fr; gap: 7px; }
  .question-card { min-height: 0; padding: 24px 13px; border-radius: 23px; }
  .choices { grid-template-columns: 1fr; gap: 9px; }
  .choice-button { min-height: 56px; }
  .question-display { min-height: 45px; }
  .bank-heading { align-items: flex-start; flex-direction: column; }
  .bank-list summary { padding: 16px; }
}

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