:root {
  color-scheme: light;
  --paper: #f6f7fb;
  --white: #fff;
  --ink: #172134;
  --muted: #535f72;
  --line: #dbe1ea;
  --blue: #284cd4;
  --blue-dark: #203ca7;
  --tint: #edf2ff;
  --gold: #ffcf65;
  --serif: "Cambria Math", Cambria, Georgia, serif;
  --sans: Inter, "Segoe UI Variable Text", "Segoe UI", Roboto, Arial, sans-serif;
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, select, input { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .54; }
:where(a, button, select, input, summary):focus-visible { outline: 3px solid #5477fa; outline-offset: 3px; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
a { color: var(--blue-dark); text-underline-offset: .18em; }
.shell, .header-inner { width: min(1216px, calc(100% - 72px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 3; top: -80px; left: 16px; padding: 10px 16px; background: white; }
.skip-link:focus { top: 8px; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: clamp(28px,5vw,84px); min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 9px; border: 0; padding: 0; background: transparent; font-weight: 750; font-size: 1.43rem; letter-spacing: -.048em; }
.brand-mark { display: grid; place-content: center; width: 35px; height: 35px; border-radius: 10px 10px 10px 3px; font: italic bold 1.9rem/1 Georgia, serif; color: white; background: var(--blue); padding-right: 2px; }
.navigation { display: flex; gap: 5px; align-items: center; }
.navigation button { min-height: 39px; padding: 6px 14px; background: transparent; color: var(--muted); border: 0; border-radius: 8px; font-size: .94rem; font-weight: 600; }
.navigation button:hover { background: #f4f6fa; color: var(--ink); }
.navigation button[aria-current="page"] { background: var(--tint); color: var(--blue-dark); }
.header-stat { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; font-size: .84rem; color: var(--muted); padding: 8px 0 8px 9px; border: 0; background: transparent; white-space: nowrap; }
.header-stat strong { margin-left: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.header-inner { column-gap: clamp(12px, 2.3vw, 36px); }
.header-cabinet { border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); display: inline-flex; flex: none; align-items: center; gap: 7px; padding: 3px 13px 3px 4px; font: inherit; font-size: .89rem; font-weight: 650; }
.header-cabinet:is(:hover, [aria-current="page"]) { background: var(--tint); color: var(--blue-dark); }
.header-avatar { display: grid; place-items: center; width: 30px; height: 30px; overflow: hidden; border-radius: 50%; background: var(--tint); }
.header-avatar svg { width: 100%; height: 100%; }
.stat-orbit { width: 17px; height: 17px; border: 2px solid #a7b7e8; border-top-color: var(--blue); border-radius: 50%; }
.hero { isolation: isolate; position: relative; overflow: hidden; margin-top: 26px; padding: 34px clamp(24px,4vw,57px) 36px; min-height: 286px; display: flex; align-items: center; color: white; border-radius: 22px; background: #101d40; }
.hero-copy { position: relative; max-width: min(56%,640px); z-index: 1; }
.hero-meta { color: #cfdaff; font-size: .83rem; font-weight: 650; letter-spacing: .025em; }
.hero-meta span { margin-inline: 6px; color: #8a9cd0; }
.hero h1 { font-size: clamp(2.65rem,4.7vw,4.1rem); line-height: 1.06; letter-spacing: -.055em; font-weight: 680; margin: 8px 0 11px; text-wrap: balance; }
.hero h1 em { font-style: normal; color: #d8e3ff; }
.hero p { font-size: 1rem; line-height: 1.48; max-width: 375px; color: #dce4f7; }
.hero-action { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; margin-top: 22px; border-radius: 9px; background: var(--gold); color: #201c13; font-weight: 700; font-size: .9rem; text-decoration: none; }
.hero-action:hover { background: #ffdc8b; }
.catalog-grid, .training-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,302px); gap: clamp(18px,2.4vw,32px); align-items: start; margin-top: 30px; }
.catalog-main, .training-grid > *, .catalog-grid > * { min-width: 0; }
.section-heading, .panel-heading, .plan-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-heading h2, .panel-heading h2, .results h2 { font-size: clamp(1.4rem,2.2vw,1.92rem); line-height: 1.15; font-weight: 690; letter-spacing: -.045em; }
#catalog-title { scroll-margin-top: 20px; }
.catalog-count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.grade-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 17px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid #cfd7e3; border-radius: 9px; padding: 9px 15px; background: white; color: var(--ink); font-size: .91rem; font-weight: 620; line-height: 1.3; }
.button:hover:not(:disabled) { background: #f1f4fb; border-color: #afbdd6; }
.button.primary { background: var(--blue); border-color: var(--blue); color: white; }
.button.primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.button.small { min-height: 36px; padding: 7px 11px; font-size: .82rem; }
.grade-picker .button { min-height: 39px; padding: 8px 15px; border-radius: 24px; font-size: .91rem; }
.grade-picker .button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.grade-picker .button[data-grade="oge"] { margin-left: 5px; }
.exam-source { margin: 11px 0 0; font-size: .88rem; color: var(--muted); }
.section-controls { margin-top: 17px; }
.section-controls h3 { font-size: 1.14rem; font-weight: 650; letter-spacing: -.02em; }
.scope-check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--muted); font-size: .88rem; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); }
.scope-check input, .topic-check input, .formula-select input { margin: 0; width: 17px; height: 17px; cursor: pointer; }
.topic-help, .panel-heading p, .muted, .formula-desc { color: var(--muted); }
.topic-help { font-size: .87rem; margin-bottom: 12px; }
.topics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.topic { display: flex; align-items: stretch; min-width: 0; background: white; border: 1px solid var(--line); border-radius: 12px; }
.topic:has(.topic-link[aria-pressed="true"]) { border-color: #8c9ee8; background: #eff3ff; box-shadow: inset 0 0 0 1px #bac6f1; }
.topic-link { display: flex; align-items: center; gap: 10px; padding: 12px 0 12px 12px; border: 0; min-width: 0; flex: 1; text-align: left; background: transparent; border-radius: 12px; line-height: 1.28; }
.topic-link:hover strong { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; }
.topic-link strong { font-size: .88rem; display: block; overflow-wrap: anywhere; }
.topic-link small { font-size: .77rem; color: var(--muted); }
.topic-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid #e0e6f5; border-radius: 9px; background: #f1f4fc; color: var(--blue-dark); font: italic 1.35rem/1 var(--serif); }
.topic-link[aria-pressed="true"] .topic-icon { background: #dce5ff; border-color: #d2ddff; }
.topic-check { display: grid; flex: 0 0 33px; place-items: center; cursor: pointer; }
.panel { border: 1px solid var(--line); background: white; border-radius: 16px; }
.library { margin-top: 22px; }
.panel-heading { padding: 20px 22px 17px; }
.panel-heading h2 { font-size: 1.43rem; }
.panel-heading p { font-size: .87rem; margin-top: 2px; }
.formula-row { display: grid; grid-template-columns: 22px minmax(0,1.5fr) minmax(110px,.85fr); align-items: start; gap: 12px; padding: 14px 22px; border-top: 1px solid #e7eaf0; }
.formula-select { min-height: 26px; display: flex; align-items: center; cursor: pointer; }
.formula-name { font-size: 1rem; line-height: 1.4; font-weight: 670; cursor: pointer; letter-spacing: -.015em; }
.formula-desc, .code-note { display: block; font-size: .83rem; line-height: 1.4; margin-top: 4px; }
.code-note { color: #465a93; }
.formula-equation { justify-self: end; align-self: start; max-width: 100%; min-width: 72px; padding: 8px 12px; border: 1px solid #e2e7f2; border-radius: 9px; color: #243a79; background: #f4f6fc; font: 1.07rem/1.28 var(--serif); text-align: center; overflow-wrap: anywhere; }
.variants { margin-top: 6px; min-width: 0; }
.variants summary { width: fit-content; min-height: 28px; display: flex; align-items: center; gap: 6px; color: var(--blue-dark); font-weight: 600; font-size: .81rem; border-radius: 3px; }
.variants summary::before, .grade-results summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); flex: none; }
.variants[open] > summary::before, .grade-results[open] summary::after { transform: rotate(45deg); }
summary::-webkit-details-marker { display: none; }
.variants ul { list-style: none; margin: 6px 0; padding: 0 0 0 12px; border-left: 2px solid #dae2fc; }
.variants li { padding: 7px 0; overflow-wrap: anywhere; }
.variants li + li { border-top: 1px solid #e9edf5; }
.variant-kind { display: block; font-size: .76rem; color: var(--muted); }
.variants .math-equation { font: 1.08rem/1.35 var(--serif); }
.variants li p { margin-top: 3px; font-size: .84rem; line-height: 1.45; color: var(--muted); }
.formula-row:has(.variants[open]) { grid-template-columns: 22px minmax(0,1fr) minmax(100px,.5fr); }
.typeset { display: inline-block; max-width: 100%; overflow: auto hidden; padding: .15em .1em; vertical-align: middle; font-size: 1.12em; }
.typeset .katex { font-size: 1em; } .option > span { min-width: 0; } .hint p + p { margin-top: .4em; } .practice-one { margin-top: 6px; }.variants .typeset { font-size: 1.13rem; }
.math-equation { display: inline-flex; align-items: center; gap: .3em; max-width: 100%; overflow-wrap: anywhere; }
.math-equation > span { min-width: 0; }
.math-fraction { display: inline-grid; text-align: center; }
.math-fraction > span { padding-inline: .18em; }
.math-fraction > span:first-child { border-bottom: 1px solid currentColor; }
.plan { position: sticky; top: 18px; padding: 22px; border-color: #cdd8f4; background: linear-gradient(145deg,#f2f5ff,#fff 78%); box-shadow: 0 3px 15px #283e7509; }
.plan-heading { justify-content: start; gap: 10px; }
.plan h2, .steps h2 { font-weight: 660; font-size: 1.28rem; letter-spacing: -.035em; }
.plan-icon { display: inline-flex; align-items: end; justify-content: center; gap: 2px; width: 30px; height: 30px; padding: 7px 5px; background: var(--blue); border-radius: 8px; }
.plan-icon i { width: 3px; background: white; border-radius: 1px; height: 6px; }
.plan-icon i:nth-child(2) { height: 10px; }.plan-icon i:nth-child(3) { height: 15px; }
.plan > p { font-size: .9rem; line-height: 1.46; color: var(--muted); margin-top: 10px; }
.plan-stats { display: grid; grid-template-columns: 1fr 1fr; padding: 17px 0 19px; margin-block: 16px; border-block: 1px solid #dae1ef; }
.plan-stats div + div { border-left: 1px solid #dae1ef; padding-left: 18px; }
.plan-stats dd { font-size: 2.1rem; line-height: 1.15; font-weight: 650; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.plan-stats dt { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.plan .button { width: 100%; }
.plan .button + .button { margin-top: 8px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 0 25px; margin-top: 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.page-heading { padding: 30px 0 0; display: flex; flex-direction: column-reverse; align-items: start; gap: 5px; }
.page-heading h1 { font-size: clamp(2rem,4vw,3.35rem); line-height: 1.13; letter-spacing: -.055em; font-weight: 680; }
.page-heading p { color: var(--muted); font-size: .93rem; }
.training-grid { margin-top: 22px; }
.exercise, .steps, .empty, .results { padding: clamp(17px,2.3vw,30px); }
.exercise h2, .results h2 { font-size: clamp(1.4rem,2.6vw,2.05rem); line-height: 1.15; letter-spacing: -.04em; margin: 6px 0 16px; font-weight: 670; }
.eyebrow { font-size: .82rem; font-weight: 650; color: var(--blue-dark); }
.condition { padding: 15px 17px; border-left: 3px solid #748ee9; border-radius: 0 9px 9px 0; background: #f1f4fd; overflow-wrap: anywhere; }
.equation-legend { font: 1.45rem/1.4 var(--serif); color: #223871; }
.instruction { margin: 16px 0 11px; font-weight: 620; }
.training-variants { border-top: 1px solid var(--line); margin-top: 21px; padding-top: 6px; }
.formula-entry { max-width: 43rem; }
.equation-input { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,2fr); gap: 9px; align-items: center; }
.equation-input:has(#percent-factor:not([hidden])) { grid-template-columns: minmax(0,1fr) auto minmax(0,2fr) auto; }
#percent-factor { white-space: nowrap; font: 1.05rem var(--serif); }
.percent-control { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; font-size: .86rem; cursor: pointer; }
.equation-input label, .given-grid label { display: grid; gap: 5px; min-width: 0; font-weight: 600; font-size: .85rem; }
.equation-input input, .given-grid select, .given-grid input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #acb8cc; border-radius: 8px; padding: 7px 9px; background: white; }
.equation-input input { font: 1.2rem var(--serif); }
.equation-input input:disabled { color: #324366; background: #f2f5fa; opacity: 1; }
.equals { font: 1.4rem var(--serif); }
.fraction-input[data-fraction="true"] #denominator-row { border-top: 2px solid var(--ink); margin-top: 7px; padding-top: 5px; }
.formula-tools { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 8px; }
.formula-tools .button { min-width: 37px; font: 1.04rem var(--serif); }
.text-condition { line-height: 2.3; }
.text-choice { display: inline-block; position: relative; max-width: 100%; cursor: pointer; line-height: 1.5; }
.text-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.text-choice span { display: block; padding: 2px 6px; border: 1px dashed #8e9db7; border-radius: 5px; background: white; }
.text-choice input:focus-visible + span { outline: 3px solid #5477fa; outline-offset: 2px; }
.text-choice input:checked + span { border: 1px solid var(--blue); background: #dde6ff; box-shadow: inset 0 -2px var(--blue); }
.answer-options, .given-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.option { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; overflow-wrap: anywhere; }
.option:has(:checked) { border-color: #7d95e8; background: var(--tint); }
.option input { margin: 0; }
.given-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,150px),1fr)); }
.given-grid label { grid-template-rows: 1fr auto; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.feedback, .hint { padding: 10px 13px; margin-top: 12px; border-radius: 8px; overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.feedback.correct { color: #15523a; background: #e9f7ef; }
.feedback.error { color: #8a281d; background: #fff0ed; }
.hint { color: #5a471c; background: #fff5d9; }
.steps { position: sticky; top: 18px; padding: 20px; }
.steps ol { list-style: none; padding: 0; margin: 14px 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 6px; font-size: .86rem; color: var(--muted); border-radius: 7px; }
.steps li[aria-current="step"] { color: #203ca7; background: var(--tint); font-weight: 650; }
.step-number { display: grid; place-items: center; flex: 0 0 24px; height: 24px; border-radius: 50%; background: #f0f2f7; font-size: .76rem; }
.steps li[aria-current="step"] .step-number { background: var(--blue); color: white; }
progress { accent-color: var(--blue); }
.progress-track { display: block; width: 100%; height: 8px; margin: 12px 0 5px; }
.steps .muted { font-size: .82rem; }
.empty, .results, .progress-groups { margin-top: 20px; }
.progress-groups { display: grid; gap: 10px; }
.grade-results summary { display: grid; grid-template-columns: minmax(86px,1fr) auto minmax(80px,175px) 14px; gap: 20px; align-items: center; padding: 18px 22px; }
.grade-results summary strong { font-size: 1.18rem; letter-spacing: -.03em; }
.grade-results summary span { color: var(--muted); font-size: .9rem; }
.grade-results summary progress { width: 100%; height: 8px; }
.grade-results .result-list { padding: 0 22px 12px; }
.result-list { list-style: none; padding: 0; margin: 7px 0 0; }
.result-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid #e6eaf0; }
.result-list strong { font-size: .94rem; font-weight: 600; }
.result-list span { color: var(--muted); font-size: .84rem; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); white-space: nowrap; overflow: hidden; }
@media (max-width: 1030px) {
  .shell,.header-inner { width: calc(100% - 42px); }
  .catalog-grid,.training-grid { grid-template-columns: minmax(0,1fr) 260px; gap: 18px; }
  .topics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { background-position: right center; }
  .plan { padding: 17px; }
}
@media (max-width: 900px) {
  .header-stat { display: none; }
  .header-cabinet { margin-inline-start: auto; }
}
@media (max-width: 760px) {
  .shell,.header-inner { width: calc(100% - 32px); }
  .header-inner { gap: 16px; }
  .navigation { gap: 2px; }.navigation button { padding: 6px 9px; }
  .hero { margin-top: 16px; min-height: 230px; padding: 24px; background-position: right center; }
  .hero-copy { max-width: 56%; }.hero h1 { font-size: 2.45rem; }
  .catalog-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 17px; margin-top: 22px; }
  .catalog-main { display: contents; }.topic-section { order: 0; }.plan { order: 1; position: static; }.library { order: 2; margin-top: 0; }
  .plan { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 14px; }
  .plan-heading, .plan > p, .plan > button { grid-column: 1; }.plan > p { margin: 0; }
  .plan-stats { grid-column: 2; grid-row: 1 / 3; margin: 0; padding: 2px 0; border: 0; gap: 13px; }
  .plan-stats div + div { padding-left: 13px; }.plan .button { width: fit-content; }.plan .button + .button { margin: 0; }
  .training-grid { grid-template-columns: minmax(0,1fr); }.steps { position: static; }
  .topics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .topic-link { padding-inline-start: 9px; gap: 6px; }
}
@media (max-width: 580px) {
  .header-inner { flex-wrap: wrap; min-height: auto; padding-top: 9px; gap: 7px 14px; }
  .navigation { order: 2; flex-basis: 100%; padding-bottom: 7px; gap: 5px; }
  .navigation button { flex: 1; font-size: .87rem; min-height: 35px; }
  .header-stat { font-size: .77rem; }
  .hero { display: block; min-height: 285px; padding: 22px; border-radius: 16px; background-size: auto 65%; background-position: right bottom; }
  .hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg,#040c2b 28%,transparent 75%),linear-gradient(90deg,#040c2b 0%,#040c2bd9 29%,transparent 65%); }
  .hero-copy { max-width: 100%; }.hero h1 { font-size: clamp(2rem,8vw,2.8rem); margin-block: 8px; }
  .hero p { font-size: .92rem; max-width: 300px; }.hero-action { margin-top: 23px; font-size: .86rem; }
  .topics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topic-link { padding-block: 10px; }.topic-icon { width: 24px; height: 27px; border: 0; background: transparent; }
  .topic-check { flex-basis: 30px; }
  .grade-picker { gap: 5px; }.grade-picker .button { min-height: 37px; padding: 7px 12px; font-size: .84rem; }.grade-picker .button[data-grade="oge"] { margin: 0; }
  .panel-heading { padding: 16px; flex-wrap: wrap; }
  .formula-row,.formula-row:has(.variants[open]) { position: relative; grid-template-columns: 17px minmax(0,1fr); gap: 6px 10px; padding: 13px 16px; }
  .formula-select { grid-row: 1 / 3; }.formula-equation { grid-row: 1; grid-column: 2; justify-self: start; font-size: 1rem; padding: 5px 10px; }.formula-body { grid-row: 2; grid-column: 2; }
  .formula-name { font-size: .98rem; }.formula-desc { font-size: .82rem; }
  .plan { padding: 16px; }.plan h2 { font-size: 1.11rem; }.plan-icon { display: none; }.plan-stats dd { font-size: 1.6rem; }
  .grade-results summary { gap: 9px; padding: 15px; grid-template-columns: minmax(66px,1fr) auto minmax(40px,65px) 10px; }
  .grade-results .result-list { padding-inline: 15px; }.result-list li { flex-wrap: wrap; gap: 3px 10px; }
}
@media (max-width: 370px) {
  .navigation { gap: 1px; }
  .navigation button { font-size: .82rem; padding-inline: 5px; }
  .shell,.header-inner { width: calc(100% - 22px); }.hero { padding: 18px; }
  .topic-icon { display: none; }.scope-check { font-size: .79rem; }
  .answer-options { grid-template-columns: 1fr; }.plan > p { grid-column: 1 / -1; grid-row: 2; }.plan-stats { grid-row: 1; }
}
