/* DuctStudy. White masthead, slate context bar, square panels, blue actions. */
:root {
  --slate: #175878; --ink: #203746; --muted: #526878; --paper: #f4f7f9; --line: #d7e1e8;
  --blue: #007cba; --green: #157655; --red: #af343a; --amber: #8c5715; --sky: #c8e9fb;
  --blue-soft: #e8f3fa; --green-soft: #e3f4ec; --red-soft: #fcebec; --amber-soft: #fff1d7;
  --display: 'Hind Madurai', 'Avenir Next Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --focus: #c48000;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; color: var(--ink); background: var(--paper); border-top: 5px solid var(--blue); line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button, a, input, select, summary, textarea { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; color: var(--ink); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { line-height: 1.6; }
ul, ol { margin: 0; }
kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; border: 1px solid var(--line); border-bottom-width: 2px; padding: 0 5px; border-radius: 3px; background: #fff; color: var(--ink); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 10px; top: -80px; background: #fff; padding: 12px 16px; z-index: 20; }
.skip:focus { top: 10px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; justify-content: center; }
.space { margin-top: 18px; }
.space-sm { margin-top: 10px; }
.space-lg { margin-top: 26px; }
.space-b { margin-bottom: 18px; }
.ok { color: var(--green); }
.bad { color: var(--red); }
.num { font-variant-numeric: tabular-nums; }
.nil { font-family: var(--body); font-size: 1.05rem; font-weight: 500; color: var(--muted); }

/* ---------- masthead ---------- */
.site-masthead { background: #fff; }
.masthead-inner { max-width: 1240px; margin: auto; padding: 25px 36px; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--blue); font-family: var(--display); font-size: 2.6rem; font-weight: 700; letter-spacing: .015em; line-height: 1; text-decoration: none; flex-shrink: 0; }
.brand-name { display: flex; align-items: baseline; gap: 8px; }
.brand-sub { color: var(--slate); font-size: 1.5rem; letter-spacing: .02em; font-weight: 600; }
.mark { display: grid; place-items: center; width: 45px; height: 45px; background: var(--blue); border-radius: 2px; flex-shrink: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 700; color: var(--muted); }
.track-area > .eyebrow { margin-bottom: 8px; }
#track-picker { display: flex; gap: 8px; }
.track-button { min-width: 112px; min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--slate); display: flex; align-items: center; justify-content: center; gap: 12px; font-size: .94rem; }
.track-button b { font-weight: 700; letter-spacing: .02em; }
.track-button span { font-size: .75rem; }
.track-button.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.track-button:hover:not(.active) { background: #edf6fc; border-color: #8bb6cf; }
.field-frame-wrap { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: #1d1a2e; }
.field-frame { display: block; width: 100%; height: calc(100vh - 16px); height: calc(100dvh - 16px); min-height: 520px; max-height: 900px; border: 0; }
.field-frame-wrap { scroll-margin-top: 8px; }
.field-pairs { margin-bottom: 16px; }
.field-pairs .chip { text-decoration: none; margin: 2px 2px 0 0; background: var(--blue-soft); color: var(--slate); border-color: #9bbfd5; }
.field-head .head-aside { align-self: center; }
.field-callout { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.field-callout p { margin: 4px 0 0; }
.navigation-band { border-top: 1px solid #edf1f4; border-bottom: 1px solid var(--line); background: #fff; }
nav#nav { display: flex; max-width: 1240px; margin: 0 auto; padding: 0 24px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #b7cad7 transparent; -webkit-overflow-scrolling: touch; }
nav#nav a { color: var(--muted); font-size: .94rem; font-weight: 500; white-space: nowrap; padding: 15px 18px 13px; min-height: 48px; display: flex; align-items: center; border-bottom: 3px solid transparent; text-decoration: none; }
nav#nav a:hover { background: #f0f7fb; color: var(--slate); }
nav#nav a.active { background: #f0f7fb; color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
nav#nav a:focus-visible { outline-offset: -3px; }
.context-header { background: var(--slate); color: #fff; font-size: .875rem; }
.context-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 1240px; margin: auto; padding: 12px 36px; }
.independent { color: #d8eaf5; font-size: .8125rem; }
.storage-alert { max-width: 1240px; margin: 16px auto 0; padding: 0 36px; }
.storage-alert p { background: var(--amber-soft); color: #6d4717; padding: 10px 14px; font-size: .875rem; border-left: 3px solid #d9a03a; }
main { display: block; max-width: 1240px; margin: auto; padding: 36px 36px 64px; min-height: 60vh; outline: none; }
main:focus, main:focus-visible { outline: none; }
.question-panel:focus, .game-text:focus, .quiz-wrap:focus { outline: none; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
footer { background: var(--slate); border-top: 4px solid var(--blue); color: #d8eaf5; font-size: .8125rem; }
.footer-inner { max-width: 1240px; margin: auto; padding: 26px 36px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.footer-inner p { max-width: 640px; text-align: right; }
.footer-name { font-family: var(--display); font-weight: 700; color: #fff; font-size: 1.15rem; letter-spacing: .025em; white-space: nowrap; }

/* ---------- page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 27px; }
.page-head > div:first-child { min-width: 0; }
.page-head .eyebrow { color: var(--blue); margin-bottom: 9px; }
.page-head .eyebrow a { color: inherit; }
.page-head h1 { font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.08; letter-spacing: -.01em; color: var(--slate); text-transform: uppercase; overflow-wrap: break-word; }
.page-head p:not(.eyebrow) { color: var(--muted); margin-top: 10px; max-width: 680px; line-height: 1.55; }
.page-head .head-aside { flex-shrink: 0; }
.lesson-head h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }

/* ---------- building blocks ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 26px; box-shadow: 0 3px 12px #17587805; min-width: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 22px; align-items: start; }
.grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid.top { align-items: stretch; }
.grid + .grid, .metrics + .grid, .grid + .note, .grid + .rule { margin-top: 22px; }
.row-between { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions.stack { flex-direction: column; align-items: stretch; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--blue); color: #fff; border: 1px solid var(--blue); padding: 11px 18px; border-radius: 3px; font-size: .94rem; font-weight: 600; min-height: 46px; text-decoration: none; line-height: 1.25; text-align: center; }
.btn:hover { filter: brightness(.94); }
.btn.secondary { background: #fff; color: var(--slate); border-color: #b7cad7; }
.btn.secondary:hover { background: #f3f8fb; filter: none; }
.btn.text { background: transparent; border-color: transparent; color: var(--blue); padding-left: 4px; padding-right: 4px; }
.btn.small { min-height: 44px; padding: 8px 12px; font-size: .875rem; }
.btn.danger, .btn.danger-btn { color: var(--red); }
.btn.danger-btn { background: var(--red); border-color: var(--red); color: #fff; }
.btn.light-text { background: transparent; border-color: #6d9ab3; color: #fff; }
.badge { font-size: .75rem; display: inline-block; background: var(--blue-soft); color: var(--slate); padding: 5px 9px; border-radius: 3px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.badge.blue { background: var(--sky); }
.badge.green { background: #d9f4e9; color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.note { border-left: 3px solid #d9a03a; padding: 12px 16px; background: #fff7e7; font-size: .9rem; line-height: 1.55; border-radius: 0 3px 3px 0; }
.note.blue { background: var(--blue-soft); border-color: var(--blue); }
.note p + p { margin-top: 4px; }
.rule { margin-top: 22px; }
.under-note { font-size: .8125rem; color: var(--muted); margin-top: 12px; }
.field label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 8px; }
select, input[type=date], input[type=search], input[type=text], textarea { width: 100%; background: #fff; border: 1px solid #b7cad7; border-radius: 3px; padding: 10px 12px; min-height: 46px; color: var(--ink); }
select { padding-right: 32px; }
textarea { display: block; resize: vertical; line-height: 1.45; font-size: .8125rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
input[type=range] { width: 100%; min-height: 40px; accent-color: var(--blue); }
output { display: block; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.checkbox { display: flex; gap: 10px; align-items: center; font-size: .9rem; min-height: 44px; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--blue); flex-shrink: 0; }
.empty { padding: 44px 26px; text-align: center; }
.empty h2 { margin-bottom: 10px; color: var(--slate); }
.empty p { max-width: 560px; margin: 0 auto; }
.plain-list { padding-left: 20px; line-height: 1.6; margin-top: 12px; }
.plain-list li { margin: 7px 0; }
.table-scroll { overflow-x: auto; }
.keys-hint { font-size: .8125rem; color: var(--muted); margin-top: 14px; line-height: 1.8; }

/* ---------- Today ---------- */
.mode-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.mode-switch button { background: #fff; color: var(--ink); text-align: left; border: 1px solid var(--line); border-radius: 3px; padding: 16px 18px; min-width: 0; }
.mode-switch button:hover { border-color: #9bbfd5; }
.mode-switch button.active { background: #eaf4fa; border-color: #9bbfd5; box-shadow: inset 0 3px 0 var(--blue); }
.mode-switch b { display: block; color: var(--slate); font-family: var(--display); font-size: 1.08rem; }
.mode-switch span { display: block; color: var(--muted); font-size: .875rem; line-height: 1.4; margin-top: 4px; }
.hero-panel { background: var(--slate); border: 0; border-left: 6px solid var(--blue); color: #fff; min-height: 240px; padding: 28px 30px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
.hero-panel .eyebrow { color: var(--sky); }
.hero-panel h2 { color: #fff; font-size: 2.15rem; line-height: 1.12; margin: 12px 0 10px; max-width: 540px; }
.hero-panel p { color: #e0edf5; max-width: 540px; }
.hero-panel .btn.primary { background: #fff; color: var(--slate); border-color: #fff; margin-top: 22px; }
.hero-panel .actions { margin-top: 22px; }
.hero-panel .actions .btn.primary { margin-top: 0; }
.hero-panel .under-note { color: #c5dcea; }
.window h2 { color: var(--ink); }
.window-out { margin-top: 18px; font-size: .94rem; line-height: 1.55; background: var(--paper); padding: 12px 14px; border-radius: 3px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.metrics.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics.compact { margin: 6px 0 0; gap: 10px; }
.metric { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--blue); padding: 15px 18px; min-width: 0; }
.metric b { display: block; font-family: var(--display); font-weight: 700; color: var(--slate); font-size: 2.2rem; line-height: 1.15; }
.metric b span { font-size: 1.1rem; color: var(--muted); }
.metric b .nil { font-size: 1.05rem; }
.metric > span { display: block; font-size: .875rem; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.metrics.compact .metric { padding: 10px 12px; }
.metrics.compact .metric b { font-size: 1.7rem; }
.domain-list { margin-top: 8px; }
.domain-row { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.domain-row:last-child { border-bottom: 0; }
a.domain-row:hover .title { color: var(--blue); text-decoration: underline; }
.domain-row .title { font-size: .94rem; font-weight: 600; }
.domain-row small { font-size: .8rem; color: var(--muted); display: block; margin-top: 6px; }
.bar { position: relative; height: 7px; background: #e4edf3; border-radius: 1px; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--blue); width: 0; border-radius: 1px; }
.bar.green i { background: var(--green); }
.cutbar { height: 10px; overflow: visible; }
.cutbar.under i { background: #c2702a; }
.cutbar .cut { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); transform: translateX(-1px); }
.two-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
.two-bars small { margin-top: 4px; }
.concept-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); padding: 15px 0; color: var(--ink); text-decoration: none; }
.concept-row:last-child { border-bottom: 0; }
.concept-row b { display: block; color: var(--slate); }
.concept-row small { display: block; margin-top: 4px; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.concept-row:hover b { text-decoration: underline; }
.concept-row .badge { flex-shrink: 0; }
.rule .ok { color: var(--green); }

/* ---------- Learn ---------- */
.learn-summary { margin-bottom: 8px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.jump a { font-size: .85rem; padding: 8px 12px; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; color: var(--slate); background: #fff; }
.jump a:hover { border-color: var(--blue); }
.dom-section { scroll-margin-top: 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; margin: 30px 0 14px; flex-wrap: wrap; }
.section-heading h2 { color: var(--slate); }
.lesson-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lesson-card { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 18px 20px; color: var(--ink); text-decoration: none; min-width: 0; min-height: 132px; }
.lesson-card:hover { border-color: var(--blue); box-shadow: 0 3px 12px #1758780d; }
.lesson-card h3 { color: var(--slate); font-size: 1.12rem; line-height: 1.3; overflow-wrap: anywhere; }
.lesson-card small { color: var(--muted); font-size: .8125rem; }
.lesson-card .lc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lesson-card > small { margin-top: auto; }
.lesson-card.st-passed { border-top: 3px solid var(--green); }
.lesson-card.st-read { border-top: 3px solid var(--blue); }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(250px, .8fr); gap: 24px; align-items: start; }
.lesson-aside { position: sticky; top: 16px; }
.lesson-aside .facts { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.lesson-aside .facts li { background: var(--paper); padding: 10px 4px; font-size: .8125rem; color: var(--muted); }
.lesson-aside .facts b { display: block; font-family: var(--display); font-size: 1.5rem; color: var(--slate); }
.mnemonic { background: var(--blue-soft); border-left: 4px solid var(--blue); padding: 16px 20px; margin-bottom: 18px; }
.mnemonic .eyebrow { color: var(--blue); }
.mnemonic p:not(.eyebrow) { margin-top: 6px; font-size: 1.05rem; font-weight: 500; color: var(--slate); }
.unit-list { padding-top: 6px; padding-bottom: 6px; }
.unit { padding: 18px 0; border-bottom: 1px solid var(--line); }
.unit:last-child { border-bottom: 0; }
.unit-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.unit-meta:empty { display: none; }
.unit-text { font-size: 1.04rem; line-height: 1.6; }
.unit-text mark { background: #fff1b8; color: inherit; padding: 0 2px; }
.trap { margin-top: 10px; background: var(--amber-soft); color: #5e3d10; border-left: 3px solid #d9a03a; padding: 8px 12px; font-size: .9rem; line-height: 1.5; }
.trap b { color: var(--amber); }
.unit-foot { margin-top: 8px; font-size: .8125rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; }
.chip { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; line-height: 1.3; border: 1px solid transparent; }
.chip-shall { background: var(--blue); color: #fff; }
.chip-should { background: var(--blue-soft); color: var(--slate); border-color: #9bbfd5; }
.chip-rec { background: #d9f4e9; color: var(--green); }
.chip-may { background: var(--sky); color: var(--slate); }
.chip-can { background: #edf1f4; color: var(--muted); }
.chip-def { background: #fff; color: var(--slate); border-color: #b7cad7; }
.chip-note { background: var(--amber-soft); color: var(--amber); }
.chip-code { background: var(--slate); color: #fff; }
.chip-reg { background: var(--red-soft); color: var(--red); }
.chip-delta { background: #fff; color: var(--amber); border-color: #d9a03a; }
.checkpoint-cta { margin-top: 18px; border-top: 3px solid var(--blue); }
.checkpoint-cta h2 { margin: 8px 0 6px; color: var(--slate); }
.lesson-pn { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.lesson-pn .btn { flex-direction: column; align-items: flex-start; text-align: left; max-width: 48%; gap: 2px; }
.lesson-pn .btn.next { align-items: flex-end; text-align: right; margin-left: auto; }

/* ---------- question card ---------- */
.quiz-wrap { max-width: 860px; margin: 0 auto; }
.quiz-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; font-size: .875rem; }
.quiz-top .qlabel { color: var(--muted); text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-top strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.quiz-top strong.low, #sim-clock.low { color: var(--red); }
.progress { height: 6px; background: #e1e9ef; margin-bottom: 16px; }
.progress i { display: block; height: 100%; background: var(--blue); }
.question-panel { padding: 30px; }
.quiz-title { font-family: var(--body); font-size: 1.35rem; font-weight: 500; line-height: 1.5; margin: 18px 0 20px; color: var(--ink); }
.choices { display: grid; gap: 11px; }
.choice { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 15px; border: 1px solid #c8d7e2; border-radius: 3px; background: #fff; text-align: left; line-height: 1.5; min-height: 56px; color: var(--ink); }
.choice:hover:not(:disabled) { border-color: var(--blue); background: #f5fafd; }
.choice:disabled { opacity: 1; cursor: default; }
.choice .letter, .opt .letter, .step .letter, .slot .letter { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border: 1px solid #b7cad7; border-radius: 3px; font-size: .85rem; font-weight: 600; background: #fff; color: var(--slate); }
.choice .ctext { flex: 1; min-width: 0; overflow-wrap: anywhere; padding-top: 1px; }
.choice.selected { border-color: var(--blue); background: #eaf4fa; box-shadow: inset 0 0 0 1px var(--blue); }
.choice.selected .letter { background: var(--blue); border-color: var(--blue); color: #fff; }
.choice.correct { background: var(--green-soft); border-color: var(--green); }
.choice.correct .letter { background: var(--green); border-color: var(--green); color: #fff; }
.choice.wrong { background: var(--red-soft); border-color: var(--red); }
.choice.wrong .letter { background: var(--red); border-color: var(--red); color: #fff; }
.choice.static { cursor: default; }
.q-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 18px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px 8px 10px; border: 1px solid #b7cad7; border-radius: 3px; background: #fff; color: var(--slate); font-size: .875rem; font-weight: 600; }
.toggle .knob { width: 34px; height: 20px; border-radius: 10px; background: #cdd9e2; position: relative; flex-shrink: 0; }
.toggle .knob::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.toggle[aria-pressed=true] { border-color: var(--amber); color: var(--amber); background: #fffaf0; }
.toggle[aria-pressed=true] .knob { background: #d9a03a; }
.toggle[aria-pressed=true] .knob::after { left: 17px; }
.toggle.flag[aria-pressed=true] { border-color: #b87920; }
.feedback { margin-top: 22px; padding: 18px 20px; border-left: 4px solid var(--green); background: #eff8f3; line-height: 1.6; }
.feedback.wrong { background: #fff3f3; border-color: var(--red); }
.feedback > b { display: block; font-size: 1.02rem; }
.feedback p { margin-top: 8px; }
.tests { margin-top: 14px; border-top: 1px solid #cfe0d7; padding-top: 12px; }
.feedback.wrong .tests { border-top-color: #efd0d2; }
.tests ul { list-style: none; padding: 0; margin-top: 6px; }
.tests li { margin: 8px 0; font-size: .92rem; line-height: 1.5; overflow-wrap: anywhere; }
.tests li a { font-size: .85rem; white-space: normal; }
.ref { margin-top: 10px; }
.quiz-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.quiz-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.qjump { width: 44px; height: 44px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 2px; font-size: .8rem; font-variant-numeric: tabular-nums; padding: 0; }
.qjump.done { background: #b9d9ee; border-color: #5f9fc6; color: var(--slate); font-weight: 700; }
.qjump.flag { border-bottom: 4px solid #b87920; }
.qjump.current { outline: 3px solid var(--ink); outline-offset: 2px; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line); margin-left: 6px; }
.lg.done { background: #e2f0fa; border-color: #83b8d6; }
.lg.flag { border-bottom: 3px solid #b87920; }
.confirm-inline { background: var(--paper); border: 1px solid var(--line); padding: 14px 16px; }
.confirm-inline p { font-weight: 500; margin-bottom: 10px; }
.study-card .note { margin-top: 14px; }
.filter-set { border: 0; padding: 0; margin: 14px 0 0; }
.radio { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-height: 52px; cursor: pointer; border-top: 1px solid var(--line); }
.radio:first-of-type { border-top: 0; }
.radio input { width: 20px; height: 20px; accent-color: var(--blue); flex-shrink: 0; }
.radio b { display: block; font-weight: 600; }
.radio small { display: block; color: var(--muted); font-size: .8125rem; }
.radio:has(input:disabled) { opacity: .55; cursor: default; }
.field.sub { padding: 0 0 10px 32px; }
.radio-off { padding: 10px 0; border-top: 1px solid var(--line); }
.result-top { display: flex; align-items: center; gap: 24px; margin: 8px 0 18px; }
.result-score { font-family: var(--display); font-weight: 700; color: var(--slate); font-size: 4.2rem; line-height: 1; }
.result-score.ok { color: var(--green); }
.result-score.bad { color: var(--red); }
.review-item { padding: 18px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.review-item:last-child { border-bottom: 0; }
.review-item h3 { font-family: var(--body); font-weight: 500; font-size: 1.05rem; line-height: 1.5; margin: 6px 0; }
.review-item p { font-size: .94rem; margin-top: 6px; }
.review-item .status { font-size: .75rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .06em; }
.history { margin-top: 10px; }
.history-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; min-height: 44px; align-items: center; }
.history-row:last-child { border-bottom: 0; }
.history-row:hover span { text-decoration: underline; }
.history-row.current { background: var(--blue-soft); padding-left: 8px; padding-right: 8px; }
.history-row b { font-variant-numeric: tabular-nums; }
.sim-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sim-card { border-top: 3px solid var(--blue); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sim-card h2 { color: var(--slate); font-size: 1.8rem; }
.sim-card .btn { margin-top: auto; }
.resume { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; border-left: 5px solid var(--blue); }
.resume h2 { color: var(--slate); margin: 6px 0; }

/* ---------- games ---------- */
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.game-card { border-top: 3px solid var(--blue); display: flex; flex-direction: column; align-items: flex-start; }
.game-card h2 { color: var(--slate); margin: 8px 0 8px; }
.game-card.off { border-top-color: var(--line); background: #fbfcfd; }
.game-card .btn { margin-top: auto; padding-left: 26px; padding-right: 26px; }
.game-card .small { margin-bottom: 16px; }
.game-score { display: flex; gap: 18px; flex-wrap: wrap; font-size: .875rem; color: var(--muted); margin-bottom: 12px; }
.game-score b { color: var(--slate); font-size: 1.05rem; font-variant-numeric: tabular-nums; margin-left: 3px; }
.game-text { margin: 14px 0 6px; font-size: 1.3rem; line-height: 1.5; font-weight: 500; border-left: 4px solid var(--sky); padding: 4px 0 4px 16px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-top: 20px; }
.opt { min-width: 0; overflow-wrap: break-word; hyphens: auto; text-align: left; }
.opts.numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; background: #fff; border: 1px solid #b7cad7; border-radius: 3px; font-weight: 600; color: var(--slate); text-align: left; }
.opt:hover:not(:disabled) { border-color: var(--blue); background: #f5fafd; }
.opt:disabled { opacity: 1; cursor: default; }
.opt.correct { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.opt.wrong { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.blank { display: inline-block; min-width: 3.2em; border-bottom: 2px solid var(--blue); color: var(--blue); letter-spacing: -.1em; }
.order-answer { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.order-pool { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed #b7cad7; }
.step { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 10px 14px; background: #fff; border: 1px solid #b7cad7; border-radius: 3px; text-align: left; line-height: 1.4; color: var(--ink); }
.step:hover:not(:disabled) { border-color: var(--blue); }
.step.placed { background: #eaf4fa; border-color: #83b8d6; }
.step:disabled { opacity: 1; cursor: default; }
.step.right { background: var(--green-soft); border-color: var(--green); }
.step.wrong { background: var(--red-soft); border-color: var(--red); }
.slot { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 14px; border: 1px dashed #c8d7e2; border-radius: 3px; }
.slot .letter { color: #9fb3c1; border-style: dashed; }
.flashcard { min-height: 280px; padding: 32px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--blue); border-radius: 3px; display: flex; flex-direction: column; justify-content: center; }
.flashcard h2 { font-family: var(--body); font-weight: 500; font-size: 1.4rem; line-height: 1.5; margin-top: 12px; }
.flashcard .back { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; }
.flashcard .back .unit-text { margin-top: 8px; }
.recall-controls { display: flex; justify-content: center; gap: 12px; margin: 18px 0 0; flex-wrap: wrap; }
.recall-controls .btn { min-width: 150px; }
.boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.box { background: var(--paper); text-align: center; padding: 10px 2px; }
.box b { display: block; font-family: var(--display); font-size: 1.5rem; color: var(--slate); }
.box span { font-size: .75rem; color: var(--muted); }

/* ---------- units ---------- */
.toolbar { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 14px; align-items: end; padding: 20px; }
.result-count { font-size: .875rem; color: var(--muted); margin: 16px 0 10px; }

/* ---------- progress ---------- */
.chart { display: block; width: 100%; max-width: 560px; height: auto; margin-top: 14px; font-size: 13px; font-family: var(--body); }
.chart text { fill: var(--muted); }
.chart .grid-l { stroke: #e4edf3; stroke-width: 1; }
.chart .cut-l { stroke: var(--red); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .cut-t { fill: var(--red); font-weight: 600; }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2.5; }
.chart .pt { stroke: #fff; stroke-width: 2; }
.chart .pt.ok { fill: var(--green); }
.chart .pt.bad { fill: var(--red); }
.backup-status { font-size: .875rem; margin-top: 10px; font-weight: 500; }
.backup-status:empty { display: none; }

/* ---------- sources ---------- */
.source { padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.source:last-child { border-bottom: 0; }
.source a { font-weight: 600; }
.source p { font-size: .8125rem; color: var(--muted); margin-top: 3px; }

/* ---------- lab ---------- */
.lab-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.system-diagram { width: 100%; height: auto; display: block; margin: 20px 0 14px; overflow: visible; }
.system-diagram text { font-family: var(--body); font-size: 16px; fill: var(--ink); }
.system-diagram.v { display: none; max-width: 300px; margin: 16px auto 14px; }
.system-diagram .d-cool { fill: var(--blue-soft); }
.system-diagram .d-warm { fill: var(--amber-soft); }
.system-diagram .d-mid { fill: var(--slate); }
.system-diagram .d-inv { fill: #fff; }
.system-diagram .d-inv2 { fill: var(--sky); }
.system-diagram .d-flow { fill: none; stroke: var(--blue); stroke-width: 4; }
.system-diagram .d-head { fill: var(--blue); }
.lab-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lab-numbers b { display: block; font-family: var(--display); font-weight: 700; color: var(--slate); font-size: 2.3rem; line-height: 1.1; }
.lab-numbers span { font-size: .875rem; color: var(--muted); }
.comparison { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .94rem; line-height: 1.5; }
.comparison th, .comparison td { text-align: left; border-bottom: 1px solid var(--line); padding: 11px 8px; vertical-align: top; }
.comparison thead th { font-size: .82rem; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .search-field { grid-column: 1 / -1; }
  .lab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .masthead-inner { padding: 22px 26px; }
  .track-button { min-width: 84px; }
  .track-button span { display: none; }
  .context-inner, .storage-alert { padding-left: 26px; padding-right: 26px; }
  main { padding: 30px 26px 50px; }
  .footer-inner { padding: 24px 26px; }
  .metrics.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-panel h2 { font-size: 1.9rem; }
}
@media (max-width: 860px) {
  .grid, .grid.even, .lesson-layout { grid-template-columns: 1fr; }
  .lesson-aside { position: static; }
  .sim-grid { grid-template-columns: 1fr; }
  .brand { font-size: 2.2rem; }
  .brand-sub { font-size: 1.3rem; }
  .mark { width: 40px; height: 40px; }
  nav#nav { padding: 0 12px; }
  nav#nav a { padding: 14px 14px 12px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-inner p { text-align: left; }
}
@media (max-width: 650px) {
  .masthead-inner { display: block; padding: 16px 16px 14px; }
  .brand { font-size: 2.05rem; gap: 10px; }
  .brand-sub { font-size: 1.2rem; }
  .track-area { margin-top: 14px; }
  .track-area > .eyebrow { display: none; }
  .track-button { flex: 1; min-width: 0; padding: 10px 8px; }
  nav#nav { padding: 0 4px; }
  nav#nav a { padding: 13px 12px 11px; font-size: .9rem; }
  .context-inner { padding: 11px 16px; }
  .context-header { font-size: .8125rem; }
  .independent, .hint { display: none; }
  .storage-alert { padding: 0 16px; }
  main { padding: 24px 16px 44px; }
  .page-head { display: block; margin-bottom: 20px; }
  .page-head h1 { font-size: 1.8rem; overflow-wrap: anywhere; }
  .page-head .head-aside { margin-top: 16px; }
  .lesson-head h1 { font-size: 1.7rem; }
  .panel { padding: 20px 18px; }
  .mode-switch { grid-template-columns: 1fr; gap: 8px; }
  .mode-switch button { padding: 12px 15px; }
  .hero-panel { padding: 22px 20px; min-height: 0; border-left-width: 5px; }
  .hero-panel h2 { font-size: 1.8rem; }
  .hero-panel .btn.primary { width: 100%; }
  .metrics, .metrics.four { gap: 8px; }
  .metrics.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric { padding: 12px 11px; }
  .metric b { font-size: 1.75rem; }
  .metric b span { font-size: .9rem; }
  .metric > span { font-size: .8125rem; }
  .metrics.compact .metric b { font-size: 1.45rem; }
  .lesson-grid, .game-grid { grid-template-columns: 1fr; }
  .lesson-grid { gap: 8px; }
  .lesson-card { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; align-items: center; }
  .lesson-card h3 { grid-column: 1; grid-row: 1; font-size: 1.02rem; }
  .lesson-card .lc-meta { grid-column: 1; grid-row: 2; margin-top: 0; }
  .lesson-card .lc-top { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; gap: 4px; }
  .section-heading { margin: 24px 0 10px; }
  .lesson-pn { flex-direction: column; }
  .lesson-pn .btn, .lesson-pn .btn.next { max-width: none; width: 100%; align-items: flex-start; text-align: left; margin-left: 0; }
  .toolbar { grid-template-columns: 1fr 1fr; padding: 16px; gap: 12px; }
  .question-panel { padding: 20px 16px; }
  .quiz-title { font-size: 1.15rem; margin: 14px 0 16px; }
  .choice { padding: 12px 11px; gap: 10px; }
  .quiz-top .qlabel { display: none; }
  .quiz-bottom .btn { flex: 1; }
  .qjump { width: 44px; height: 44px; }
  .two-bars { grid-template-columns: 1fr; gap: 6px; }
  .result-top { gap: 16px; }
  .result-score { font-size: 3.2rem; }
  .game-text { font-size: 1.12rem; }
  .opts.numbers { grid-template-columns: 1fr; }
  .flashcard { padding: 22px 18px; min-height: 240px; }
  .flashcard h2 { font-size: 1.2rem; }
  .recall-controls .btn { flex: 1; min-width: 0; }
  .resume { flex-direction: column; align-items: flex-start; }
  .lab-numbers b { font-size: 1.8rem; }
  .system-diagram.h { display: none; }
  .system-diagram.v { display: block; }
  .comparison { font-size: .875rem; }
  .comparison th, .comparison td { padding: 9px 5px; }
  .footer-inner { padding: 22px 16px; }
}
@media (max-width: 380px) {
  .brand { font-size: 1.8rem; }
  .brand-sub { font-size: 1.05rem; }
  .toolbar { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .bar i, .progress i { transition: width .25s ease; }
  .btn, .choice, .opt, .step { transition: background-color .12s, border-color .12s, filter .12s; }
  .toggle .knob::after { transition: left .15s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { border: 0; background: #fff; }
  .site-masthead, .context-header, footer, .btn, .actions { display: none !important; }
  main { max-width: none; padding: 0; }
  .panel { box-shadow: none; }
}

.sync-form { display: grid; gap: 6px; max-width: 420px; }
.sync-form input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); }
.sync-form input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.sync-notice { border-left: 3px solid var(--amber); background: var(--amber-soft); padding: 8px 12px; color: var(--ink); }
.sync-url { width: 100%; font: inherit; font-size: .85rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); margin-top: 6px; }

/* ---------- audit pass: touch, state marks, spacing ---------- */
.grid.top { align-items: start; }
.quiz-wrap > .panel + .panel, .quiz-wrap > .panel + section { margin-top: 16px; }
.quiz-bottom.end { justify-content: flex-end; }
/* Right and wrong carry a mark, not just a color. */
.choice.correct::after, .opt.correct::after, .step.right::after { content: "\2713"; margin-left: auto; padding-left: 10px; font-weight: 700; color: var(--green); font-size: 1.1rem; }
.choice.wrong::after, .opt.wrong::after, .step.wrong::after { content: "\2717"; margin-left: auto; padding-left: 10px; font-weight: 700; color: var(--red); font-size: 1.1rem; }
.opt.correct .letter, .opt.wrong .letter { color: #fff; }
.opt.correct .letter { background: var(--green); border-color: var(--green); }
.opt.wrong .letter { background: var(--red); border-color: var(--red); }
/* Touch screens: no sticky hover, no keyboard hints. */
@media (hover: none) {
  .choice:hover:not(:disabled):not(.selected):not(.correct):not(.wrong) { border-color: #c8d7e2; background: #fff; }
  .opt:hover:not(:disabled):not(.correct):not(.wrong), .step:hover:not(:disabled):not(.placed):not(.right):not(.wrong) { border-color: #b7cad7; background: #fff; }
  .mode-switch button:hover:not(.active) { border-color: var(--line); }
  .track-button:hover:not(.active) { background: #fff; border-color: var(--line); }
  nav#nav a:hover:not(.active) { background: transparent; color: var(--muted); }
  .lesson-card:hover { border-color: var(--line); box-shadow: none; }
  .keys-hint { display: none; }
}
@media (max-width: 650px) {
  /* Less chrome above the page on a phone: the context bar repeats the credential already shown in the picker. */
  .context-header { display: none; }
  .masthead-inner { padding: 12px 16px 10px; }
  .brand { font-size: 1.7rem; }
  .brand-sub { font-size: 1rem; }
  .track-area { margin-top: 10px; }
  .track-button { min-height: 42px; padding: 8px 6px; }
}
details.review-item > summary { cursor: pointer; list-style: none; display: block; padding: 2px 0; }
details.review-item > summary::-webkit-details-marker { display: none; }
details.review-item > summary .status { display: block; }
details.review-item > summary .rv-stem { display: block; font-family: var(--display); font-weight: 600; color: var(--slate); font-size: 1.02rem; margin-top: 4px; }
details.review-item > summary .rv-stem::after { content: " +"; color: var(--blue); }
details.review-item[open] > summary .rv-stem::after { content: " \2212"; }
@media (hover: none) { .opts .opt .letter { display: none; } }
@media (max-width: 650px) { .opt { padding: 10px 12px; gap: 8px; font-size: .95rem; } }

/* ---------- five-tab shell ---------- */
nav#nav .tab-ic { display: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.no-nav .navigation-band { display: none; }
body.in-quiz .navigation-band { display: none; }
@media (max-width: 650px) {
  /* Phone: the tabs sit at the bottom, under the thumb. */
  .navigation-band { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; border-top: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -4px 14px rgba(23, 88, 120, .08); padding-bottom: env(safe-area-inset-bottom, 0px); }
  nav#nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0; overflow: visible; }
  nav#nav a { flex-direction: column; justify-content: center; gap: 2px; padding: 7px 2px 6px; min-height: 58px; font-size: .75rem; font-weight: 600; border-bottom: 0; border-top: 3px solid transparent; }
  nav#nav a.active { border-top-color: var(--blue); border-bottom-color: transparent; }
  nav#nav .tab-ic { display: block; }
  body:not(.no-nav):not(.in-quiz) { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  /* The mode switch is a compact segmented control on a phone. */
  .mode-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mode-switch button { padding: 10px 8px; text-align: center; }
  .mode-switch b { font-size: .9rem; line-height: 1.2; }
  .mode-switch span { display: none; }
}

/* Today */
.status-line { display: block; color: var(--muted); }
.status-line b { color: var(--slate); }
.status-line b.ok { color: var(--green); }
.status-line b.bad { color: var(--red); }
.today-head { margin-bottom: 18px; }
.size-offer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.size-offer p { margin: 0; flex: 1 1 260px; }
.hero-panel + .ready-panel, .ready-panel { margin-top: 22px; }
.checklist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .ck { flex: 0 0 26px; height: 26px; border: 2px solid #9bbfd5; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: .9rem; }
.checklist li.ok .ck { background: var(--green); border-color: var(--green); }
.checklist li.ok > span:last-child { color: var(--muted); }
.welcome .actions { margin-top: 8px; }

/* Practice */
.tile-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.tile-link, .tool-card { display: block; border: 1px solid var(--line); border-radius: 3px; padding: 14px 16px; text-decoration: none; color: var(--ink); background: #fff; }
.tile-link b { display: block; color: var(--slate); font-family: var(--display); }
.tile-link small { color: var(--muted); }
.tile-link:hover, .tool-card:hover { border-color: #9bbfd5; background: #f6fbfe; }
.tool-card h3 { color: var(--slate); margin: 4px 0 6px; }
.tool-card p { margin: 0; }
.section-heading .small { margin-left: auto; }

/* Learn */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 22px; overflow-x: auto; }
.subtabs a { padding: 10px 14px 9px; min-height: 44px; display: flex; align-items: center; color: var(--muted); text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.subtabs a.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.subtabs a:hover { color: var(--slate); }
.learn-summary .search-field input { width: 100%; }
#ls-count:empty { display: none; }
.lesson-head .head-aside .actions { flex-wrap: wrap; }

/* Me */
.stack-col { display: grid; gap: 22px; align-content: start; }
.stack-col .ready-panel { margin-top: 0; }
details.advanced > summary { cursor: pointer; font-weight: 600; color: var(--slate); min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary::before { content: "+"; color: var(--blue); font-weight: 700; width: 1em; }
details.advanced[open] > summary::before { content: "\2212"; }
#sync-slot:empty { display: none; }

/* First run */
.setup-form { max-width: 760px; }
.setup-form fieldset { border: 0; padding: 0; margin: 0 0 26px; }
.setup-form legend { font-family: var(--display); font-weight: 700; color: var(--slate); font-size: 1.2rem; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.setup-form .step { display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; line-height: 1; border-radius: 50%; background: var(--blue); color: #fff; font-size: .9rem; }
.su-tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.su-track { position: relative; display: block; cursor: pointer; }
.su-track input, .chip-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.su-track span { display: block; border: 1px solid var(--line); border-radius: 3px; padding: 14px 16px; min-height: 100%; }
.su-track b { display: block; font-size: 1.2rem; color: var(--slate); }
.su-track small { color: var(--muted); }
.su-track input:checked + span { border-color: var(--blue); background: #eaf4fa; box-shadow: inset 0 3px 0 var(--blue); }
.su-track input:focus-visible + span, .chip-radio input:focus-visible + span { outline: 3px solid var(--focus, #c48000); outline-offset: 2px; }
.su-mins { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio { position: relative; cursor: pointer; }
.chip-radio span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 22px; font-weight: 600; color: var(--slate); }
.chip-radio input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (max-width: 650px) { .su-tracks { grid-template-columns: 1fr; } .setup-form .actions .btn.primary { width: 100%; } }
@media print { .navigation-band, .subtabs, details.advanced { display: none !important; } body { padding-bottom: 0 !important; } }
[hidden] { display: none !important; }

/* Exam sim: the length the ready check wants next stands out; on a phone each length is one compact row. */
.sim-card.next { box-shadow: inset 0 0 0 2px var(--blue); background: #f6fbfe; }
.next-tag { color: var(--blue); }
@media (max-width: 650px) {
  .sim-grid { gap: 10px; }
  .sim-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 14px 16px; }
  .sim-card .eyebrow { grid-column: 1 / -1; }
  .sim-card h2 { font-size: 1.3rem; }
  .sim-card p.muted { grid-column: 1; margin: 0; }
  .sim-card .btn { grid-column: 2; grid-row: 2 / span 2; margin: 0; }
}
@media (max-width: 650px) { .hide-sm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
@media (max-width: 860px) { .lesson-aside .actions .btn:not(#mark-read) { display: none; } .lesson-aside .actions { margin-top: 0; } }
.tile-links.wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.footer-inner a { color: #fff; }
