:root {
  --bg: #f4f7fa;
  --paper: #ffffff;
  --ink: #162033;
  --muted: #667085;
  --line: #d8e1ec;
  --blue: #205f9c;
  --blue-dark: #143b66;
  --blue-soft: #e8f2fb;
  --teal: #0f766e;
  --teal-soft: #e7f6f3;
  --amber: #9a620d;
  --amber-soft: #fff3df;
  --red: #a33d3d;
  --red-soft: #fff0f0;
  --green: #25764a;
  --green-soft: #edf8f2;
  --purple: #6450a8;
  --purple-soft: #f0ecff;
  --shadow: 0 14px 34px rgba(22, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(32, 95, 156, 0.10), rgba(15, 118, 110, 0.08), rgba(154, 98, 13, 0.08)) 0 0 / 100% 8px no-repeat,
    linear-gradient(180deg, #eaf2fb 0, var(--bg) 360px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.68;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.layout {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  gap: 28px;
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

aside {
  position: sticky;
  top: 22px;
  height: calc(100vh - 44px);
  align-self: start;
  overflow: auto;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

aside strong {
  display: block;
  margin-bottom: 12px;
  color: var(--blue-dark);
  font-size: 16px;
}

nav a {
  position: relative;
  display: block;
  padding: 8px 10px;
  color: #344054;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
}

nav a:hover {
  background: var(--blue-soft);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(32, 95, 156, 0.28);
  outline-offset: 3px;
}

main {
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar .links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: #344054;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(22, 32, 51, 0.05);
}

.button-link:hover {
  background: var(--blue-soft);
  text-decoration: none;
}

header {
  padding: 34px 38px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 28px;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(32, 95, 156, 0.08), rgba(255, 255, 255, 0) 46%),
    var(--paper);
}

.hero-copy {
  min-width: 0;
}

.study-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 3px 8px;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid #c7e8e2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-aside {
  display: grid;
  gap: 10px;
}

.hero-stat {
  padding: 14px 16px;
  background: #f7fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-stat span {
  display: block;
  color: var(--blue-dark);
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

.hero-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

h1 {
  margin: 0;
  color: #10233f;
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: 0;
}

.subtitle {
  max-width: 900px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.meta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  color: #344054;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.study-map {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.75fr) minmax(220px, 0.95fr);
  gap: 14px;
  margin-top: 18px;
}

.study-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(22, 32, 51, 0.05);
}

.study-card.primary {
  background:
    linear-gradient(135deg, rgba(32, 95, 156, 0.10), rgba(15, 118, 110, 0.08)),
    #ffffff;
  border-color: #c9dae9;
}

.study-card h2 {
  margin-bottom: 8px;
  padding-left: 0;
  border-left: 0;
  color: #10233f;
  font-size: 22px;
}

.study-card strong {
  display: block;
  color: #10233f;
  font-size: 22px;
  line-height: 1.25;
}

.study-card p:last-child {
  margin-bottom: 0;
}

.tag-list.compact {
  margin-bottom: 0;
}

.path-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.path-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  color: #1d2939;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(22, 32, 51, 0.04);
}

.path-card:hover {
  background: var(--blue-soft);
  text-decoration: none;
}

.path-card span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 900;
  font-size: 13px;
}

.path-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.35;
}

.source-strip {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: stretch;
  margin-top: 18px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(22, 32, 51, 0.05);
}

.source-strip strong {
  display: block;
  color: #10233f;
  font-size: 18px;
  line-height: 1.35;
}

.source-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

section {
  margin-top: 24px;
  padding: 30px 36px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(22, 32, 51, 0.05);
}

section,
.exercise-card,
.question-card {
  scroll-margin-top: 24px;
}

section.focus-section {
  border-color: #efd7a8;
  box-shadow: 0 12px 30px rgba(154, 98, 13, 0.08);
}

section.focus-section h2 {
  color: #6f4508;
  border-left-color: var(--amber);
}

section.check-section h2,
section.self-test-section h2 {
  border-left-color: var(--teal);
}

h2 {
  margin: 0 0 16px;
  padding-left: 12px;
  color: var(--blue-dark);
  border-left: 5px solid var(--blue);
  font-size: 25px;
  line-height: 1.28;
  letter-spacing: 0;
}

h3 {
  margin: 22px 0 10px;
  color: #1d2939;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
}

p {
  margin: 0 0 12px;
}

ul,
ol {
  margin: 8px 0 12px 1.35em;
  padding: 0;
}

li {
  margin: 6px 0;
}

code {
  padding: 2px 5px;
  background: #eef3f8;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.94em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  padding: 16px;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card h3 {
  margin-top: 0;
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}

