:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #27223a;
  background: #f8f7fc;
  font-synthesis: none;
  --ink: #27223a;
  --text: #625b72;
  --purple: #6547c7;
  --purple-dark: #5134a8;
  --ice: #f0ebfd;
  --line: #e9e5f0;
  --paper: #fff;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button { cursor: pointer; }
button[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex: none; }
:focus-visible { outline: 3px solid #7655e5; outline-offset: 3px; }
main:focus, .feedback:focus { outline: none; }
h1, h2, p { margin-top: 0; }
.skip-link { position: fixed; left: 14px; top: 12px; z-index: 20; padding: 10px 14px; background: #fff; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.shell { display: grid; grid-template-columns: 235px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 26px 17px 19px; background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand, .mini-brand { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 750; white-space: nowrap; }
.brand { margin: 0 3px 42px; }
.brand strong { color: var(--purple); }
.brand small { display: block; margin-top: 4px; font-size: 8.5px; font-weight: 750; letter-spacing: .11em; color: var(--text); }
.brand-mark { display: grid; place-content: center; position: relative; width: 37px; height: 37px; flex: 0 0 37px; border-radius: 11px; background: #714ee0; color: #fff; box-shadow: inset 0 -3px 0 #5a3eb5; font-size: 17px; font-weight: 850; letter-spacing: -.07em; padding-right: 4px; }
.brand-mark span { position: absolute; top: 7px; right: 7px; color: #ffbd87; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a, .side-install { min-height: 46px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border-radius: 11px; font-size: 13px; font-weight: 660; color: var(--text); }
.sidebar nav a:hover, .side-install:hover { background: #f6f3fc; color: var(--purple-dark); }
.sidebar nav a[aria-current] { background: #eee8fc; color: var(--purple-dark); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: #d75d45; margin-left: auto; }
.side-footer { margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.side-install { width: 100%; border: 0; background: transparent; text-align: left; }
.stage { min-width: 0; }
.topbar { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 clamp(18px, 4.3vw, 64px); border-bottom: 1px solid var(--line); background: #fbfafd; }
#breadcrumb { font-size: 13px; font-weight: 700; color: #554e65; }
.mini-brand { display: none; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.offline-label, .date-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 680; color: #524b64; background: #fff; border: 1px solid var(--line); border-radius: 100px; padding: 8px 11px; white-space: nowrap; }
.offline-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a08d70; }
.offline-label[data-ready="true"]::before { background: #369168; }
.icon-button { display: grid; width: 37px; height: 37px; place-items: center; background: #fff; color: var(--purple-dark); border: 1px solid var(--line); border-radius: 11px; }
.icon-button:hover { background: var(--ice); }
main { width: min(100%, 1220px); margin: 0 auto; padding: 39px clamp(18px, 4.3vw, 64px) 48px; }
.page-intro { margin-bottom: 26px; }
.eyebrow { font-size: 10px; font-weight: 790; letter-spacing: .115em; line-height: 1.4; color: var(--purple-dark); margin: 0 0 8px; }
.page-intro h1 { font-size: clamp(32px, 4.1vw, 48px); letter-spacing: -.062em; line-height: 1.07; margin-bottom: 9px; font-weight: 790; }
.page-intro p:not(.eyebrow) { color: var(--text); font-size: 14px; line-height: 1.62; margin-bottom: 0; }
.home-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.date-chip { margin-top: 17px; }
.hero { min-height: 228px; position: relative; isolation: isolate; display: flex; align-items: center; overflow: hidden; border-radius: 21px; background: linear-gradient(109deg, #362376 5%, #5633ad 58%, #754ed8); color: #fff; padding: 27px 31px 30px; }
.hero-copy { position: relative; z-index: 1; width: 58%; }
.hero-label { display: inline-flex; gap: 6px; align-items: center; font-size: 10px; font-weight: 800; letter-spacing: .07em; color: #ffe0bd; margin-bottom: 11px; }
.hero h2 { font-size: clamp(27px, 3.4vw, 40px); letter-spacing: -.053em; line-height: 1.1; margin-bottom: 8px; }
.hero p { max-width: 38ch; color: #eee8ff; font-size: 13px; line-height: 1.58; margin: 0 0 19px; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 9px 15px; border: 1px solid transparent; border-radius: 10px; color: #fff; background: var(--purple); font-size: 13px; line-height: 1.4; font-weight: 730; text-align: center; }
.primary:hover { background: var(--purple-dark); }
.hero .primary { background: #ffd4b0; color: #3e2241; }
.hero .primary:hover { background: #ffe5d0; }
.hero :focus-visible { outline-color: #fff; }
.hero-secondary { display: block; border: 0; background: transparent; color: #fff; font-size: 12px; margin: 8px 0 0; padding: 5px 0; text-decoration: underline; }
.hero-art { position: absolute; right: 0; top: 0; width: 45%; height: 100%; transform-origin: right center; pointer-events: none; }
.orbit { position: absolute; width: 355px; height: 355px; top: 50%; left: 52%; border: 1px solid #fff2; border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-two { width: 285px; height: 285px; }
.art-card { position: absolute; width: 218px; height: 119px; left: 50%; top: 50%; border-radius: 15px; }
.art-back { background: #b092f2; border: 1px solid #e6d5ff81; transform: translate(-44%, -49%) rotate(13deg); }
.art-front { padding: 12px 15px; background: #f9effd; border: 1px solid #f4e4ff; box-shadow: 0 14px 25px #32206258; transform: translate(-54%, -54%) rotate(-8deg); color: #48326d; font-family: "IBM Plex Mono", "Courier New", monospace; font-size: 12px; font-weight: 650; }
.art-front > span { display: block; white-space: nowrap; }
.art-toolbar { padding-bottom: 7px; margin-bottom: 9px; border-bottom: 1px solid #eaddf2; }
.art-toolbar i { display: inline-block; height: 6px; width: 6px; border-radius: 50%; background: #b28dea; vertical-align: top; margin-right: 4px; }
.art-toolbar i:first-child { background: #e69280; }
.art-toolbar i:last-child { background: #e2af62; }
.art-code > span, .art-result strong { color: #7040c3; }
.art-code em { color: #89532d; font-style: normal; }
.art-result, .art-end { margin-top: 4px; }
.art-chip { position: absolute; z-index: 1; top: 66%; left: calc(50% + 55px); display: flex; align-items: center; gap: 6px; padding: 7px 9px; background: #daf6e9; color: #1d6a4e; transform: rotate(8deg); border-radius: 8px; font-size: 12px; font-weight: 810; }
.art-spark { position: absolute; color: #ffd5b9; }
.art-spark-one { top: 18%; left: calc(50% + 101px); }
.art-spark-two { top: 66%; left: calc(50% - 138px); color: #e1c6ff; }
.art-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; top: 24%; left: calc(50% - 117px); background: #ffcaa8; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 16px 0 30px; }
.stat { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.topic-icon { display: inline-grid; width: 39px; height: 39px; flex: 0 0 39px; place-items: center; border-radius: 11px; }
.violet { background: #eee7fc; color: #6242b8; }
.amber { background: #fff0de; color: #9a5021; }
.green { background: #def4ea; color: #206a4c; }
.blue { background: #e8effd; color: #335c9b; }
.rose { background: #fbe8f0; color: #983b6d; }
.stat p { margin: 0 0 3px; color: var(--text); font-size: 11px; font-weight: 640; }
.stat strong { font-size: 21px; letter-spacing: -.04em; }
.stat small { margin-left: 4px; color: var(--text); font-size: 10.5px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; }
.section-heading h2, .panel h2 { font-size: 23px; margin: 0 0 5px; letter-spacing: -.045em; }
.section-heading p, .panel p { font-size: 13px; color: var(--text); line-height: 1.6; margin: 0; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 740; color: var(--purple-dark); }
.text-link:hover { text-decoration: underline; }
.topic-grid { display: grid; gap: 13px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.topic-card { display: flex; flex-direction: column; width: 100%; min-width: 0; padding: 14px; text-align: left; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.topic-card:hover { border-color: #a48fe6; box-shadow: 0 4px 12px #46307210; }
.topic-card-top, .topic-card-bottom { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 7px; }
.level { display: inline-flex; padding: 4px 7px; border-radius: 6px; color: #5a4388; background: #f2edf9; font-size: 10px; font-weight: 760; letter-spacing: .01em; white-space: nowrap; }
.topic-title { margin: 11px 0 3px; font-size: 15px; font-weight: 760; letter-spacing: -.025em; }
.topic-subtitle, .topic-card-bottom { font-size: 11px; color: var(--text); }
.topic-subtitle { margin-bottom: 10px; line-height: 1.4; }
.topic-card-bottom { margin-top: auto; border-top: 1px solid #f0edf6; padding-top: 9px; }
.topic-card-bottom svg { color: var(--purple); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters button { min-height: 40px; border: 1px solid var(--line); border-radius: 40px; background: #fff; padding: 6px 15px; font-size: 13px; font-weight: 700; color: var(--text); }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--purple-dark); border-color: #c9b8f1; background: var(--ice); }
.source-note, .storage-notice { color: var(--text); font-size: 12px; line-height: 1.6; margin-top: 17px; }
.storage-notice { margin-top: 0; padding: 9px 12px; background: #fff2d8; border-radius: 8px; color: #65421c; }
.narrow { max-width: 730px; margin: 0 auto; }
.panel { border: 1px solid var(--line); border-radius: 17px; background: #fff; padding: clamp(16px, 3vw, 25px); }
.panel > .topic-icon { margin-bottom: 10px; }
.panel > .primary { margin-top: 15px; }
.review-list { list-style: none; padding: 0; margin: 15px 0 0; }
.review-list li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.progress-panel { margin-bottom: 13px; }
.week { display: grid; gap: 7px; grid-template-columns: repeat(7, minmax(0,1fr)); margin-top: 14px; }
.day { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; background: #f8f6fb; border-radius: 8px; color: var(--text); font-size: 11px; }
.day strong { color: var(--ink); font-size: 18px; }
.day.current-day { background: var(--ice); color: var(--purple-dark); }
.progress-rows { margin-top: 12px; display: grid; gap: 12px; }
.progress-row { display: grid; grid-template-columns: minmax(0, 1fr) 1.3fr max-content; gap: 8px; align-items: center; color: var(--text); font-size: 12px; }
.progress-row strong { color: var(--ink); }
progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 9px; background: #ece6f6; overflow: hidden; color: var(--purple); }
progress::-webkit-progress-bar { background: #ece6f6; }
progress::-webkit-progress-value { background: var(--purple); border-radius: 9px; }
progress::-moz-progress-bar { background: var(--purple); border-radius: 9px; }
.back-link { margin-bottom: 15px; }
.exercise-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.exercise-meta h1 { font-size: clamp(23px, 3vw, 34px); line-height: 1.2; letter-spacing: -.045em; margin-bottom: 8px; }
.exercise-meta > span { color: var(--text); font-size: 12px; white-space: nowrap; }
.session-progress { margin: 2px 0 14px; }
.question h2 { font-size: clamp(20px, 3.1vw, 26px); line-height: 1.42; margin: 12px 0 15px; letter-spacing: -.035em; }
.question-tags { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.context, .question-topic { color: var(--text); font-size: 11px; font-weight: 690; background: #f6f4fa; border-radius: 6px; padding: 4px 7px; }
fieldset { min-width: 0; display: grid; gap: 8px; border: 0; margin: 0; padding: 0; }
.answer { position: relative; display: flex; gap: 9px; min-height: 45px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.answer input { position: absolute; opacity: 0; }
.answer:has(input:focus-visible) { outline: 2px solid var(--purple); outline-offset: 2px; }
.answer:has(input:checked), .answer:not(:has(input:disabled)):hover { border-color: #b39be9; background: #f8f2ff; }
.option-key { display: grid; flex: 0 0 24px; height: 24px; place-items: center; background: #f0edf5; border-radius: 5px; font-size: 11px; font-weight: 750; }
.answer > svg { margin-left: auto; }
.answer:has(input:disabled) { cursor: default; }
.answer.correct, .feedback.correct { background: #e8f6ee; border-color: #a9d6ba; color: #205b3e; }
.answer.wrong, .feedback.wrong { background: #fff0ec; border-color: #ebc0b4; color: #823d36; }
.submit-answer { margin-top: 15px; }
.field-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.written-answer { display: block; width: 100%; min-height: 45px; border: 1px solid #d4cbe5; border-radius: 9px; padding: 8px 10px; color: var(--ink); background: #fff; }
.written-answer:disabled { background: #f8f6fb; opacity: 1; }
.feedback { margin-top: 13px; border: 1px solid; border-radius: 10px; padding: 10px 12px; }
.feedback strong { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.feedback p { color: inherit; margin-top: 4px; }
.summary { text-align: center; }
.score { font-size: 49px; font-weight: 790; letter-spacing: -.05em; color: var(--purple-dark); }
.score span { font-size: 26px; color: var(--text); }
.summary-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 15px; }
dialog { width: min(400px, calc(100% - 32px)); padding: 22px; position: fixed; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 65px #291c5a45; }
dialog::backdrop { background: #22183d70; }
.dialog-close { float: right; font-size: 24px; }
dialog h2 { margin: 10px 0; }
dialog p { color: var(--text); font-size: 13px; line-height: 1.6; margin-bottom: 10px; }
@media (max-width: 1050px) { .shell { grid-template-columns: 190px minmax(0, 1fr); } .sidebar { padding-inline: 12px; } }
@media (max-width: 800px) {
  .shell { display: block; }
  .sidebar { position: fixed; z-index: 4; top: auto; bottom: 0; left: 0; right: 0; height: auto; padding: 5px 8px max(5px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); }
  .sidebar nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  .sidebar nav a { position: relative; flex-direction: column; justify-content: center; gap: 3px; min-height: 49px; padding: 4px 1px; font-size: 10px; }
  .nav-dot { position: absolute; left: calc(50% + 11px); top: 5px; }
  .sidebar .brand, .side-footer, #breadcrumb { display: none; }
  .mini-brand { display: flex; }
  .mini-brand .brand-mark { width: 31px; height: 31px; flex-basis: 31px; font-size: 14px; border-radius: 9px; }
  .mini-brand .brand-mark span { top: 6px; right: 6px; }
  .topbar { min-height: 58px; }
  main { padding-top: 26px; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (max-width: 540px) {
  .topbar { gap: 8px; }
  .top-actions { gap: 5px; }
  .offline-label { padding: 6px 7px; font-size: 9px; gap: 4px; }
  .top-actions .icon-button { width: 32px; height: 32px; }
  .mini-brand { gap: 6px; font-size: 11px; }
  .home-heading { display: block; }
  .home-heading .page-intro { margin-bottom: 16px; }
  .date-chip { display: none; }
  .hero { min-height: 204px; padding: 19px 15px; }
  .hero-copy { width: 68%; }
  .hero-art { transform: scale(.55); right: -5%; width: 57%; }
  .hero p { font-size: 12px; }
  .stats { gap: 6px; margin: 12px 0 21px; }
  .stat { display: block; padding: 8px; }
  .stat .topic-icon { width: 27px; height: 27px; border-radius: 8px; margin-bottom: 4px; }
  .stat .topic-icon svg { width: 16px; height: 16px; }
  .stat p { font-size: 10px; }
  .stat strong { font-size: 17px; }
  .stat small { font-size: 9px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 19px; }
  .section-heading .text-link { font-size: 11px; white-space: nowrap; margin-top: 4px; }
  .section-heading .text-link svg { width: 13px; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .topic-card { padding: 9px; }
  .topic-card-bottom { font-size: 10px; }
}
@media (max-width: 345px) {
  main, .topbar { padding-inline: 11px; }
  .mini-brand b { display: none; }
  .hero-art { display: none; }
  .hero-copy { width: 100%; }
  .topic-card-bottom svg { display: none; }
}
