@font-face {
  font-family: "Guide Sans";
  src: url("fonts/noto-sans-sc-guide.woff2?v=20260728-structures-1") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f6f0;
  --surface: #ffffff;
  --surface-raised: #fbfcf8;
  --surface-muted: #edf2ea;
  --text: #1f2a24;
  --muted: #607064;
  --line: #cfd8cc;
  --green: #27794c;
  --green-soft: #e2efe5;
  --blue: #226d9a;
  --blue-soft: #e0eff6;
  --teal: #167b78;
  --teal-soft: #dff1ef;
  --amber: #a8521f;
  --amber-soft: #faece2;
  --red: #ae3227;
  --red-soft: #f8e7e4;
  --violet: #76569a;
  --violet-soft: #eee8f4;
  --shadow: 0 14px 32px rgba(31, 42, 36, 0.08);
  --radius: 8px;
  font-family: "Guide Sans", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121714;
  --surface: #1b231e;
  --surface-raised: #202a24;
  --surface-muted: #273329;
  --text: #eef4ed;
  --muted: #b8c5ba;
  --line: #3c4a40;
  --green: #65c98a;
  --green-soft: #1e3c2a;
  --blue: #70bce2;
  --blue-soft: #1b3642;
  --teal: #63c9c2;
  --teal-soft: #173b3a;
  --amber: #e2a85c;
  --amber-soft: #452f1f;
  --red: #ff9389;
  --red-soft: #422624;
  --violet: #c5a8e0;
  --violet-soft: #352a3f;
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-padding-top: 88px;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent);
  outline-offset: 2px;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--text);
  color: var(--surface);
  transform: translateY(-150%);
}

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

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.icon-search { --icon: url("icons/search.svg"); }
.icon-sun { --icon: url("icons/sun.svg"); }
.icon-moon { --icon: url("icons/moon.svg"); }
.icon-download { --icon: url("icons/download.svg"); }
.icon-map { --icon: url("icons/map.svg"); }
.icon-book-open { --icon: url("icons/book-open.svg"); }
.icon-heart { --icon: url("icons/heart.svg"); }
.icon-book-a { --icon: url("icons/book-a.svg"); }
.icon-wrench { --icon: url("icons/wrench.svg"); }
.icon-link { --icon: url("icons/link.svg"); }
.icon-x { --icon: url("icons/x.svg"); }
.icon-check { --icon: url("icons/check.svg"); }
.icon-bookmark { --icon: url("icons/bookmark.svg"); }
.icon-arrow-left { --icon: url("icons/arrow-left.svg"); }
.icon-refresh-cw { --icon: url("icons/refresh-cw.svg"); }
.icon-target { --icon: url("icons/target.svg"); }
.icon-clipboard-check { --icon: url("icons/clipboard-check.svg"); }
.icon-chevron-right { --icon: url("icons/chevron-right.svg"); }
.icon-beaker { --icon: url("icons/beaker.svg"); }
.icon-save { --icon: url("icons/save.svg"); }
.icon-notebook-pen { --icon: url("icons/notebook-pen.svg"); }
.icon-layers { --icon: url("icons/layers.svg"); }
.icon-library { --icon: url("icons/library.svg"); }
.icon-shield-alert { --icon: url("icons/shield-alert.svg"); }
.icon-sparkles { --icon: url("icons/sparkles.svg"); }
.icon-castle { --icon: url("icons/castle.svg"); }
.icon-flask-conical { --icon: url("icons/flask-conical.svg"); }
.icon-swords { --icon: url("icons/swords.svg"); }

.theme-dark-icon {
  display: none;
}

:root[data-theme="dark"] .theme-light-icon {
  display: none;
}

:root[data-theme="dark"] .theme-dark-icon {
  display: inline-block;
}

.shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 286px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 620px);
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

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

.brand h1,
.brand p,
.overview h2,
.overview p,
.toolbar h2,
.toolbar p,
.lesson-hero h2,
.lesson-hero p,
.panel h3,
.panel p,
.section-heading h3,
.section-heading p {
  margin: 0;
}

.brand h1 {
  overflow: hidden;
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand p {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--muted);
}

.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 15%, transparent);
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.clear-search {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}

.clear-search:hover {
  background: var(--surface);
  color: var(--text);
}

.clear-search .icon {
  width: 15px;
  height: 15px;
}

.icon-button,
.nav-button,
.stage-button,
.primary-button,
.secondary-button,
.text-button,
.back-button {
  border-radius: var(--radius);
  color: var(--text);
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
}

.icon-button:hover,
.secondary-button:hover,
.nav-button:hover,
.stage-button:hover,
.back-button:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.side {
  position: sticky;
  top: 77px;
  height: calc(100vh - 77px);
  overflow-y: auto;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

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

.nav-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.nav-button .icon {
  width: 16px;
  height: 16px;
}

.nav-button.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.mobile-stage-filter {
  display: none;
}

.stage-nav {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.stage-button {
  position: relative;
  display: grid;
  min-height: 50px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}

.stage-button span,
.stage-button small {
  position: relative;
  z-index: 1;
}

.stage-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-button small {
  color: var(--muted);
}

.stage-button i {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--green);
}

.stage-button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.side-note {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.side-note > div:first-child {
  display: grid;
  gap: 4px;
}

.side-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.progress-track {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 180ms ease;
}

.content {
  min-width: 0;
  padding: 28px;
}

.content > * {
  width: min(1280px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 34px;
  align-items: end;
  padding: 14px 2px 26px;
  border-bottom: 1px solid var(--line);
}

.overview-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.overview h2,
.lesson-hero h2,
.project-hero h2,
.blueprint-hero h2,
.assessment-hero h2 {
  font-size: 36px;
  line-height: 1.2;
}

.overview p,
.lesson-hero p,
.project-hero p,
.blueprint-hero p,
.assessment-hero p,
.toolbar p,
.panel p,
.lesson-card-copy,
.source-card > span {
  color: var(--muted);
  line-height: 1.7;
}

.overview-copy > p:last-child {
  max-width: 680px;
  margin-top: 12px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.metric-row div {
  display: grid;
  min-height: 98px;
  align-content: center;
  gap: 3px;
  padding: 13px;
  background: var(--surface-raised);
}

.metric-row strong {
  font-size: 27px;
  line-height: 1;
}

.metric-row span {
  color: var(--muted);
  font-size: 13px;
}

.resume-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--amber);
  background: var(--amber-soft);
}

.training-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
}

.lab-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
}

.blueprint-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
}

.assessment-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--violet);
  background: var(--violet-soft);
}

