:root {
  color-scheme: light;
  --ink: #142944;
  --ink-2: #203a59;
  --text: #263b54;
  --muted: #718197;
  --muted-2: #99a6b5;
  --line: #e7edf0;
  --paper: #ffffff;
  --ground: #f4f7f8;
  --ground-2: #eef3f4;
  --teal: #2ab5a0;
  --teal-dark: #117f72;
  --teal-pale: #e8f7f4;
  --blue: #496ed8;
  --blue-pale: #edf1ff;
  --amber: #d99029;
  --amber-pale: #fff5e4;
  --red: #c94a4a;
  --red-pale: #fff0ef;
  --shadow: 0 16px 50px rgba(28, 50, 74, .07);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.mobile-refresh-sync { display: none; }
.keyboard-answer-note { color: var(--muted); }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .mobile-refresh-sync { width: 30px; height: 30px; display: grid; place-items: center; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--muted); cursor: pointer; }
  .mobile-refresh-sync svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-refresh-sync:disabled { opacity: .65; }
  .mobile-refresh-sync[aria-busy="true"] svg { animation: refresh-spin .8s linear infinite; }
  .keyboard-answer-note { display: none; }
}

/* Give the active exam the full viewport so the question and answer controls stay in view. */
.quiz-active .app-shell { height: 100vh; height: 100dvh; min-height: 0; }
.quiz-active .sidebar, .quiz-active .topbar { display: none; }
.quiz-active .main-column { width: 100%; height: 100%; min-height: 0; margin-left: 0; display: flex; flex-direction: column; overflow: hidden; }
.quiz-active .content { flex: 1; width: 100%; min-height: 0; height: auto; overflow: hidden; padding: 14px clamp(16px,2vw,30px); }
.quiz-active .site-footer, .quiz-active .mobile-nav { display: none; }
.quiz-active .exam-shell, .quiz-active .exam-frame { height: 100%; min-height: 0; }
.quiz-active .exam-frame { display: flex; flex-direction: column; }
.quiz-active .exam-layout { flex: 1; min-height: 0; }
.quiz-active .exam-main { min-height: 0; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto auto auto; overflow: hidden; padding-block: 16px; }
.quiz-active .exam-question-content { min-height: 0; overflow: auto; overscroll-behavior: contain; padding-right: 6px; }
.quiz-active .exam-question-content:has(.question-figures) { display: flex; flex-direction: column; overflow: hidden; }
.quiz-active .exam-main .question-figures { flex: 1 1 0; min-height: 0; justify-content: flex-start; align-items: center; overflow: hidden; }
.quiz-active .exam-question-content:has(.question-figures) .quiz-question { flex: none; font-size: clamp(22px,2.4vw,32px); line-height: 1.3; }
.quiz-active .exam-question-content .question-figures .quiz-figure { width: min(100%,520px); max-width: 100%; height: auto; max-height: 100%; margin: 0; object-fit: contain; object-position: left center; }
.quiz-active .question-figures:has(.quiz-figure:nth-child(2)) { flex-wrap: nowrap; }
.quiz-active .question-figures:has(.quiz-figure:nth-child(2)) .quiz-figure { width: min(50%,250px); }
.quiz-active .exam-progress-line { margin-block: 12px 18px; }
.quiz-active .exam-answer-area { margin-block: 10px; }
.quiz-active .choice-button.exam-choice { min-height: 64px; }
.quiz-active .exam-control-row { padding-block: 9px; }
.quiz-active .exam-summary { min-height: 0; padding-top: 9px; }
.quiz-active .exam-map-grid { gap: 6px; }
.quiz-active .exam-map-group { padding: 6px; }
.quiz-active .map-dot { height: 22px; }
.quiz-active .exam-exit { width: 42px; height: 42px; border: 2px solid color-mix(in srgb,var(--red) 62%,var(--line)); border-radius: 12px; background: var(--red-pale); color: var(--red); }
.quiz-active .exam-exit:hover, .quiz-active .exam-exit:focus-visible { border-color: var(--red); background: color-mix(in srgb,var(--red) 18%,var(--paper)); color: var(--red); }
.quiz-active .exam-exit svg { width: 23px; height: 23px; stroke-width: 2.8; }
.quiz-active .exam-main .quiz-question { font-size: clamp(27px,3.2vw,42px); line-height: 1.34; }
.quiz-active .exam-kicker { font-size: 10px; }
.quiz-active .exam-question-head .question-number { font-size: 24px; }
.quiz-active .exam-choice-copy strong { font-size: 16px; }
.quiz-active .exam-completion { font-size: 12px; }
.quiz-active .exam-map-group-title { font-size: 8px; }
.quiz-active .map-dot { font-size: 10px; }

@media (max-height: 760px) and (min-width: 761px) {
  .quiz-active .content { padding-block: 8px; }
  .quiz-active .exam-disclaimer { min-height: 38px; }
  .quiz-active .exam-aside { gap: 9px; padding-block: 12px; }
  .quiz-active .exam-candidate { padding-block: 10px; }
  .quiz-active .candidate-avatar { width: 46px; height: 46px; margin-bottom: 7px; }
  .quiz-active .exam-main { padding-block: 10px; }
  .quiz-active .exam-question-content { font-size: 95%; }
  .quiz-active .exam-main .quiz-question { font-size: clamp(25px,2.8vw,34px); }
  .quiz-active .exam-main .question-figures .quiz-figure { max-height: 100%; }
  .quiz-active .exam-summary { padding-top: 5px; }
}

@media (max-width: 760px) {
  .quiz-active .app-shell { height: 100vh; height: 100svh; }
  .quiz-active .main-column { padding-bottom: env(safe-area-inset-bottom); }
  .quiz-active .content { padding: 5px 8px 7px; }
  .quiz-active .exam-frame { border-radius: 13px; }
  .quiz-active .exam-disclaimer { min-height: 32px; flex: none; gap: 7px; padding: 3px 9px; }
  .quiz-active .exam-disclaimer > span:nth-child(2) { display: none; }
  .quiz-active .exam-disclaimer-badge { padding: 3px 6px; }
  .quiz-active .exam-layout { display: flex; flex-direction: column; }
  .quiz-active .exam-aside { flex: none; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 5px 8px; border-bottom: 1px solid var(--line); }
  .quiz-active .exam-candidate { display: none; }
  .quiz-active .exam-clock-card { grid-column: 1; grid-row: 1; min-width: 0; display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px; border-radius: 9px; }
  .quiz-active .exam-clock-card > span { font-size: 8px; }
  .quiz-active .exam-clock-card .timer { gap: 5px; font-size: 17px; }
  .quiz-active .exam-clock-card .timer svg { width: 13px; height: 13px; }
  .quiz-active .exam-clock-card small, .quiz-active .exam-rule-card, .quiz-active .exam-aside-foot { display: none; }
  .quiz-active .exam-summary-button { grid-column: 2; grid-row: 1; min-height: 31px; gap: 5px; padding-inline: 7px; border-radius: 9px; font-size: 7px; }
  .quiz-active .exam-summary-button > span { gap: 5px; }
  .quiz-active .exam-summary-button svg { width: 12px; height: 12px; }
  .quiz-active .exam-summary-button > strong { font-size: 10px; }
  .quiz-active .exam-main { flex: 1; gap: 0; padding: 9px 10px 7px; grid-template-rows: auto auto minmax(0,1fr) auto auto auto; }
  .quiz-active .exam-question-head .question-number { margin-top: 2px; font-size: 16px; }
  .quiz-active .exam-kicker { font-size: 6px; }
  .quiz-active .exam-tool { width: 30px; height: 30px; }
  .quiz-active .exam-progress-line { margin: 7px 0 9px; }
  .quiz-active .exam-question-content { padding-right: 3px; }
  .quiz-active .question-category { margin-bottom: 6px; font-size: 7px; }
  .quiz-active .exam-main .quiz-question { font-size: clamp(18px,4.8vw,23px); line-height: 1.3; }
  .quiz-active .exam-question-content:has(.question-figures) .quiz-question { font-size: clamp(16px,4.2vw,19px); line-height: 1.25; }
  .quiz-active .exam-exit { width: 38px; height: 38px; }
  .quiz-active .exam-exit svg { width: 21px; height: 21px; }
  .quiz-active .exam-main .question-figures { margin-top: 8px; }
  .quiz-active .exam-main .question-figures .quiz-figure { width: min(100%,440px); max-height: 100%; padding: 3px; }
  .quiz-active .question-figures:has(.quiz-figure:nth-child(2)) .quiz-figure { width: calc(50% - 4px); }
  .quiz-active .exam-answer-area { margin-block: 7px 5px; }
  .quiz-active .answer-prompt { margin-bottom: 6px; font-size: 8px; }
  .quiz-active .exam-choice-grid { gap: 6px; }
  .quiz-active .choice-button.exam-choice { min-height: 54px; gap: 6px; padding: 6px; border-radius: 9px; }
  .quiz-active .exam-choice-letter { width: 32px; height: 32px; border-radius: 8px; font-size: 17px; }
  .quiz-active .exam-choice-copy strong { font-size: 10px; }
  .quiz-active .exam-choice-copy small, .quiz-active .exam-choice-check, .quiz-active .answer-note, .quiz-active .exam-completion { display: none; }
  .quiz-active .exam-control-row { justify-content: stretch; padding-block: 6px; }
  .quiz-active .exam-control-actions { width: 100%; gap: 6px; }
  .quiz-active .exam-control-actions .button { min-height: 36px; font-size: 8px; }
  .quiz-active .exam-summary { padding-top: 6px; }
  .quiz-active .exam-summary-footer { justify-content: flex-start; }
  .quiz-active .exam-legend { gap: 8px; font-size: 7px; }
  .quiz-active .exam-summary-foot { display: none; }
  .quiz-active .exam-map-grid { grid-template-columns: repeat(10,minmax(0,1fr)); gap: 4px; }
  .quiz-active .exam-map-group { display: contents; }
  .quiz-active .exam-map-group-title { display: none; }
  .quiz-active .exam-map-items { display: contents; }
  .quiz-active .map-dot { height: 24px; border-radius: 6px; font-size: 9px; }
}