.accent-blue {
  border-top: 5px solid var(--blue);
}

.accent-teal {
  border-top: 5px solid var(--teal);
}

.accent-amber {
  border-top: 5px solid var(--amber);
}

.accent-red {
  border-top: 5px solid var(--red);
}

.accent-green {
  border-top: 5px solid var(--green);
}

.accent-purple {
  border-top: 5px solid var(--purple);
}

table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  table-layout: fixed;
  overflow-wrap: anywhere;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

th,
td {
  padding: 12px 13px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--blue-dark);
  background: #f0f5fb;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.formula {
  margin: 14px 0;
  padding: 14px 16px;
  color: #10233f;
  background:
    linear-gradient(90deg, rgba(154, 98, 13, 0.12), rgba(255, 243, 223, 0.92)),
    var(--amber-soft);
  border: 1px solid #efd7a8;
  border-left: 5px solid var(--amber);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
  overflow-x: auto;
  overflow-wrap: anywhere;
}

.callout {
  margin: 16px 0;
  padding: 16px 18px;
  background: var(--blue-soft);
  border: 1px solid #cfe0f3;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
}

.callout strong {
  display: block;
  margin-bottom: 6px;
  color: var(--blue-dark);
}

.steps {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 14px 16px 14px 54px;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 14px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 26px;
  height: 26px;
  color: white;
  background: var(--teal);
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
}

.practice-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.practice-dashboard article {
  min-width: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e7d2aa;
  border-radius: 8px;
}

.practice-dashboard span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  color: #ffffff;
  background: var(--amber);
  border-radius: 8px;
  font-weight: 900;
  font-size: 13px;
}

.practice-dashboard strong {
  display: block;
  color: #533407;
  font-size: 17px;
}

.practice-dashboard p {
  margin: 6px 0 0;
  color: #4d5563;
  font-size: 14px;
  line-height: 1.55;
}

.topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.topic-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  color: #1c5661;
  background: #eef8f6;
  border: 1px solid #c7e8e2;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.topic-strip.compact {
  margin-top: 12px;
}

.topic-strip.compact span {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  color: #344054;
  background: #f2f5f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.25;
}

.source-gallery {
  margin-top: 18px;
}

.source-gallery summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  font-weight: 800;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

figure {
  margin: 0;
  padding: 10px;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-thumb {
  padding: 8px;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #eef2f6;
  border-radius: 6px;
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.quiz-card {
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.quiz-card summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  cursor: pointer;
  color: #1d2939;
  font-weight: 800;
  line-height: 1.45;
}

.quiz-card summary span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.quiz-card[open] summary {
  background: var(--teal-soft);
  border-bottom: 1px solid #c7e8e2;
}

.quiz-card p {
  margin: 0;
  padding: 14px 16px 16px 62px;
  color: #344054;
}

.exercise-bank {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.exercise-card {
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(255, 243, 223, 0.72), rgba(255, 255, 255, 0.98) 40%),
    #ffffff;
  border: 1px solid #efd7a8;
  border-left: 5px solid var(--amber);
  border-radius: 8px;
}

.exercise-card h3 {
  margin-top: 10px;
  color: #6f4508;
}

.problem-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.problem-meta span,
.problem-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.25;
}

.problem-meta span {
  color: #6f4508;
  background: var(--amber-soft);
  border: 1px solid #efd7a8;
  font-weight: 800;
}

.problem-meta a {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px solid #cfe0f3;
}

.problem-meta a:hover {
  background: #dcecf9;
  text-decoration: none;
}

.problem-body {
  margin-top: 12px;
}

.problem-body pre {
  margin: 12px 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.problem-body pre code {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.solution-toggle {
  margin-top: 14px;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.solution-toggle summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--blue-dark);
  font-weight: 800;
}

.solution-toggle[open] summary {
  background: var(--blue-soft);
  border-bottom: 1px solid #cfe0f3;
}

.solution-toggle p,
.solution-toggle ol,
.solution-toggle ul {
  padding-left: 14px;
  padding-right: 14px;
}

.solution-toggle p:first-of-type {
  margin-top: 12px;
}

.paper-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(32, 95, 156, 0.08), rgba(15, 118, 110, 0.08)),
    #fbfcff;
  border: 1px solid #cfe0f3;
  border-radius: 8px;
}

.paper-toolbar strong {
  display: block;
  color: var(--blue-dark);
  font-size: 18px;
}