.lab-band h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.blueprint-band h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.assessment-band h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.lab-band p:not(.eyebrow) {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.blueprint-band p:not(.eyebrow) {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.assessment-band p:not(.eyebrow) {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.training-band h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.training-band p:not(.eyebrow) {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.training-band-meta {
  display: block;
  margin-top: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.resume-band h3,
.section-title h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.resume-band p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.primary-button,
.secondary-button,
.text-button,
.back-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid transparent;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.primary-button:hover {
  background: color-mix(in srgb, var(--green) 88%, #000000);
}

.secondary-button {
  border-color: var(--line);
  background: var(--surface);
}

.text-button,
.back-button {
  background: transparent;
  color: var(--blue);
}

.route-section {
  margin-top: 32px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.section-title .eyebrow {
  margin-bottom: 4px;
}

.stage-grid,
.lesson-grid,
.term-grid {
  display: grid;
  gap: 14px;
}

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

.stage-card {
  display: grid;
  min-height: 162px;
  align-content: start;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.stage-card:hover,
.lesson-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
}

.stage-head small {
  color: var(--muted);
}

.stage-card p {
  min-height: 50px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.stage-strip {
  display: flex;
  gap: 5px;
  margin-top: auto;
}

.stage-strip i {
  display: block;
  width: 18px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}

.stage-strip i.done {
  background: var(--green);
}

.lesson-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.training-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 34px;
  align-items: end;
  padding: 14px 2px 26px;
  border-bottom: 1px solid var(--line);
}

.lab-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 34px;
  align-items: end;
  padding: 14px 2px 26px;
  border-bottom: 1px solid var(--line);
}

.lab-overview > div:first-child {
  max-width: 720px;
}

.lab-overview h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.2;
}

.lab-overview > div:first-child > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.training-overview > div:first-child {
  max-width: 720px;
}

.training-overview h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.2;
}

.training-overview > div:first-child > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.training-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.lab-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.lab-metrics div {
  display: grid;
  min-height: 98px;
  align-content: center;
  gap: 3px;
  padding: 13px;
  background: var(--surface-raised);
}

.lab-metrics strong {
  font-size: 25px;
  line-height: 1;
}

.lab-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.lab-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--amber);
  background: var(--amber-soft);
}

.lab-guidance h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.lab-guidance p:not(.eyebrow) {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.training-metrics div {
  display: grid;
  min-height: 98px;
  align-content: center;
  gap: 3px;
  padding: 13px;
  background: var(--surface-raised);
}

.training-metrics strong {
  font-size: 25px;
  line-height: 1;
}

.training-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.training-toolbar {
  margin-top: 26px;
}

.training-track-list {
  display: grid;
  gap: 42px;
  margin-top: 30px;
}

.training-track {
  padding-top: 2px;
}

.training-track-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 26px;
  align-items: end;
  margin-bottom: 15px;
}

.training-track-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.training-track-head p:not(.eyebrow),
.track-outcome {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.track-outcome {
  padding: 12px 0 12px 15px;
  border-left: 3px solid var(--green);
}

.track-outcome strong {
  color: var(--text);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.assessment-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 34px;
  align-items: end;
  padding: 14px 2px 26px;
  border-bottom: 1px solid var(--line);
}

.assessment-overview > div:first-child {
  max-width: 720px;
}

.assessment-overview h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.2;
}

.assessment-overview > div:first-child > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.assessment-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.assessment-metrics div {
  display: grid;
  min-height: 98px;
  align-content: center;
  gap: 3px;
  padding: 13px;
  background: var(--surface-raised);
}

.assessment-metrics strong {
  font-size: 25px;
  line-height: 1;
}

.assessment-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.assessment-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--violet);
  background: var(--violet-soft);
}

.assessment-guidance h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.assessment-guidance p:not(.eyebrow) {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.assessment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.assessment-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.assessment-card:hover {
  border-color: var(--violet);
  transform: translateY(-2px);
}

.assessment-card.passed {
  border-color: var(--green);
}

.assessment-card.attempted {
  border-color: var(--amber);
}

.assessment-card-index {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.assessment-card.passed .assessment-card-index {
  background: var(--green-soft);
  color: var(--green);
}

.assessment-card-body {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.assessment-card-body > strong {
  font-size: 18px;
  line-height: 1.35;
}

.assessment-card-copy {
  color: var(--muted);
  line-height: 1.65;
}

.assessment-card-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
}

.assessment-card-progress::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

.assessment-card-progress i {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--violet);
}

.assessment-card.passed .assessment-card-progress i {
  background: var(--green);
}

.assessment-card-progress b {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.blueprint-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 34px;
  align-items: end;
  padding: 14px 2px 26px;
  border-bottom: 1px solid var(--line);
}

.blueprint-overview > div:first-child {
  max-width: 720px;
}

.blueprint-overview h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.2;
}

.blueprint-overview > div:first-child > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.blueprint-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.blueprint-metrics div {
  display: grid;
  min-height: 98px;
  align-content: center;
  gap: 3px;
  padding: 13px;
  background: var(--surface-raised);
}

.blueprint-metrics strong {
  font-size: 25px;
  line-height: 1;
}

.blueprint-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.blueprint-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
}

.blueprint-guidance h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.blueprint-guidance p:not(.eyebrow) {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.engineering-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
  gap: 1px;
}

