.explore-page [hidden] {
  display: none !important;
}
.explore-page main {
  max-width: 1200px;
  width: min(100% - 40px, 1200px);
  margin: 32px auto 64px;
  padding: 0;
}
.explore-page h1,
.explore-page h2,
.explore-page h3 {
  line-height: 1.13;
  letter-spacing: -0.025em;
}
.explore-page h1 {
  font-size: clamp(2.1rem, 5.1vw, 4.25rem);
  margin: 0;
  max-width: 18ch;
}
.explore-page h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 14px;
}
.explore-page h3 {
  font-size: 1.18rem;
  margin: 0 0 10px;
}
.explore-page p {
  line-height: 1.62;
}
.explore-page .eyebrow {
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.explore-page :is(main, h2, p, summary):focus-visible {
  outline: 3px solid #876118;
  outline-offset: 4px;
}
.explore-skip {
  position: absolute;
  z-index: 3;
  top: 4px;
  left: 12px;
  padding: 10px;
  background: white;
  transform: translateY(-140%);
}
.explore-skip:focus {
  transform: translateY(0);
}
.explore-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 38px;
  padding: clamp(24px, 5vw, 66px);
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #17374b, #28536d);
  border-bottom: 5px solid #c39b55;
}
.explore-hero .eyebrow {
  color: #f1d7a4;
}
.explore-hero p:not(.eyebrow) {
  max-width: 49ch;
  color: #e4edf2;
  font-size: 1.08rem;
}
.explore-page .explore-gold {
  background: #f1d7a4;
  color: #263e4c;
  border-color: #f1d7a4;
}
.hero-road {
  position: relative;
  min-height: 220px;
  border: 1px solid #ffffff3d;
  border-radius: 16px;
  background: #142d3d66;
  padding: 30px 20px;
}
.hero-road::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 2px dashed #ffffff56;
}
.hero-lane {
  position: absolute;
  left: 20px;
  height: 7px;
  border-radius: 8px;
  background: #a6cedf;
}
.hero-lane::after {
  position: absolute;
  content: "?";
  top: -11px;
  left: 100%;
  padding-left: 7px;
  font-weight: 700;
}
.hero-lane.short {
  top: 39%;
  width: calc(100% - 64px);
}
.hero-lane.long {
  top: 86%;
  width: calc(100% - 64px);
  background: #e9c27a;
}
.hero-road-label {
  position: absolute;
  left: 20px;
  top: 12%;
  font-size: 1.75rem;
  font-weight: 720;
}
.hero-road-label.second {
  top: 59%;
}
.hero-road-label small {
  font-size: 0.85rem;
  font-weight: 500;
}
.explore-library {
  margin-top: 38px;
}
.explore-filters {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 14px;
}
.explore-filters label {
  font-weight: 650;
  font-size: 0.88rem;
}
.explore-filters :is(input, select),
.course-lens select {
  margin-top: 6px;
  min-height: 46px;
}
.explore-count {
  color: var(--muted);
  font-size: 0.9rem;
}
.explore-card {
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 24px #18374809;
}
.library-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}
.library-card h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}
.library-card h3 a {
  text-decoration: none;
}
.library-card h3 a:hover {
  text-decoration: underline;
}
.library-mark {
  align-self: start;
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #e8f1f5;
  font-size: 1.5rem;
}
.explore-tags,
.model-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.explore-tags li {
  padding: 5px 10px;
  border-radius: 30px;
  color: #23465d;
  background: #eef4f6;
  font-size: 0.82rem;
  font-weight: 650;
}
.lesson-toolbar,
.lesson-toolbar > div,
.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.lesson-toolbar,
.lesson-actions {
  justify-content: space-between;
}
.lesson-toolbar > a {
  font-weight: 650;
}
.lesson-header {
  margin: 27px 0 23px;
}
.lesson-header h1 {
  font-size: clamp(2rem, 4.4vw, 3.45rem);
  max-width: 26ch;
  margin-bottom: 14px;
}
.lesson-steps ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 15px;
  padding: 0;
  list-style: none;
}
.lesson-step {
  min-height: 44px;
  background: #edf3f6;
  border: 1px solid transparent;
  color: #24475a;
  padding: 6px 13px;
  font-size: 0.88rem;
}
.lesson-step:disabled {
  opacity: 1;
  color: #516674;
  background: transparent;
  cursor: default;
}
.lesson-step[aria-current] {
  color: white;
  background: var(--brand);
}
.lesson-card > .eyebrow {
  color: #845820;
}
.lesson-card > p,
.check-feedback {
  max-width: 75ch;
}
.lesson-actions {
  margin-top: 16px;
}
#next {
  margin-left: auto;
}
#next:disabled,
#checks button:disabled {
  cursor: default;
}
.wonder-cars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  max-width: 620px;
}
.wonder-cars div {
  display: grid;
  gap: 5px;
  border-radius: 12px;
  padding: 14px 18px;
  background: #edf4f7;
  border-bottom: 4px solid #6aa3bc;
}
.wonder-cars div + div {
  background: #faf3e6;
  border-color: #c39b55;
}
.wonder-cars strong {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}
.wonder-cars small {
  font-size: 0.9rem;
}
.lesson-card fieldset {
  min-inline-size: 0;
  padding: 0;
  margin: 0 0 18px;
  border: 0;
}
.lesson-card legend {
  margin-bottom: 12px;
  font-weight: 650;
  line-height: 1.45;
}
.lesson-choice {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 650px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 13px;
  margin: 0 0 7px;
  cursor: pointer;
}
.lesson-choice:has(:checked) {
  background: #eaf2f6;
  border-color: #64879a;
}
.lesson-choice input {
  width: 19px;
  height: 19px;
  accent-color: #28536d;
  flex: none;
}
.lesson-hint {
  color: var(--muted);
  font-size: 0.93rem;
}
.experiment-layout,
.explain-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 18px;
  align-items: start;
}
.experiment-controls,
.experiment-results,
.course-lens,
.model-details,
.apply-insight {
  border-radius: 12px;
  padding: clamp(14px, 2vw, 22px);
  background: #edf4f7;
}
.experiment-results {
  background: #f8f5ee;
}
.model-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px;
  align-items: center;
  font-size: 0.94rem;
  font-weight: 650;
  margin: 14px 0 4px;
}
.model-control span[aria-hidden="true"] {
  font-variant-numeric: tabular-nums;
  color: #21465d;
}
.model-control input {
  grid-column: 1 / -1;
  width: 100%;
  height: 30px;
  padding: 0;
  accent-color: var(--brand);
}
.results-heading,
.stop-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 4px 10px;
}
.results-heading span {
  font-size: 0.8rem;
  color: var(--muted);
}
.stop-row {
  margin: 13px 0;
}
.stop-track {
  display: flex;
  position: relative;
  height: 20px;
  margin: 6px 4px 0 0;
  background: #e8e3d7;
  border-radius: 4px;
}
.track-reaction {
  background: #cb9d50;
}
.track-braking {
  background: #3e7690;
}
.track-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: #1e3949;
}
.stop-row p {
  margin: 5px 0 0;
  font-size: 0.88rem;
}
.model-legend {
  font-size: 0.83rem;
  gap: 8px 15px;
}
.model-legend li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 2px;
  background: #cb9d50;
}
.model-legend li + li::before {
  background: #3e7690;
}
.model-summary {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d5c8ae;
  font-weight: 650;
  line-height: 1.45;
}
.model-details {
  margin-top: 16px;
}
.model-details summary {
  cursor: pointer;
  font-weight: 650;
}
.model-details p {
  margin-bottom: 0;
}
.explain-layout figure {
  margin: 0;
}
.braking-graph {
  display: block;
  width: 100%;
  max-width: 610px;
  height: auto;
  background: #f4f8fa;
  border-radius: 12px;
}
.braking-graph text {
  font-size: 17px;
  fill: #24475a;
}
.graph-grid {
  fill: none;
  stroke: #d4e1e6;
}
.graph-axis {
  fill: none;
  stroke: #35566b;
  stroke-width: 2;
}
.graph-curve {
  fill: none;
  stroke: #39738f;
  stroke-width: 4;
}
.graph-first {
  fill: #193e56;
}
.graph-second {
  fill: #966524;
}
.lesson-equation {
  font-size: 1.6rem;
  font-weight: 620;
}
.fraction {
  display: inline-grid;
  vertical-align: middle;
  text-align: center;
  margin-left: 5px;
  line-height: 1.2;
}
.fraction span + span {
  border-top: 2px solid currentColor;
  padding: 2px 7px 0;
}
.course-lens select {
  display: block;
  max-width: 270px;
}
#lens-copy {
  margin-top: 16px;
}
#lens-copy p {
  margin-bottom: 0;
}
.check-feedback,
.solution-hidden,
.prediction-result {
  padding: 11px 14px;
  background: #faf1e1;
  border-left: 3px solid #b18b48;
}
.check-feedback.correct {
  background: #eef6f1;
  border-color: #39704d;
}
.present-mode .site-header,
.present-mode .site-footer,
.present-mode .lesson-toolbar > a {
  display: none;
}
.present-mode .lesson-toolbar {
  justify-content: flex-end;
}
.present-mode main {
  max-width: 1450px;
  width: min(100% - 32px, 1450px);
  margin-top: 20px;
}
.present-mode .lesson-card {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}
.present-mode .stop-track {
  height: 28px;
}
.present-mode .braking-graph {
  max-width: 760px;
}
@media (max-width: 800px) {
  .explore-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .explore-filters label:first-child {
    grid-column: 1 / -1;
  }
  .experiment-layout,
  .explain-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .explore-page main {
    width: calc(100% - 28px);
    margin-top: 20px;
  }
  .explore-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .hero-road {
    min-height: 155px;
  }
  .hero-road-label {
    top: 8%;
    font-size: 1.4rem;
  }
  .hero-road-label.second {
    top: 55%;
  }
  .library-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .library-mark {
    display: none;
  }
  .lesson-step {
    padding-inline: 9px;
  }
  .lesson-toolbar button {
    padding-inline: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .explore-page *,
  .explore-page *::before,
  .explore-page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (min-width: 801px) {
  .present-mode .lesson-header h1 {
    max-width: 100%;
    font-size: clamp(2rem, 3vw, 3rem);
  }
  .present-mode .lesson-header {
    margin: 15px 0;
  }
  .present-mode .explain-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  }
  .present-mode .braking-graph {
    width: min(100%, 590px);
  }
}

.experiment-controls .model-control {
  margin-top: 0;
}
.experiment-options {
  grid-column: 1 / -1;
}
.experiment-options .model-details {
  margin: 0 0 10px;
}
#distance-scale {
  margin: 7px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.present-mode .lesson-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 0;
  background: var(--paper);
}
.present-mode
  :is(#stage-title, .prediction-result, .apply-insight, .check-feedback) {
  scroll-margin-top: 120px;
}
.present-mode .reveal-here {
  margin-top: 8px;
}