.paper-toolbar p {
  margin: 4px 0 0;
  color: #4d5563;
  font-size: 14px;
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.paper-actions button,
.paper-tab {
  min-height: 38px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-weight: 800;
}

.paper-actions button {
  padding: 8px 12px;
  color: var(--blue-dark);
  background: #ffffff;
}

.paper-actions button:hover {
  background: var(--blue-soft);
}

.paper-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.paper-tab {
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 9px 10px;
  color: #344054;
  background: #ffffff;
  text-align: left;
}

.paper-tab strong {
  color: inherit;
  font-size: 14px;
  line-height: 1.2;
}

.paper-tab span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.paper-tab:hover,
.paper-tab.active {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.paper-tab:hover span,
.paper-tab.active span {
  color: rgba(255, 255, 255, 0.82);
}

.paper-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  color: #344054;
  font-size: 13px;
}

.paper-status strong,
.paper-status span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.paper-status strong {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: #cfe0f3;
}

.detailed-paper-bank {
  margin-top: 14px;
}

.detailed-paper {
  display: grid;
  gap: 14px;
}

.paper-header {
  padding: 18px;
  background: #ffffff;
  border: 1px solid #dce7f1;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
}

.paper-header h3 {
  margin: 0 0 6px;
  color: var(--blue-dark);
  font-size: 22px;
}

.paper-header p {
  margin: 0;
  color: var(--muted);
}

.question-list {
  display: grid;
  gap: 14px;
}

.question-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dce7f1;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(22, 32, 51, 0.04);
}

.question-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: #f7fafc;
  border-bottom: 1px solid #e5edf5;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.question-number,
.score-badge,
.topic-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 850;
}

.question-number {
  color: #ffffff;
  background: var(--blue);
}

.score-badge {
  color: #6f4508;
  background: var(--amber-soft);
  border: 1px solid #efd7a8;
}

.topic-badge {
  color: #1c5661;
  background: var(--teal-soft);
  border: 1px solid #c7e8e2;
}

.state-select {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.state-select select {
  min-height: 32px;
  padding: 5px 28px 5px 8px;
  color: #344054;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.prompt-text {
  margin: 0;
  padding: 16px;
  color: #1d2939;
  font-size: 15px;
  line-height: 1.72;
}

.structured-solution {
  margin: 0 16px 16px;
}

.solution-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.strategy-box,
.rubric-box {
  padding: 12px 14px;
  border-radius: 8px;
}

.strategy-box {
  color: #173d45;
  background: #eef8f6;
  border: 1px solid #c7e8e2;
}

.strategy-box strong,
.rubric-box strong {
  display: block;
  margin-bottom: 5px;
}

.strategy-box p {
  margin: 0;
}

.answer-steps {
  display: grid;
  gap: 9px;
}

.answer-step {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  background: #ffffff;
  border: 1px solid #e5edf5;
  border-radius: 8px;
}

.answer-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 7px;
  align-self: start;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.answer-step p {
  margin: 0;
  color: #344054;
  line-height: 1.62;
}

.rubric-box {
  color: #533407;
  background: var(--amber-soft);
  border: 1px solid #efd7a8;
}

.rubric-box ol,
.speed-answer-list {
  margin: 7px 0 0 1.25em;
}

.rubric-box li,
.speed-answer-list li {
  margin: 4px 0;
}

.speed-answer-list {
  padding: 0 16px 16px 40px;
}

.footer {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1060px) {
  .layout {
    grid-template-columns: 1fr;
  }

  aside {
    position: static;
    height: auto;
  }

  nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .hero-panel,
  .study-map,
  .source-strip {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .path-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.three,
  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .practice-dashboard {
    grid-template-columns: 1fr;
  }

  .paper-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }
}

@media (max-width: 720px) {
  .layout {
    width: min(100% - 24px, 1320px);
    padding-top: 18px;
  }

  .topbar {
    display: grid;
  }

  header,
  section {
    padding: 24px 18px;
  }

  h1 {
    font-size: 30px;
  }

  h2 {
    font-size: 22px;
  }

  .grid,
  .grid.three,
  .grid.four,
  .page-grid,
  .quiz-grid,
  .source-preview-grid,
  .path-strip,
  .hero-aside,
  .paper-tabs {
    grid-template-columns: 1fr;
  }

  .source-strip,
  .study-card,
  .hero-stat {
    padding: 14px;
  }

  .paper-toolbar,
  .question-header {
    display: grid;
    justify-content: stretch;
  }

  .paper-actions {
    justify-content: stretch;
  }

  .paper-actions button {
    width: 100%;
  }

  .answer-step {
    grid-template-columns: 1fr;
  }

  .state-select {
    justify-content: space-between;
    width: 100%;
  }

  .state-select select {
    min-width: 132px;
  }

  .quiz-card p {
    padding-left: 16px;
  }
}
