:root {
  color-scheme: light;
  --forest-950: #08251d;
  --forest-900: #0d3026;
  --forest-800: #164538;
  --forest-700: #27604f;
  --paper: #f3ead8;
  --paper-deep: #e9dcc5;
  --ink: #183028;
  --muted: #6c766f;
  --orange: #e57135;
  --orange-soft: #f1a06f;
  --line-dark: rgba(231, 223, 197, 0.18);
  --line-paper: rgba(24, 48, 40, 0.2);
  --display: "Songti SC", "STSong", "SimSun", serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--forest-950);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: #f7f0df;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--forest-950);
  font: 16px/1.7 var(--sans);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--forest-950);
  background: var(--paper);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.brand-bar {
  position: relative;
  z-index: 5;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 76px);
  border-bottom: 1px solid var(--line-dark);
  background: rgba(8, 37, 29, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--orange);
  color: var(--orange-soft);
  font: 700 21px/1 var(--display);
  transform: rotate(-4deg);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 5px;
  color: #a5b6ad;
  font-size: 9px;
  letter-spacing: 0.22em;
}

.system-status {
  color: #a5b6ad;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.system-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #79b48d;
  box-shadow: 0 0 0 5px rgba(121, 180, 141, 0.09);
}

#app {
  min-height: calc(100vh - 82px);
}

.loading,
noscript {
  display: block;
  max-width: 720px;
  margin: 12vh auto;
  padding: 24px;
  text-align: center;
}

.ai-hub,
.module-page {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0 96px;
}

.ai-hub .section-heading {
  max-width: 760px;
}

.section-lede {
  max-width: 680px;
  margin: 16px 0 0;
  color: #a5b6ad;
}

.module-grid,
.module-content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.module-card,
.module-content-card {
  display: block;
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line-dark);
  background: rgba(22, 69, 56, 0.42);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.module-card:hover,
.module-card:focus-visible {
  border-color: var(--orange);
  background: rgba(39, 96, 79, 0.7);
  transform: translateY(-2px);
}

.module-kicker,
.module-content-card .eyebrow {
  color: var(--orange-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.module-card h3,
.module-content-card h2 {
  margin: 24px 0 8px;
  color: #f7f0df;
  font: 500 25px/1.2 var(--display);
}

.module-card p,
.module-content-card p {
  margin: 0;
  color: #adbbb4;
}

.module-action,
.card-source {
  display: block;
  margin-top: 22px;
  color: var(--orange-soft);
  font-size: 13px;
}

.module-hero {
  max-width: 720px;
  padding: 56px 0 24px;
  border-bottom: 1px solid var(--line-dark);
}

.module-hero h1 {
  margin: 14px 0;
  color: #f7f0df;
  font: 500 clamp(44px, 7vw, 86px)/1 var(--display);
  letter-spacing: -0.05em;
}

.module-hero p:last-child {
  max-width: 640px;
  margin: 0;
  color: #adbbb4;
  font-size: 18px;
}

.module-content-card {
  min-height: 220px;
}

.module-content-card[data-card-status="gated"] {
  border-color: rgba(229, 113, 53, 0.6);
}

.module-content-card.is-empty {
  grid-column: 1 / -1;
}

.module-next-step {
  max-width: 560px;
  margin-top: 40px;
  padding: 26px;
  border-top: 2px solid var(--orange);
  background: rgba(8, 37, 29, 0.6);
}

.module-next-step h2 {
  margin: 8px 0 18px;
  color: #f7f0df;
  font: 500 28px/1.2 var(--display);
}

.mission-hero {
  display: grid;
  min-height: 560px;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.65fr);
  gap: clamp(40px, 8vw, 140px);
  align-items: end;
  padding: clamp(80px, 12vw, 160px) clamp(20px, 7vw, 112px) clamp(70px, 9vw, 124px);
}

.kicker,
.eyebrow,
.section-heading p,
.rail-label,
.paper-meta,
.mission-panel > p,
.load-error > p:first-child {
  margin: 0;
  color: var(--orange-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.mission-hero h1 {
  max-width: 850px;
  margin: 20px 0 28px;
  font: 500 clamp(44px, 5.4vw, 84px)/1.07 var(--display);
  letter-spacing: -0.055em;
}

.mission-hero h1 em {
  color: var(--orange-soft);
  font-style: normal;
}

.hero-intro {
  max-width: 700px;
  margin: 0;
  color: #adbbb4;
  font-size: clamp(16px, 1.4vw, 20px);
}

.mission-panel {
  padding: 26px 0 0;
  border-top: 2px solid var(--orange);
}

.mission-panel strong {
  display: block;
  margin: 11px 0 32px;
  font: 500 26px/1.35 var(--display);
}

.mission-panel dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.mission-panel dl div {
  padding: 16px 8px;
  border-right: 1px solid var(--line-dark);
}

.mission-panel dl div:last-child {
  border: 0;
}

.mission-panel dt {
  color: #7f958a;
  font-size: 11px;
}

.mission-panel dd {
  margin: 2px 0 0;
  font: 500 20px/1.2 var(--display);
}

.route-notice {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto 24px;
  padding: 12px 18px;
  border-left: 3px solid var(--orange);
  color: #f5d6c3;
  background: rgba(229, 113, 53, 0.1);
}

.storage-warning {
  width: min(1160px, calc(100% - 40px));
  margin: 20px auto 0;
  padding: 12px 18px;
  border: 1px solid rgba(241, 160, 111, 0.55);
  color: #f5d6c3;
  background: rgba(229, 113, 53, 0.12);
  font-size: 14px;
}

.storage-warning[hidden] {
  display: none;
}

.learning-progress {
  display: flex;
  width: min(1160px, calc(100% - 40px));
  gap: 16px;
  align-items: center;
  margin: 0 auto 34px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-dark);
}

.learning-progress p,
.learning-progress strong {
  margin: 0;
}

.learning-progress p {
  color: #a5b6ad;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.learning-progress strong {
  font: 500 22px/1.2 var(--display);
}

.learning-progress a,
.progress-clear,
.completion-card button {
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid var(--orange);
  color: var(--paper);
  background: var(--orange);
  font: 700 13px/1.2 var(--sans);
  text-decoration: none;
}

.learning-progress a { margin-left: auto; }

.progress-clear {
  border-color: rgba(241, 234, 216, 0.42);
  color: #cad4ce;
  background: transparent;
  cursor: pointer;
}

.route-board {
  padding: clamp(70px, 10vw, 130px) clamp(20px, 7vw, 112px);
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 8%, rgba(229, 113, 53, 0.11), transparent 24%),
    var(--paper);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 56px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-paper);
}