.explore-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#lesson-results {
  display: grid;
  gap: 14px;
}
.pilot-experiment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  align-items: start;
  gap: 14px;
  margin: 12px 0;
}
.pilot-experiment select {
  grid-column: 1 / -1;
}
.pilot-result {
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.35;
}
.pilot-graph {
  display: block;
  width: 100%;
  max-width: 550px;
  height: auto;
  background: #fffdf9;
  border-radius: 10px;
}
.pilot-graph text {
  fill: #24475a;
  font-size: 16px;
}
.pilot-dash {
  fill: none;
  stroke: #647e8e;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}
.pilot-accent,
.pilot-field {
  fill: none;
  stroke: #966524;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pilot-field {
  stroke: #39738f;
}
.pilot-sheet {
  fill: #e2eff4;
  stroke: #35566b;
  stroke-width: 2;
}
.pilot-cut {
  fill: #ead2a1;
  stroke: #966524;
  stroke-width: 1.5;
}
.pilot-revealed:focus-visible {
  outline: 2px solid #876118;
  outline-offset: 4px;
}
#apply-feedback {
  margin-top: 12px;
}
@media (max-width: 800px) {
  .pilot-experiment {
    grid-template-columns: minmax(0, 1fr);
  }
}

.present-mode .pilot-graph {
  max-height: min(375px, 51vh);
}

@media (max-width: 480px) {
  .pilot-graph text {
    font-size: 24px;
  }
}
