:root {
  --ink: #18201d;
  --muted: #66716c;
  --soft: #eef2ee;
  --line: #d9e0dc;
  --canvas: #f5f4ef;
  --panel: #fffef9;
  --accent: #176b54;
  --accent-dark: #0f4d3d;
  --accent-soft: #dff0e8;
  --sun: #f0b84b;
  --warn: #8a5a00;
  --danger: #a03b3b;
  --shadow: 0 18px 55px rgba(30, 45, 38, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 0%, rgba(240, 184, 75, .12), transparent 28rem),
    var(--canvas);
  color: var(--ink);
  font: 15px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

button, input, select, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
button:hover, .button:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 8px 20px rgba(23, 107, 84, .16);
}
button:focus-visible, .button:focus-visible, input:focus-visible,
textarea:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid rgba(240, 184, 75, .65);
  outline-offset: 2px;
}
button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
button.ghost, .button.ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
  font-weight: 650;
}
button.ghost:hover, .button.ghost:hover { background: var(--soft); color: var(--accent-dark); }
button.danger-ghost { color: var(--danger); }

input[type="text"], input[type="password"], select, textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(160, 59, 59, .12); }
textarea { min-height: 84px; resize: vertical; }

.container { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.page { padding-block: 44px 76px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 224, 220, .84);
  background: rgba(245, 244, 239, .9);
  backdrop-filter: blur(16px);
}
.nav {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}
.brand-mark {
  width: 26px;
  height: 28px;
  position: relative;
  display: inline-block;
  transform: rotate(7deg);
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
}
.brand-mark::before {
  inset: 2px 4px;
  border-left: 3px solid var(--accent);
  border-right: 3px solid var(--accent);
  border-radius: 2px;
}
.brand-mark::after {
  left: 6px;
  top: 7px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 6px 0 var(--accent), 0 12px 0 var(--accent);
}
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; }
h1 { font-size: clamp(2.25rem, 5vw, 4.6rem); margin-bottom: 20px; }
h2 { font-size: clamp(1.45rem, 3vw, 2.25rem); margin-bottom: 12px; }
h3 { font-size: 1.02rem; letter-spacing: -.015em; }
.eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.lede { max-width: 680px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.micro { font-size: 11px; }

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
.panel.flush { padding: 0; overflow: hidden; }
.section { margin-top: 54px; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-head h2, .section-head p { margin-bottom: 0; }

.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 42px; align-items: center; padding-block: 34px 26px; }
.hero-copy h1 span { color: var(--accent); }
.core-idea { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; max-width: 650px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.core-idea > span { color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.core-idea p { margin: -2px 0 0; color: var(--ink); font-size: 15px; font-weight: 650; line-height: 1.5; }
.pill, .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}
.pill.current { background: var(--accent-soft); border-color: #b9daca; color: var(--accent-dark); }
.ladder-card { position: relative; padding: 28px; box-shadow: var(--shadow); }
.ladder-card::after {
  content: "";
  position: absolute;
  right: -10px;
  top: -10px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sun);
  opacity: .72;
  z-index: -1;
}
.rung-list { display: grid; gap: 7px; margin: 18px 0 0; padding: 0; list-style: none; }
.rung-item { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; min-height: 28px; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 650; }
.rung-item:last-child { padding-bottom: 0; border-bottom: 0; }
.rung-number { color: var(--accent); font-weight: 900; font-variant-numeric: tabular-nums; }

.recommend-grid, .feature-grid, .metric-grid { display: grid; gap: 14px; }
.recommend-grid { grid-template-columns: repeat(3, 1fr); }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.metric-grid { grid-template-columns: repeat(4, 1fr); }
.recommend-card { display: flex; flex-direction: column; min-height: 210px; }
.recommend-card .button { width: 100%; margin-top: auto; }
.recommend-card h3 { margin: 10px 0 7px; }
.feature { padding: 20px 0; border-top: 2px solid var(--line); }
.feature-index { color: var(--accent); font-weight: 900; }

.setup-card { box-shadow: var(--shadow); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend, .field-label { margin-bottom: 9px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.required-text { color: var(--danger); font-size: 10px; letter-spacing: .08em; }
.field-help, .field-error { margin: 6px 0 0; font-size: 12px; }
.field-help { color: var(--muted); }
.field-error { color: var(--danger); font-weight: 750; }
.field { margin-bottom: 24px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { position: relative; display: block; }
.choice > input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body {
  display: block;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
}
.choice input:checked + .choice-body { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(23, 107, 84, .12); }
.choice input:focus-visible + .choice-body { outline: 3px solid rgba(240, 184, 75, .65); outline-offset: 2px; }
.choice-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-weight: 800; }
.choice-copy { color: var(--muted); font-size: 13px; }
.problem-instruction { margin: -2px 0 12px; color: var(--muted); font-size: 13px; }
.practice-overview { margin-bottom: 12px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.practice-overview-copy { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 11px; }
.practice-overview-copy strong { display: block; }
.practice-total { font-size: 12px; font-weight: 750; text-align: right; }
.practice-track, .unit-progress-track { display: block; overflow: hidden; border-radius: 99px; background: var(--soft); }
.practice-track { height: 9px; }
.practice-fill, .unit-progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.unit-list { display: grid; gap: 12px; }
.unit-block { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.unit-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; cursor: pointer; list-style: none; }
.unit-head::-webkit-details-marker { display: none; }
.unit-block[open] .unit-head { border-bottom: 1px solid var(--line); }
.unit-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.unit-head-meta { display: flex; align-items: center; gap: 12px; }
.unit-progress { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 750; white-space: nowrap; }
.unit-progress-track { width: 74px; height: 6px; }
.unit-toggle { display: inline-flex; min-width: 44px; min-height: 26px; align-items: center; justify-content: center; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf8; color: var(--accent-dark); font-size: 10px; font-weight: 850; letter-spacing: .04em; line-height: 1; text-transform: uppercase; }
.unit-toggle .when-open { display: none; }
.unit-block[open] .unit-toggle .when-closed { display: none; }
.unit-block[open] .unit-toggle .when-open { display: inline; }
.problem-list { background: #fff; }
.problem-columns, .problem-label { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; padding-inline: 16px; }
.problem-columns { min-height: 35px; border-bottom: 1px solid var(--line); background: #fafbf8; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.problem-columns span:nth-child(3) { text-align: right; }
button.problem-choice { position: relative; display: block; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: #fff; color: var(--ink); font-weight: 400; text-align: left; box-shadow: none; transform: none; }
.problem-choice + .problem-choice { border-top: 1px solid var(--line); }
.problem-label { min-height: 58px; padding-block: 12px; background: #fff; cursor: pointer; transition: background .15s ease; }
.problem-name { min-width: 0; }
.practice-status { width: 23px; height: 23px; display: grid; place-items: center; color: var(--muted); font-size: 20px; font-weight: 900; line-height: 1; }
/* Practiced is a hollow ring, solved is filled: finishing a rep and passing
   every check are different claims and should not look alike. */
.practice-status.is-practiced { border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 16px; }
.practice-status.is-solved { border: 1px solid var(--accent); border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; }
.status-legend { margin: 10px 0 0; }
.status-legend .practice-status { display: inline-grid; width: 16px; height: 16px; margin-right: 3px; font-size: 10px; vertical-align: -3px; }
.status-legend .practice-status.is-practiced { font-size: 12px; }
.legend-gap { display: inline-block; width: 10px; }
.picker-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.picker-toolbar .problem-instruction { margin: 0; }
.view-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.view-toggle a { padding: 5px 11px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 750; text-decoration: none; }
.view-toggle a:hover { color: var(--accent-dark); }
.view-toggle a[aria-current] { background: var(--accent); color: #fff; }
.solved-tag { border-color: #b9d8cb; background: var(--accent-soft); color: var(--accent-dark); }
.challenge-badge { display: inline-flex; width: fit-content; align-items: center; justify-content: center; padding: 3px 8px; border: 1px solid var(--line); border-radius: 99px; font-size: 10px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.challenge-warmup { border-color: #b9d8cb; background: #edf7f2; color: #1f5a42; }
.challenge-core { border-color: #e5d09b; background: #fff8e8; color: #795100; }
.challenge-stretch { border-color: #e3bdbd; background: #fff0f0; color: #8e3030; }
.difficulty-meter { display: inline-flex; gap: 2px; margin-right: 6px; }
.difficulty-meter span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .25; }
.difficulty-meter span.on { opacity: 1; }
.problem-action { color: var(--muted); font-size: 22px; line-height: 1; transition: transform .15s ease, color .15s ease; }
button.problem-choice:hover { background: #fff; color: var(--ink); box-shadow: none; transform: none; }
button.problem-choice:hover .problem-label { background: #f4faf7; }
button.problem-choice:hover .problem-name { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
button.problem-choice:hover .problem-action { color: var(--accent); transform: translateX(2px); }
button.problem-choice:focus-visible { outline: 0; }
button.problem-choice:focus-visible .problem-label { outline: 3px solid var(--sun); outline-offset: -3px; }
button.problem-choice:disabled { opacity: 1; background: #fff; color: var(--ink); box-shadow: none; transform: none; }
button.problem-choice:disabled:hover .problem-label { background: #fff; }
button.problem-choice:disabled:hover .problem-name { color: inherit; text-decoration: none; }
button.problem-choice:disabled .problem-action { visibility: hidden; }
.unit-block.locked { opacity: .62; }
.unit-block.locked .problem-label { cursor: not-allowed; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.start-guidance { color: var(--accent-dark); font-size: 12px; font-weight: 800; white-space: nowrap; }

.status-strip {
  position: sticky;
  top: 82px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 254, 249, .94);
  box-shadow: 0 8px 30px rgba(30, 45, 38, .07);
  backdrop-filter: blur(14px);
}
#clock { min-width: 60px; font-size: 17px; font-weight: 850; font-variant-numeric: tabular-nums; }
#clock.low { color: var(--warn); }
#clock.out { color: var(--danger); }
.phases { display: flex; gap: 6px; flex-wrap: wrap; }
.phase {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.phase.now { border-color: var(--accent); background: var(--accent); color: #fff; }
.phase.done { border-color: #afd2c3; color: var(--accent); }
.status-spacer { flex: 1; }
.workspace-grid { display: grid; grid-template-columns: minmax(270px, .72fr) minmax(0, 1.55fr); gap: 18px; align-items: start; }
.brief { position: sticky; top: 154px; }
.brief-title { margin: 6px 0 12px; font-size: 1.35rem; }
.contract { display: grid; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.contract-row { display: grid; grid-template-columns: 22px 1fr; gap: 9px; color: var(--muted); font-size: 13px; }
.contract-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); text-align: center; font-size: 11px; font-weight: 900; line-height: 18px; }
.work-column { min-width: 0; display: grid; gap: 16px; }
.editor-locked { display: flex; gap: 12px; align-items: flex-start; border-style: dashed; color: var(--muted); }
.lock-icon { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--soft); font-weight: 900; }
.editor-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.editor-head strong { margin-right: auto; }
.code-editor {
  min-height: 280px;
  border-radius: 12px;
  background: #17201d;
  color: #e7f2ec;
  border-color: #17201d;
  font: 13px/1.65 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  tab-size: 4;
}
.output {
  margin-top: 10px;
  padding: 12px;
  min-height: 46px;
  max-height: 180px;
  overflow: auto;
  border-radius: 10px;
  background: #101714;
  color: #d7e8df;
  white-space: pre-wrap;
  font: 12px/1.55 "SFMono-Regular", Consolas, monospace;
}
.output.error { color: #ffb4b4; }
.runner-status { min-height: 20px; color: var(--muted); font-size: 12px; }
.check-output { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; white-space: pre-wrap; }
.check-output.pass { border-color: #b9d8cb; background: #edf7f2; color: #1f5a42; }
.check-output.error { border-color: #e8d3ae; background: #fbf2e6; color: var(--warn); }
.failed-checks { margin: 12px 0 0; padding-left: 18px; }
.failed-checks li { margin: 7px 0; }
.checks-panel code { padding: 1px 5px; border-radius: 5px; background: var(--soft); font: 12.5px/1.5 "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.chat-panel { padding: 18px; }
#log { display: flex; flex-direction: column; gap: 11px; min-height: 80px; max-height: 520px; overflow-y: auto; padding: 4px 2px 14px; scroll-behavior: smooth; }
.msg { max-width: 88%; padding: 12px 14px; border-radius: 14px; }
.msg.you { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--accent-soft); }
.msg.proctor { align-self: flex-start; border: 1px solid var(--line); border-bottom-left-radius: 4px; background: #fff; }
.msg .who { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.msg .body { white-space: pre-wrap; }
.note { padding: 4px; color: var(--muted); font-size: 12px; text-align: center; }
.note.err { color: var(--danger); }
.composer { display: flex; gap: 10px; align-items: end; padding-top: 12px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-height: 74px; }
.composer-help { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.page-title { margin-bottom: 34px; }
.page-title h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); margin-bottom: 10px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.summary-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.summary-card .value { display: block; margin-top: 4px; font-size: 1.45rem; font-weight: 850; letter-spacing: -.03em; }
.feedback-hero { border-color: #b9daca; background: linear-gradient(135deg, #f8fff9, var(--accent-soft)); }
.feedback-hero blockquote { margin: 10px 0 0; font-size: 1.15rem; font-weight: 650; line-height: 1.55; }
.score-list { display: grid; gap: 1px; background: var(--line); }
.score-row { display: grid; grid-template-columns: 190px 150px 150px 1fr; gap: 14px; align-items: start; padding: 17px 20px; background: var(--panel); }
.score-name { font-weight: 800; }
.verdict { display: inline-flex; width: fit-content; padding: 3px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: 11px; font-weight: 800; }
.v3 { background: #eaf3ef; border-color: #b9d8cb; color: #1f5a42; }
.v2 { background: #f0f4ea; border-color: #cfe0bc; color: #47632c; }
.v1 { background: #fbf2e6; border-color: #e8d3ae; color: var(--warn); }
.v0 { background: #fbecec; border-color: #e8bcbc; color: var(--danger); }
.vnone { color: var(--muted); }
.score-note { color: var(--muted); font-size: 13px; }
.calibration { margin-top: 7px; color: var(--warn); font-size: 12px; }
.rubric-form { display: grid; gap: 18px; }
.rubric-dimension { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rubric-dimension:last-of-type { border-bottom: 0; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span { display: block; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 12px; }
.radio-pill input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; }

.profile-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.profile-hero h1 { margin-bottom: 6px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.bar-track { width: 150px; height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.roadmap { display: grid; gap: 10px; }
.roadmap-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 13px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.roadmap-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-weight: 900; }

.metric { padding: 19px; }
.metric-value { display: block; font-size: 2rem; font-weight: 900; letter-spacing: -.04em; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.instructor-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; align-items: start; }
.inline-form { display: inline; }
.empty { padding: 34px; color: var(--muted); text-align: center; }
.error-banner { margin-bottom: 16px; padding: 11px 13px; border: 1px solid #e8bcbc; border-radius: 10px; background: #fbecec; color: var(--danger); }

@media (max-width: 860px) {
  .hero, .workspace-grid, .instructor-grid { grid-template-columns: 1fr; }
  .brief { position: static; }
  .recommend-grid, .feature-grid { grid-template-columns: 1fr; }
  .metric-grid, .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .score-row { grid-template-columns: 1fr 1fr; }
  .score-note { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .container { width: min(100% - 24px, 1120px); }
  .page { padding-block: 28px 54px; }
  .nav { min-height: 58px; }
  .nav-links { gap: 11px; }
  .nav-links a { font-size: 12px; }
  .hero { padding-top: 12px; gap: 24px; }
  .core-idea { grid-template-columns: 1fr; gap: 5px; }
  .mode-grid, .metric-grid, .summary-grid { grid-template-columns: 1fr; }
  .practice-overview-copy { align-items: stretch; flex-direction: column; gap: 6px; }
  .practice-total { text-align: left; }
  .unit-head { align-items: flex-start; }
  .unit-title { align-items: flex-start; flex-wrap: wrap; }
  .unit-head-meta { align-items: center; gap: 8px; }
  .unit-progress { gap: 6px; }
  .unit-progress-track { display: none; }
  .problem-columns, .problem-label { grid-template-columns: 26px minmax(0, 1fr) auto 14px; gap: 8px; padding-inline: 12px; }
  .status-strip { top: 68px; gap: 9px; }
  .phases { order: 3; width: 100%; }
  .status-spacer { display: none; }
  .status-strip .ghost { margin-left: auto; min-height: 36px; padding: 6px 10px; }
  .composer { align-items: stretch; flex-direction: column; }
  .composer button { width: 100%; }
  .msg { max-width: 94%; }
  .score-row { grid-template-columns: 1fr; }
  .profile-hero, .section-head, .form-actions { align-items: stretch; flex-direction: column; }
  .bar-track { width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