.section-heading p {
  color: var(--orange);
}

.section-heading h2 {
  margin: 0;
  font: 500 clamp(32px, 4vw, 55px)/1 var(--display);
}

.route-line {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
}

.route-line::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 43px;
  width: 1px;
  background: var(--line-paper);
  content: "";
}

.route-stop {
  position: relative;
  display: grid;
  min-height: 164px;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-paper);
}

.stop-index {
  position: relative;
  z-index: 1;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-size: 13px;
  font-weight: 700;
}

.route-stop:last-child .stop-index {
  color: var(--paper);
  border-color: var(--orange);
  background: var(--orange);
}

.stop-copy h2 {
  margin: 4px 0 5px;
  font: 500 clamp(26px, 3vw, 39px)/1.2 var(--display);
}

.stop-copy .stop-goal {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.stop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 12px 0 0;
  font-size: 12px;
}

.stop-meta div { display: flex; gap: 7px; }
.stop-meta dt { color: var(--orange); }
.stop-meta dd { margin: 0; color: var(--muted); }

.eyebrow {
  color: var(--orange);
  font-size: 10px;
}

.route-link,
.back-link,
.reader-navigation a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.route-link {
  gap: 15px;
  padding: 0 0 0 18px;
  border-left: 1px solid var(--line-paper);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.route-link span {
  color: var(--orange);
  font-size: 20px;
  transition: transform 180ms ease;
}

.route-link:hover span,
.route-link:focus-visible span {
  transform: translate(4px, -4px);
}

.reader-shell {
  display: grid;
  min-height: calc(100vh - 82px);
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.75fr);
}

.reader-rail {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100vh - 82px);
  padding: clamp(38px, 6vw, 84px) clamp(24px, 4.5vw, 72px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 45%),
    var(--forest-900);
}

.back-link {
  gap: 10px;
  margin-bottom: clamp(70px, 10vw, 150px);
  color: #b7c3bd;
  font-size: 13px;
  text-decoration: none;
}

.reader-rail h2 {
  max-width: 380px;
  margin: 14px 0 32px;
  font: 500 clamp(30px, 3.5vw, 50px)/1.15 var(--display);
}

.progress-track {
  height: 3px;
  margin: 28px 0;
  background: rgba(255, 255, 255, 0.12);
}

