.chapter-nav {
  display: flex;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 13px;
  margin: 0 0 22px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.chapter-nav button {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 6px;
  padding: 11px 19px;
  font-size: 13px;
  white-space: nowrap;
  color: #91a7b0;
}
.chapter-nav button span {
  font-family: monospace;
  font-size: 9px;
  color: #627e89;
}
.chapter-nav button[aria-pressed='true'] {
  background: #244037;
  color: #b7ecd1;
}
.chapter-nav button[aria-pressed='true'] span {
  color: #8ebea7;
}
.chapter-nav button:hover {
  background: #1e3036;
}
.chapter-side {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}
.lab-card {
  border: 1px solid #2a3b43;
  border-radius: 11px;
  background: linear-gradient(130deg, #14242b, #111d24);
  padding: 23px;
  min-width: 0;
}
.lab-card h2 {
  font-size: 20px;
  font-weight: 550;
  line-height: 1.6;
  margin: 14px 0 12px;
}
.lab-card h3 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  margin: 13px 0 7px;
}
.lab-copy {
  color: #a0b6bf;
  font-size: 12px;
  line-height: 1.95;
  margin: 10px 0;
}
.lab-note {
  font-size: 10px;
  line-height: 1.9;
  color: #78939f;
  margin: 13px 0;
}
.lab-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0 8px;
}
.lab-range {
  margin-top: 21px;
}
.lab-range label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #c0d2d9;
  font-size: 12px;
}
.lab-range output {
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
.lab-range .range-limits {
  font-size: 10px;
  margin: 11px 0 13px;
}
.lab-range input {
  margin: 17px 0;
}
.step-selector {
  display: flex;
  gap: 7px;
  margin: 21px 0 17px;
}
.step-selector button {
  border: 1px solid #34505a;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 11px;
  color: #8da4af;
}
.step-selector button[aria-pressed='true'] {
  background: #3e6b59;
  border-color: #8fcbad;
  color: #ceefdd;
}
.hemisphere-buttons,
.city-presets {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.hemisphere-buttons button,
.city-presets button {
  padding: 8px 10px;
  font-size: 11px;
  border: 1px solid #344b54;
  border-radius: 5px;
  color: #a9c1c9;
}
.city-presets button:hover,
.hemisphere-buttons button:hover {
  border-color: var(--mint);
  background: #243d34;
}
.coordinate-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 17px;
  background: #0d191f;
  border: 1px solid #34463f;
  border-radius: 7px;
}
.coordinate-readout strong {
  font-size: 22px;
  font-weight: 400;
  color: var(--mint);
}
.coordinate-readout strong:nth-child(2) {
  color: var(--violet);
}
.coordinate-readout span {
  width: 100%;
  font-size: 12px;
  color: #a8bec5;
}
.knowledge-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #a2d6bc;
  font-size: 12px;
  line-height: 1.8;
  width: 100%;
  padding: 16px 0 0;
  text-align: left;
}
.knowledge-link .icon {
  width: 15px;
}
.chapter-below {
  margin-top: 20px;
}
.lab-two-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.lab-card select {
  color: #c8ddd9;
  background: #152c32;
  border: 1px solid #425d65;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  padding: 9px;
}
.chapter-transport .scale-note {
  line-height: 1.85;
}
.chapter-side .primary-button {
  font-size: 12px;
}
.lab-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.lab-tabs button {
  padding: 8px 11px;
  border: 1px solid #354c54;
  border-radius: 5px;
  color: #a1b8c3;
  font-size: 12px;
}
.lab-tabs button[aria-pressed='true'] {
  background: #29483d;
  color: #b6e9d0;
  border-color: #668d78;
}
.stage-caption {
  position: absolute;
  left: 22px;
  bottom: 24px;
  color: #99b7c0;
  font-size: 12px;
  line-height: 1.8;
  max-width: 65%;
  pointer-events: none;
}
.stage-caption strong {
  color: #c9e2d8;
  font-weight: 500;
}
.lab-stat {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #2c3d45;
  font-size: 12px;
  color: #9bb5bf;
}
.lab-stat strong {
  font-size: 22px;
  color: #cce4db;
  font-weight: 400;
}
.lab-card canvas {
  max-width: 100%;
}
.lab-card details summary {
  font-size: 12px;
  color: #a4c6b7;
  cursor: pointer;
  padding: 12px 0;
}
.cause-chain {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: #a4c2b6;
  line-height: 1.8;
  padding: 15px;
  border: 1px solid #345444;
  border-radius: 7px;
  background: #1a3025aa;
  margin: 12px 0;
}
.cause-chain span {
  color: #648377;
}
.lab-figure {
  position: absolute;
  inset: 60px 20px 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.lab-figure svg {
  width: 100%;
  max-height: 100%;
  overflow: visible;
}
.lab-figure text {
  font-family: inherit;
}
.compact-list {
  font-size: 12px;
  color: #a1b6c0;
  line-height: 2;
  padding-left: 18px;
}
.lab-legend {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  margin: 15px 0;
  font-size: 11px;
  color: #a0b5be;
}
.lab-legend i {
  display: inline-block;
  width: 12px;
  height: 8px;
  border-radius: 2px;
  margin-right: 5px;
}
.chapter-transport input[type='range'] {
  max-width: 100%;
}
.slope-map {
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 650;
  border-radius: 8px;
  background: #0d1920;
}
.lab-choice {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.lab-choice button {
  padding: 8px 12px;
  border: 1px solid #405a60;
  color: #b1c9c9;
  border-radius: 5px;
  font-size: 12px;
}
@media (max-width: 850px) {
  .chapter-nav {
    gap: 4px;
  }
  .chapter-nav button {
    padding: 10px 14px;
  }
  .lab-two-cards {
    gap: 15px;
  }
  .chapter-side {
    width: 100%;
  }
  .chapter-side .lab-card {
    padding: 21px;
  }
  .lab-card h2 {
    font-size: 19px;
  }
}
@media (max-width: 650px) {
  .chapter-nav {
    margin-bottom: 15px;
    gap: 3px;
    padding-bottom: 10px;
  }
  .chapter-nav button {
    padding: 10px 11px;
    font-size: 12px;
    gap: 6px;
  }
  .chapter-nav button span {
    font-size: 8px;
  }
  .lab-two-cards {
    grid-template-columns: 1fr;
  }
  .lab-card {
    padding: 20px;
  }
  .lab-card h2 {
    font-size: 20px;
  }
  .lab-copy {
    font-size: 13px;
  }
  .lab-note {
    font-size: 11px;
  }
  .lab-range label {
    font-size: 13px;
  }
  .city-presets button {
    min-height: 37px;
  }
  .stage-caption {
    font-size: 10px;
    left: 15px;
    bottom: 18px;
    max-width: 70%;
  }
  .lab-figure {
    inset: 60px 8px 25px;
  }
  .lab-tabs {
    gap: 5px;
  }
  .lab-tabs button {
    font-size: 11px;
    padding: 9px;
  }
  .chapter-transport .speed-label {
    display: none;
  }
}
