:root {
  color-scheme: light;
  --serif: 'STIX Two Text Variable', Georgia, serif;
  --paper: #f7f6f2;
  --ink: #30283a;
  --muted: #666573;
  --violet: #674995;
  --violet-dark: #49308e;
  --line: #e0dfdf;
  --lime: #dcf6a1;
  --display: 'Bricolage Grotesque Variable', system-ui, sans-serif;
  --body: 'DM Sans Variable', system-ui, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 500 16px/1.55 var(--body); }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid #8c69d8; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; fill: currentColor; }
.wrap { width: min(1192px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; left: 10px; top: -60px; z-index: 10; padding: 8px 16px; background: white; border-radius: 6px; }
.skip:focus { top: 10px; }
.topbar { background: #fcfbf8; border-bottom: 1px solid var(--line); }
.header-row { height: 71px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; font: 570 25px/1 var(--serif); letter-spacing: -1.15px; white-space: nowrap; }
.brand em { font-weight: 500; }
.brand-icon { display: grid; place-items: center; width: 36px; height: 36px; margin-right: 10px; background: var(--violet-dark); border-radius: 11px; color: #eff7d5; }
.brand-icon .icon { width: 26px; height: 26px; transform: rotate(36deg); }
nav { display: flex; gap: 5px; align-items: center; }
.nav-item { position: relative; display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 650; border: 0; padding: 7px 13px; border-radius: 9px; background: none; color: var(--muted); }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item.active { color: var(--violet-dark); background: #eee9f2; }
.nav-item:hover, .footer button:hover { color: var(--violet); }
.main { padding-top: 30px; }
.hero { isolation: isolate; position: relative; display: flex; align-items: center; min-height: 269px; overflow: hidden; border: 1px solid #d8cce3; border-radius: 21px; background: linear-gradient(110deg,#f6f0f9,#ede6f5 65%,#e3d7ed); }
.hero-grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(#856c9511 1px,transparent 1px),linear-gradient(90deg,#856c9511 1px,transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(90deg,transparent 20%,black); }
.hero-tag { display: inline-flex; gap: 9px; align-items: center; color: #655173; }
.hero-tag i { width: 18px; height: 2px; background: #88719b; }
.hero h1 { margin: 13px 0 6px -2px; font: 520 clamp(56px,6vw,88px)/1.02 var(--serif); letter-spacing: -.06em; color: #32243c; }
.hero h1 span { position: relative; color: #644787; font-weight: 480; font-style: italic; }
.hero h1 svg { position: absolute; z-index: -1; width: 98%; left: 3%; bottom: 9px; height: 10px; fill: none; stroke: #bdcd88; stroke-width: 6; stroke-linecap: round; }
.hero-content p { max-width: 365px; color: #5e5165; font-size: 16px; line-height: 1.45; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: 46%; pointer-events: none; overflow: hidden; border-radius: 125px 0 0 0; background-color: #3d3054; background-image: linear-gradient(#dfd3f014 1px,transparent 1px),linear-gradient(90deg,#dfd3f014 1px,transparent 1px),radial-gradient(ellipse at 85% 60%,#765c96,transparent 70%); background-size: 26px 26px,26px 26px,100% 100%; }
.orbit { position: absolute; width: 75%; height: 80%; border: 1px dashed #cbbbd15c; border-radius: 50%; left: 9%; top: 10%; transform: rotate(-22deg); }
.annotation { position: absolute; top: 19%; left: 14%; color: #f6eafa; font: 500 24px/1 Caveat,cursive; transform: rotate(-8deg); }
.hero-content { position: relative; z-index: 2; padding: 31px 0 31px 41px; max-width: 54%; }
.hero-tag, .mini-label, .question-number { font-family: var(--mono); font-size: 11px; font-weight: 650; line-height: 1.3; letter-spacing: 1.25px; }
.hero-art img { position: absolute; width: 111%; max-width: none; height: auto; left: 0; top: 50%; transform: translateY(-50%); filter: drop-shadow(0 16px 11px #21113666); }
.annotation svg { display: block; width: 49px; height: 28px; margin: 3px 0 0 51px; stroke: #dfd3ff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.workspace { display: grid; grid-template-columns: minmax(0, 2.12fr) minmax(265px,1fr); gap: 22px; margin-top: 24px; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 4px 15px -9px #3e324820; }
.quiz-panel { padding: 28px 31px 25px; scroll-margin-top: 15px; }
.question-number { display: inline-flex; align-items: center; gap: 9px; color: var(--violet); font-size: 11px; }
.question-number::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: #8763cc; }
.question-title { font-size: clamp(25px,2.2vw,33px); letter-spacing: -.048em; font-weight: 700; line-height: 1.16; max-width: 700px; margin: 18px 0 8px; }
.hint { font-size: 14px; color: var(--muted); }
.options { border: 0; margin: 20px 0 23px; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.option { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 13px; min-height: 60px; border: 1.5px solid #dedde3; border-radius: 11px; background: #fdfdfc; text-align: left; font-size: 15px; font-weight: 600; letter-spacing: -.2px; cursor: pointer; line-height: 1.35; transition: background .15s,border-color .15s,transform .15s; }
.option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.option:has(input:focus-visible) { outline: 3px solid #a88ed7; outline-offset: 2px; }
.option:not(.locked):hover { border-color: #9b7cc4; background: #f8f5fd; }
.letter { flex: none; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #dfdce6; background: #f3f2f6; border-radius: 8px; font: 650 13px var(--mono); color: #666173; }
.option:not(.locked):has(input:checked) { border-color: var(--violet); background: #f2edfc; }
.option:not(.locked):has(input:checked) .letter { color: white; background: var(--violet); border-color: var(--violet); }
.option.locked { cursor: default; }
.option.correct { background: #f0f7e6; border-color: #7d9f56; }
.option.correct .letter { background: #526e38; color: white; border-color: #526e38; }
.option.wrong { background: #fff1ef; border-color: #b96968; }
.option.wrong .letter { background: #9b4a4a; color: white; border-color: #9b4a4a; }
.letter .icon { width: 19px; height: 19px; }
.actions .primary { margin-inline-start: auto; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #ebe9ec; padding-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 10px; background: var(--violet); color: white; min-height: 43px; padding: 9px 16px; font-size: 14px; font-weight: 700; transition: background .15s,transform .15s; }
.btn .icon { width: 17px; height: 17px; }
.btn:disabled { background: #eeebf4; color: #716879; }
.btn:not(:disabled):hover { background: var(--violet-dark); transform: translateY(-1px); }
.btn:not(:disabled):active, .notecard:active { transform: scale(.985); }
.btn.secondary { color: var(--violet-dark); background: #f1edf8; border-color: #e0d6f0; }
.btn.secondary:hover { background: #e8dff5; }
.side { display: grid; gap: 15px; }
.progress-panel { padding: 24px; }
.panel-title, .dialog-head { display: flex; align-items: center; gap: 11px; }
.panel-title h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.8px; }
.mini-icon { display: inline-grid; place-items: center; border-radius: 9px; flex: none; width: 34px; height: 34px; color: var(--violet); background: #eee8fa; }
.mini-icon .icon { width: 20px; height: 20px; }
.progress-text { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #65616e; font-size: 13px; margin-top: 21px; }
.progress-text strong { font: 700 13px var(--mono); color: var(--violet); }
.track { display: grid; grid-template-columns: repeat(10,1fr); gap: 2px; margin-top: 8px; height: 6px; }
.track i { background: #eeecf1; border-radius: 2px; transition: background .22s; }
.track .right { background: #46865c; }
.track .miss { background: #be6268; }
.steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin-top: 18px; }
.step { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 35px; padding: 4px 0; border: 1px solid #e3e1e6; background: #f8f7f9; border-radius: 7px; font: 600 12px var(--mono); color: #767080; }
.step:enabled:hover { outline: 2px solid #b49ad9; outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.notecard { isolation: isolate; position: relative; overflow: hidden; text-align: left; width: 100%; display: flex; align-items: center; border: 1px solid #d0d5b9; border-radius: 16px; background: #e9edd8; padding: 19px 23px; color: #3e462d; transition: background .2s,transform .2s; }
.notecard::before { z-index: -1; position: absolute; content: ''; inset: 0; background-image: linear-gradient(90deg,#78609c19 1px,transparent 1px),linear-gradient(#78609c19 1px,transparent 1px); background-size: 15px 15px; mask-image: linear-gradient(95deg,transparent 30%, black); }
.notecard:hover { background: #e0e7c6; }
.notecard-text { position: relative; z-index: 1; display: grid; justify-items: start; }
.mini-label { font-size: 9px; letter-spacing: 1.3px; color: #5d6847; }
.notecard strong { font: 700 22px/1.25 var(--display); letter-spacing: -.8px; margin: 4px 0 12px; }
.note-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #4f5d37; }
.note-link .icon { width: 14px; height: 14px; }
.notebook { position: absolute; right: 8%; top: 23%; width: 62px; height: 76px; border-radius: 4px 7px 8px 4px; transform: rotate(12deg) skewY(-3deg); background: linear-gradient(90deg,#9179c0 0 13%,#c0addf 14% 19%,#cdbde7 20%); border: 1.5px solid #9e86bf; box-shadow: 1px 2px #f7f3fd,2px 3px #b29fc5,3px 4px #f7f3fd,4px 5px #a18bb6,6px 9px 6px #63517b22; display: grid; place-items: center; transition: transform .3s; }
.notebook .icon { width: 33px; height: 33px; margin-left: 9px; color: #6c548c; transform: rotate(22deg); }
.rings { position: absolute; left: -5px; right: auto; top: 6px; bottom: 5px; width: 11px; background: repeating-linear-gradient(to bottom,transparent 0 5px,#6c587c 5px 7px,#f2e9fb 7px 8px,transparent 8px 11px); }
.notecard:hover .notebook { transform: rotate(6deg) translateY(-2px); }
.footer { display: flex; justify-content: flex-end; align-items: center; gap: 12px; border-top: 1px solid var(--line); margin-top: 29px; padding: 17px 0 25px; color: #686571; font-size: 12px; }
.footer button { display: flex; align-items: center; gap: 7px; }
.footer .icon { width: 16px; height: 16px; }
.footer button { border: 0; background: none; font-size: 12px; padding: 6px 0; }
.footer button .icon { width: 13px; height: 13px; }
.feedback { border-left: 3px solid #7e9a58; background: #f5f8ef; border-radius: 0 8px 8px 0; padding: 12px 15px; margin: -7px 0 18px; }
.feedback.missed { border-color: #ba8171; background: #fcf5f1; }
.feedback strong { display: block; font-size: 15px; }
.feedback p { font-size: 14px; margin-top: 2px; color: #514e58; }
.arrive { animation: arrive .27s ease-out both; }
@keyframes arrive { from { transform: translateY(5px); opacity: .45; } to { transform: translateY(0); opacity: 1; } }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.result-score { font: 800 72px/1.1 var(--display); color: var(--violet); letter-spacing: -.075em; margin: 17px 0 0; }
.result-score span { font-size: 31px; color: #786c86; font-weight: 550; }
.result .question-title { margin: 10px 0 5px; }
.result .actions { justify-content: flex-start; margin-top: 21px; flex-wrap: wrap; }
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(620px,calc(100% - 28px)); max-height: min(80dvh,790px); color: var(--ink); background: #fff; box-shadow: 0 25px 90px #1a12363b; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #1d153368; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head { padding: 17px 23px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 25px; letter-spacing: -.8px; }
.close { margin-left: auto; border: 1px solid var(--line); background: #f9f8fa; width: 36px; height: 36px; border-radius: 9px; }
.close .icon { width: 16px; height: 16px; }
.dialog-body { overflow: auto; padding: 21px 25px 28px; font-size: 15px; overscroll-behavior: contain; }
.dialog-body .intro { color: var(--muted); }
.dialog-body section { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.dialog-body h3 { color: var(--violet-dark); font-size: 21px; letter-spacing: -.6px; }
.dialog-body p + p, .dialog-body h3 + p { margin-top: 7px; }
.sources ul { margin: 8px 0 0; padding-left: 18px; }
.sources a { text-decoration: underline; text-underline-offset: 3px; color: var(--violet-dark); }
@media (min-width: 1500px) { .main { padding-top: 38px; } .hero { min-height: 283px; } .workspace { margin-top: 28px; } }
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 52px); }
  .workspace { grid-template-columns: minmax(0,1.9fr) minmax(238px,1fr); gap: 15px; }
  .quiz-panel { padding: 23px; }
  .progress-panel { padding: 20px; }
  .hero-content { padding-left: 30px; }
  .hero { min-height: 238px; }
  .hero-art { width: 46%; }
  .hero-content p { max-width: 380px; }
  .notebook { right: 6%; width: 50px; height: 65px; }
  .option { font-size: 14px; gap: 9px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .header-row { height: 62px; gap: 25px; }
  .brand { font-size: 26px; }
  .brand-icon { width: 32px; height: 32px; }
  .main { padding-top: 18px; }
  .workspace { grid-template-columns: 1fr; margin-top: 16px; }
  .side { grid-template-columns: 1.2fr 1fr; align-items: start; gap: 12px; }
  .hero-content { max-width: 64%; padding: 24px; }
  .hero h1 { font-size: clamp(45px,7.5vw,58px); }
  .hero-content p { font-size: 15px; max-width: 340px; }
  .hero-art { width: 37%; }
  .hero-art img { width: 177%; left: -31%; transform-origin: center; }
  .annotation { display: none; }
  .question-title { font-size: 28px; }
  .notecard { padding-inline: 18px; }
}
@media (max-width: 540px) {
  .wrap { width: calc(100% - 28px); }
  .header-row { gap: 0; height: 59px; }
  .brand { font-size: 21px; }
  .brand-icon { width: 30px; height: 30px; border-radius: 9px; margin-right: 7px; }
  .brand-icon .icon { width: 22px; height: 22px; }
  nav { margin-left: auto; gap: 3px; }
  .nav-item { font-size: 12px; padding: 6px; gap: 5px; }
  .nav-item .icon { width: 15px; height: 15px; }
  .main { padding-top: 14px; }
  .hero { min-height: 204px; border-radius: 15px; }
  .hero-content { padding: 19px 0 20px 18px; max-width: 74%; }
  .hero-tag { font-size: 8.5px; gap: 6px; letter-spacing: .95px; }
  .hero-tag i { width: 5px; height: 5px; }
  .hero h1 { font-size: clamp(37px,9.3vw,49px); margin: 9px 0 12px; }
  .hero h1 svg { height: 5px; bottom: 4px; }
  .hero-content p { max-width: 225px; font-size: 13px; line-height: 1.45; }
  .hero-art { width: 30%; }
  .hero-art img { width: 300%; left: -69%; top: 53%; rotate: -19deg; }
  .hero-art { border-top-left-radius: 57px; }
  .orbit { width: 165%; left: 0; }
  .workspace { margin-top: 12px; gap: 12px; }
  .quiz-panel { padding: 19px 17px 17px; }
  .panel { border-radius: 15px; }
  .question-title { font-size: 26px; margin-top: 15px; }
  .question-number { font-size: 10px; gap: 7px; letter-spacing: .85px; }
  .question-number::before { width: 13px; }
  .hint { font-size: 13px; }
  .options { grid-template-columns: 1fr; gap: 7px; margin: 14px 0 16px; }
  .option { min-height: 46px; padding: 7px 10px; }
  .letter { width: 28px; height: 28px; }
  .actions { padding-top: 14px; gap: 5px; }
  .btn { font-size: 13px; padding-inline: 12px; }
  .side { grid-template-columns: 1fr; }
  .progress-panel { padding: 18px; }
  .steps { gap: 6px; }
  .step { font-size: 13px; }
  .progress-text { margin-top: 14px; }
  .notecard { padding-block: 15px; }
  .notebook { top: 16%; right: 10%; }
  .footer { margin-top: 19px; font-size: 10px; padding: 12px 0 20px; }
  .footer button { font-size: 10px; }
  .dialog-body { padding: 14px 19px 23px; }
}
@media (max-width: 355px) {
  nav { gap: 10px; } .nav-item .icon { display: none; }
  .hero-content p { max-width: 183px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.back-result { border: 0; background: none; color: var(--violet-dark); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; padding: 7px 0; }
.motion-control { position: absolute; z-index: 3; right: 16px; top: 15px; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #372653be; border: 1px solid #f0e7ff50; color: #fff; }
.motion-control .icon { width: 14px; height: 14px; }
.motion-control:hover { background: #463361; }
.motion-control[hidden] { display: none; }
@media (max-width: 540px) { .motion-control { right: 6px; top: 6px; } }

.breakdown { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 19px 0 0; list-style: none; }
.breakdown li { display: flex; align-items: center; gap: 8px; border: 1px solid #e4dfed; border-radius: 8px; padding: 6px 9px; font-size: 12px; background: #f8f6fb; }
.breakdown b { color: var(--violet-dark); }

.step.pending.current { background: var(--violet); border-color: var(--violet); color: #fff; }
.step.right { background: #ddf1e4; color: #235e39; border-color: #9bc9a9; }
.step.miss { background: #fbe4e4; color: #933b41; border-color: #e6a9ae; }
.step.current:not(.pending) { box-shadow: 0 0 0 2px white,0 0 0 3.5px #77559e; }
.step .icon { width: 13px; height: 13px; }
.legend i { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; font: 700 12px/1 var(--body); }
.key-current { border: 1.5px solid #79569d; }
.key-right { background: #ddf1e4; color: #235e39; }
.key-wrong { background: #fbe4e4; color: #933b41; }
@media(max-width:760px) { .hero h1 { font-size: clamp(47px,8vw,64px); } }
@media(max-width:540px) {
  .hero h1 { font-size: clamp(36px,9.9vw,52px); }
  .hero-content { max-width: 69%; }
  .hero-content p { font-size: 13px; }
  .annotation { display: none; }
}
@media(max-width:360px) { .brand { font-size: 19px; } .nav-item { padding: 6px 4px; } }
.feedback .back-result { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 0; font-weight: 600; }
.feedback .back-result .icon { width: 15px; height: 15px; }

@media (pointer: coarse), (max-width: 540px) {
  .brand, .nav-item, .step, .btn, .back-result, .footer button { min-height: 44px; }
  .nav-item { min-width: 44px; justify-content: center; }
  .motion-control { width: 44px; height: 44px; }
  .motion-control .icon { width: 16px; height: 16px; }
  .step { font-size: 13px; }
}
@media (max-width: 540px) {
  .option { font-size: 16px; min-height: 48px; }
  .actions .primary:only-child { width: 100%; }
  .btn { font-size: 15px; }
  .footer { flex-wrap: wrap; gap: 0 10px; font-size: 12px; }
  .footer button { font-size: 12px; }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 540px) {
  .hero { min-height: 160px; }
  .hero-content { padding-block: 16px; }
  .hero h1 { font-size: 48px; margin-block: 5px; }
}