@media (min-width: 1000px) {
  .quiz-active .exam-question-content:has(.question-figures) { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(280px,.85fr); grid-template-rows: auto minmax(0,1fr); align-items: center; column-gap: clamp(14px,2vw,28px); }
  .quiz-active .exam-question-content:has(.question-figures) .question-category { grid-column: 1 / -1; grid-row: 1; margin-bottom: 8px; }
  .quiz-active .exam-question-content:has(.question-figures) .quiz-question { grid-column: 1; grid-row: 2; align-self: start; font-size: clamp(20px,2.4vw,30px); line-height: 1.3; }
  .quiz-active .exam-question-content:has(.question-figures) .question-figures { grid-column: 2; grid-row: 2; align-self: stretch; margin: 0; }
  .quiz-active .exam-question-content:has(.question-figures) .question-figures .quiz-figure { width: min(100%,500px); max-height: 100%; }
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--ground); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(42,181,160,.38); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; }
.sidebar { width: 250px; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; padding: 27px 17px 15px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 31px; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; flex: none; color: #fff; background: var(--ink); border-radius: 13px; box-shadow: 0 7px 14px rgba(20,41,68,.17); }
.brand-mark svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
.brand strong { display: block; color: var(--ink); font-size: 15px; letter-spacing: -.025em; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; letter-spacing: .12em; font-weight: 750; white-space: nowrap; }
.sidebar-label { padding: 0 12px 11px; color: #a1adba; font-size: 9px; letter-spacing: .14em; font-weight: 800; }
.main-nav { display: grid; gap: 5px; }
.nav-item { height: 46px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: #607187; text-align: left; font-size: 12px; font-weight: 650; cursor: pointer; transition: background .16s ease,color .16s ease; }
.nav-item:hover { background: #f5f8f9; color: var(--ink); }
.nav-item.is-active { background: #eaf7f5; color: #117c70; }
.nav-icon, .nav-item [data-icon], .mobile-nav-item [data-icon] { width: 18px; height: 18px; display: inline-grid; place-items: center; flex: none; }
.nav-icon svg, .nav-item [data-icon] svg, .mobile-nav-item [data-icon] svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { min-width: 21px; height: 20px; margin-left: auto; display: grid; place-items: center; padding: 0 5px; border-radius: 7px; background: #f0f3f5; color: #65768a; font-size: 10px; font-weight: 750; }
.sidebar-bottom { margin-top: auto; }
.profile-button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 8px 7px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #deeee9; color: #286e63; font-size: 12px; font-weight: 800; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { display: block; margin-top: 3px; color: #8b99a9; font-size: 9px; }
.more-icon { color: #91a0af; letter-spacing: 2px; font-size: 11px; }
.main-column { min-height: 100vh; margin-left: 250px; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: flex-end; gap: 25px; padding: 0 clamp(24px,4vw,64px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.85); }
.topbar-note { display: flex; align-items: center; gap: 8px; color: #78889a; font-size: 10px; font-weight: 550; }
.tiny-check { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: #e5f5f1; color: var(--teal-dark); font-size: 10px; font-weight: 900; }
.top-profile { display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; color: var(--ink-2); font-size: 11px; font-weight: 700; cursor: pointer; }
.small-avatar { width: 29px; height: 29px; font-size: 10px; }
.chevron { color: #94a1af; font-size: 16px; line-height: 1; }
.mobile-brand, .mobile-nav { display: none; }
.content { width: min(1160px,100%); margin: 0 auto; padding: 35px clamp(22px,4vw,64px) 60px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #75879a; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow .spark { color: var(--teal-dark); font-size: 13px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-heading h1 { margin: 8px 0 0; color: var(--ink); font-size: clamp(25px,3vw,34px); letter-spacing: -.045em; line-height: 1.1; }
.page-heading p { max-width: 600px; margin: 9px 0 0; color: #76869a; font-size: 12px; line-height: 1.6; }
.date-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; color: #718197; background: #fff; font-size: 9px; font-weight: 700; white-space: nowrap; }
.date-chip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.62fr) minmax(250px,.88fr); gap: 16px; }
.hero-card { position: relative; min-height: 270px; display: flex; overflow: hidden; padding: 29px 30px; border-radius: var(--radius); background: linear-gradient(112deg,#142d4d 0%,#1a3c5e 68%,#1c5061 100%); color: white; box-shadow: 0 16px 34px rgba(20,41,68,.15); }
.hero-card:before, .hero-card:after { position: absolute; content: ""; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; pointer-events: none; }
.hero-card:before { width: 330px; height: 330px; right: -80px; top: -166px; }
.hero-card:after { width: 230px; height: 230px; right: -29px; top: -114px; }
.hero-copy { position: relative; z-index: 1; width: min(410px,74%); }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: #b4dcd7; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-kicker span { width: 7px; height: 7px; border-radius: 50%; background: #51d3bd; box-shadow: 0 0 0 4px rgba(81,211,189,.15); }
.hero-card h2 { max-width: 385px; margin: 16px 0 9px; color: #fff; font-size: clamp(25px,3vw,34px); letter-spacing: -.045em; line-height: 1.08; }
.hero-card p { max-width: 395px; margin: 0; color: #c3d1dc; font-size: 11px; line-height: 1.7; }
.hero-facts { display: flex; gap: 19px; margin: 19px 0 20px; }
.hero-fact { display: flex; align-items: center; gap: 7px; color: #e2edf0; font-size: 10px; font-weight: 650; }
.hero-fact .fact-icon { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; color: #8de1d3; }
.hero-fact svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 39px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; background: var(--teal); color: #083d3a; font-size: 10px; font-weight: 800; cursor: pointer; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); background: #48c6b2; box-shadow: 0 7px 15px rgba(42,181,160,.2); }
.button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button.primary-dark { background: var(--ink); color: #fff; }
.button.primary-dark:hover { background: #244867; box-shadow: 0 7px 15px rgba(20,41,68,.17); }
.button.secondary { border-color: var(--line); background: white; color: var(--ink-2); }
.button.secondary:hover { background: #f6f9fa; box-shadow: none; }
.button.ghost-light { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: #fff; }
.button.ghost-light:hover { background: rgba(255,255,255,.13); box-shadow: none; }
.button.danger-outline { border-color: #efd2d0; background: #fff; color: var(--red); }
.hero-art { position: absolute; right: 17px; bottom: 12px; width: 190px; height: 190px; opacity: .92; }
.hero-art svg { width: 100%; height: 100%; }
.hero-art .road { fill: none; stroke: #81cdbf; stroke-width: 1.3; stroke-dasharray: 4 7; opacity: .55; }
.hero-art .car-body { fill: #30ad9b; stroke: #b6eee4; stroke-width: 1.4; }
.hero-art .car-detail { fill: #d8fff6; opacity: .75; }
.hero-art .orbit { fill: none; stroke: rgba(255,255,255,.19); stroke-width: 1; }
.resume-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; padding: 14px 17px; border: 1px solid #ccebe4; border-radius: 13px; background: #f0fbf8; }
.resume-copy { display: flex; align-items: center; gap: 11px; }
.resume-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #d9f2ec; color: #168775; }
.resume-mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.resume-copy strong { display: block; color: #205b50; font-size: 11px; }
.resume-copy small { display: block; margin-top: 4px; color: #6d8f89; font-size: 9px; }
.stat-stack { display: grid; gap: 14px; }
.stat-card { min-height: 81px; display: flex; align-items: center; gap: 13px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 6px 20px rgba(29,53,77,.025); }
.stat-icon { width: 39px; height: 39px; display: grid; place-items: center; flex: none; border-radius: 12px; background: var(--blue-pale); color: var(--blue); }
.stat-icon.teal { background: var(--teal-pale); color: var(--teal-dark); }
.stat-icon.amber { background: var(--amber-pale); color: var(--amber); }
.stat-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-info { min-width: 0; }
.stat-info small { display: block; color: #8290a0; font-size: 9px; font-weight: 650; }
.stat-info strong { display: block; margin-top: 4px; color: var(--ink); font-size: 20px; letter-spacing: -.04em; line-height: 1; }
.stat-info span { display: block; margin-top: 4px; color: #a1acb8; font-size: 8px; }
.section-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 30px 0 13px; }
.section-row h2 { margin: 0; color: var(--ink); font-size: 15px; letter-spacing: -.025em; }
.section-row p { margin: 5px 0 0; color: #8592a1; font-size: 10px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: transparent; color: #168477; font-size: 10px; font-weight: 800; cursor: pointer; }
.text-button:hover { color: #0d5d54; }
.text-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.progress-panel { padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.progress-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.progress-title { display: flex; align-items: center; gap: 10px; }
.progress-title .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
.progress-title strong { display: block; color: var(--ink); font-size: 11px; }
.progress-title small { display: block; margin-top: 3px; color: #91a0af; font-size: 9px; }
.progress-number { color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.progress-number span { color: #8b9aaa; font-size: 10px; font-weight: 600; }
.progress-track { height: 7px; overflow: hidden; margin: 16px 0 9px; border-radius: 20px; background: #edf1f3; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2ab5a0,#55c8a7); transition: width .35s ease; }
.progress-foot { display: flex; align-items: center; justify-content: space-between; color: #91a0ae; font-size: 9px; }
.topic-shortcuts { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.topic-shortcut { min-height: 95px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.topic-shortcut:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.topic-shortcut .shortcut-index { color: #92a0af; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.topic-shortcut strong { display: block; margin: 8px 0 5px; color: var(--ink); font-size: 10px; line-height: 1.35; }
.topic-shortcut small { color: #95a2b0; font-size: 8px; }
.topic-shortcut .shortcut-line { width: 23px; height: 2px; margin-top: 11px; border-radius: 2px; background: var(--teal); }
.source-note { margin: 23px 0 0; color: #a2aeba; font-size: 9px; text-align: center; }
.card { border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 18px 0 14px; }
.search-wrap { min-width: 220px; flex: 1; position: relative; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); stroke: #98a5b3; fill: none; stroke-width: 1.8; }
.input, .select { height: 39px; width: 100%; padding: 0 12px; border: 1px solid #e3e9ec; border-radius: 9px; background: #fff; color: var(--ink-2); font-size: 10px; }
.search-wrap .input { padding-left: 35px; }
.select { width: auto; min-width: 170px; cursor: pointer; }
.input::placeholder { color: #a2adba; }
.chapter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.chapter-card { position: relative; display: flex; align-items: center; gap: 12px; min-height: 75px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.chapter-card:hover { transform: translateY(-1px); border-color: #bfded8; }
.chapter-symbol { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 10px; background: #edf6f4; color: #1b8878; font-size: 11px; font-weight: 850; }
.chapter-copy { min-width: 0; flex: 1; }
.chapter-copy strong { display: block; color: var(--ink); font-size: 10px; line-height: 1.35; }
.chapter-copy small { display: block; margin-top: 4px; color: #8d9baa; font-size: 8px; }
.chapter-arrow { color: #92a1af; font-size: 17px; }
.topic-list { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; min-width: 0; width: 100%; }
.topic-row { display: flex; align-items: center; gap: 13px; width: 100%; min-width: 0; min-height: 60px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.topic-row-copy { min-width: 0; flex: 1; }
.topic-row-copy strong { display: block; color: var(--ink); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.topic-row-copy small { display: block; margin-top: 4px; color: #8e9baa; font-size: 8px; line-height: 1.4; overflow-wrap: anywhere; }
.topic-row-count { color: #8190a0; font-size: 9px; white-space: nowrap; }
.topic-row .button { flex: none; min-height: 32px; padding: 0 10px; font-size: 9px; white-space: nowrap; }
.list-note { margin: 9px 1px 0; color: #9aa6b3; font-size: 9px; }
.empty-state { padding: 34px 20px; border: 1px dashed #d8e1e5; border-radius: 14px; color: #8291a1; background: rgba(255,255,255,.68); text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink-2); font-size: 12px; }
.empty-state p { margin: 0; font-size: 10px; line-height: 1.6; }
.error-card { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.error-card + .error-card { margin-top: 9px; }
.error-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: #96a2af; font-size: 8px; }
.error-head strong { overflow: hidden; color: #607286; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.question-text { color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.65; }
.question-answer { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: #7f8da0; font-size: 9px; }
.answer-chip { padding: 5px 8px; border-radius: 6px; color: #a13e3d; background: var(--red-pale); font-size: 8px; font-weight: 800; }
.answer-chip.correct { color: #147c6d; background: var(--teal-pale); }
.figure-image { display: block; max-width: min(100%,300px); max-height: 165px; margin: 11px 0 6px; border: 1px solid #eef1f2; border-radius: 8px; background: #fff; object-fit: contain; object-position: left center; }
.question-figures { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 9px; margin: 11px 0 7px; }
.question-figures .figure-image { max-width: min(100%,330px); max-height: 205px; margin: 0; object-position: center; }
.question-figures .figure-image.quiz-figure { max-width: min(100%,390px); max-height: 245px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0 17px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: #8593a2; font-size: 9px; }
.pagination .button { min-height: 31px; padding: 0 10px; font-size: 9px; }
.question-card { padding: clamp(19px,3vw,31px); border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 14px 32px rgba(29,53,77,.04); }
.quiz-shell { width: min(920px,100%); margin: 0 auto; }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.quiz-back { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #7d8c9e; font-size: 9px; font-weight: 700; cursor: pointer; }
.quiz-back:hover { color: var(--ink); }
.quiz-back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.result-topline .quiz-back { min-height: 44px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 750; }
.result-topline .quiz-back svg { width: 18px; height: 18px; }
.quiz-mode { display: inline-flex; align-items: center; gap: 6px; color: #7e8d9f; font-size: 9px; font-weight: 750; }
.quiz-mode .mode-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.quiz-progress-wrap { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 15px; margin-bottom: 16px; }
.quiz-progress-track { height: 6px; overflow: hidden; border-radius: 8px; background: #e9eff0; }
.quiz-progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2ab5a0,#6ad1bd); }
.quiz-progress-label { color: #8b99a9; font-size: 9px; font-weight: 700; white-space: nowrap; }
.quiz-info-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.question-number { color: #8b99a9; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.timer { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #e3e9ec; border-radius: 9px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer svg { width: 14px; height: 14px; stroke: #8292a3; fill: none; stroke-width: 1.7; }
.timer.warning { border-color: #f2d8b4; background: #fff9ef; color: #a46a15; }
.timer.danger { border-color: #efc9c7; background: #fff5f4; color: #b84343; }
.question-category { margin-bottom: 10px; color: #79908f; font-size: 8px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.quiz-question { margin: 0; color: var(--ink); font-size: clamp(18px,2.7vw,26px); font-weight: 650; letter-spacing: -.025em; line-height: 1.45; }
.quiz-figure { max-width: 320px; max-height: 210px; margin: 18px 0 3px; }
.choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 21px; }
.choice-button { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border: 1px solid #e3e9ec; border-radius: 11px; background: #fff; color: var(--ink-2); font-size: 11px; font-weight: 800; text-align: left; cursor: pointer; transition: border .14s ease, background .14s ease, transform .14s ease; }
.choice-button:hover { transform: translateY(-1px); border-color: #b5d9d3; }
.choice-button.selected { border-color: var(--teal); background: #effaf7; color: #167d70; box-shadow: 0 0 0 2px rgba(42,181,160,.08); }
.choice-key { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #e7ecee; border-radius: 8px; color: #8c9aa8; background: #f8fafb; font-size: 9px; }
.choice-button.selected .choice-key { border-color: #b6e3da; color: #147e71; background: #e2f5f0; }
.quiz-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.quiz-footer-left, .quiz-footer-right { display: flex; align-items: center; gap: 8px; }
.quiz-footer .button { min-height: 38px; }
.quiz-hint { margin: 11px 0 0; color: #9ba7b3; font-size: 8px; text-align: center; }
.question-map { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.map-dot { width: 27px; height: 27px; border: 1px solid #e5ebee; border-radius: 8px; background: #fff; color: #8190a1; font-size: 8px; font-weight: 750; cursor: pointer; }
.map-dot:hover { border-color: #a9d9cf; }
.map-dot.current { border-color: var(--ink); background: var(--ink); color: #fff; }
.map-dot.answered { border-color: #b9e2d9; background: #e8f7f3; color: #147b6e; }
.map-dot.current.answered { border-color: #168979; background: #168979; color: #fff; }
.result-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.result-hero { display: flex; align-items: center; gap: 18px; padding: 24px; background: linear-gradient(115deg,#143352,#1b4d61); color: #fff; }
.result-hero.failed { background: linear-gradient(115deg,#4c3140,#743d47); }
.result-symbol { width: 55px; height: 55px; display: grid; place-items: center; flex: none; border: 1px solid rgba(255,255,255,.2); border-radius: 16px; background: rgba(255,255,255,.08); color: #81e0cd; font-size: 25px; font-weight: 800; }
.result-hero.failed .result-symbol { color: #ffbbb5; }
.result-hero h2 { margin: 0; color: #fff; font-size: 24px; letter-spacing: -.04em; }
.result-hero p { margin: 6px 0 0; color: #cedbe3; font-size: 10px; }
.result-body { padding: 20px 23px 24px; }
.result-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.result-stat { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.result-stat small { display: block; color: #8795a4; font-size: 8px; font-weight: 650; }
.result-stat strong { display: block; margin-top: 6px; color: var(--ink); font-size: 18px; letter-spacing: -.04em; }
.result-stat strong.good { color: #158575; }
.result-stat strong.bad { color: #bf4b48; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 19px; }
.result-review-intro { margin: 22px 0 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.result-review-group { margin-top: 18px; }
.result-review-title { display: flex; align-items: center; gap: 9px; margin: 0 0 5px; color: var(--ink); font-size: 15px; }
.result-review-count { display: inline-grid; min-width: 24px; height: 24px; place-items: center; padding: 0 6px; border-radius: 8px; background: var(--surface-soft); color: var(--ink-2); font-size: 11px; }
.result-review-wrong .result-review-count { background: var(--red-pale); color: var(--red); }
.result-review-unanswered .result-review-count { background: var(--amber-pale); color: var(--amber); }
.result-review-correct .result-review-count { background: var(--teal-pale); color: var(--teal-dark); }
.result-question { padding: 13px 0; border-top: 1px solid #edf1f2; }
.result-question-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.result-question-index { color: var(--muted); font-size: 10px; font-weight: 800; }
.result-question-status { padding: 3px 7px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 800; }
.result-question-wrong .result-question-status { background: var(--red-pale); color: var(--red); }
.result-question-unanswered .result-question-status { background: var(--amber-pale); color: var(--amber); }
.result-question-correct .result-question-status { background: var(--teal-pale); color: var(--teal-dark); }
.result-question-topic { margin-left: auto; color: var(--muted); font-size: 9px; text-align: right; }
.result-question .question-text { font-size: 14px; line-height: 1.45; }
.result-answer-line { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.result-answer-line strong { color: #a74644; }
.result-answer-line .right-answer { color: #158575; }
.result-answer-line .wrong-answer { color: var(--red); }
.result-question .learning-note > p { font-size: 10px; }
.result-question .learning-note-head strong { font-size: 11px; }
.result-question .learning-note-source { font-size: 8px; }
.learning-note { margin-top: 12px; padding: 12px 14px; border: 1px solid color-mix(in srgb,var(--blue) 22%,var(--line)); border-radius: 12px; background: color-mix(in srgb,var(--blue-pale) 52%,var(--paper)); color: var(--text); }
.learning-note-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.learning-note-head strong { color: var(--ink); font-size: 10px; }
.learning-note-head span { color: var(--blue); font-size: 8px; font-weight: 800; }
.learning-note > p { margin: 8px 0 0; color: var(--text); font-size: 9px; line-height: 1.55; }
.learning-note > p strong { color: var(--ink); }
.learning-compare { margin-top: 9px; padding: 9px 10px; border-left: 2px solid var(--blue); border-radius: 0 8px 8px 0; background: var(--paper); }
.learning-compare small { display: block; color: var(--blue); font-size: 7px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.learning-compare p { margin: 5px 0 0; color: var(--ink-2); font-size: 9px; line-height: 1.55; }
.learning-note .learning-note-tip { color: var(--muted); }
.learning-note-source { display: block; margin-top: 8px; color: var(--muted-2); font-size: 7px; line-height: 1.4; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(14,31,50,.42); backdrop-filter: blur(5px); }
.modal { width: min(475px,100%); max-height: min(90vh,760px); overflow: auto; padding: 22px; border: 1px solid rgba(255,255,255,.65); border-radius: 17px; background: #fff; box-shadow: 0 25px 80px rgba(8,24,39,.25); }
.exit-confirm-modal { width: min(425px,100%); padding: 27px; text-align: center; }
.exit-confirm-mark { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 15px; border: 1px solid rgba(217,144,41,.18); border-radius: 15px; background: var(--amber-pale); color: var(--amber); }
.exit-confirm-mark svg { width: 23px; height: 23px; }
.exit-confirm-modal h2 { margin: 0; color: var(--ink); font-size: 17px; letter-spacing: -.03em; }
.exit-confirm-modal p { margin: 9px 0 20px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.exit-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.exit-confirm-actions .button { width: 100%; justify-content: center; }
.exit-confirm-cancel, .exit-confirm-cancel:hover { border: 1px solid rgba(201,74,74,.18); background: var(--red-pale); color: var(--red); box-shadow: none; }
.exit-confirm-cancel:hover { border-color: rgba(201,74,74,.35); }
.reset-progress-modal { width: min(470px,100%); text-align: left; }
.reset-progress-modal h2 { font-size: 20px; }
.reset-progress-modal p { font-size: 12px; line-height: 1.7; }
.reset-progress-mark { border-color: color-mix(in srgb,var(--red) 25%,var(--line)); background: var(--red-pale); color: var(--red); }
.reset-irreversible { display: block; margin-top: -10px; color: var(--red); font-size: 11px; }
.reset-progress-modal .exit-confirm-actions { margin-top: 22px; }
.reset-progress-modal .exit-confirm-actions .button { min-height: 42px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.modal-head h2 { margin: 0; color: var(--ink); font-size: 18px; letter-spacing: -.03em; }
.modal-head p { margin: 5px 0 0; color: #8290a0; font-size: 9px; line-height: 1.55; }
.close-button { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #748397; font-size: 16px; cursor: pointer; }
.field-label { display: block; margin: 13px 0 6px; color: #607287; font-size: 9px; font-weight: 750; }
.profile-info { margin-top: 14px; padding: 11px; border-radius: 10px; background: #f3f8f7; color: #65827c; font-size: 9px; line-height: 1.6; }
.profile-info p { margin: 4px 0 0; }
.account-modal { width: min(500px,100%); }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 5px 0 13px; padding: 4px; border-radius: 10px; background: #f1f5f6; }
.account-tab { min-height: 34px; border: 0; border-radius: 7px; background: transparent; color: #77879a; font-size: 10px; font-weight: 750; cursor: pointer; }
.account-tab.active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(20,41,68,.08); }
.account-setup-note { margin: 0 0 13px; border: 1px solid #f0e1bf; background: #fff8e9; color: #7c6947; }
.auth-form { margin-bottom: 12px; }
.auth-form .field-label { margin-top: 10px; }
.auth-form .input { font-size: 11px; }
.auth-form .input:disabled { background: #f7f9fa; color: #a0aab5; }
.auth-submit { width: 100%; margin-top: 13px; }
.button:disabled, .button:disabled:hover { transform: none; border-color: #e4e9ec; background: #edf1f3; color: #9ba7b3; box-shadow: none; cursor: not-allowed; }
.account-feedback { min-height: 17px; margin-top: 8px; color: #27816f; font-size: 9px; line-height: 1.5; }
.account-feedback.is-error { color: #b34846; }
.account-state { display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid #e2eeea; border-radius: 10px; background: #f5faf8; }
.account-state-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #2ab5a0; box-shadow: 0 0 0 4px rgba(42,181,160,.13); }
.account-state > div { min-width: 0; flex: 1; }
.account-state strong, .account-state small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-state strong { color: var(--ink); font-size: 10px; }
.account-state small { margin-top: 3px; color: #8190a0; font-size: 9px; }
.account-state .button { min-height: 32px; }
.sync-status { margin: 8px 2px 13px; color: #65827c; font-size: 9px; }
.sync-status.is-error { color: #b34846; }
.local-profile-divider { display: flex; align-items: center; gap: 9px; margin: 17px 0 4px; color: #9aa7b4; font-size: 8px; font-weight: 750; }
.local-profile-divider::before, .local-profile-divider::after { height: 1px; flex: 1; background: #e9eef0; content: ''; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.modal-actions .button { flex: 1; min-width: 120px; }
.hidden-file { display: none; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 80; max-width: calc(100vw - 28px); padding: 11px 15px; transform: translate(-50%,16px); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: #17344f; color: #fff; box-shadow: 0 12px 32px rgba(12,34,55,.22); font-size: 10px; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translate(-50%,0); opacity: 1; }

/* Refined visual system and device-aware themes */
:root {
  color-scheme: light;
  --ink: #122b3f;
  --ink-2: #25445a;
  --text: #304b5c;
  --muted: #708493;
  --muted-2: #97a7b2;
  --line: #e3ebed;
  --paper: #fff;
  --ground: #f3f6f6;
  --ground-2: #eaf0f0;
  --teal: #37b6a2;
  --teal-dark: #137f70;
  --teal-pale: #e6f6f2;
  --blue: #5072d5;
  --blue-pale: #edf1ff;
  --amber: #d99029;
  --amber-pale: #fff4e1;
  --red: #c94a4a;
  --red-pale: #fff0ef;
  --surface-soft: #f7f9f9;
  --shadow: 0 20px 54px rgba(24,51,68,.075);
  --radius: 20px;
  scroll-behavior: smooth;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --ink: #e8f1f2; --ink-2: #cfdee2; --text: #c1d1d7; --muted: #9bafb8; --muted-2: #8097a2;
    --line: #293b44; --paper: #17252d; --ground: #101920; --ground-2: #1c2b33;
    --teal: #779cff; --teal-dark: #a8bdff; --teal-pale: #243656; --blue: #9cb4ff; --blue-pale: #283753;
    --amber: #f1ba64; --amber-pale: #3a3022; --red: #ff8d85; --red-pale: #402729;
    --surface-soft: #1b2a32; --shadow: 0 20px 54px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8f1f2; --ink-2: #cfdee2; --text: #c1d1d7; --muted: #9bafb8; --muted-2: #8097a2;
  --line: #293b44; --paper: #17252d; --ground: #101920; --ground-2: #1c2b33;
  --teal: #779cff; --teal-dark: #a8bdff; --teal-pale: #243656; --blue: #9cb4ff; --blue-pale: #283753;
  --amber: #f1ba64; --amber-pale: #3a3022; --red: #ff8d85; --red-pale: #402729;
  --surface-soft: #1b2a32; --shadow: 0 20px 54px rgba(0,0,0,.25);
}
html { background: var(--ground); }
body { background: radial-gradient(ellipse at 78% 0%,rgba(55,182,162,.055),transparent 32%),var(--ground); color: var(--text); }
button, input, select { color: inherit; }
::selection { background: rgba(55,182,162,.23); color: var(--ink); }
.sidebar { width: 268px; padding: 27px 17px 16px; background: var(--paper); border-color: var(--line); box-shadow: 8px 0 32px rgba(25,52,70,.025); }
.main-column { margin-left: 268px; }
.brand { gap: 13px; padding: 0 9px 37px; }
.brand-mark { width: 45px; height: 45px; border-radius: 15px; background: linear-gradient(145deg,#18364d,#147d73); box-shadow: 0 9px 18px rgba(20,89,83,.18); }
.brand strong { color: var(--ink); font-size: 16px; }
.brand small { color: var(--muted); font-size: 8px; letter-spacing: .11em; }
.sidebar-label { color: var(--muted-2); font-size: 9px; }
.nav-item { height: 47px; border-radius: 12px; color: var(--muted); font-size: 12px; }
.nav-item:hover { background: var(--surface-soft); color: var(--ink); }
.nav-item.is-active { background: var(--teal-pale); color: var(--teal-dark); }
.nav-count { background: var(--ground-2); color: var(--muted); }
.profile-button { border-color: var(--line); }
.profile-copy strong { color: var(--ink); }
.profile-copy small { color: var(--muted); }
.avatar { background: var(--teal-pale); color: var(--teal-dark); }
.topbar { position: sticky; top: 0; z-index: 15; height: 72px; padding: 0 clamp(25px,4vw,60px); border-color: var(--line); background: color-mix(in srgb,var(--paper) 88%,transparent); backdrop-filter: blur(16px); }
.topbar-note { color: var(--muted); font-size: 11px; }
.tiny-check { background: var(--teal-pale); color: var(--teal-dark); }
.top-profile { color: var(--ink-2); font-size: 11px; }
.content { width: min(1800px,100%); padding: 39px clamp(24px,4vw,64px) 68px; }
.page-heading { margin-bottom: 28px; }
.eyebrow { color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.eyebrow .spark { color: var(--teal-dark); }
.page-heading h1 { color: var(--ink); font-size: clamp(29px,3.3vw,40px); letter-spacing: -.05em; }
.page-heading p { color: var(--muted); font-size: 13px; }
.date-chip { padding: 9px 12px; border-color: var(--line); border-radius: 12px; color: var(--muted); background: var(--paper); font-size: 10px; }
.dashboard-grid { grid-template-columns: minmax(0,1.68fr) minmax(250px,.82fr); gap: 19px; }
.hero-card { min-height: 300px; padding: 34px; border-radius: 24px; background: radial-gradient(circle at 88% 21%,rgba(56,188,164,.25),transparent 28%),linear-gradient(120deg,#142d42 0%,#1d4858 63%,#17645f 100%); box-shadow: 0 22px 45px rgba(18,48,62,.16); }
.hero-kicker { color: #b8e4dc; font-size: 9px; }
.hero-card h2 { font-size: clamp(29px,3.1vw,38px); }
.hero-card p { color: #d0dfe2; font-size: 12px; }
.hero-facts { gap: 16px; margin: 20px 0 22px; }
.hero-fact { color: #eff7f6; font-size: 10px; }
.hero-art { right: 12px; bottom: 13px; width: 210px; height: 210px; }
.button { min-height: 42px; padding: 0 16px; border-radius: 11px; font-size: 11px; }
.button.primary-dark { background: #18394d; }
.button.primary-dark:hover { background: #23546a; }
.button.secondary { border-color: var(--line); background: var(--paper); color: var(--ink-2); }
.button.secondary:hover { background: var(--surface-soft); }
.button:disabled, .button:disabled:hover { border-color: var(--line); background: var(--ground-2); color: var(--muted-2); }
.stat-stack { gap: 11px; }
.stat-card { min-height: 90px; gap: 14px; padding: 17px; border-color: var(--line); border-radius: 17px; background: var(--paper); box-shadow: 0 7px 20px rgba(24,51,68,.035); }
.stat-icon { width: 42px; height: 42px; border-radius: 13px; background: var(--blue-pale); color: var(--blue); }
.stat-icon.teal { background: var(--teal-pale); color: var(--teal-dark); }
.stat-icon.amber { background: var(--amber-pale); color: var(--amber); }
.stat-info small { color: var(--muted); font-size: 10px; }
.stat-info strong { color: var(--ink); font-size: 23px; }
.stat-info span { color: var(--muted-2); font-size: 9px; }
.section-row { margin: 33px 0 15px; }
.section-row h2 { color: var(--ink); font-size: 17px; }
.section-row p { color: var(--muted); font-size: 11px; }
.progress-panel { padding: 21px; border-color: var(--line); border-radius: 17px; background: var(--paper); }
.progress-title strong { color: var(--ink); font-size: 12px; }
.progress-title small { color: var(--muted); font-size: 10px; }
.progress-number { color: var(--ink); font-size: 17px; }
.progress-track { background: var(--ground-2); }
.progress-foot { color: var(--muted); font-size: 10px; }
.topic-shortcuts { gap: 12px; }
.topic-shortcut { min-height: 113px; padding: 16px; border-color: var(--line); border-radius: 16px; background: var(--paper); }
.topic-shortcut:hover { border-color: color-mix(in srgb,var(--teal) 45%,var(--line)); }
.topic-shortcut .shortcut-index { color: var(--muted-2); }
.topic-shortcut strong { color: var(--ink); font-size: 11px; }
.topic-shortcut small { color: var(--muted); font-size: 9px; }
.source-note { color: var(--muted-2); font-size: 9px; }
.card, .chapter-card, .topic-row, .error-card, .question-card, .result-card, .progress-panel, .stat-card, .date-chip { border-color: var(--line); background: var(--paper); }
.chapter-card { min-height: 82px; border-radius: 14px; }
.chapter-copy strong, .topic-row-copy strong { color: var(--ink); font-size: 11px; }
.chapter-copy small, .topic-row-copy small { color: var(--muted); font-size: 9px; }
.chapter-symbol { background: var(--teal-pale); color: var(--teal-dark); }
.topic-row { min-height: 66px; border-radius: 13px; }
.topic-row-count, .list-note { color: var(--muted); }
.empty-state { border-color: var(--line); background: color-mix(in srgb,var(--paper) 75%,transparent); }
.empty-state strong { color: var(--ink-2); }
.error-card { border-radius: 15px; }
.error-head { color: var(--muted); font-size: 9px; }
.error-head strong { color: var(--ink-2); font-size: 9px; }
.question-text { color: var(--ink); font-size: 13px; }
.figure-image { border-color: var(--line); }
.input, .select { border-color: var(--line); background: var(--paper); color: var(--ink-2); font-size: 11px; }
.input::placeholder { color: var(--muted-2); }
.search-wrap svg { stroke: var(--muted-2); }
.answer-chip.correct { color: var(--teal-dark); background: var(--teal-pale); }
.answer-chip { color: var(--red); background: var(--red-pale); }
.result-card { overflow: hidden; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.result-body { padding: 24px; }
.result-stat { border-color: var(--line); background: var(--surface-soft); }
.result-stat small { color: var(--muted); }
.result-stat strong { color: var(--ink); }
.result-question { border-color: var(--line); }
.result-errors-title { color: var(--ink); }
.modal-backdrop { background: rgba(6,19,29,.58); }
.exit-confirm-modal { border-color: var(--line); background: var(--paper); }
.exit-confirm-modal h2 { color: var(--ink); }
.exit-confirm-modal p { color: var(--muted); }
.modal { border-color: var(--line); border-radius: 20px; background: var(--paper); color: var(--text); }
.modal-head h2 { color: var(--ink); }
.modal-head p, .field-label { color: var(--muted); }
.close-button { border-color: var(--line); background: var(--paper); color: var(--muted); }
.profile-info { background: var(--teal-pale); color: var(--teal-dark); }
.account-tabs { background: var(--ground-2); }
.account-tab { color: var(--muted); }
.account-tab.active { background: var(--paper); color: var(--ink); }
.account-state { border-color: var(--line); background: var(--surface-soft); }
.account-state strong { color: var(--ink); }
.account-state small, .sync-status { color: var(--muted); }
.local-profile-divider::before, .local-profile-divider::after { background: var(--line); }
.toast { background: #173b4a; }
.mobile-nav { border-color: var(--line); background: color-mix(in srgb,var(--paper) 92%,transparent); }
.mobile-nav-item { color: var(--muted); }
.mobile-nav-item.is-active { color: var(--teal-dark); }

/* Three-way selector: follows the device by default, with explicit light and dark choices. */
.theme-picker { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.theme-option { min-width: 34px; height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; transition: background .18s ease,color .18s ease,box-shadow .18s ease; }
.theme-option [data-icon], .theme-option svg { width: 15px; height: 15px; display: inline-grid; place-items: center; }
.theme-option svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-option-label { font-size: 9px; font-weight: 750; }
.theme-option:hover { color: var(--ink); }
.theme-option.is-selected { background: var(--paper); color: var(--teal-dark); box-shadow: 0 2px 7px rgba(18,43,63,.09); }

/* Exam facsimile: familiar exam controls with a calmer, responsive layout. */
.exam-frame { width: min(1320px,100%); margin: 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.exam-disclaimer { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 8px 18px; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 10px; font-weight: 600; }
.exam-disclaimer-badge { padding: 5px 8px; border: 1px solid color-mix(in srgb,var(--amber) 35%,var(--line)); border-radius: 7px; background: var(--amber-pale); color: var(--amber); font-size: 8px; font-weight: 850; letter-spacing: .1em; }
.exam-exit { width: 30px; height: 30px; display: grid; place-items: center; margin-left: auto; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.exam-exit:hover { border-color: var(--line); background: var(--surface-soft); color: var(--ink); }
.exam-exit svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.exam-layout { display: grid; grid-template-columns: 254px minmax(0,1fr); min-height: 660px; }
.exam-aside { display: flex; flex-direction: column; gap: 15px; padding: 21px 17px; border-right: 1px solid var(--line); background: var(--surface-soft); }
.exam-candidate { display: grid; justify-items: center; padding: 17px 12px 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); text-align: center; }
.candidate-avatar { width: 63px; height: 63px; display: grid; place-items: center; margin-bottom: 12px; border: 4px solid color-mix(in srgb,var(--teal) 19%,var(--paper)); border-radius: 50%; background: linear-gradient(145deg,#d9f3ec,#e8efff); color: #246a66; font-size: 23px; font-weight: 800; }
:root[data-theme="dark"] .candidate-avatar { background: linear-gradient(145deg,#284642,#303a53); color: #b9ece0; }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) .candidate-avatar { background: linear-gradient(145deg,#284642,#303a53); color: #b9ece0; } }
.exam-candidate .candidate-label { color: var(--muted-2); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.exam-candidate strong { margin-top: 7px; color: var(--ink); font-size: 14px; }
.exam-candidate > span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.exam-clock-card { display: grid; justify-items: center; gap: 7px; padding: 16px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.exam-clock-card > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.exam-clock-card .timer { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 29px; font-weight: 800; letter-spacing: -.04em; }
.exam-clock-card .timer svg { width: 19px; height: 19px; color: var(--teal-dark); stroke: currentColor; fill: none; stroke-width: 1.8; }
.exam-clock-card .timer.warning { color: #bd7b1d; }
.exam-clock-card .timer.danger { color: #d4544e; animation: timer-pulse 1.2s ease-in-out infinite; }
.exam-clock-card small { color: var(--muted-2); font-size: 9px; }
@keyframes timer-pulse { 50% { opacity: .68; } }
.exam-summary-button { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-2); font-size: 10px; font-weight: 750; cursor: pointer; }
.exam-summary-button:hover { border-color: color-mix(in srgb,var(--teal) 50%,var(--line)); }
.exam-summary-button > span { display: inline-flex; align-items: center; gap: 8px; }
.exam-summary-button svg { width: 16px; height: 16px; stroke: var(--teal-dark); fill: none; stroke-width: 1.8; }
.exam-summary-button > strong { color: var(--teal-dark); font-size: 13px; }
.exam-summary-button > strong small { color: var(--muted-2); font-size: 9px; }
.exam-rule-card { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid color-mix(in srgb,var(--blue) 18%,var(--line)); border-radius: 12px; background: var(--blue-pale); }
.rule-icon { width: 27px; height: 27px; display: grid; place-items: center; flex: none; border-radius: 8px; background: color-mix(in srgb,var(--blue) 12%,var(--paper)); color: var(--blue); }
.rule-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.exam-rule-card strong, .exam-rule-card div > span, .exam-rule-card small { display: block; }
.exam-rule-card strong { color: var(--ink-2); font-size: 9px; }
.exam-rule-card div > span { margin-top: 5px; color: var(--blue); font-size: 12px; font-weight: 800; }
.exam-rule-card small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.exam-aside-foot { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 4px 2px 0; color: var(--muted); font-size: 8px; }
.exam-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-pale); }
.exam-main { min-width: 0; display: flex; flex-direction: column; padding: 24px clamp(20px,3.5vw,42px) 22px; }
.exam-question-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.exam-kicker { color: var(--teal-dark); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.exam-kicker span { color: var(--muted-2); padding: 0 2px; }
.exam-question-head .question-number { margin-top: 7px; color: var(--ink); font-size: 20px; font-weight: 800; letter-spacing: -.04em; text-transform: none; }
.exam-question-head .question-number span { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.exam-tools { display: flex; gap: 7px; }
.exam-tool { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--muted); cursor: pointer; transition: .16s ease; }
.exam-tool:hover, .exam-tool.is-flagged { border-color: color-mix(in srgb,var(--amber) 48%,var(--line)); background: var(--amber-pale); color: var(--amber); }
.exam-tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.exam-tool.is-flagged svg { fill: color-mix(in srgb,var(--amber) 20%,transparent); }
.exam-progress-line { height: 4px; overflow: hidden; margin: 18px 0 27px; border-radius: 9px; background: var(--ground-2); }
.exam-progress-line span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2fb59f,#79d3bf); transition: width .25s ease; }
.exam-question-content { flex: 1; min-height: 150px; }
.question-category { margin-bottom: 13px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.question-category span { color: var(--muted-2); margin: 0 4px; }
.exam-main .quiz-question { max-width: 900px; margin: 0; color: var(--ink); font-size: clamp(23px,3vw,34px); font-weight: 650; letter-spacing: -.035em; line-height: 1.42; }
.exam-main .question-figures { margin-top: 21px; }
.exam-main .question-figures .quiz-figure { max-width: min(100%,430px); max-height: 240px; padding: 7px; border-color: var(--line); border-radius: 14px; object-position: center; }
.exam-answer-area { margin: 16px 0 17px; }
.answer-prompt { margin-bottom: 10px; color: var(--muted); font-size: 9px; font-weight: 750; }
.exam-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
.choice-button.exam-choice { min-height: 92px; justify-content: flex-start; gap: 12px; padding: 12px 15px; border-color: var(--line); border-radius: 15px; background: var(--paper); color: var(--ink); }
.choice-button.exam-choice:hover { transform: translateY(-2px); border-color: color-mix(in srgb,var(--teal) 48%,var(--line)); background: var(--surface-soft); }
.choice-button.exam-choice.selected { border-color: var(--teal-dark); background: var(--teal-pale); color: var(--teal-dark); box-shadow: 0 0 0 3px color-mix(in srgb,var(--teal) 12%,transparent); }
.exam-choice-letter { width: 52px; height: 52px; display: grid; place-items: center; flex: none; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); color: var(--ink); font-size: 25px; font-weight: 800; }
.exam-choice.selected .exam-choice-letter { border-color: color-mix(in srgb,var(--teal) 30%,var(--line)); background: color-mix(in srgb,var(--teal) 15%,var(--paper)); color: var(--teal-dark); }
.exam-choice-copy { min-width: 0; flex: 1; }
.exam-choice-copy strong { display: block; font-size: 14px; }
.exam-choice-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 500; }
.exam-choice-check { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: transparent; }
.exam-choice-check svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.3; }
.exam-choice.selected .exam-choice-check { border-color: var(--teal-dark); background: var(--teal-dark); color: #fff; }
.answer-note { margin: 8px 1px 0; color: var(--muted-2); font-size: 8px; }
.exam-control-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.exam-completion { color: var(--muted); font-size: 9px; font-weight: 650; }
.exam-control-actions { display: flex; gap: 8px; }
.exam-control-actions .button { min-height: 39px; font-size: 10px; }
.exam-summary { padding-top: 17px; scroll-margin: 20px; }
.exam-legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 8px; }
.exam-legend span { display: inline-flex; align-items: center; gap: 5px; }
.exam-legend i { width: 8px; height: 8px; display: inline-block; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); }
.exam-legend .legend-current { border-color: var(--ink); background: var(--ink); }
.exam-legend .legend-answered { border-color: color-mix(in srgb,var(--teal) 40%,var(--line)); background: var(--teal-pale); }
.exam-legend .legend-flagged { border-color: color-mix(in srgb,var(--amber) 48%,var(--line)); background: var(--amber-pale); }
.exam-map-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.exam-map-group { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.exam-map-group-title { margin: 0 0 7px; color: var(--muted); font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.exam-map-items { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); gap: 3px; }
.map-dot { width: 100%; min-width: 0; height: 25px; padding: 0; border-color: var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font-size: 8px; }
.map-dot:hover { border-color: var(--teal-dark); }
.map-dot.answered { border-color: color-mix(in srgb,var(--teal) 45%,var(--line)); background: var(--teal-pale); color: var(--teal-dark); }
.map-dot.flagged { box-shadow: inset 0 -2px 0 var(--amber); }
.map-dot.current, .map-dot.current.answered { border-color: var(--ink); background: var(--ink); color: var(--paper); box-shadow: 0 2px 5px rgba(18,43,63,.16); }
.exam-summary-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.exam-summary-foot { margin: 0; color: var(--muted-2); font-size: 8px; text-align: right; }

@media (max-width: 1100px) {
  .sidebar { width: 238px; }
  .main-column { margin-left: 238px; }
  .exam-layout { grid-template-columns: 220px minmax(0,1fr); }
  .exam-aside { padding: 16px 13px; }
  .exam-main { padding-inline: 23px; }
  .exam-map-grid { gap: 6px; }
  .exam-map-group { padding: 7px; }
  .map-dot { height: 23px; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .main-column { margin-left: 0; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .topbar { height: 60px; justify-content: space-between; gap: 8px; padding: 0 12px; }
  .mobile-brand { gap: 7px; color: var(--ink); font-size: 11px; }
  .brand-mark.small { width: 30px; height: 30px; border-radius: 10px; }
  .top-profile { gap: 0; }
  .top-profile #profile-name-top, .top-profile .chevron { display: none; }
  .theme-picker { gap: 1px; padding: 3px; border-radius: 11px; }
  .theme-option { min-width: 31px; height: 30px; padding: 0 7px; }
  .theme-option-label { display: none; }
  .content { padding: 26px 15px 38px; }
  .page-heading { display: block; margin-bottom: 19px; }
  .page-heading h1 { font-size: 29px; }
  .page-heading p { max-width: 520px; font-size: 11px; }
  .date-chip { display: inline-flex; margin-top: 11px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-card { min-height: 294px; padding: 24px 20px; border-radius: 21px; }
  .hero-copy { width: 100%; }
  .hero-card h2 { max-width: 320px; font-size: 30px; }
  .hero-card p { max-width: 320px; font-size: 11px; }
  .hero-art { right: 0; bottom: 0; width: 132px; height: 132px; opacity: .64; }
  .hero-facts { flex-wrap: wrap; gap: 10px; margin: 17px 0 19px; }
  .hero-fact { font-size: 9px; }
  .stat-stack { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .stat-card { min-height: 105px; align-items: flex-start; flex-direction: column; gap: 8px; padding: 11px; border-radius: 14px; }
  .stat-icon { width: 30px; height: 30px; border-radius: 9px; }
  .stat-icon svg { width: 15px; height: 15px; }
  .stat-info strong { font-size: 17px; }
  .stat-info small { font-size: 8px; line-height: 1.35; }
  .stat-info span { display: none; }
  .section-row { margin-top: 24px; }
  .section-row h2 { font-size: 15px; }
  .topic-shortcuts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .topic-shortcut { min-height: 94px; padding: 12px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(4,1fr); padding: 6px 6px calc(5px + env(safe-area-inset-bottom)); }
  .mobile-nav-item { color: var(--muted); }
  .mobile-nav-item.is-active { color: var(--teal-dark); }
  .chapter-grid { grid-template-columns: 1fr; }
  .filters { gap: 7px; }
  .search-wrap { min-width: 100%; }
  .select { min-width: 0; flex: 1; }
  .topic-row { gap: 8px; padding: 9px; }
  .topic-row .button { min-height: 33px; padding: 0 8px; }
  .topic-row-count { display: none; }
  .exam-frame { border-radius: 17px; }
  .exam-disclaimer { min-height: 43px; padding: 6px 11px; font-size: 8px; }
  .exam-disclaimer-badge { padding: 4px 6px; font-size: 7px; }
  .exam-layout { grid-template-columns: 1fr; min-height: 0; }
  .exam-aside { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 8px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .exam-candidate { grid-column: 1; grid-row: 1 / span 2; grid-template-columns: 42px 1fr; justify-items: start; align-content: center; column-gap: 9px; padding: 9px; text-align: left; }
  .candidate-avatar { grid-row: 1 / span 3; width: 39px; height: 39px; margin: 0; border-width: 2px; font-size: 15px; }
  .exam-candidate .candidate-label { align-self: end; font-size: 6px; }
  .exam-candidate strong { margin-top: 2px; font-size: 10px; }
  .exam-candidate > span { margin-top: 0; font-size: 8px; }
  .exam-clock-card { grid-column: 2; grid-row: 1; display: flex; justify-content: space-between; gap: 5px; padding: 8px 10px; border-radius: 12px; }
  .exam-clock-card > span { font-size: 8px; }
  .exam-clock-card .timer { gap: 5px; font-size: 19px; }
  .exam-clock-card .timer svg { width: 14px; height: 14px; }
  .exam-clock-card small { display: none; }
  .exam-summary-button { grid-column: 2; grid-row: 2; min-height: 34px; padding: 0 9px; border-radius: 10px; font-size: 8px; }
  .exam-summary-button svg { width: 14px; height: 14px; }
  .exam-summary-button > strong { font-size: 11px; }
  .exam-rule-card, .exam-aside-foot { display: none; }
  .exam-main { padding: 18px 14px 16px; }
  .exam-kicker { font-size: 7px; }
  .exam-question-head .question-number { margin-top: 5px; font-size: 18px; }
  .exam-question-head .question-number span { font-size: 11px; }
  .exam-tool { width: 34px; height: 34px; border-radius: 10px; }
  .exam-progress-line { margin: 14px 0 21px; }
  .exam-question-content { min-height: 155px; }
  .question-category { margin-bottom: 10px; font-size: 8px; line-height: 1.45; }
  .exam-main .quiz-question { font-size: clamp(21px,6vw,27px); line-height: 1.43; }
  .exam-main .question-figures .quiz-figure { max-height: 190px; }
  .exam-answer-area { margin: 14px 0; }
  .exam-choice-grid { gap: 8px; }
  .choice-button.exam-choice { min-height: 73px; gap: 8px; padding: 8px; border-radius: 12px; }
  .exam-choice-letter { width: 39px; height: 39px; border-radius: 10px; font-size: 20px; }
  .exam-choice-copy strong { font-size: 12px; }
  .exam-choice-copy small { font-size: 7px; }
  .exam-choice-check { width: 17px; height: 17px; }
  .answer-note { font-size: 7px; }
  .exam-control-row { align-items: flex-start; flex-direction: column; gap: 9px; padding: 11px 0; }
  .exam-completion { font-size: 8px; }
  .exam-control-actions { width: 100%; }
  .exam-control-actions .button { flex: 1; min-height: 40px; padding: 0 9px; font-size: 9px; }
  .exam-summary { padding-top: 13px; }
  .exam-summary-footer { justify-content: flex-start; }
  .exam-legend { gap: 9px; font-size: 7px; }
  .exam-map-grid { grid-template-columns: 1fr; gap: 6px; }
  .exam-map-group { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 9px; }
  .exam-map-group-title { width: 61px; flex: none; margin: 0; font-size: 6px; line-height: 1.3; }
  .exam-map-items { flex: 1; gap: 4px; }
  .map-dot { height: 27px; border-radius: 7px; font-size: 8px; }
  .exam-summary-foot { font-size: 7px; }
  .result-hero { padding: 18px; }
  .result-hero h2 { font-size: 20px; }
  .result-symbol { width: 46px; height: 46px; }
  .result-body { padding: 16px; }
  .result-stats { grid-template-columns: repeat(2,1fr); }
  .resume-card { align-items: flex-start; flex-direction: column; }
  .resume-card .button { width: 100%; }
  .toast { bottom: calc(75px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .mobile-brand strong { font-size: 10px; }
  .exam-candidate { grid-template-columns: 34px 1fr; column-gap: 7px; padding: 8px; }
  .candidate-avatar { width: 32px; height: 32px; font-size: 13px; }
  .exam-clock-card { flex-wrap: wrap; justify-content: center; }
  .exam-clock-card > span { flex: 1; }
  .exam-map-group-title { width: 53px; }
  .exam-map-items { gap: 2px; }
  .map-dot { height: 24px; font-size: 7px; }
}

/* Shared contrast and component states across both themes. */
.more-icon, .chevron, .chapter-arrow, .pagination, .text-button { color: var(--muted); }
.resume-card { border-color: color-mix(in srgb,var(--teal) 28%,var(--line)); background: color-mix(in srgb,var(--teal-pale) 72%,var(--paper)); }
.resume-copy strong { color: var(--teal-dark); }
.resume-copy small { color: var(--muted); }
.resume-mark { background: var(--teal-pale); color: var(--teal-dark); }
.text-button { color: var(--teal-dark); }
.button.danger-outline { border-color: color-mix(in srgb,var(--red) 28%,var(--line)); background: var(--paper); color: var(--red); }
.timer.warning { border-color: color-mix(in srgb,var(--amber) 35%,var(--line)); background: color-mix(in srgb,var(--amber-pale) 80%,var(--paper)); color: var(--amber); }
.timer.danger { border-color: color-mix(in srgb,var(--red) 35%,var(--line)); background: color-mix(in srgb,var(--red-pale) 75%,var(--paper)); color: var(--red); }
.quiz-back { color: var(--muted); }
.quiz-back:hover { color: var(--ink); }
.quiz-mode, .quiz-progress-label, .quiz-hint { color: var(--muted); }
.choice-key { border-color: var(--line); background: var(--surface-soft); color: var(--muted); }
.choice-button.selected .choice-key { border-color: color-mix(in srgb,var(--teal) 32%,var(--line)); background: var(--teal-pale); color: var(--teal-dark); }
.account-setup-note { border-color: color-mix(in srgb,var(--amber) 30%,var(--line)); background: var(--amber-pale); color: var(--amber); }
.auth-form .input:disabled { border-color: var(--line); background: var(--surface-soft); color: var(--muted-2); }
.account-feedback { color: var(--teal-dark); }
.account-feedback.is-error, .sync-status.is-error { color: var(--red); }
.result-answer-line { color: var(--muted); }
.result-answer-line strong { color: var(--red); }
.result-answer-line .right-answer, .result-stat strong.good { color: var(--teal-dark); }
.result-stat strong.bad { color: var(--red); }
.figure-image { background: #fff; }
.exam-choice.selected .exam-choice-check { color: #fff; }
@media (max-width: 760px) {
  .quiz-active .mobile-nav { display: none; }
  .quiz-active .main-column { padding-bottom: env(safe-area-inset-bottom); }
}
.theme-picker { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(3,minmax(72px,1fr)); gap: 0; }
.theme-picker::before { position: absolute; inset: 4px auto 4px 4px; z-index: -1; width: calc((100% - 8px)/3); border: 1px solid color-mix(in srgb,var(--line) 60%,transparent); border-radius: 9px; background: var(--paper); box-shadow: 0 2px 7px rgba(18,43,63,.08); content: ""; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.theme-picker[data-theme-mode="light"]::before { transform: translateX(100%); }
.theme-picker[data-theme-mode="dark"]::before { transform: translateX(200%); }
.theme-option { position: relative; min-width: 72px; background: transparent; }
.theme-option.is-selected { background: transparent; box-shadow: none; }
@media (max-width: 760px) {
  .theme-picker { grid-template-columns: repeat(3,31px); }
  .theme-picker::before { inset: 3px auto 3px 3px; width: calc((100% - 6px)/3); }
  .theme-option { min-width: 31px; }
}

@media (min-width: 761px) {
  .topbar { display: none; }
  .sidebar-theme { margin-bottom: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .sidebar-theme .theme-picker { width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .sidebar-theme .theme-option { min-width: 0; gap: 3px; padding-inline: 3px; }
  .sidebar-theme .theme-option-label { font-size: 8px; }
}

@media (max-width: 760px) {
  .sidebar-theme { display: none; }
}

/* First-visit sign-in gateway and technical-storage notice. */
.entry-active .sidebar, .entry-active .topbar, .entry-active .mobile-nav, .entry-active .site-footer { display: none; }
.entry-active .main-column { margin-left: 0; padding: 0; }
.entry-active .content { width: 100%; min-height: 100vh; padding: 0; }
.entry-shell { position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.02fr) minmax(440px,.98fr); background: var(--paper); }
.entry-story { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 37px clamp(30px,6vw,88px) 30px; background: radial-gradient(circle at 82% 20%,rgba(114,151,226,.2),transparent 34%),linear-gradient(150deg,#102a42,#163958 61%,#1b4360); color: #f7f9fc; }
.entry-brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.entry-brand img { width: 48px; height: 48px; }
.entry-brand strong, .entry-brand small { display: block; }
.entry-brand strong { font-size: 17px; letter-spacing: -.03em; }
.entry-brand small { margin-top: 4px; color: #b7c6d1; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.entry-story-copy { width: min(470px,100%); margin: 60px auto; }
.entry-kicker { display: flex; align-items: center; gap: 9px; color: #e6d6a7; font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.entry-kicker span { width: 8px; height: 8px; border-radius: 50%; background: #d8c17f; box-shadow: 0 0 0 5px rgba(216,193,127,.14); }
.entry-story-copy h1 { max-width: 430px; margin: 20px 0 14px; color: #fff; font-size: clamp(38px,4.2vw,57px); letter-spacing: -.055em; line-height: 1.02; }
.entry-story-copy p { max-width: 430px; margin: 0; color: #d2dee7; font-size: 14px; line-height: 1.7; }
.entry-benefits { display: grid; gap: 13px; margin-top: 30px; }
.entry-benefits div { display: flex; align-items: center; gap: 10px; color: #f0f4f5; font-size: 11px; font-weight: 650; }
.entry-benefits svg { width: 18px; height: 18px; fill: none; stroke: #e1cb88; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.entry-story-note { color: #afc0cc; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.entry-panel { position: relative; min-width: 0; display: grid; place-items: center; padding: 60px 32px; background: var(--ground); }
.entry-card { width: min(420px,100%); padding: 35px; border: 1px solid var(--line); border-radius: 23px; background: var(--paper); box-shadow: var(--shadow); }
.entry-mobile-brand { display: none; }
.entry-eyebrow { color: var(--teal-dark); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.entry-card h2 { margin: 9px 0 0; color: var(--ink); font-size: 30px; letter-spacing: -.05em; }
.entry-subtitle { margin: 8px 0 21px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.entry-tabs { margin: 0 0 16px; }
.entry-auth-form .field-label { margin: 13px 0 7px; color: var(--ink-2); font-size: 10px; }
.entry-auth-form .input { height: 45px; border-radius: 11px; font-size: 12px; }
.entry-auth-form .auth-submit { min-height: 45px; margin-top: 10px; font-size: 11px; }
.entry-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 13px; color: var(--muted-2); font-size: 9px; }
.entry-divider::before, .entry-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.social-auth { display: grid; gap: 9px; margin-top: 0; }
.social-auth-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-size: 10px; }
.social-auth-button:hover { border-color: color-mix(in srgb,var(--blue) 34%,var(--line)); background: var(--surface-soft); box-shadow: none; }
.social-provider-mark { width: 18px; height: 18px; display: inline-grid; place-items: center; flex: none; }
.social-provider-mark svg { width: 18px; height: 18px; display: block; }
.social-apple-mark svg { fill: currentColor; }
.entry-guest { width: 100%; min-height: 44px; border-color: var(--line); background: var(--surface-soft); color: var(--ink-2); }
.entry-guest:hover { background: var(--ground-2); box-shadow: none; }
.entry-guest-note { margin: 9px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; text-align: center; }
.entry-cookie-link { display: block; margin: 18px auto 0; padding: 5px; border: 0; background: transparent; color: var(--muted); font-size: 9px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.entry-legal-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 16px; }
.entry-privacy-link, .entry-legal-links .entry-cookie-link { margin: 0; padding: 5px; border: 0; background: transparent; color: var(--muted); font-size: 9px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.entry-theme { position: absolute; top: 19px; right: 20px; }
.entry-theme .theme-picker { transform: scale(.94); transform-origin: top right; }
.entry-active .account-feedback:empty { display: none; }
.entry-active .account-setup-note { margin: -5px 0 14px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 clamp(20px,4vw,60px) 22px; color: var(--muted-2); font-size: 8px; }
.footer-links { display: flex; align-items: center; gap: 14px; }
.site-footer a, .site-footer button { padding: 6px 0; border: 0; background: transparent; color: var(--muted); font-size: 8px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-backdrop { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(7,22,36,.62); backdrop-filter: blur(8px); }
.cookie-dialog { width: min(520px,100%); max-height: min(90vh,780px); overflow: auto; padding: 29px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); color: var(--text); box-shadow: 0 28px 90px rgba(6,22,37,.28); }
.cookie-mark { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 17px; border: 1px solid color-mix(in srgb,var(--blue) 25%,var(--line)); border-radius: 13px; background: var(--blue-pale); color: var(--blue); }
.cookie-mark svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cookie-eyebrow { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.cookie-dialog h2 { margin: 7px 0 9px; color: var(--ink); font-size: 25px; letter-spacing: -.04em; }
.cookie-intro { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.cookie-details { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.cookie-details > strong { color: var(--ink); font-size: 10px; }
.cookie-details ul { display: grid; gap: 7px; margin: 9px 0; padding-left: 17px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.cookie-details p { margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.cookie-details a { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--teal-dark); font-size: 9px; font-weight: 750; }
.cookie-details a svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.cookie-dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.cookie-dialog-actions .button { min-height: 43px; }
.cookie-details-button { padding: 7px 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-footnote { display: block; margin-top: 13px; color: var(--muted-2); font-size: 8px; }
.brand-logo { object-fit: contain; background: transparent; box-shadow: none; }
.entry-mobile-brand img { width: 36px; height: 36px; }
:root[data-theme="dark"] .entry-story { background: radial-gradient(circle at 82% 20%,rgba(93,129,206,.24),transparent 35%),linear-gradient(150deg,#0c1b2b,#142d49 62%,#1c365a); }
:root[data-theme="dark"] .hero-card { background: radial-gradient(circle at 88% 21%,rgba(99,132,213,.27),transparent 29%),linear-gradient(120deg,#12273d 0%,#183451 63%,#203c62 100%); }
:root[data-theme="dark"] .hero-kicker { color: #c8d6ff; }
:root[data-theme="dark"] .hero-art .car-body { fill: #6182d7; stroke: #c1d0ff; }
:root[data-theme="dark"] .hero-art .car-detail { fill: #e0e8ff; }
:root[data-theme="dark"] .hero-art .road { stroke: #8ca8f1; }
:root[data-theme="dark"] .hero-fact .fact-icon { color: #c0d0ff; }
:root[data-theme="dark"] body { background: radial-gradient(ellipse at 78% 0%,rgba(91,126,204,.09),transparent 34%),var(--ground); }
:root[data-theme="dark"] .progress-fill, :root[data-theme="dark"] .exam-progress-line span { background: linear-gradient(90deg,#6287e6,#a4baff); }
:root[data-theme="dark"] .candidate-avatar { background: linear-gradient(145deg,#293b59,#354568); color: #d5e0ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .entry-story { background: radial-gradient(circle at 82% 20%,rgba(93,129,206,.24),transparent 35%),linear-gradient(150deg,#0c1b2b,#142d49 62%,#1c365a); }
  :root:not([data-theme="light"]) .hero-card { background: radial-gradient(circle at 88% 21%,rgba(99,132,213,.27),transparent 29%),linear-gradient(120deg,#12273d 0%,#183451 63%,#203c62 100%); }
  :root:not([data-theme="light"]) .hero-kicker { color: #c8d6ff; }
  :root:not([data-theme="light"]) .hero-art .car-body { fill: #6182d7; stroke: #c1d0ff; }
  :root:not([data-theme="light"]) .hero-art .car-detail { fill: #e0e8ff; }
  :root:not([data-theme="light"]) .hero-art .road { stroke: #8ca8f1; }
  :root:not([data-theme="light"]) .hero-fact .fact-icon { color: #c0d0ff; }
  :root:not([data-theme="light"]) body { background: radial-gradient(ellipse at 78% 0%,rgba(91,126,204,.09),transparent 34%),var(--ground); }
  :root:not([data-theme="light"]) .progress-fill, :root:not([data-theme="light"]) .exam-progress-line span { background: linear-gradient(90deg,#6287e6,#a4baff); }
  :root:not([data-theme="light"]) .candidate-avatar { background: linear-gradient(145deg,#293b59,#354568); color: #d5e0ff; }
}
@media (max-width: 760px) {
  .entry-shell { min-height: 100svh; display: block; background: var(--ground); }
  .entry-story { display: none; }
  .entry-panel { min-height: 100svh; padding: 65px 16px 28px; }
  .entry-card { width: min(440px,100%); padding: 25px 21px; border-radius: 19px; }
  .entry-mobile-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 27px; color: var(--ink); font-size: 14px; font-weight: 800; }
  .entry-theme { top: 15px; right: 13px; }
  .entry-theme .theme-picker { transform: none; }
  .entry-card h2 { font-size: 27px; }
  .site-footer { padding: 0 16px 17px; }
}
@media (max-width: 380px) {
  .entry-panel { padding-inline: 12px; }
  .entry-card { padding: 21px 17px; }
  .cookie-dialog { padding: 22px 18px; }
  .cookie-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .cookie-dialog-actions .button { width: 100%; }
}

@media (max-width: 1050px) {
  .sidebar { width: 220px; }
  .main-column { margin-left: 220px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.4fr) minmax(220px,.9fr); }
  .hero-art { right: -1px; width: 155px; height: 155px; }
  .hero-copy { width: 78%; }
  .topic-shortcuts { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .main-column { margin-left: 0; padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .topbar { height: 57px; justify-content: space-between; padding: 0 17px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; }
  .brand-mark.small { width: 31px; height: 31px; border-radius: 9px; }
  .brand-mark.small svg { width: 23px; height: 23px; }
  .topbar-note { display: none; }
  .top-profile { gap: 0; }
  .top-profile #profile-name-top, .top-profile .chevron { display: none; }
  .content { padding: 25px 16px 36px; }
  .page-heading { align-items: flex-start; margin-bottom: 18px; }
  .page-heading h1 { font-size: 27px; }
  .page-heading p { max-width: 500px; font-size: 11px; }
  .date-chip { margin-top: 3px; padding: 7px; font-size: 8px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 11px; }
  .hero-card { min-height: 286px; padding: 23px 21px; }
  .hero-copy { width: 100%; }
  .hero-card h2 { max-width: 320px; font-size: 29px; }
  .hero-card p { max-width: 300px; }
  .hero-art { right: 0; bottom: 0; width: 123px; height: 123px; opacity: .72; }
  .hero-facts { gap: 12px; }
  .hero-fact { font-size: 9px; }
  .stat-stack { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .stat-card { min-height: 101px; align-items: flex-start; flex-direction: column; gap: 8px; padding: 11px; }
  .stat-icon { width: 29px; height: 29px; border-radius: 9px; }
  .stat-icon svg { width: 14px; height: 14px; }
  .stat-info strong { font-size: 17px; }
  .stat-info small { font-size: 8px; }
  .stat-info span { display: none; }
  .section-row { margin-top: 24px; }
  .topic-shortcuts { grid-template-columns: repeat(2,1fr); }
  .topic-shortcut { min-height: 85px; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 25; display: grid; grid-template-columns: repeat(4,1fr); padding: 6px 6px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); backdrop-filter: blur(12px); }
  .mobile-nav-item { min-height: 48px; display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
  .mobile-nav-item [data-icon] { width: 19px; height: 19px; }
  .mobile-nav-item [data-icon] svg { width: 17px; height: 17px; }
  .mobile-nav-item small { font-size: 8px; font-weight: 700; }
  .mobile-nav-item.is-active { color: var(--teal-dark); }
  .chapter-grid { grid-template-columns: 1fr; }
  .filters { gap: 7px; }
  .search-wrap { min-width: 100%; }
  .select { min-width: 0; flex: 1; }
  .topic-row { gap: 8px; padding: 9px; }
  .topic-row .button { min-height: 31px; padding: 0 8px; }
  .topic-row-count { display: none; }
  .question-card { padding: 19px 15px; }
  .quiz-topline { margin-bottom: 12px; }
  .quiz-progress-wrap { gap: 9px; }
  .quiz-question { font-size: 20px; }
  .choice-button { min-height: 50px; padding: 0 11px; font-size: 10px; }
  .quiz-footer { align-items: stretch; }
  .quiz-footer-left, .quiz-footer-right { gap: 6px; }
  .quiz-footer .button { min-height: 36px; padding: 0 10px; font-size: 9px; }
  .question-map { gap: 5px; }
  .map-dot { width: 25px; height: 25px; }
  .result-hero { padding: 18px; }
  .result-hero h2 { font-size: 20px; }
  .result-symbol { width: 46px; height: 46px; }
  .result-body { padding: 16px; }
  .result-stats { grid-template-columns: repeat(2,1fr); }
  .resume-card { align-items: flex-start; flex-direction: column; }
  .resume-card .button { width: 100%; }
  .toast { bottom: calc(75px + env(safe-area-inset-bottom)); }
}
@media (max-width: 390px) {
  .hero-card { min-height: 302px; }
  .hero-card h2 { max-width: 270px; font-size: 26px; }
  .hero-art { width: 105px; height: 105px; }
  .hero-facts { gap: 8px; }
  .hero-fact { gap: 5px; font-size: 8px; }
  .hero-fact .fact-icon { width: 19px; height: 19px; }
  .quiz-footer { flex-wrap: wrap; }
  .quiz-footer-left, .quiz-footer-right { flex: 1; }
  .quiz-footer-right { justify-content: flex-end; }
}

/* Roomier desktop layout and readable, wrap-safe topic rows on touch screens. */
.main-column, .content, #app { min-width: 0; }
.topic-row { min-width: 0; }
.topic-row-copy, .chapter-copy { overflow-wrap: anywhere; }
.chapter-copy strong, .chapter-copy small { white-space: normal; overflow-wrap: anywhere; }

@media (min-width: 1440px) {
  .content { padding: 48px clamp(36px,3.5vw,72px) 78px; }
  .page-heading h1 { font-size: clamp(40px,2.7vw,50px); }
  .page-heading p { font-size: 15px; }
  .eyebrow { font-size: 11px; }
  .hero-card { min-height: 340px; padding: 42px; }
  .hero-card h2 { font-size: clamp(36px,2.6vw,48px); }
  .hero-card p { font-size: 14px; }
  .hero-kicker { font-size: 11px; }
  .hero-fact { font-size: 12px; }
  .button { min-height: 48px; padding-inline: 19px; font-size: 13px; }
  .stat-card { min-height: 104px; padding: 18px; }
  .stat-icon { width: 44px; height: 44px; }
  .stat-info small { font-size: 11px; }
  .stat-info strong { font-size: 24px; }
  .section-row h2 { font-size: 18px; }
  .section-row p { font-size: 12px; }
  .topic-row-copy strong { font-size: 13px; }
  .topic-row-copy small, .topic-row-count { font-size: 11px; }
  .topic-row .button { min-height: 40px; font-size: 11px; }
  .nav-item { font-size: 14px; }
  .brand strong { font-size: 18px; }
  .topbar-note, .top-profile { font-size: 13px; }
}

@media (max-width: 760px) {
  .content { padding-inline: 12px; }
  .topbar { padding-inline: 12px; }
  .page-heading h1 { font-size: 30px; }
  .page-heading p { font-size: 13px; }
  .hero-card p { font-size: 13px; }
  .hero-fact { font-size: 10px; }
  .stat-info small { font-size: 9px; }
  .stat-info strong { font-size: 18px; }
  .topic-list { grid-template-columns: minmax(0,1fr); width: 100%; }
  .topic-row { gap: 9px; padding: 11px 10px; }
  .topic-row-copy { flex: 1 1 0; min-width: 0; }
  .topic-row-copy strong { font-size: 14px; line-height: 1.4; white-space: normal; overflow: visible; text-overflow: clip; }
  .topic-row-copy small { font-size: 11px; line-height: 1.45; white-space: normal; }
  .topic-row .button { flex: none; min-height: 40px; padding-inline: 11px; font-size: 12px; }
  .chapter-card { min-width: 0; }
}

@media (min-width: 761px) and (max-width: 1439px) {
  .content { padding: 34px clamp(22px,3vw,40px) 62px; }
  .page-heading h1 { font-size: clamp(32px,3.1vw,40px); }
  .page-heading p { font-size: 14px; }
  .eyebrow { font-size: 10px; }
  .hero-card { min-height: 310px; padding: 32px; }
  .hero-card h2 { font-size: clamp(29px,2.8vw,37px); }
  .hero-card p { font-size: 13px; }
  .hero-kicker { font-size: 10px; }
  .hero-fact { font-size: 11px; }
  .button { min-height: 44px; padding-inline: 17px; font-size: 12px; }
  .stat-card { min-height: 94px; padding: 16px; }
  .stat-icon { width: 41px; height: 41px; }
  .stat-info small { font-size: 11px; }
  .stat-info strong { font-size: 23px; }
  .section-row h2 { font-size: 19px; }
  .section-row p { font-size: 12px; }
  .chapter-copy strong, .topic-row-copy strong { font-size: 13px; }
  .chapter-copy small, .topic-row-copy small, .topic-row-count { font-size: 11px; }
  .topic-row { min-height: 72px; }
  .topic-row .button { min-height: 40px; font-size: 11px; }
  .nav-item { min-height: 48px; font-size: 12px; }
  .brand strong { font-size: 16px; }
  .topbar-note, .top-profile { font-size: 12px; }
}