.engineering-tab {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.engineering-tab b {
  min-width: 25px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.engineering-tab:hover {
  background: var(--teal-soft);
  color: var(--teal);
}

.engineering-tab.active {
  background: var(--teal);
  color: #ffffff;
}

.engineering-tab.active b {
  background: color-mix(in srgb, #ffffff 20%, transparent);
  color: #ffffff;
}

.blueprint-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

.blueprint-card {
  display: grid;
  grid-template-columns: minmax(130px, 0.46fr) minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.blueprint-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.blueprint-card.done {
  border-color: var(--green);
}

.blueprint-card.production {
  border-top: 3px solid var(--teal);
}

.blueprint-card.production.done {
  border-top-color: var(--green);
}

.blueprint-card-map {
  display: grid;
  min-height: 170px;
  place-items: center;
  padding: 13px;
  border-right: 1px solid var(--line);
  background: var(--surface-muted);
}

.blueprint-card-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.blueprint-card-body > strong {
  font-size: 18px;
  line-height: 1.3;
}

.blueprint-card-copy {
  color: var(--muted);
  line-height: 1.65;
}

.engineering-card-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.engineering-card-spec span {
  min-height: 24px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.blueprint-card-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.blueprint-card.done .blueprint-card-state {
  color: var(--green);
}

.blueprint-card-state .icon {
  width: 15px;
  height: 15px;
}

.blueprint-grid {
  display: grid;
  width: min(100%, 600px);
  aspect-ratio: var(--blueprint-cols) / var(--blueprint-rows);
  grid-template-columns: repeat(var(--blueprint-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--blueprint-rows), minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--line);
}

.blueprint-grid.compact {
  width: 100%;
}

.blueprint-cell {
  display: block;
  min-width: 0;
  min-height: 0;
  border: 1px solid color-mix(in srgb, #18211c 12%, transparent);
}

.tone-structure { background: color-mix(in srgb, var(--green) 72%, var(--surface)); }
.tone-floor { background: color-mix(in srgb, var(--amber) 64%, var(--surface)); }
.tone-work { background: color-mix(in srgb, var(--blue) 72%, var(--surface)); }
.tone-storage { background: color-mix(in srgb, var(--violet) 72%, var(--surface)); }
.tone-path { background: color-mix(in srgb, var(--muted) 72%, var(--surface)); }
.tone-roof { background: color-mix(in srgb, var(--red) 68%, var(--surface)); }
.tone-empty { background: var(--surface-muted); }
.tone-crop { background: color-mix(in srgb, var(--green) 48%, #b4c66d); }
.tone-water { background: color-mix(in srgb, var(--blue) 76%, #dff4ff); }
.tone-light { background: color-mix(in srgb, var(--amber) 78%, #ffe091); }
.tone-cover { background: color-mix(in srgb, var(--text) 46%, var(--surface)); }
.tone-redstone { background: color-mix(in srgb, var(--red) 80%, var(--surface)); }

.search-blueprint-section {
  margin-top: 32px;
}

.search-assessment-section {
  margin-top: 32px;
}

.search-project-section {
  margin-top: 32px;
}

.search-lab-section {
  margin-top: 32px;
}

.project-card {
  display: grid;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.project-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.project-card.done {
  border-color: var(--green);
}

.lab-card {
  display: grid;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.lab-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.lab-card.recorded {
  border-color: var(--green);
}

.lab-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2.2 / 1;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
  object-fit: cover;
}

.lab-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.lab-card-body > strong {
  font-size: 18px;
  line-height: 1.3;
}

.lab-card-copy {
  color: var(--muted);
  line-height: 1.65;
}

.lab-record-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.lab-record-state .icon {
  width: 15px;
  height: 15px;
}

.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2.2 / 1;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
  object-fit: cover;
}

.project-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.project-card-body > strong {
  font-size: 18px;
  line-height: 1.3;
}

.project-card-copy {
  color: var(--muted);
  line-height: 1.65;
}

.project-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
}

.project-progress::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.project-progress i {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
}

.project-progress b {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.lesson-card {
  display: grid;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.lesson-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2.2 / 1;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
  object-fit: cover;
}

.lesson-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.lesson-card-body > strong {
  font-size: 18px;
  line-height: 1.3;
}

.lesson-card.done {
  border-color: var(--green);
}

.meta,
.tag-row,
.kit-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta span,
.tag-row span,
.kit-grid span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.meta .saved-pill {
  border-color: var(--amber);
  color: var(--amber);
}

.saved-pill .icon {
  width: 13px;
  height: 13px;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 17px;
  border-bottom: 1px solid var(--line);
}

.toolbar h2 {
  font-size: 30px;
  line-height: 1.25;
}

.toolbar p:last-child {
  margin-top: 7px;
}

.filter-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.select-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.select-field select,
.mobile-stage-filter select {
  min-height: 40px;
  max-width: 200px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.toolbar + .lesson-grid,
.toolbar + .term-grid,
.toolbar + .source-list {
  margin-top: 18px;
}

.lesson-view {
  display: grid;
  max-width: 1120px;
  gap: 0;
}

.project-view {
  display: grid;
  max-width: 1120px;
  gap: 0;
}

.lab-view {
  display: grid;
  max-width: 1120px;
  gap: 0;
}

.blueprint-view {
  display: grid;
  max-width: 1120px;
  gap: 0;
}

.assessment-view {
  display: grid;
  max-width: 1120px;
  gap: 0;
}

.lesson-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lab-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.blueprint-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.assessment-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lesson-hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.project-hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.lab-hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.blueprint-hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.assessment-hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.back-button {
  min-height: 32px;
  margin: -6px 0 15px -8px;
  padding: 0 8px;
}

.back-button .icon {
  width: 16px;
  height: 16px;
}

.lesson-hero h2 {
  margin: 3px 0 12px;
}

.project-hero h2 {
  margin: 3px 0 12px;
}

.lab-hero h2 {
  margin: 3px 0 12px;
}

.blueprint-hero h2 {
  margin: 3px 0 12px;
}

.assessment-hero h2 {
  margin: 3px 0 12px;
}

.lesson-hero p:last-of-type {
  max-width: 590px;
}

.project-hero p:last-of-type {
  max-width: 590px;
}

.lab-hero p:last-of-type {
  max-width: 590px;
}

.blueprint-hero p:last-of-type {
  max-width: 590px;
}

.assessment-hero p:last-of-type {
  max-width: 590px;
}

.lesson-hero img {
  width: 100%;
  min-height: 292px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  object-fit: contain;
}

.project-hero img {
  width: 100%;
  min-height: 292px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  object-fit: contain;
}

.lab-hero img {
  width: 100%;
  min-height: 292px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  object-fit: contain;
}

.lab-hero-meta {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 16px 0 0 14px;
  border-left: 3px solid var(--green);
}

.lab-hero-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lab-hero-meta strong {
  line-height: 1.55;
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}

.blueprint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}

.blueprint-hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.blueprint-hero-facts > div {
  display: grid;
  min-height: 118px;
  align-content: center;
  gap: 6px;
  padding: 15px;
  background: var(--surface-raised);
}

.blueprint-hero-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.blueprint-hero-facts dd {
  margin: 0;
  line-height: 1.55;
}

.assessment-hero-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.assessment-hero-facts > div {
  display: grid;
  min-height: 116px;
  align-content: center;
  gap: 6px;
  padding: 15px;
  background: var(--surface-raised);
}

.assessment-hero-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.assessment-hero-facts dd {
  margin: 0;
  line-height: 1.55;
}

.primary-button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--muted);
}

.lesson-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.75fr);
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.project-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.project-specs > div {
  min-height: 116px;
  padding: 16px;
  background: var(--surface-raised);
}

.project-specs p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.project-specs .eyebrow {
  margin-bottom: 7px;
}

.lab-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.lab-facts .eyebrow {
  margin-bottom: 8px;
}

.lesson-summary .eyebrow,
.section-heading .eyebrow {
  margin-bottom: 8px;
}

.lesson-section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.project-section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.lab-section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.blueprint-section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.blueprint-plan-section {
  padding-top: 26px;
}

.blueprint-layer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.blueprint-layer-tab {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.blueprint-layer-tab:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.blueprint-layer-tab.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.blueprint-canvas {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 24px;
  align-items: center;
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.blueprint-grid-frame {
  display: grid;
  min-width: 0;
  min-height: 240px;
  place-items: center;
}

.blueprint-canvas-side {
  min-width: 0;
}

.blueprint-canvas-side h4 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

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

.blueprint-legend-item,
.blueprint-layer-counts span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.blueprint-legend-item i,
.blueprint-layer-counts i {
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, #18211c 15%, transparent);
}

.blueprint-layer-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.blueprint-layer-counts b {
  margin-left: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.blueprint-warning {
  padding-left: 17px;
  border-left: 3px solid var(--amber);
}

.blueprint-warning > p {
  max-width: 880px;
  margin: 13px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.blueprint-materials .kit-grid {
  margin-top: 14px;
}

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

.blueprint-link-groups > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.blueprint-hero.production {
  border-top: 4px solid var(--teal);
}

.production-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.production-flow > div {
  position: relative;
  display: grid;
  min-height: 150px;
  align-content: start;
  gap: 8px;
  padding: 16px;
  background: var(--surface-raised);
}

.production-flow > div > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.production-flow strong {
  font-size: 16px;
}

.production-flow p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.production-prerequisites {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 20px;
  align-items: end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.production-prerequisites > .eyebrow {
  grid-column: 1 / -1;
  margin: 0;
}

.production-time {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.production-time strong {
  color: var(--text);
}

.engineering-matrix {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.engineering-matrix-head,
.engineering-matrix-row {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.engineering-matrix.columns-3 .engineering-matrix-head,
.engineering-matrix.columns-3 .engineering-matrix-row {
  grid-template-columns: minmax(150px, 0.75fr) minmax(120px, 0.6fr) minmax(0, 1.65fr);
}

.engineering-matrix.columns-4 .engineering-matrix-head,
.engineering-matrix.columns-4 .engineering-matrix-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.engineering-matrix-head span {
  padding: 11px 13px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.engineering-matrix-row + .engineering-matrix-row {
  border-top: 1px solid var(--line);
}

.engineering-matrix-row > span {
  min-width: 0;
  padding: 13px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.engineering-matrix-row > span:first-child {
  color: var(--text);
  font-weight: 800;
}

.engineering-matrix.failure {
  border-top: 3px solid var(--amber);
}

.engineering-matrix.commission {
  border-top: 3px solid var(--green);
}

.engineering-mobile-label {
  display: none;
}

.orientation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.orientation-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
}

.orientation-list li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--blue) 45%, transparent);
  border-radius: 50%;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.orientation-list p {
  margin: 2px 0 0;
  line-height: 1.7;
}

.engineering-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.engineering-metric-grid article {
  display: grid;
  gap: 8px;
  min-height: 146px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
}

.engineering-metric-grid article > strong {
  font-size: 17px;
}

.engineering-metric-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.engineering-metric-grid span {
  align-self: end;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.engineering-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.engineering-duo > div:last-child {
  padding-left: 24px;
  border-left: 3px solid var(--red);
}

.assessment-section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.assessment-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 17px 17px 17px 18px;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
}

.assessment-result.needs-work {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.assessment-result h3,
.assessment-submit h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.assessment-result p:not(.eyebrow) {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.assessment-question-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.assessment-question {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.assessment-question.correct {
  border-color: var(--green);
}

.assessment-question.incorrect {
  border-color: var(--amber);
}

.assessment-question-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raised);
}

.assessment-question-head > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--violet);
  border-radius: 6px;
  color: var(--violet);
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.assessment-question.correct .assessment-question-head > span {
  border-color: var(--green);
  color: var(--green);
}

.assessment-question.incorrect .assessment-question-head > span {
  border-color: var(--amber);
  color: var(--amber);
}

.assessment-question-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.assessment-option-list {
  display: grid;
  gap: 8px;
  padding: 14px 18px 18px;
}

.assessment-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  line-height: 1.55;
}

.assessment-option:hover:not(:disabled) {
  border-color: var(--violet);
  background: var(--violet-soft);
}

.assessment-option.selected {
  border-color: var(--violet);
  background: var(--violet-soft);
}

.assessment-option.answer {
  border-color: var(--green);
  background: var(--green-soft);
}

.assessment-option.wrong {
  border-color: var(--red);
  background: var(--red-soft);
}

.assessment-option:disabled {
  cursor: default;
  opacity: 1;
}

.assessment-option-key {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.assessment-option.selected .assessment-option-key {
  border-color: var(--violet);
  background: var(--violet);
  color: #ffffff;
}

.assessment-option.answer .assessment-option-key {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.assessment-option.wrong .assessment-option-key {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.assessment-option > .icon {
  width: 18px;
  height: 18px;
}

.assessment-option.answer > .icon {
  color: var(--green);
}

.assessment-option.wrong > .icon {
  color: var(--red);
}

.assessment-explanation {
  padding: 17px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
}

.assessment-explanation > p:not(.eyebrow) {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.assessment-remediation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.assessment-remediation strong {
  font-size: 13px;
}

.assessment-remediation .project-lesson-links {
  margin-top: 8px;
}

.assessment-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--violet);
  background: var(--violet-soft);
}

.lab-section.notice {
  padding-left: 17px;
  border-left: 3px solid var(--blue);
}

.decision-section {
  padding-left: 17px;
  border-left: 3px solid var(--green);
}

.decision-section > p {
  max-width: 880px;
  margin: 13px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.lab-record-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 15px;
}

.lab-record-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lab-record-form input,
.lab-record-form select,
.lab-record-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.lab-record-form input,
.lab-record-form select {
  padding: 0 10px;
}

.lab-record-form textarea {
  min-height: 132px;
  padding: 10px;
  resize: vertical;
  line-height: 1.6;
}

.lab-record-form input::placeholder,
.lab-record-form textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.lab-form-wide {
  grid-column: 1 / -1;
}

.lab-record-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

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

.lab-link-groups > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.project-section.notice {
  padding-left: 17px;
  border-left: 3px solid var(--blue);
}

.project-section.warning {
  padding-left: 17px;
  border-left: 3px solid var(--amber);
}

.project-lesson-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.lesson-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.lesson-link:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.lesson-link .icon {
  width: 14px;
  height: 14px;
}

.checkpoint-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.checkpoint {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  line-height: 1.55;
}

.checkpoint:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.checkpoint.complete {
  border-color: var(--green);
  background: var(--green-soft);
}

.checkpoint-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
}

.checkpoint.complete .checkpoint-mark {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.checkpoint-mark .icon {
  width: 14px;
  height: 14px;
}

.lesson-section.notice {
  border-left: 3px solid var(--blue);
  padding-left: 17px;
}

.lesson-section.warning {
  border-left: 3px solid var(--amber);
  padding-left: 17px;
}

.section-heading h3 {
  font-size: 21px;
  line-height: 1.3;
}

.step-list,
.link-list {
  margin: 14px 0 0;
  padding-left: 22px;
}

.step-list li,
.link-list li {
  margin: 9px 0;
  color: var(--muted);
  line-height: 1.75;
}

.step-list li::marker {
  color: var(--green);
  font-weight: 900;
}

.link-list span {
  display: block;
  color: var(--muted);
}

.panel {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel h3 {
  font-size: 18px;
  line-height: 1.35;
}

.panel p {
  margin-top: 9px;
}

.panel .tag-row {
  margin-top: 13px;
}

.term-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-card {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.source-card > span {
  flex: 0 0 auto;
  font-size: 13px;
  text-align: right;
}

.empty-state,
.loading-state,
.error-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--muted);
  text-align: center;
}

.empty-state .icon,
.error-state > .icon {
  width: 30px;
  height: 30px;
  color: var(--blue);
}

.empty-state h3,
.empty-state p,
.error-state h2,
.error-state p,
.loading-state p {
  margin: 0;
}

.empty-state h3,
.error-state h2 {
  color: var(--text);
  font-size: 21px;
}

.empty-state p,
.error-state p {
  max-width: 520px;
  line-height: 1.65;
}

.loading-state {
  width: min(520px, 100%);
  min-height: 300px;
}

.loading-mark {
  width: 30px;
  height: 30px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.reference-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
}

.reference-band h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.reference-band p:not(.eyebrow) {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.reference-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 34px;
  align-items: end;
  padding: 14px 2px 26px;
  border-bottom: 1px solid var(--line);
}

.reference-overview > div:first-child {
  max-width: 740px;
}

.reference-overview h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.2;
}

.reference-overview > div:first-child > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.reference-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.reference-metrics div {
  display: grid;
  min-height: 98px;
  align-content: center;
  gap: 3px;
  padding: 13px;
  background: var(--surface-raised);
}

.reference-metrics strong {
  font-size: 25px;
  line-height: 1;
}

.reference-metrics span {
  color: var(--muted);
  font-size: 12px;
}

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

.reference-category-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.reference-category-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.reference-category-card.active {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal), var(--shadow);
}

.reference-category-card img {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 920 / 420;
  border-bottom: 1px solid var(--line);
  background: #f5f7f2;
  object-fit: contain;
}

.reference-category-card > span {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
}

.reference-category-card > span b {
  font-size: 19px;
  line-height: 1.35;
}

.reference-category-card > span small {
  flex: 0 0 auto;
  color: var(--teal);
  font-weight: 800;
}

.reference-category-card p {
  margin: 8px 0 0;
  padding: 0 16px 16px;
  color: var(--muted);
  line-height: 1.6;
}

.reference-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.reference-toolbar h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.3;
}

.reference-toolbar p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
}

.reference-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.reference-search-field {
  display: flex;
  width: min(370px, 42vw);
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
}

.reference-search-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent);
}

.reference-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.reference-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.search-reference-section,
.saved-section {
  margin-top: 32px;
}

.search-result-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.reference-card {
  display: grid;
  min-width: 0;
  min-height: 244px;
  grid-template-columns: 58px minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.reference-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.reference-card.saved {
  border-color: var(--green);
}

.reference-card-mark {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--blue);
}

.reference-card-mark .icon {
  width: 24px;
  height: 24px;
}

.reference-card.type-mobs .reference-card-mark {
  background: var(--red-soft);
  color: var(--red);
}

.reference-card.type-structures .reference-card-mark {
  background: var(--amber-soft);
  color: var(--amber);
}

.reference-card.type-enchantments .reference-card-mark {
  background: var(--blue-soft);
  color: var(--blue);
}

.reference-card.type-potions .reference-card-mark {
  background: var(--green-soft);
  color: var(--green);
}

.reference-card-body {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  padding: 15px;
}

.reference-card-body > strong {
  font-size: 19px;
  line-height: 1.35;
}

.reference-card-copy {
  color: var(--muted);
  line-height: 1.65;
}

.reference-card-footer {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.reference-card-footer b {
  color: var(--text);
}

.reference-card-footer em {
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-card-footer.recipe {
  grid-template-columns: auto auto minmax(0, 1fr);
}

.reference-card-footer.recipe i {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.reference-level {
  display: flex;
  gap: 3px;
}

.reference-level i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--line);
}

.reference-level.danger i.active {
  background: var(--red);
}

.reference-level.risk i.active {
  background: var(--amber);
}

.reference-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.reference-detail-copy {
  min-width: 0;
}

.reference-detail-copy h2 {
  margin: 16px 0 9px;
  font-size: 36px;
  line-height: 1.2;
}

.reference-detail-copy > p:last-of-type {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.reference-detail-actions {
  margin-top: 20px;
}

.reference-detail-emblem {
  display: grid;
  min-height: 196px;
  place-items: center;
  align-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--blue);
  text-align: center;
}

.reference-detail-emblem .icon {
  width: 46px;
  height: 46px;
}

.reference-detail-emblem b {
  font-size: 19px;
}

.reference-detail-emblem small {
  color: var(--muted);
  font-weight: 800;
}

.reference-detail.type-mobs .reference-detail-emblem {
  background: var(--red-soft);
  color: var(--red);
}

.reference-detail.type-structures .reference-detail-emblem {
  background: var(--amber-soft);
  color: var(--amber);
}

.reference-detail.type-potions .reference-detail-emblem {
  background: var(--green-soft);
  color: var(--green);
}

.reference-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.reference-facts > div {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 6px;
  padding: 15px;
  background: var(--surface-raised);
}

.reference-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reference-facts dd {
  min-width: 0;
  margin: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.reference-detail-section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.reference-detail-section.action,
.reference-detail-section.note,
.reference-detail-section.warning {
  padding-left: 17px;
  border-left: 3px solid var(--green);
}

.reference-detail-section.note {
  border-left-color: var(--blue);
}

.reference-detail-section.warning {
  border-left-color: var(--amber);
}

.reference-detail-text,
.reference-duo p:not(.eyebrow) {
  max-width: 920px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.reference-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.reference-duo > div {
  min-width: 0;
}

.reference-duo h3 {
  margin: 0;
  font-size: 20px;
}

.reference-duo > .warning {
  padding-left: 17px;
  border-left: 3px solid var(--amber);
}

.reference-prep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.reference-prep-grid > span {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  line-height: 1.45;
}

.reference-prep-grid .icon {
  width: 16px;
  height: 16px;
  color: var(--green);
}

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

.reference-link-groups > div > p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.potion-chain {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) auto minmax(180px, 1fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 14px;
}

.potion-chain span,
.potion-chain strong {
  display: grid;
  min-height: 68px;
  place-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-raised);
  text-align: center;
}

.potion-chain strong {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.potion-chain > i {
  display: grid;
  place-items: center;
  color: var(--green);
  font-style: normal;
  font-size: 20px;
  font-weight: 900;
}

.reference-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
}

.reference-pager .secondary-button {
  max-width: 48%;
  white-space: normal;
  text-align: left;
}

.manual-band,
.manual-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 17px 0 17px 17px;
  border-left: 4px solid var(--amber);
  background: var(--amber-soft);
}

.manual-guidance {
  margin-top: 22px;
}

.manual-band h3,
.manual-guidance h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.manual-band p:not(.eyebrow),
.manual-guidance p:not(.eyebrow) {
  max-width: 760px;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.manual-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 34px;
  align-items: end;
  padding: 14px 2px 26px;
  border-bottom: 1px solid var(--line);
}

.manual-overview > div:first-child {
  max-width: 720px;
}

.manual-overview h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.2;
}

.manual-overview > div:first-child > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.manual-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.manual-metrics div {
  display: grid;
  min-height: 98px;
  align-content: center;
  gap: 3px;
  padding: 13px;
  background: var(--surface-raised);
}

.manual-metrics strong {
  font-size: 25px;
  line-height: 1;
}

.manual-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 14px;
}

.search-manual-section {
  margin-top: 32px;
}

.manual-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, transform 140ms ease;
}

.manual-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.manual-card.read {
  border-color: var(--green);
}

.manual-card > img {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 920 / 420;
  border-bottom: 1px solid var(--line);
  background: #f5f7f2;
  object-fit: contain;
}

.manual-card-body {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 10px;
  padding: 16px;
}

.manual-card-body > strong {
  font-size: 19px;
  line-height: 1.35;
}

.manual-card-copy,
.manual-card-use {
  color: var(--muted);
  line-height: 1.6;
}

.manual-card-use {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.manual-card-use b {
  color: var(--amber);
  font-size: 12px;
}

.manual-card-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.manual-card.read .manual-card-status {
  color: var(--green);
}

.manual-card-status .icon {
  width: 15px;
  height: 15px;
}

.manual-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.94fr);
  gap: 34px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.manual-hero h2 {
  margin: 16px 0 9px;
  font-size: 36px;
  line-height: 1.2;
}

.manual-hero p:last-of-type {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.manual-hero > img {
  display: block;
  width: 100%;
  min-height: 0;
  aspect-ratio: 920 / 420;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f7f2;
  object-fit: contain;
}

.manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.manual-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.8fr);
  gap: 28px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.manual-context h3 {
  max-width: 760px;
  margin: 0;
  font-size: 20px;
  line-height: 1.65;
}

.manual-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.manual-facts > div {
  min-width: 0;
  padding: 14px;
  background: var(--surface-raised);
}

.manual-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manual-facts dd {
  margin: 6px 0 0;
  font-weight: 800;
  line-height: 1.45;
}

.manual-section {
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}

.manual-section.notice,
.manual-section.warning {
  position: relative;
}

.manual-section.notice::before,
.manual-section.warning::before {
  position: absolute;
  top: 27px;
  bottom: 27px;
  left: -14px;
  width: 3px;
  background: var(--green);
  content: "";
}

.manual-section.warning::before {
  background: var(--amber);
}

.manual-matrix {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.manual-matrix-head,
.manual-matrix-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(220px, 1fr) minmax(260px, 1.28fr);
}

.manual-matrix-head {
  background: var(--surface-muted);
}

.manual-matrix-head > span {
  padding: 11px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.manual-matrix-row {
  border-top: 1px solid var(--line);
}

.manual-matrix-row > span {
  min-width: 0;
  padding: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.manual-matrix-row > span + span,
.manual-matrix-head > span + span {
  border-left: 1px solid var(--line);
}

.manual-matrix-row > span:first-child {
  background: var(--surface-raised);
  font-weight: 800;
}

.manual-matrix.decision .manual-matrix-row > span:nth-child(2),
.manual-matrix.loadout .manual-matrix-row > span:nth-child(2) {
  color: var(--green);
  font-weight: 700;
}

.manual-matrix.decision .manual-matrix-row > span:nth-child(3) {
  color: var(--red);
}

.manual-matrix.failure .manual-matrix-row > span:nth-child(3) {
  color: var(--blue);
  font-weight: 700;
}

.manual-mobile-label {
  display: none;
}

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

.manual-link-groups > div > p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manual-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
}

.manual-pager .secondary-button {
  max-width: 48%;
  white-space: normal;
  text-align: left;
}

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

.manual-tabs .engineering-tab.active {
  background: var(--amber);
}

.operation-card {
  border-top: 3px solid var(--amber);
}

.operation-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.operation-card-facts > span {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 10px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.operation-card-facts b {
  color: var(--amber);
  font-size: 11px;
}

.operation-card-progress {
  position: relative;
  display: grid;
  height: 23px;
  align-items: center;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-muted);
}

.operation-card-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--amber-soft);
}

.operation-card-progress b {
  position: relative;
  padding: 0 9px;
  color: var(--amber);
  font-size: 11px;
  font-style: normal;
}

.operation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: 30px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--amber);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.operation-hero-copy,
.operation-hero-visual {
  min-width: 0;
}

.operation-hero h2 {
  margin: 16px 0 9px;
  font-size: 36px;
  line-height: 1.2;
}

.operation-hero-copy > p:last-of-type {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.operation-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.operation-hero-visual {
  display: grid;
  gap: 12px;
}

.operation-hero-visual > img {
  display: block;
  width: 100%;
  aspect-ratio: 920 / 420;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f5f7f2;
  object-fit: contain;
}

.operation-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.operation-progress > span {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.operation-progress b {
  font-size: 22px;
}

.operation-progress small {
  color: var(--muted);
}

.operation-progress > i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-muted);
}

.operation-progress > i > b {
  display: block;
  height: 100%;
  background: var(--amber);
}

.operation-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.operation-brief > div {
  min-width: 0;
}

.operation-brief > div + div {
  padding-left: 20px;
  border-left: 3px solid var(--green);
}

.operation-brief > .warning {
  border-left-color: var(--red);
}

.operation-brief h3,
.operation-brief p:not(.eyebrow) {
  margin: 0;
  line-height: 1.65;
}

.operation-brief p:not(.eyebrow) {
  color: var(--muted);
}

.operation-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.operation-facts > div {
  display: grid;
  min-height: 108px;
  align-content: center;
  gap: 6px;
  padding: 15px;
  background: var(--surface-raised);
}

.operation-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.operation-facts dd {
  min-width: 0;
  margin: 0;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.operation-section {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.operation-section.warning {
  padding-left: 16px;
  border-left: 3px solid var(--red);
}

.operation-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.operation-readiness-state,
.operation-phase-summary {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 4px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.operation-readiness-state.ready {
  background: var(--green-soft);
  color: var(--green);
}

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

.operation-readiness-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--text);
  text-align: left;
}

.operation-readiness-item.critical {
  border-left-color: var(--amber);
}

.operation-readiness-item:hover {
  background: var(--blue-soft);
}

.operation-readiness-item.checked {
  border-color: var(--green);
  border-left-color: var(--green);
  background: var(--green-soft);
}

.operation-check-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--amber);
}

.operation-readiness-item.checked .operation-check-mark {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.operation-check-mark .icon {
  width: 17px;
  height: 17px;
}

.operation-readiness-item > span:last-child {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 9px;
}

.operation-readiness-item b {
  line-height: 1.4;
}

.operation-readiness-item small {
  align-self: start;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.operation-readiness-item p,
.operation-readiness-item em {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.operation-readiness-item em {
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-size: 12px;
}

.operation-mechanics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.operation-mechanics-grid article {
  display: grid;
  min-height: 190px;
  align-content: start;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 6px;
  background: var(--surface-raised);
}

.operation-mechanics-grid span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.operation-mechanics-grid strong {
  font-size: 19px;
  line-height: 1.4;
}

.operation-mechanics-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.operation-mechanics-grid a {
  align-self: end;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.operation-matrix {
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.operation-matrix-head,
.operation-matrix-row {
  display: grid;
}

.operation-matrix.columns-5 .operation-matrix-head,
.operation-matrix.columns-5 .operation-matrix-row {
  grid-template-columns: minmax(105px, 0.65fr) minmax(140px, 0.9fr) minmax(160px, 1fr) minmax(200px, 1.35fr) minmax(130px, 0.8fr);
}

.operation-matrix.columns-4 .operation-matrix-head,
.operation-matrix.columns-4 .operation-matrix-row {
  grid-template-columns: minmax(150px, 0.75fr) repeat(3, minmax(190px, 1fr));
}

.operation-matrix-head {
  background: var(--surface-muted);
}

.operation-matrix-head > span {
  padding: 11px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.operation-matrix-row {
  border-top: 1px solid var(--line);
}

.operation-matrix-row > span {
  min-width: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.operation-matrix-row > span + span,
.operation-matrix-head > span + span {
  border-left: 1px solid var(--line);
}

.operation-matrix-row > span:first-child {
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 900;
}

.operation-matrix.loadout .operation-matrix-row > span:nth-child(3) {
  color: var(--green);
  font-weight: 700;
}

.operation-matrix.emergency .operation-matrix-row > span:nth-child(2) {
  color: var(--red);
  font-weight: 700;
}

.operation-matrix.emergency .operation-matrix-row > span:nth-child(4) {
  color: var(--amber);
}

.operation-mobile-label {
  display: none;
}

.operation-phase-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  background: var(--line);
}

.operation-phase-tab {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 78px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-content: center;
  align-items: center;
  padding: 10px;
  background: var(--surface-raised);
  color: var(--muted);
  text-align: left;
}

.operation-phase-tab > span:first-child {
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
}

.operation-phase-tab b {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.operation-phase-tab > .icon {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  color: var(--green);
}

.operation-phase-tab:hover {
  background: var(--amber-soft);
}

.operation-phase-tab.active {
  background: var(--amber);
  color: #ffffff;
}

.operation-phase-tab.active b,
.operation-phase-tab.active > span:first-child {
  color: #ffffff;
}

.operation-phase-tab.complete:not(.active) {
  box-shadow: inset 0 -3px var(--green);
}

.operation-phase-panel {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: var(--surface);
  scroll-margin-top: 130px;
}

.operation-phase-panel > header {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.operation-phase-panel > header > div {
  min-height: 94px;
  padding: 15px;
  background: var(--surface-muted);
}

.operation-phase-panel > header strong {
  display: block;
  line-height: 1.55;
}

.operation-phase-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 26px;
  padding: 20px;
}

.operation-action-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.operation-action-list button {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-raised);
  color: var(--text);
  text-align: left;
}

.operation-action-list button:hover {
  border-color: var(--amber);
  background: var(--amber-soft);
}

.operation-action-list button.checked {
  border-color: var(--green);
  background: var(--green-soft);
}

.operation-action-list button > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.operation-action-list button.checked > span {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.operation-action-list .icon {
  width: 15px;
  height: 15px;
}

.operation-action-list b {
  font-size: 14px;
  line-height: 1.55;
}

.operation-phase-body aside {
  display: grid;
  align-content: start;
  gap: 12px;
}

.operation-hazards,
.operation-checkpoint,
.operation-fallback {
  padding: 13px;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
}

.operation-checkpoint {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.operation-fallback {
  border-left-color: var(--blue);
  background: var(--blue-soft);
}

.operation-hazards > span {
  display: flex;
  gap: 7px;
  align-items: start;
  padding-top: 7px;
  color: var(--red);
  font-size: 13px;
  line-height: 1.5;
}

.operation-hazards .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.operation-checkpoint strong,
.operation-fallback p:not(.eyebrow) {
  margin: 0;
  line-height: 1.65;
}

.operation-phase-panel > footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
}

.operation-phase-panel > footer > :last-child {
  justify-self: end;
}

.operation-phase-panel > footer button:disabled {
  visibility: hidden;
}

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

.operation-drill-grid article {
  display: grid;
  min-width: 0;
  min-height: 214px;
  align-content: start;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 6px;
  background: var(--surface-raised);
}

.operation-drill-grid article > span {
  display: grid;
  width: 34px;
  height: 28px;
  place-items: center;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.operation-drill-grid h4 {
  margin: 0;
  font-size: 17px;
}

.operation-drill-grid p {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.operation-drill-grid p + p {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.operation-drill-grid p b {
  color: var(--text);
  font-size: 11px;
}

.operation-debrief-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 28px;
  margin-top: 14px;
}

.operation-debrief-layout > label {
  display: grid;
  align-content: start;
  gap: 7px;
}

.operation-debrief-layout > label > span {
  font-weight: 900;
}

.operation-debrief-layout textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
}

.operation-debrief-layout small {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.operation-local-tests {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.operation-local-tests summary {
  padding: 14px 0;
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1120px) {
  .overview {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .metric-row {
    max-width: 620px;
  }

  .training-overview {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .lab-overview {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .blueprint-overview {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .assessment-overview {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .manual-overview {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .reference-overview {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .training-metrics {
    max-width: 620px;
  }

  .lab-metrics {
    max-width: 620px;
  }

  .blueprint-metrics {
    max-width: 620px;
  }

  .assessment-metrics {
    max-width: 620px;
  }

  .manual-metrics {
    max-width: 620px;
  }

  .reference-metrics {
    max-width: 720px;
  }

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

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

  .topbar {
    grid-template-columns: minmax(220px, 1fr) minmax(340px, 0.9fr);
  }

  .side {
    position: static;
    height: auto;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .lesson-hero,
  .project-hero,
  .lab-hero,
  .blueprint-hero,
  .assessment-hero,
  .manual-hero,
  .reference-detail-hero,
  .lab-facts,
  .lesson-summary,
  .blueprint-canvas,
  .manual-context {
    grid-template-columns: 1fr;
  }

  .lesson-hero img,
  .project-hero img,
  .lab-hero img {
    min-height: 230px;
  }

  .manual-hero > img {
    min-height: 0;
  }

  .training-track-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 112px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    gap: 8px;
    min-height: 0;
    padding: 10px 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .brand p {
    font-size: 11px;
  }

  .top-actions {
    display: contents;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 42px;
  }

  #themeToggle {
    grid-column: 2;
    grid-row: 1;
  }

  #exportPlan {
    grid-column: 3;
    grid-row: 1;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .side {
    display: grid;
    gap: 9px;
    padding: 9px 12px 10px;
  }

  .main-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .nav-button {
    min-height: 38px;
    flex: 0 0 auto;
    padding: 0 11px;
  }

  .mobile-stage-filter {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-stage-filter select {
    width: 100%;
    max-width: none;
    min-height: 38px;
  }

  .stage-nav,
  .side-note {
    display: none;
  }

  .content {
    padding: 18px 12px 34px;
  }

  .overview {
    gap: 18px;
    padding-top: 2px;
    padding-bottom: 20px;
  }

  .overview h2,
  .lesson-hero h2,
  .project-hero h2,
  .training-overview h2,
  .lab-overview h2,
  .lab-hero h2,
  .blueprint-overview h2,
  .blueprint-hero h2,
  .assessment-overview h2,
  .assessment-hero h2,
  .manual-overview h2,
  .manual-hero h2,
  .reference-overview h2,
  .reference-detail-copy h2 {
    font-size: 28px;
  }

  .metric-row {
    width: 100%;
  }

  .metric-row div {
    min-height: 76px;
    padding: 10px;
  }

  .metric-row strong {
    font-size: 23px;
  }

  .metric-row span {
    font-size: 12px;
  }

  .resume-band,
  .training-band,
  .lab-band,
  .lab-guidance,
  .blueprint-band,
  .blueprint-guidance,
  .assessment-band,
  .assessment-guidance,
  .manual-band,
  .manual-guidance,
  .reference-band,
  .assessment-result,
  .assessment-submit,
  .toolbar,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .resume-band {
    gap: 14px;
    padding: 14px 14px 14px 15px;
  }

  .training-band {
    gap: 14px;
    padding: 14px 14px 14px 15px;
  }

  .lab-band,
  .lab-guidance,
  .blueprint-band,
  .blueprint-guidance,
  .assessment-band,
  .assessment-guidance,
  .manual-band,
  .manual-guidance,
  .reference-band,
  .assessment-result,
  .assessment-submit {
    gap: 14px;
    padding: 14px 14px 14px 15px;
  }

  .training-band .secondary-button {
    width: 100%;
  }

  .lab-band .secondary-button,
  .lab-guidance .secondary-button,
  .blueprint-band .secondary-button,
  .blueprint-guidance .secondary-button,
  .assessment-band .secondary-button,
  .assessment-guidance .secondary-button,
  .manual-band .secondary-button,
  .manual-guidance .secondary-button,
  .reference-band .secondary-button,
  .assessment-result .secondary-button,
  .assessment-submit .primary-button {
    width: 100%;
  }

  .resume-band .primary-button {
    width: 100%;
  }

  .section-title {
    gap: 10px;
  }

  .section-title .text-button {
    align-self: start;
    margin-left: -10px;
  }

  .stage-grid {
    grid-template-columns: 1fr;
  }

  .stage-card {
    min-height: 136px;
  }

  .stage-card p {
    min-height: auto;
  }

  .lesson-grid,
  .term-grid,
  .project-grid,
  .lab-grid,
  .blueprint-card-grid,
  .assessment-grid,
  .manual-grid,
  .reference-entry-grid,
  .reference-category-grid {
    grid-template-columns: 1fr;
  }

  .reference-toolbar,
  .reference-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .reference-search-field {
    width: 100%;
  }

  .reference-category-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .reference-category-card img {
    grid-row: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 920 / 420;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    object-fit: contain;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar h2 {
    font-size: 26px;
  }

  .filter-controls {
    align-items: end;
    justify-content: stretch;
  }

  .select-field {
    flex: 1 1 180px;
  }

  .training-toolbar > .select-field {
    flex: 0 0 auto;
    align-self: stretch;
  }

  .select-field select {
    width: 100%;
    max-width: none;
  }

  .lesson-hero {
    gap: 18px;
    padding: 16px;
  }

  .project-hero {
    gap: 18px;
    padding: 16px;
  }

  .lab-hero {
    gap: 18px;
    padding: 16px;
  }

  .blueprint-hero {
    gap: 18px;
    padding: 16px;
  }

  .assessment-hero {
    gap: 18px;
    padding: 16px;
  }

  .manual-hero {
    gap: 18px;
    padding: 16px;
  }

  .reference-detail-hero {
    gap: 18px;
    padding: 16px;
  }

  .reference-detail-emblem {
    min-height: 120px;
  }

  .lesson-hero img,
  .project-hero img,
  .lab-hero img {
    min-height: 180px;
  }

  .manual-hero > img {
    min-height: 0;
  }

  .lesson-actions {
    width: 100%;
  }

  .lesson-actions button {
    flex: 1 1 145px;
  }

  .project-actions {
    width: 100%;
  }

  .project-actions button {
    width: 100%;
    white-space: normal;
  }

  .blueprint-actions {
    width: 100%;
  }

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

  .manual-actions,
  .manual-actions button {
    width: 100%;
  }

  .lesson-summary {
    gap: 20px;
    padding: 22px 0;
  }

  .lesson-section {
    padding: 23px 0;
  }

  .project-section {
    padding: 23px 0;
  }

  .lab-section {
    padding: 23px 0;
  }

  .blueprint-section {
    padding: 23px 0;
  }

  .assessment-section {
    padding: 23px 0;
  }

  .manual-section {
    padding: 23px 0;
  }

  .reference-detail-section {
    padding-top: 23px;
    padding-bottom: 23px;
  }

  .reference-detail-section.action,
  .reference-detail-section.note,
  .reference-detail-section.warning {
    padding-left: 12px;
  }

  .manual-section.notice::before,
  .manual-section.warning::before {
    top: 23px;
    bottom: 23px;
    left: -7px;
  }

  .project-specs {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .project-specs > div {
    min-height: auto;
  }

  .lab-facts {
    gap: 20px;
    padding: 22px 0;
  }

  .lab-record-form,
  .lab-link-groups,
  .blueprint-link-groups,
  .assessment-remediation {
    grid-template-columns: 1fr;
  }

  .manual-link-groups {
    grid-template-columns: 1fr;
  }

  .reference-link-groups,
  .reference-duo {
    grid-template-columns: 1fr;
  }

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

  .potion-chain {
    grid-template-columns: 1fr;
  }

  .potion-chain > i {
    min-height: 24px;
  }

  .reference-pager {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reference-pager > span {
    display: none;
  }

  .reference-pager .secondary-button {
    width: 100%;
    max-width: none;
  }

  .manual-card {
    grid-template-columns: 1fr;
  }

  .manual-card > img {
    height: auto;
    min-height: 0;
    aspect-ratio: 920 / 420;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .manual-facts {
    grid-template-columns: 1fr;
  }

  .manual-matrix-head {
    display: none;
  }

  .manual-matrix-row {
    display: grid;
    grid-template-columns: 1fr;
    padding: 4px 0;
  }

  .manual-matrix-row > span {
    display: grid;
    grid-template-columns: minmax(88px, 0.32fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 13px;
  }

  .manual-matrix-row > span + span {
    border-left: 0;
  }

  .manual-mobile-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
  }

  .manual-pager {
    display: grid;
    grid-template-columns: 1fr;
  }

  .manual-pager > span {
    display: none;
  }

  .manual-pager .secondary-button {
    width: 100%;
    max-width: none;
  }

  .blueprint-card {
    grid-template-columns: 1fr;
  }

  .assessment-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .assessment-card-index {
    font-size: 18px;
  }

  .assessment-question-head {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 15px;
  }

  .assessment-question-head > span {
    width: 34px;
    height: 34px;
  }

  .assessment-question-head h3 {
    font-size: 17px;
  }

  .assessment-option-list {
    padding: 12px 14px 15px;
  }

  .assessment-option {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 54px;
    padding: 9px 10px;
  }

  .assessment-explanation {
    padding: 15px;
  }

  .blueprint-card-map {
    min-height: 172px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .blueprint-layer-tabs {
    gap: 6px;
  }

  .blueprint-layer-tab {
    flex: 1 1 145px;
    min-height: 42px;
    white-space: normal;
  }

  .blueprint-canvas {
    gap: 18px;
    padding: 13px;
  }

  .blueprint-grid-frame {
    min-height: 0;
  }

  .blueprint-legend,
  .blueprint-layer-counts {
    grid-template-columns: 1fr;
  }

  .lab-record-actions > * {
    flex: 1 1 145px;
  }

  .source-card {
    align-items: start;
    flex-direction: column;
  }

  .source-card > span {
    text-align: left;
  }
}

@media (max-width: 980px) {
  .production-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orientation-list {
    grid-template-columns: 1fr;
  }

  .operation-hero,
  .operation-brief,
  .operation-phase-body,
  .operation-debrief-layout {
    grid-template-columns: 1fr;
  }

  .operation-brief > div + div {
    padding-top: 18px;
    padding-left: 0;
    border-top: 3px solid var(--green);
    border-left: 0;
  }

  .operation-brief > .warning {
    border-top-color: var(--red);
  }

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

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

@media (max-width: 720px) {
  .blueprint-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .engineering-tabs {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .engineering-tab {
    min-width: 0;
    padding: 0 8px;
    font-size: 13px;
  }

  .production-prerequisites,
  .engineering-duo {
    grid-template-columns: 1fr;
  }

  .production-time {
    white-space: normal;
  }

  .engineering-duo > div:last-child {
    padding-top: 22px;
    padding-left: 0;
    border-top: 3px solid var(--red);
    border-left: 0;
  }

  .engineering-matrix-head {
    display: none;
  }

  .engineering-matrix.columns-3 .engineering-matrix-row,
  .engineering-matrix.columns-4 .engineering-matrix-row {
    display: grid;
    grid-template-columns: 1fr;
    padding: 4px 0;
  }

  .engineering-matrix-row > span {
    display: grid;
    grid-template-columns: minmax(88px, 0.32fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 13px;
  }

  .engineering-mobile-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
  }

  .engineering-metric-grid {
    grid-template-columns: 1fr;
  }

  .operation-hero {
    gap: 18px;
    padding: 16px;
  }

  .operation-hero h2 {
    font-size: 28px;
  }

  .operation-hero-actions,
  .operation-hero-actions button {
    width: 100%;
  }

  .operation-facts,
  .operation-readiness-grid,
  .operation-phase-panel > header,
  .operation-drill-grid {
    grid-template-columns: 1fr;
  }

  .operation-section {
    padding: 23px 0;
  }

  .operation-section.warning {
    padding-left: 10px;
  }

  .operation-section-heading {
    align-items: start;
    flex-direction: column;
  }

  .operation-readiness-state,
  .operation-phase-summary {
    align-self: start;
  }

  .operation-matrix-head {
    display: none;
  }

  .operation-matrix.columns-4 .operation-matrix-row,
  .operation-matrix.columns-5 .operation-matrix-row {
    display: grid;
    grid-template-columns: 1fr;
    padding: 4px 0;
  }

  .operation-matrix-row > span {
    display: grid;
    grid-template-columns: minmax(88px, 0.32fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px 13px;
  }

  .operation-matrix-row > span + span {
    border-left: 0;
  }

  .operation-mobile-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
  }

  .operation-phase-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operation-phase-tab {
    min-height: 64px;
  }

  .operation-phase-body {
    gap: 18px;
    padding: 14px;
  }

  .operation-phase-panel > footer {
    grid-template-columns: 1fr 1fr;
    padding: 12px 14px;
  }

  .operation-phase-panel > footer #operationPhaseComplete {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
  }

  .operation-phase-panel > footer > :last-child {
    justify-self: stretch;
  }

  .operation-phase-panel > footer .secondary-button {
    width: 100%;
  }

  .operation-debrief-layout textarea {
    min-height: 190px;
  }
}

@media (max-width: 380px) {
  .brand-mark {
    display: none;
  }

  .nav-button .icon {
    display: none;
  }

  .metric-row strong {
    font-size: 20px;
  }

  .production-flow {
    grid-template-columns: 1fr;
  }

  .engineering-tab {
    display: grid;
    gap: 2px;
    min-height: 52px;
    place-content: center;
    font-size: 12px;
  }

  .blueprint-hero-facts {
    grid-template-columns: 1fr;
  }

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

  .reference-facts {
    grid-template-columns: 1fr;
  }

  .reference-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .reference-card-footer {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .reference-card-footer em {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .manual-metrics,
  .operation-card-facts,
  .operation-facts {
    grid-template-columns: 1fr;
  }

  .operation-readiness-item {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 11px;
  }

  .operation-check-mark {
    width: 30px;
    height: 30px;
  }

  .operation-phase-tab {
    grid-template-columns: 1fr;
    gap: 2px;
    text-align: center;
  }

  .operation-action-list button {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 10px;
  }
}

@media print {
  .topbar,
  .side,
  .lesson-actions,
  .blueprint-actions,
  .assessment-submit,
  .assessment-result button,
  .operation-hero-actions,
  .operation-phase-tabs,
  .operation-phase-panel > footer,
  .back-button {
    display: none;
  }

  .shell {
    display: block;
  }

  .content {
    padding: 0;
  }

  .lesson-hero,
  .project-hero,
  .lab-hero,
  .blueprint-hero,
  .assessment-hero,
  .manual-hero,
  .reference-detail-hero,
  .panel,
  .stage-card,
  .lesson-card,
  .project-card,
  .lab-card,
  .blueprint-card,
  .assessment-card,
  .assessment-question,
  .manual-card,
  .reference-card,
  .reference-category-card {
    box-shadow: none;
  }
}
