:root {
  color-scheme: light;
  --ink: #172d32;
  --muted: #456069;
  --paper: #fffefa;
  --canvas: #f6f5ed;
  --line: #d5ded9;
  --accent: #185b52;
  --accent-strong: #0e483f;
  --tint: #e3efe8;
  --warm: #f8efdb;
  --warning: #8a3528;
  font: 1rem/1.55 Inter, "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
a { color: var(--accent-strong); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #286d9f; outline-offset: 3px; }
button, select, input, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
h1 { margin: .3rem 0 .7rem; font-size: clamp(1.65rem, 4.4vw, 2.9rem); letter-spacing: -.025em; }
h2 { font-size: 1.18rem; margin-bottom: .55rem; }
h3 { font-size: 1.06rem; }
p + p { margin-top: .7rem; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset: .5rem auto auto .5rem; z-index: 2; background: var(--paper); padding: .55rem; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner, main, .save-warning { max-width: 69rem; margin-inline: auto; padding-inline: clamp(.75rem, 4vw, 2rem); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .35rem 1rem; flex-wrap: wrap; min-height: 3.35rem; padding-block: .4rem; }
.header-inner nav { display: flex; flex-wrap: wrap; gap: .35rem 1.15rem; font-size: .9rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 800; text-decoration: none; }
main { padding-block: clamp(1rem, 4vw, 2rem) 3rem; }
.save-warning { padding-block: .7rem; background: var(--warm); }
.hero { display: grid; grid-template-columns: 1.65fr 1fr; align-items: end; gap: 1.5rem; margin-bottom: 1.75rem; }
.eyebrow { color: var(--accent-strong); font-weight: 750; font-size: .83rem; letter-spacing: .03em; }
.lead { color: var(--muted); max-width: 62ch; margin-bottom: .8rem; }
.panel, .progress-panel, .model { min-width: 0; padding: clamp(.8rem, 2.4vw, 1.25rem); border: 1px solid var(--line); border-radius: .8rem; background: var(--paper); }
.progress-panel { background: var(--tint); }
.meters { display: grid; gap: .35rem; }
.meters label { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: .55rem; font-size: .9rem; }
progress { width: 100%; height: .75rem; margin-bottom: .45rem; accent-color: var(--accent); }
.lesson-list, .progress-list { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .55rem; }
.lesson-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lesson-card, .progress-list li { min-width: 0; display: flex; align-items: start; gap: .75rem; padding: .8rem; border: 1px solid var(--line); border-radius: .65rem; background: var(--paper); }
.lesson-card p, .progress-list p { margin-top: .24rem; color: var(--muted); font-size: .9rem; }
.lesson-number { display: grid; place-items: center; flex: 0 0 1.8rem; height: 1.8rem; border-radius: .4rem; background: var(--tint); color: var(--accent-strong); font-weight: 750; }
.completion { display: inline-block; margin-top: .24rem; color: var(--accent-strong); font-size: .83rem; font-weight: 700; }
.completion + .completion::before { content: '·'; margin-inline: .1rem .3rem; }
.assessment-summary { margin-block: 0 1.15rem; }
.panel + .assessment-summary { margin-top: .8rem; }
.assessment-date { margin-top: .65rem; color: var(--muted); }
.progress-list li { justify-content: space-between; align-items: center; }
.progress-list h2 { margin-bottom: 0; font-size: 1rem; }
.actions { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; margin-top: .7rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.65rem;
  padding: .4rem .8rem; border: 1px solid var(--accent); border-radius: .45rem;
  font-weight: 700; font-size: .91rem; line-height: 1.3; text-align: center; text-decoration: none;
}
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-strong); }
.secondary { background: var(--paper); color: var(--accent-strong); }
.secondary:hover { background: var(--tint); }
.back { display: inline-block; margin-bottom: .55rem; font-size: .9rem; }
.lesson-grid { display: grid; gap: .7rem; max-width: 54rem; align-items: start; }
.lesson-grid.with-model { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: none; }
.work { grid-column: 1 / -1; }
.problem p, .practice p { max-width: 72ch; }
.text-button { border: 0; background: none; color: var(--accent-strong); padding: .45rem 0; text-decoration: underline; text-underline-offset: .18em; font-weight: 700; }
.note { border-left: 3px solid var(--accent); background: var(--tint); padding: .45rem .65rem; margin-top: .45rem; }
#sample h3 { margin-top: .6rem; }
#sample ul { margin: .3rem 0 0; padding-inline-start: 1.2rem; }
.solved { margin: 0 0 .8rem; padding: .5rem .5rem .5rem 1.6rem; background: var(--tint); border-radius: .45rem; }
.solved li + li { margin-top: .3rem; }
.work h2 { margin-top: .1rem; }
.practice { max-width: 54rem; }
.field { display: grid; gap: .25rem; margin-top: .65rem; width: min(100%, 35rem); font-weight: 650; }
.field small { color: var(--muted); font-weight: 400; }
.field :is(input, select, textarea) { width: 100%; min-width: 0; min-height: 2.6rem; border: 1px solid #849e97; border-radius: .4rem; background: white; color: var(--ink); padding: .35rem .55rem; }
.field textarea { resize: vertical; }
.field :is(input, select, textarea):disabled { opacity: 1; background: #edf2ee; color: var(--muted); }
.field [aria-invalid="true"] { border-color: var(--warning); outline-color: var(--warning); }
.answer-group { padding: 0; border: 0; min-width: 0; margin: 0; }
.feedback { margin-top: .45rem; color: var(--warning); font-weight: 650; }
.feedback:empty { margin-top: 0; }
.result { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.result h2 { color: var(--accent-strong); }
.transfer { margin-top: 1.3rem; }
.transfer ul { margin: .25rem 0 0; padding-left: 1.25rem; }
.transfer li + li { margin-top: .2rem; }
.model { margin: 0; background: #eef3f1; }
.model figcaption { font-size: 1.04rem; font-weight: 800; }
.model p, .range-labels, .model output { font-size: .87rem; }
.model output { display: block; min-height: 1.4em; margin-top: .45rem; color: var(--accent-strong); font-weight: 650; }
.ticks, .packs { display: grid; gap: .2rem; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ticks { gap: 0; }
.ticks.ten { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.packs { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: .45rem; }
:is(.ticks, .packs) button { min-width: 0; padding: .15rem; min-height: 2rem; border-radius: .35rem; border: 1px solid #9eb4ad; background: white; font-size: .85rem; font-weight: 700; }
:is(.ticks, .packs) button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
.pack-count, .dots { display: block; }
.dots { font-size: .72rem; letter-spacing: .05em; }
.axis, .intersection-tracks { position: relative; height: 1.6rem; margin: .25rem 0; }
.axis::before { content: ''; position: absolute; inset: .75rem 0 auto; height: 1px; background: #627b77; }
.axis i { position: absolute; top: .63rem; left: 21.4286%; width: 64.285714%; height: .25rem; background: var(--accent); }
.axis i::before, .axis i::after { content: ''; position: absolute; top: 50%; width: .6rem; height: .6rem; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--accent); background: #eef3f1; }
.axis i::after { left: 100%; background: var(--accent); }
.range-labels { display: flex; flex-wrap: wrap; gap: .05rem .7rem; }
.range-labels span::before { content: ""; display: inline-block; width: .65em; height: .65em; margin-right: .32em; border-radius: .18em; background: var(--accent); }
.range-labels span + span::before { background: #80531b; }
.intersection-tracks i { position: absolute; height: .3rem; border-radius: .4rem; }
.intersection-tracks i:first-child { top: .4rem; left: 25%; width: 70%; background: var(--accent); }
.intersection-tracks i:last-child { top: .95rem; left: 5%; width: 70%; background: #80531b; }
.embedded main { padding-bottom: 1.25rem; }

@media (max-width: 680px) {
  .hero, .lesson-grid.with-model { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: .75rem; }
  .lesson-list { grid-template-columns: minmax(0, 1fr); }
  .progress-list li { flex-wrap: wrap; }
}