.progress-track span {
  display: block;
  width: var(--progress);
  height: 100%;
  background: var(--orange);
}

.rail-note {
  max-width: 350px;
  color: #9eafa6;
  font-size: 14px;
}

.paper-reader {
  min-width: 0;
  padding: clamp(34px, 7vw, 108px) clamp(22px, 8vw, 128px);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(24, 48, 40, 0.025) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--paper);
  box-shadow: inset 14px 0 30px rgba(2, 21, 15, 0.17);
}

.paper-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: clamp(55px, 8vw, 110px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-paper);
  color: var(--muted);
}

.markdown-body {
  max-width: 820px;
  margin: 0 auto;
  font: 18px/1.92 var(--sans);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.markdown-body h1 {
  margin: 0 0 70px;
  font-size: clamp(42px, 5.5vw, 70px);
  line-height: 1.12;
}

.markdown-body h2 {
  position: relative;
  margin: 80px 0 24px;
  padding: 14px 0 14px 22px;
  border-left: 3px solid var(--orange);
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.22;
}

.markdown-body h3 {
  margin-top: 50px;
  font-size: 24px;
}

.markdown-body p {
  margin: 0 0 24px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 20px 0 32px;
  padding-left: 1.4em;
}

.markdown-body li {
  margin: 8px 0;
  padding-left: 0.35em;
  overflow-wrap: anywhere;
}

.markdown-body li::marker {
  color: var(--orange);
  font-weight: 700;
}

.markdown-body code {
  padding: 0.12em 0.38em;
  color: #8d3d19;
  border: 1px solid rgba(141, 61, 25, 0.18);
  background: rgba(229, 113, 53, 0.08);
  font: 0.86em/1.4 "SFMono-Regular", Consolas, monospace;
  overflow-wrap: anywhere;
}

.markdown-body pre {
  max-width: 100%;
  margin: 30px 0;
  padding: 24px;
  overflow-x: auto;
  color: #e9efeb;
  background: var(--forest-900);
  box-shadow: 8px 8px 0 var(--paper-deep);
}

.markdown-body pre code {
  padding: 0;
  color: inherit;
  border: 0;
  background: none;
  white-space: pre;
  overflow-wrap: normal;
}

.markdown-body table {
  display: table;
  width: 100%;
  margin: 32px 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.markdown-body th,
.markdown-body td {
  padding: 13px 12px;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line-paper);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  color: var(--paper);
  background: var(--forest-800);
}

.reader-navigation {
  display: grid;
  max-width: 820px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 100px auto 0;
  background: var(--line-paper);
  border: 1px solid var(--line-paper);
}

.completion-card {
  max-width: 820px;
  margin: 64px auto 0;
  padding: 28px;
  border: 1px solid var(--line-paper);
  background: rgba(229, 113, 53, 0.06);
}

.completion-card > p:first-child {
  margin: 0;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.completion-card h2 { margin: 7px 0 20px; }

.completion-checklist { display: grid; gap: 12px; }

.completion-checklist label {
  display: flex;
  min-height: 44px;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.completion-checklist input { accent-color: var(--orange); }

.completion-lock,
.completion-hint,
.completion-feedback { margin: 20px 0; font-size: 14px; }

.completion-lock { color: #9a491f; }
.completion-hint { color: var(--muted); }

.completion-card button { cursor: pointer; }
.completion-card button:disabled { cursor: not-allowed; opacity: 0.48; }

.completion-feedback { min-height: 1.7em; color: var(--forest-800); font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .completion-feedback.is-visible { animation: completion-flash 480ms ease both; }

  @keyframes completion-flash {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
  }
}

.reader-navigation a {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 22px;
  background: var(--paper);
  text-decoration: none;
}

.reader-navigation a:last-child {
  align-items: flex-end;
  text-align: right;
}

.reader-navigation small {
  color: var(--muted);
}

.reader-navigation strong {
  max-width: 100%;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font: 600 17px/1.35 var(--display);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(24px, 1fr) auto minmax(24px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 22px clamp(20px, 7vw, 112px);
  color: rgba(241, 234, 216, 0.46);
  background: var(--forest-950);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer span {
  height: 1px;
  background: var(--line-dark);
}

.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--orange-soft);
}

.load-error {
  max-width: 760px;
  margin: 0 auto;
  padding: 18vh 24px;
}

.load-error h1 {
  font: 500 clamp(38px, 6vw, 72px)/1.1 var(--display);
}

.model-lab {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(62px, 9vw, 124px) 0 76px;
}

.lab-intro {
  max-width: 760px;
  margin-bottom: 56px;
}

.lab-intro > p:first-child,
.lab-rubric > div > p,
.lab-conclusion > p:first-child {
  margin: 0;
  color: var(--orange-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.lab-intro h1 {
  margin: 14px 0 20px;
  font: 500 clamp(46px, 6vw, 76px)/1.05 var(--display);
  letter-spacing: -0.05em;
}

.lab-intro > p:not(:first-child) {
  color: #bdcac3;
  font-size: 18px;
}

.lab-intro .lab-disclaimer {
  margin-top: 20px;
  color: var(--orange-soft);
  font-size: 13px;
}

.lab-rubric,
.lab-conclusion {
  padding: 28px;
  border: 1px solid var(--line-dark);
  background: rgba(243, 234, 216, 0.05);
}

.lab-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--line-dark);
  background: rgba(243, 234, 216, 0.05);
}

.lab-context > div,
.lab-context > label:last-of-type,
.lab-context > p { grid-column: 1 / -1; }
.lab-context h2 { margin: 5px 0 8px; font: 500 30px/1.2 var(--display); }
.lab-context p { margin: 0; color: #aebdb5; font-size: 13px; }
.lab-context label { display: grid; gap: 8px; color: #cad4ce; font-size: 13px; }
.lab-context input,
.lab-context textarea {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(241, 234, 216, 0.34);
  color: var(--paper);
  background: var(--forest-900);
  font: inherit;
}
.lab-context textarea { min-height: 88px; resize: vertical; }

.lab-rubric h2,
.lab-conclusion h2 {
  margin: 5px 0 0;
  font: 500 clamp(28px, 3.5vw, 43px)/1.18 var(--display);
}

.lab-weight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 28px 0 16px;
}

.lab-weight-control,
.lab-score-control {
  display: grid;
  gap: 7px;
  color: #cad4ce;
  font-size: 13px;
}

.lab-weight-control {
  grid-template-columns: minmax(0, 1fr) 64px auto;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-dark);
}

.lab-weight-control input {
  width: 64px;
  min-height: 44px;
  padding: 7px;
  color: var(--paper);
  border: 1px solid rgba(241, 234, 216, 0.34);
  background: var(--forest-900);
  font: inherit;
}

.lab-weight-control small { color: #97aaa0; }

.lab-rule,
.lab-evidence,
.lab-previous,
.lab-feedback {
  color: #aebdb5;
  font-size: 13px;
}

.lab-veto-rule {
  display: flex;
  gap: 18px;
  align-items: baseline;
  margin: 18px 0 30px;
  padding: 16px 18px;
  border-left: 3px solid var(--orange);
  color: #e0d7c7;
  background: rgba(229, 113, 53, 0.1);
}

.lab-veto-rule strong { color: var(--orange-soft); }

.lab-candidates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lab-candidate {
  min-width: 0;
  padding: 22px;
  border-top: 2px solid var(--orange);
  color: var(--ink);
  background: var(--paper);
}

.lab-candidate header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.lab-candidate header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.lab-candidate h3 {
  margin: 4px 0 0;
  font: 500 28px/1.1 var(--display);
  overflow-wrap: anywhere;
}

.lab-candidate header > span { color: var(--muted); font-size: 12px; }

.lab-score-grid { display: grid; gap: 13px; }

.lab-score-control {
  grid-template-columns: 88px minmax(0, 1fr) 40px;
  align-items: center;
  color: var(--ink);
}

.lab-score-control input {
  width: 100%;
  min-height: 44px;
  accent-color: var(--orange);
}

.lab-score-control output {
  color: #8d3d19;
  font-size: 12px;
  text-align: right;
}

.lab-veto {
  margin: 22px 0 10px;
  color: #a14222;
  font-size: 13px;
  font-weight: 700;
}

.lab-veto.is-clear { color: var(--forest-700); }
.lab-veto-grid {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}
.lab-veto-grid legend { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.lab-veto-control { display: flex; min-height: 44px; align-items: center; gap: 8px; font-size: 12px; }
.lab-veto-control input { width: 20px; height: 20px; accent-color: var(--orange); }
.lab-evidence { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.lab-evidence code { color: #8d3d19; }
.lab-missing-evidence { color: #a14222; font-weight: 700; }

.lab-conclusion { margin-top: 34px; }
.lab-conclusion > p { margin: 0; }
.lab-conclusion > p:not(:first-child) { color: #d3dfd8; }
.lab-conclusion ol,
.lab-conclusion ul { margin: 22px 0 0; padding-left: 1.25em; }
.lab-conclusion li { margin: 8px 0; color: #cbd8d1; }
.lab-conclusion.is-blocked { border-color: rgba(229, 113, 53, 0.65); }

.lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.lab-actions button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--orange);
  color: var(--paper);
  background: var(--orange);
  font: 700 13px/1.2 var(--sans);
  cursor: pointer;
}

.lab-actions button:disabled { cursor: not-allowed; opacity: 0.46; }
.lab-actions .lab-secondary { color: #cbd8d1; border-color: rgba(241, 234, 216, 0.42); background: transparent; }
.lab-feedback { min-height: 1.7em; margin: 14px 0 0; }
.lab-previous { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .mission-panel,
  .route-stop,
  .paper-reader {
    animation: rise-in 560ms both;
  }

  .mission-panel { animation-delay: 100ms; }
  .route-stop:nth-child(2) { animation-delay: 60ms; }
  .route-stop:nth-child(3) { animation-delay: 120ms; }
  .route-stop:nth-child(4) { animation-delay: 180ms; }
  .route-stop:nth-child(5) { animation-delay: 240ms; }
  .route-stop:nth-child(6) { animation-delay: 300ms; }

  @keyframes rise-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
  }

  .brand-bar {
    min-height: 72px;
    padding: 12px 18px;
  }

  .system-status {
    max-width: 92px;
    text-align: right;
    line-height: 1.35;
  }

  .mission-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 60px;
    padding: 76px 20px 66px;
  }

  .mission-hero h1 {
    font-size: clamp(38px, 10.5vw, 48px);
  }

  .section-heading {
    display: block;
  }

  .learning-progress {
    flex-wrap: wrap;
    margin-bottom: 22px;
  }

  .learning-progress a { margin-left: 0; }

  .section-heading h2 {
    margin-top: 10px;
  }

  .ai-hub,
  .module-page {
    width: min(100% - 40px, 620px);
    padding: 54px 0 72px;
  }

  .module-grid,
  .module-content-grid {
    grid-template-columns: 1fr;
  }

  .module-card,
  .module-content-card {
    min-height: auto;
    padding: 22px;
  }

  .module-hero {
    padding-top: 26px;
  }

  .module-hero h1 {
    font-size: 52px;
  }

  .route-line::before {
    left: 24px;
  }

  .route-stop {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 14px;
    padding: 28px 0;
  }

  .stop-index {
    width: 48px;
    height: 48px;
  }

  .route-link {
    grid-column: 2;
    justify-content: space-between;
    padding: 0;
    border: 0;
  }

  .reader-shell {
    grid-template-columns: 1fr;
  }

  .reader-rail {
    position: relative;
    min-height: auto;
    padding: 28px 20px 42px;
  }

  .back-link {
    margin-bottom: 55px;
  }

  .paper-reader {
    padding: 30px 20px 60px;
    box-shadow: inset 0 10px 24px rgba(2, 21, 15, 0.14);
  }

  .paper-meta {
    margin-bottom: 55px;
  }

  .markdown-body {
    font-size: 16px;
    line-height: 1.85;
  }

  .markdown-body h1 {
    margin-bottom: 54px;
    padding-right: 2px;
    font-size: 38px;
    letter-spacing: 0;
  }

  .markdown-body h2 {
    margin-top: 62px;
    font-size: 29px;
  }

  .markdown-body pre {
    padding: 18px;
  }

  .markdown-body table {
    font-size: 12px;
  }

  .markdown-body th,
  .markdown-body td {
    padding: 9px 6px;
  }

  .reader-navigation {
    grid-template-columns: 1fr;
    margin-top: 72px;
  }

  .reader-navigation a:last-child {
    align-items: flex-start;
    text-align: left;
  }

  .model-lab {
    width: min(100% - 40px, 620px);
    padding-top: 58px;
  }

  .lab-intro { margin-bottom: 38px; }
  .lab-intro h1 { font-size: 48px; }
  .lab-context { grid-template-columns: 1fr; padding: 20px; }
  .lab-context > label { grid-column: 1; }
  .lab-rubric,
  .lab-conclusion { padding: 20px; }
  .lab-veto-rule { display: block; }
  .lab-veto-rule span { display: block; margin-top: 6px; }
  .lab-candidates { grid-template-columns: 1fr; }
}
