:root {
  --navy: #102a43;
  --navy-2: #173f5f;
  --blue: #2f6f9f;
  --teal: #276b63;
  --ink: #20242a;
  --muted: #66717c;
  --line: #d9dee5;
  --soft: #f4f7f9;
  --white: #ffffff;
  --warm: #f3eee4;
  --green-soft: #e5f0eb;
  --orange-soft: #f5ead8;
  --red-soft: #f4e3e3;
  --shadow: 0 14px 38px rgba(25, 45, 65, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--soft);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 9px 13px;
  color: white;
  background: var(--navy);
  transform: translateY(-160%);
}

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

.masthead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding: 32px 40px;
  color: white;
  background:
    radial-gradient(
      circle at 82% 18%,
      rgba(89, 152, 194, 0.34),
      transparent 28%
    ),
    linear-gradient(135deg, #0e2843, #214f75);
}

.eyebrow,
.small-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  color: #9dbbd3;
}

.masthead h1 {
  margin: 7px 0 5px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.subtitle {
  max-width: 760px;
  margin: 0;
  color: #d7e4ee;
  font-size: 1.05rem;
}







.app-shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  max-width: 1720px;
  margin: 0 auto;
  min-height: calc(100vh - 150px);
}

.journey {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 26px 18px;
  color: white;
  background: var(--navy);
}

.journey-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 20px;
  padding: 0 8px;
}

.journey-heading .small-label {
  color: #9fb8cd;
}

.journey-heading strong {
  font-size: 1.3rem;
}

.point-navigation {
  display: grid;
  gap: 5px;
}

.point-button {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 9px;
  align-items: center;
  width: 100%;
  border: 0;
  padding: 8px 10px;
  text-align: left;
  color: #dce7ee;
  background: transparent;
  border-radius: 9px;
}

.point-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.point-button.active {
  color: var(--navy);
  background: white;
}

.point-number {
  font-weight: 850;
}

.point-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.84rem;
}

.progress-area {
  margin-top: 24px;
  padding: 0 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #b9cddd;
  font-size: 0.76rem;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.17);
  border-radius: 999px;
}

.progress-bar {
  height: 100%;
  width: 5%;
  background: white;
  transition: width 180ms ease;
}

.presentation {
  min-width: 0;
  padding: 30px;
}

.presentation-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.presentation-header h2 {
  margin: 5px 0 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.navigation-buttons {
  display: flex;
  gap: 8px;
}

.navigation-buttons button,
.review-bar button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.primary-button {
  color: white !important;
  border-color: var(--blue) !important;
  background: var(--blue) !important;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
  gap: 18px;
}

.experiment-pane,
.interpretation-pane,
.review-bar,
.review-answer {
  border: 1px solid var(--line);
  background: white;
  box-shadow: var(--shadow);
}

.experiment-pane {
  overflow: hidden;
  border-radius: 18px;
}

.question-block {
  padding: 28px 30px;
  border-bottom: 1px solid var(--line);
}

.question-block .small-label,
.reasoning-block .small-label,
.review-bar .small-label {
  color: var(--blue);
}

.question-block h3 {
  max-width: 950px;
  margin: 9px 0 0;
  font-size: clamp(1.45rem, 2.5vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.experiment-content {
  min-height: 500px;
  padding: 30px;
}

.placeholder-visual {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 40px;
  text-align: center;
  border: 1px dashed #bcc8d0;
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      rgba(47, 111, 159, 0.04),
      rgba(39, 107, 99, 0.07)
    );
}

.placeholder-visual strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.45rem;
}

.placeholder-visual p {
  max-width: 660px;
  color: var(--muted);
}

.interpretation-pane {
  border-radius: 18px;
  overflow: hidden;
}

.reasoning-block {
  padding: 21px 23px;
  border-bottom: 1px solid var(--line);
}

.reasoning-block:last-child {
  border-bottom: 0;
}

.reasoning-block p {
  margin: 8px 0 0;
  color: #4c5660;
  line-height: 1.55;
}

.decision-block {
  background: var(--green-soft);
}

.ensemble-block {
  background: var(--warm);
}

.review-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
  padding: 20px 23px;
  border-radius: 14px;
}

.review-bar p {
  margin: 6px 0 0;
}

.review-answer {
  margin-top: 8px;
  padding: 18px 23px;
  border-radius: 12px;
  color: #4d5962;
}

.diversity-lab {
  display: grid;
  gap: 22px;
}

.controls {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.controls label {
  display: grid;
  gap: 6px;
  min-width: 210px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.controls select {
  padding: 10px 12px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.metric {
  padding: 18px;
  border-radius: 12px;
  background: #eef2f5;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.77rem;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 2rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

th {
  background: #eef2f5;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shared {
  background: var(--red-soft);
}

.complementary {
  background: var(--orange-soft);
}

.correct {
  background: var(--green-soft);
}

.interpretation-callout {
  padding: 17px 19px;
  border-left: 4px solid var(--teal);
  background: var(--green-soft);
}





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

  .journey {
    position: static;
    min-height: 0;
  }

  .point-navigation {
    grid-template-columns: repeat(5, 1fr);
  }

  .point-button {
    display: block;
    text-align: center;
  }

  .point-name {
    display: none;
  }

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

@media (max-width: 680px) {
  .masthead,
  .presentation-header,
  .review-bar {
    display: block;
  }

  .masthead {
    padding: 26px 20px;
  }

  .mode-switch,
  .navigation-buttons {
    margin-top: 18px;
  }

  .presentation {
    padding: 18px;
  }

  .point-navigation {
    grid-template-columns: repeat(4, 1fr);
  }

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


/* ==========================================================
   POINT-SPECIFIC LEARNING CONTENT
   ========================================================== */

.concept-lab {
  display: grid;
  gap: 22px;
}

.concept-intro {
  max-width: 900px;
}

.concept-intro .small-label {
  color: var(--blue);
}

.concept-intro p {
  margin: 9px 0 0;
  font-size: 1.16rem;
  line-height: 1.65;
}

.learning-cycle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.learning-card {
  min-height: 245px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafb;
}

.learning-number {
  display: block;
  margin-bottom: 35px;
  color: #87929b;
  font-size: 0.8rem;
  font-weight: 800;
}

.learning-card .small-label {
  color: var(--blue);
}

.learning-card h4 {
  margin: 7px 0 8px;
  font-size: 1.15rem;
}

.learning-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.experiment-card {
  background: #f5f1e8;
}

.evidence-card {
  background: #edf4f1;
}

.experiment-preview {
  padding: 22px;
  border: 1px solid #bfcbd3;
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      rgba(47, 111, 159, 0.035),
      rgba(39, 107, 99, 0.07)
    );
}

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

.preview-heading .small-label {
  color: var(--teal);
}

.preview-heading h4 {
  margin: 5px 0 0;
  font-size: 1.3rem;
}

.build-state {
  padding: 5px 8px;
  border: 1px solid #b6c3c9;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.experiment-preview > p {
  max-width: 850px;
  color: var(--muted);
}

.experiment-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 20px;
}

.experiment-flow span:nth-child(odd) {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 0.8rem;
  font-weight: 750;
}

.experiment-flow span:nth-child(even) {
  color: #8b959d;
}


@media (max-width: 900px) {
  .learning-cycle {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   POINT 6 — GRADIENT DESCENT LAB
   ========================================================== */

.gradient-lab {
  display: grid;
  gap: 18px;
}

.gd-intuition {
  max-width: 900px;
}

.gd-intuition .small-label,
.gd-card-heading .small-label,
.gd-controls-card .small-label,
.gd-gradient-box .small-label {
  color: var(--blue);
}

.gd-intuition h4 {
  margin: 7px 0 6px;
  font-size: 1.45rem;
}

.gd-intuition p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.gd-intuition code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #edf1f4;
}

.gd-state-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.gd-state {
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7f9fa;
}

.gd-state span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.gd-state strong {
  display: block;
  margin-top: 4px;
  font-size: 1.55rem;
}

.gd-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.7fr);
  gap: 14px;
}

.gd-chart-card,
.gd-controls-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.gd-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.gd-card-heading h4,
.gd-controls-card h4 {
  margin: 5px 0 0;
  font-size: 1.1rem;
}

.gd-legend {
  color: var(--muted);
  font-size: 0.72rem;
}

.gd-chart,
.gd-loss-chart {
  display: block;
  width: 100%;
  height: auto;
}

.gd-axis {
  stroke: #8f9ba4;
  stroke-width: 1.3;
}

.gd-grid-line {
  stroke: #e4e8eb;
  stroke-width: 1;
}

.gd-axis-label,
.gd-tick-label,
.gd-empty-chart {
  fill: #73808a;
  font-size: 12px;
  font-family: inherit;
}

.gd-point {
  fill: var(--navy-2);
  stroke: white;
  stroke-width: 2;
}

.gd-residual {
  stroke: #b87927;
  stroke-width: 2;
  stroke-dasharray: 5 4;
  opacity: 0.72;
}

.gd-fit-line {
  stroke: var(--blue);
  stroke-width: 4;
  stroke-linecap: round;
}

.gd-controls-card {
  display: flex;
  flex-direction: column;
}

.gd-control {
  display: grid;
  gap: 6px;
  margin-top: 19px;
}

.gd-control > span {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 0.8rem;
}

.gd-control strong {
  color: var(--ink);
}

.gd-control input[type="range"] {
  width: 100%;
}

.gd-actions {
  display: grid;
  gap: 8px;
  margin-top: 23px;
}

.gd-actions button {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.gd-gradient-box {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  background: #eef2f4;
}

.gd-gradient-box div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.79rem;
}

.gd-gradient-box strong {
  color: var(--ink);
}

.gd-loss-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gd-loss-point {
  fill: var(--teal);
}

.gd-direction {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf1f3;
  font-size: 0.72rem;
  font-weight: 750;
}

.gd-down {
  color: #286448;
  background: #e2efe8;
}

.gd-up {
  color: #8a3f3f;
  background: #f3e1e1;
}


@media (max-width: 1000px) {
  .gd-main-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 700px) {
  .gd-state-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gd-card-heading {
    display: block;
  }

  .gd-legend,
  .gd-direction {
    display: inline-block;
    margin-top: 8px;
  }
}


/* ==========================================================
   POINT 8 — LOGISTIC REGRESSION
   ========================================================== */

.logistic-lab {
  display: grid;
  gap: 18px;
}

.logistic-intro h4 {
  margin: 6px 0;
  font-size: 1.4rem;
}

.logistic-intro p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.logistic-intro code {
  padding: 3px 6px;
  border-radius: 5px;
  background: #edf1f4;
}

.logistic-equation-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.logistic-equation-flow div {
  min-width: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafb;
}

.logistic-equation-flow div span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}

.logistic-equation-flow div strong {
  display: block;
  margin-top: 4px;
}

.logistic-equation-flow > span {
  color: #87929b;
}

.logistic-main-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.65fr)
    minmax(250px, 0.65fr);
  gap: 13px;
}

.logistic-chart-card,
.logistic-controls,
.confusion-card,
.metric-card,
.prediction-table-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.logistic-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.logistic-card-heading h4,
.logistic-controls h4,
.confusion-card h4,
.metric-card h4 {
  margin: 5px 0 10px;
}

.boundary-pill {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf1f3;
  font-size: 0.7rem;
  font-weight: 750;
}

.logistic-chart {
  display: block;
  width: 100%;
  height: auto;
}

.log-axis {
  stroke: #939fa8;
  stroke-width: 1.5;
}

.log-grid {
  stroke: #e5e9ec;
  stroke-width: 1;
}

.log-label,
.threshold-label {
  fill: #74818b;
  font-size: 12px;
}

.sigmoid-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.threshold-line {
  stroke: #b87927;
  stroke-width: 2;
  stroke-dasharray: 7 5;
}

.decision-boundary-line {
  stroke: var(--teal);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.class-zero-point {
  fill: #435568;
  stroke: white;
  stroke-width: 2;
}

.class-one-point {
  fill: #b87927;
  stroke: white;
  stroke-width: 2;
}

.probability-guide {
  stroke: #bbc5cc;
  stroke-width: 1.3;
  stroke-dasharray: 3 4;
}

.probability-point {
  fill: var(--blue);
}

.logistic-controls {
  display: flex;
  flex-direction: column;
}

.logistic-controls label {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.logistic-controls label > span {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 0.82rem;
}

.logistic-controls input {
  width: 100%;
}

.logistic-controls > button {
  min-height: 42px;
  margin-top: 22px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.logistic-state {
  margin-top: 18px;
  padding: 14px;
  border-radius: 10px;
  background: #eef2f4;
}

.logistic-state p {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.logistic-state strong {
  color: var(--ink);
}

.classification-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.confusion-matrix {
  display: grid;
  grid-template-columns:
    minmax(80px, 0.8fr)
    1fr
    1fr;
  gap: 5px;
}

.confusion-heading {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 7px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  text-align: center;
}

.confusion-cell {
  display: grid;
  place-items: center;
  min-height: 85px;
  padding: 10px;
  border-radius: 9px;
  background: #eef2f4;
}

.confusion-cell span {
  color: var(--muted);
  font-size: 0.72rem;
}

.confusion-cell strong {
  font-size: 1.8rem;
}

.true-cell {
  background: var(--green-soft);
}

.false-cell {
  background: #f4e4e1;
}

.classification-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.classification-metrics div {
  padding: 15px;
  border-radius: 10px;
  background: #eef2f4;
}

.classification-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
}

.classification-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 1.6rem;
}

.prediction-table-card {
  overflow: hidden;
}


@media (max-width: 1000px) {
  .logistic-main-grid,
  .classification-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 650px) {
  .classification-metrics {
    grid-template-columns: 1fr;
  }
}

/* POINT 8 — LOGISTIC REGRESSION */

.logistic-lab {
  display: grid;
  gap: 18px;
}

.logistic-intro h4 {
  margin: 6px 0;
  font-size: 1.4rem;
}

.logistic-intro p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.logistic-intro code {
  padding: 3px 6px;
  border-radius: 5px;
  background: #edf1f4;
}

.logistic-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.logistic-flow span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: .8rem;
  font-weight: 750;
}

.logistic-flow b {
  color: var(--muted);
}

.logistic-workspace {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(250px,.65fr);
  gap: 13px;
}

.logistic-chart-card,
.logistic-controls {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.logistic-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.logistic-heading h4,
.logistic-controls h4 {
  margin: 5px 0 10px;
}

.boundary-pill {
  padding: 5px 9px;
  height: fit-content;
  border-radius: 999px;
  background: #edf1f3;
  color: var(--muted);
  font-size: .72rem;
}

.logistic-chart {
  display: block;
  width: 100%;
}

.log-axis {
  stroke: #929da5;
  stroke-width: 1.5;
}

.log-grid {
  stroke: #e4e9ec;
}

.log-label {
  fill: #74818b;
  font-size: 12px;
}

.sigmoid-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 4;
}

.threshold-line {
  stroke: #b87927;
  stroke-width: 2;
  stroke-dasharray: 7 5;
}

.decision-line {
  stroke: var(--teal);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.negative-point {
  fill: #405568;
  stroke: white;
  stroke-width: 2;
}

.positive-point {
  fill: #b87927;
  stroke: white;
  stroke-width: 2;
}

.probability-point {
  fill: var(--blue);
}

.logistic-controls {
  display: flex;
  flex-direction: column;
}

.logistic-controls label {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.logistic-controls label span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .82rem;
}

.logistic-controls input {
  width: 100%;
}

.logistic-controls button {
  min-height: 42px;
  margin-top: 22px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.logistic-metrics {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 8px;
}

.logistic-metrics article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.logistic-metrics span {
  display: block;
  color: var(--muted);
  font-size: .7rem;
}

.logistic-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 1.4rem;
}

@media (max-width:1000px) {
  .logistic-workspace {
    grid-template-columns: 1fr;
  }

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


/* ==========================================================
   POINT 9 — KNN
   ========================================================== */

.knn-lab {
  display: grid;
  gap: 18px;
}

.knn-intro h4 {
  margin: 6px 0;
  font-size: 1.4rem;
}

.knn-intro p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.knn-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.knn-flow span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 0.8rem;
  font-weight: 750;
}

.knn-flow b {
  color: var(--muted);
}

.knn-state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.knn-state-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7f9fa;
}

.knn-state-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.knn-state-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.55rem;
}

.knn-workspace {
  display: grid;
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(250px, 0.65fr);
  gap: 13px;
}

.knn-chart-card,
.knn-controls,
.knn-neighbours-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.knn-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.knn-card-heading h4,
.knn-controls h4 {
  margin: 5px 0 10px;
}

.knn-legend {
  color: var(--muted);
  font-size: 0.72rem;
}

.knn-chart {
  display: block;
  width: 100%;
}

.knn-grid {
  stroke: #e3e8eb;
  stroke-width: 1;
}

.knn-axis-label,
.knn-point-label,
.knn-rank-label,
.knn-query-label {
  fill: #74818b;
  font-size: 12px;
}

.knn-rank-label {
  fill: var(--teal);
  font-weight: 800;
}

.knn-class-zero {
  fill: #405568;
  stroke: white;
  stroke-width: 2;
}

.knn-class-one {
  fill: #b87927;
  stroke: white;
  stroke-width: 2;
}

.knn-selected {
  stroke: var(--teal);
  stroke-width: 4;
}

.knn-neighbour-line {
  stroke: var(--teal);
  stroke-width: 2;
  stroke-dasharray: 5 4;
  opacity: 0.7;
}

.knn-query {
  fill: #dbece8;
  stroke: var(--teal);
  stroke-width: 4;
}

.knn-query-centre {
  fill: var(--teal);
}

.knn-query-label {
  fill: var(--teal);
  font-weight: 850;
}

.knn-controls {
  display: flex;
  flex-direction: column;
}

.knn-controls label {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.knn-controls label > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.knn-controls input {
  width: 100%;
}

.knn-controls > button {
  min-height: 42px;
  margin-top: 22px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.knn-formula {
  margin-top: 18px;
  padding: 14px;
  border-radius: 10px;
  background: #eef2f4;
}

.knn-formula p {
  margin: 8px 0 0;
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: 0.82rem;
}

.knn-neighbours-card {
  overflow: hidden;
}


@media (max-width: 1000px) {
  .knn-workspace {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 700px) {
  .knn-state-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ==========================================================
   POINT 10 — DECISION TREES
   ========================================================== */

.tree-lab {
  display: grid;
  gap: 18px;
}

.tree-intro h4 {
  margin: 6px 0;
  font-size: 1.4rem;
}

.tree-intro p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.tree-intro code {
  padding: 3px 6px;
  border-radius: 5px;
  background: #edf1f4;
}

.tree-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tree-flow span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 0.8rem;
  font-weight: 750;
}

.tree-flow b {
  color: var(--muted);
}

.tree-state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.tree-state-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7f9fa;
}

.tree-state-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}

.tree-state-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.35rem;
}

.tree-workspace {
  display: grid;
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(250px, 0.65fr);
  gap: 13px;
}

.tree-chart-card,
.tree-controls,
.tree-child-card,
.tree-candidates-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.tree-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.tree-card-heading h4,
.tree-controls h4,
.tree-child-card h4 {
  margin: 5px 0 10px;
}

.tree-rule-pill {
  padding: 5px 9px;
  height: fit-content;
  border-radius: 999px;
  background: #edf1f3;
  color: var(--muted);
  font-size: 0.72rem;
}

.tree-chart {
  display: block;
  width: 100%;
}

.tree-grid {
  stroke: #e3e8eb;
}

.tree-axis-label,
.tree-point-label {
  fill: #74818b;
  font-size: 12px;
}

.tree-class-zero {
  fill: #405568;
  stroke: white;
  stroke-width: 2;
}

.tree-class-one {
  fill: #b87927;
  stroke: white;
  stroke-width: 2;
}

.tree-split-line {
  stroke: var(--teal);
  stroke-width: 4;
  stroke-dasharray: 8 5;
}

.tree-controls {
  display: flex;
  flex-direction: column;
}

.tree-controls label {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.tree-controls label > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.tree-controls select,
.tree-controls input {
  width: 100%;
}

.tree-controls select {
  padding: 9px;
  border: 1px solid #cbd4db;
  border-radius: 8px;
  background: white;
}

.tree-controls button {
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.tree-formula {
  margin-top: 18px;
  padding: 14px;
  border-radius: 10px;
  background: #eef2f4;
}

.tree-formula p {
  margin: 7px 0 0;
  font-size: 0.8rem;
}

.tree-child-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.tree-child-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.tree-child-metrics p {
  margin: 0;
  padding: 11px;
  border-radius: 8px;
  background: #eef2f4;
  color: var(--muted);
  font-size: 0.74rem;
}

.tree-child-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.2rem;
}

.tree-candidates-card {
  overflow: hidden;
}


@media (max-width: 1000px) {
  .tree-workspace {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 700px) {
  .tree-state-grid,
  .tree-child-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tree-child-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ==========================================================
   POINT 11 — RANDOM FOREST
   ========================================================== */

.forest-lab {
  display: grid;
  gap: 18px;
}

.forest-intro h4 {
  margin: 6px 0;
  font-size: 1.4rem;
}

.forest-intro p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.forest-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.forest-flow span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 0.8rem;
  font-weight: 750;
}

.forest-flow b {
  color: var(--muted);
}

.forest-state-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.forest-state-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.forest-state-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.forest-state-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.45rem;
}

.forest-workspace {
  display: grid;
  grid-template-columns:
    minmax(0, 1.55fr)
    minmax(255px, 0.65fr);
  gap: 13px;
}

.forest-chart-card,
.forest-controls,
.forest-members-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.forest-card-heading h4,
.forest-controls h4 {
  margin: 5px 0 10px;
}

.forest-chart {
  display: block;
  width: 100%;
}

.forest-grid {
  stroke: #e3e8eb;
}

.forest-axis-label,
.forest-point-label {
  fill: #74818b;
  font-size: 12px;
}

.forest-class-zero {
  fill: #405568;
  stroke: white;
  stroke-width: 2;
}

.forest-class-one {
  fill: #b87927;
  stroke: white;
  stroke-width: 2;
}

.forest-query {
  fill: #dbece8;
  stroke: var(--teal);
  stroke-width: 4;
}

.forest-query-centre {
  fill: var(--teal);
}

.forest-query-label {
  fill: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.forest-controls {
  display: flex;
  flex-direction: column;
}

.forest-controls label {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.forest-controls label > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.forest-controls input {
  width: 100%;
}

.forest-controls > button {
  min-height: 42px;
  margin-top: 22px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.forest-members {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.forest-tree-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.forest-tree-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.forest-tree-top > span {
  font-weight: 800;
}

.forest-tree-top strong {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.forest-vote-zero {
  background: #e4e9ed;
  color: #405568;
}

.forest-vote-one {
  background: #f3e7d5;
  color: #8a5a1d;
}

.forest-tree-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.forest-tree-card p strong {
  color: var(--ink);
}

.forest-rule {
  display: grid;
  gap: 5px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.forest-rule span {
  color: var(--muted);
  font-size: 0.72rem;
}

.forest-rule strong {
  color: var(--ink);
}


@media (max-width: 1050px) {
  .forest-workspace {
    grid-template-columns: 1fr;
  }

  .forest-state-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


@media (max-width: 700px) {
  .forest-state-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ==========================================================
   POINT 12 — FEATURE ENGINEERING + PIPELINES
   ========================================================== */

.pipeline-lab {
  display: grid;
  gap: 18px;
}

.pipeline-intro h4 {
  margin: 6px 0;
  font-size: 1.4rem;
}

.pipeline-intro p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.pipeline-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pipeline-flow > b {
  color: var(--muted);
}

.pipeline-step {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.pipeline-step > span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-size: .7rem;
}

.pipeline-step strong {
  font-size: .82rem;
}

.pipeline-step small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.pipeline-state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.pipeline-state-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7f9fa;
}

.pipeline-state-grid span {
  display: block;
  color: var(--muted);
  font-size: .74rem;
}

.pipeline-state-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.4rem;
}

.pipeline-workspace {
  display: grid;
  grid-template-columns:
    minmax(0, 1.55fr)
    minmax(260px, .65fr);
  gap: 13px;
}

.pipeline-chart-card,
.pipeline-controls,
.pipeline-transform-card,
.pipeline-model-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.pipeline-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pipeline-heading h4,
.pipeline-controls h4,
.pipeline-model-card h4 {
  margin: 5px 0 10px;
}

.pipeline-status-pill {
  height: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}

.pipeline-safe {
  color: #286448;
  background: #e2efe8;
}

.pipeline-danger {
  color: #923e3e;
  background: #f3e1e1;
}

.pipeline-chart {
  display: block;
  width: 100%;
}

.pipeline-axis {
  stroke: #8f9aa3;
}

.pipeline-grid-line {
  stroke: #e3e8eb;
}

.pipeline-axis-label,
.pipeline-point-label,
.pipeline-split-label,
.pipeline-mean-label,
.pipeline-leaky-label {
  fill: #74818b;
  font-size: 12px;
}

.pipeline-split-label {
  font-weight: 850;
}

.pipeline-train-point {
  fill: #405568;
  stroke: white;
  stroke-width: 2;
}

.pipeline-validation-point {
  fill: #b87927;
  stroke: white;
  stroke-width: 2;
}

.pipeline-mean-line {
  stroke: var(--teal);
  stroke-width: 3;
  stroke-dasharray: 5 4;
}

.pipeline-mean-label {
  fill: var(--teal);
  font-weight: 800;
}

.pipeline-leaky-line {
  stroke: #a64444;
  stroke-width: 3;
  stroke-dasharray: 5 4;
}

.pipeline-leaky-label {
  fill: #a64444;
  font-weight: 800;
}

.pipeline-controls {
  display: flex;
  flex-direction: column;
}

.pipeline-radio,
.pipeline-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.pipeline-radio input,
.pipeline-toggle input {
  margin-top: 4px;
}

.pipeline-radio span,
.pipeline-toggle span {
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.pipeline-radio strong,
.pipeline-toggle strong {
  color: var(--ink);
}

.pipeline-controls > button {
  min-height: 42px;
  margin-top: 20px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.pipeline-equation {
  margin: 12px 0 17px;
  padding: 14px;
  border-radius: 9px;
  background: #eef2f4;
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
}

.pipeline-train-cell {
  background: #e7edf1;
}

.pipeline-validation-cell {
  background: #f5ead8;
}

.pipeline-model-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.pipeline-model-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.pipeline-model-grid strong {
  font-size: .86rem;
}

.pipeline-model-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.5;
}


@media (max-width: 1000px) {
  .pipeline-workspace {
    grid-template-columns: 1fr;
  }

  .pipeline-model-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


@media (max-width: 700px) {
  .pipeline-state-grid,
  .pipeline-model-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ==========================================================
   POINT 13 — MODEL ERROR & DIVERSITY OBSERVATORY
   ========================================================== */

.diversity-observatory {
  display: grid;
  gap: 18px;
}

.diversity-intro h4 {
  margin: 6px 0;
  max-width: 850px;
  font-size: 1.45rem;
}

.diversity-intro p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.diversity-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.diversity-controls label {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.diversity-controls select {
  padding: 10px 12px;
  border: 1px solid #cbd4db;
  border-radius: 9px;
  background: white;
}

.diversity-metric-grid {
  display: grid;
  grid-template-columns:
    repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.diversity-metric-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.diversity-metric-grid span {
  display: block;
  color: var(--muted);
  font-size: .7rem;
}

.diversity-metric-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.45rem;
}

.diversity-main-grid {
  display: grid;
  grid-template-columns: 1.25fr .8fr;
  gap: 13px;
}

.diversity-matrix-card,
.diversity-readiness-card,
.diversity-table-card,
.pair-landscape-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.diversity-matrix-card h4,
.diversity-readiness-card h4 {
  margin: 5px 0 15px;
}

.error-overlap-matrix {
  display: grid;
  grid-template-columns:
    minmax(90px, .7fr)
    1fr
    1fr;
  gap: 6px;
}

.matrix-heading {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 7px;
  color: var(--muted);
  text-align: center;
  font-size: .74rem;
  font-weight: 800;
}

.matrix-cell {
  display: grid;
  place-items: center;
  min-height: 110px;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
}

.matrix-cell span {
  color: var(--muted);
  font-size: .74rem;
}

.matrix-cell strong {
  display: block;
  margin-top: 6px;
  font-size: 2rem;
}

.matrix-both-correct {
  background: #e4efe9;
}

.matrix-complementary {
  background: #f5ead8;
}

.matrix-shared {
  background: #f3e1e1;
}

.diversity-readiness-card p {
  color: var(--muted);
  line-height: 1.55;
}

.readiness-score {
  height: 14px;
  overflow: hidden;
  margin: 12px 0 17px;
  border-radius: 999px;
  background: #e4e8eb;
}

.readiness-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.readiness-none .readiness-bar {
  background: #8a9298;
}

.readiness-weak .readiness-bar {
  background: #9b5555;
}

.readiness-possible .readiness-bar {
  background: #b87927;
}

.readiness-promising .readiness-bar {
  background: var(--teal);
}

.readiness-rule {
  margin-top: 18px;
  padding: 13px;
  border-radius: 9px;
  background: #eef2f4;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

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

.diversity-heading h4 {
  margin: 5px 0 10px;
}

.diversity-heading > span {
  color: var(--muted);
  font-size: .76rem;
}

.diversity-shared-cell {
  background: #f3e1e1;
}

.diversity-complementary-cell {
  background: #f5ead8;
}

.diversity-correct-cell {
  background: #e4efe9;
}

.pair-landscape {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}

.pair-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.pair-title {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  font-size: .78rem;
}

.pair-title span {
  color: var(--muted);
}

.pair-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 12px;
}

.pair-metrics span {
  padding: 8px;
  border-radius: 7px;
  background: #eef2f4;
  color: var(--muted);
  font-size: .66rem;
}

.pair-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 1rem;
}


@media (max-width: 1150px) {
  .diversity-metric-grid {
    grid-template-columns:
      repeat(4, 1fr);
  }
}


@media (max-width: 900px) {
  .diversity-main-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 650px) {
  .diversity-metric-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }

  .pair-metrics {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   POINT 14 — ENSEMBLE METHODS I
   ========================================================== */

.ensemble-one-lab {
  display: grid;
  gap: 18px;
}

.ensemble-one-intro h4 {
  margin: 6px 0;
  max-width: 850px;
  font-size: 1.45rem;
}

.ensemble-one-intro p,
.bagging-copy {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.ensemble-one-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ensemble-one-flow span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: .78rem;
  font-weight: 750;
}

.ensemble-one-flow b {
  color: var(--muted);
}

.ensemble-member-selector,
.ensemble-voting-card,
.ensemble-mechanism-card,
.ensemble-prediction-card,
.bagging-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.ensemble-member-selector h4,
.ensemble-one-heading h4,
.ensemble-voting-card h4,
.ensemble-mechanism-card h4 {
  margin: 5px 0 10px;
}

.ensemble-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ensemble-member-option {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font-size: .8rem;
}

.ensemble-one-state-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.ensemble-one-state-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.ensemble-one-state-grid span {
  display: block;
  color: var(--muted);
  font-size: .7rem;
}

.ensemble-one-state-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.25rem;
}

.ensemble-one-main-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 13px;
}

.ensemble-method-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.ensemble-method-switch label {
  display: flex;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.ensemble-method-switch span {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}

.ensemble-method-switch strong {
  display: block;
  color: var(--ink);
}

.ensemble-threshold-control {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.ensemble-threshold-control > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

.ensemble-method-explanation {
  margin-top: 16px;
  padding: 13px;
  border-radius: 9px;
  background: #eef2f4;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.ensemble-mechanism-example {
  display: grid;
  gap: 10px;
  margin-top: 15px;
  text-align: center;
}

.mechanism-members {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.mechanism-members strong {
  min-width: 44px;
  padding: 8px;
  border-radius: 8px;
  background: #e7edf1;
}

.mechanism-members b {
  align-self: center;
  color: var(--muted);
}

.ensemble-correct-cell {
  background: #e4efe9;
}

.ensemble-error-cell {
  background: #f3e1e1;
}

.ensemble-one-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.bagging-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 15px 0;
}

.bagging-controls label {
  display: grid;
  gap: 7px;
}

.bagging-controls label > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

.original-sample {
  margin-top: 18px;
}

#original-training-ids,
.bootstrap-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

#original-training-ids span,
.bootstrap-ids span {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 7px;
  background: #e7edf1;
  font-size: .72rem;
  font-weight: 800;
}

.bootstrap-samples {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(230px, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.bootstrap-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.bootstrap-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bootstrap-card-heading span {
  color: var(--muted);
  font-size: .72rem;
}

.bootstrap-repeat {
  background: #f5ead8 !important;
  outline: 1px solid #d0a968;
}

.bootstrap-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .72rem;
}


@media (max-width: 1050px) {
  .ensemble-one-state-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ensemble-one-main-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 700px) {
  .ensemble-one-state-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ensemble-method-switch,
  .bagging-controls {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   POINT 15 — ENSEMBLE METHODS II
   ========================================================== */

.ensemble-two-lab {
  display: grid;
  gap: 18px;
}

.ensemble-two-intro h4 {
  margin: 6px 0;
  max-width: 850px;
  font-size: 1.45rem;
}

.ensemble-two-intro p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.ensemble-two-mode-switch {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #edf1f3;
}

.ensemble-two-mode {
  border: 0;
  padding: 9px 17px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.ensemble-two-mode.active {
  color: white;
  background: var(--navy);
}

.ensemble-two-content,
.boosting-lab,
.stacking-lab {
  display: grid;
  gap: 16px;
}

.ensemble-two-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ensemble-two-flow span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: .78rem;
  font-weight: 750;
}

.ensemble-two-flow b {
  color: var(--muted);
}


/* BOOSTING */

.boosting-state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.boosting-state-grid article,
.stacking-state-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.boosting-state-grid span,
.stacking-state-grid span {
  display: block;
  color: var(--muted);
  font-size: .7rem;
}

.boosting-state-grid strong,
.stacking-state-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.35rem;
}

.boosting-control-card,
.boosting-table-card,
.boosting-weight-card,
.stacking-controls-card,
.stacking-equation-card,
.stacking-table-card,
.stacking-warning {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.boosting-control-card h4,
.boosting-weight-card h4,
.stacking-controls-card h4,
.stacking-equation-card h4,
.stacking-table-card h4,
.stacking-warning h4 {
  margin: 5px 0 11px;
}

.boosting-control-card label {
  display: grid;
  gap: 7px;
  max-width: 600px;
}

.boosting-control-card label > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

.boosting-stage-story {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 10px;
  margin-top: 18px;
}

.boosting-stage-story > div {
  padding: 13px;
  border-radius: 9px;
  background: #eef2f4;
}

.boosting-stage-story p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .78rem;
}

.boost-correct,
.stack-correct {
  background: #e4efe9;
}

.boost-error,
.stack-error {
  background: #f3e1e1;
}

.boost-weight-up {
  background: #f5ead8;
  font-weight: 800;
}

.boosting-weight-bars {
  display: grid;
  gap: 6px;
}

.boosting-weight-row {
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  gap: 9px;
  align-items: center;
  font-size: .75rem;
}

.boosting-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3e8eb;
}

.boosting-bar {
  height: 100%;
  border-radius: inherit;
  background: #b87927;
}


/* STACKING */

.stacking-state-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.stacking-main-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 13px;
}

.stacking-controls-card label {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.stacking-controls-card label > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

.stacking-equation {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 16px;
}

.stacking-equation strong {
  padding: 8px 10px;
  border-radius: 8px;
  background: #e7edf1;
  font-size: .8rem;
}

.stacking-equation span {
  color: var(--muted);
}

.stacking-equation-card p {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: .8rem;
}

.stacking-warning {
  border-color: #d7b46e;
  background: #f8f1e4;
}

.stacking-warning p {
  max-width: 850px;
  color: var(--muted);
  line-height: 1.55;
}

.stacking-warning > strong {
  color: #80571d;
}


@media (max-width: 1050px) {
  .boosting-state-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stacking-state-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stacking-main-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 700px) {
  .boosting-stage-story {
    grid-template-columns: 1fr;
  }

  .stacking-state-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .boosting-weight-row {
    grid-template-columns: 60px 1fr 58px;
  }
}


/* ==========================================================
   POINT 16 — LEAKAGE-SAFE ENSEMBLES
   ========================================================== */

.safe-stack-lab {
  display: grid;
  gap: 18px;
}

.safe-stack-intro h4 {
  margin: 6px 0;
  max-width: 850px;
  font-size: 1.45rem;
}

.safe-stack-intro p {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.6;
}

.safe-stack-mode {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #edf1f3;
}

.safe-stack-mode-button {
  border: 0;
  padding: 9px 15px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.safe-stack-mode-button.active {
  color: white;
  background: var(--navy);
}

.safe-stack-state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.safe-stack-state-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.safe-stack-state-grid span {
  display: block;
  color: var(--muted);
  font-size: .7rem;
}

.safe-stack-state-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.3rem;
}

.fold-trace-card,
.fold-map-card,
.meta-feature-card,
.stack-boundary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.safe-stack-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.safe-stack-heading h4,
.fold-map-card h4,
.stack-boundary-card h4 {
  margin: 5px 0 10px;
}

.safe-stack-status {
  height: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}

.stack-safe {
  color: #286448;
  background: #e2efe8;
}

.stack-danger {
  color: #923e3e;
  background: #f3e1e1;
}

.fold-control {
  display: grid;
  gap: 7px;
  max-width: 500px;
  margin-top: 15px;
}

.fold-control > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

.fold-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto .8fr;
  gap: 10px;
  align-items: stretch;
  margin-top: 18px;
}

.fold-box {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.fold-box > strong {
  display: block;
  margin-top: 7px;
}

.fold-box p {
  color: var(--muted);
  font-size: .8rem;
}

.fold-arrow {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.3rem;
}

.row-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.row-pills span {
  display: inline-grid;
  place-items: center;
  min-width: 31px;
  height: 31px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: .72rem;
  font-weight: 800;
}

.training-row-pill {
  background: #e7edf1;
}

.heldout-row-pill {
  color: #286448;
  background: #e2efe8;
}

.leaky-row-pill {
  color: #923e3e;
  background: #f3e1e1;
}

.fold-map {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.fold-map-row {
  display: grid;
  grid-template-columns: .8fr 1fr auto 1fr;
  gap: 9px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.fold-map-row.active {
  outline: 2px solid var(--teal);
}

.fold-map-row > div:first-child span {
  display: block;
  color: var(--muted);
  font-size: .68rem;
}

.fold-map-row > div:first-child strong {
  font-size: .8rem;
}

.fold-map-train,
.fold-map-predict,
.fold-map-leaky {
  padding: 8px;
  border-radius: 7px;
  font-size: .74rem;
}

.fold-map-train {
  background: #e7edf1;
}

.fold-map-predict {
  background: #e2efe8;
}

.fold-map-leaky {
  color: #8f3838;
  background: #f3e1e1;
}

.fold-map-arrow {
  color: var(--muted);
}

.provenance-safe {
  background: #e2efe8;
}

.provenance-leaky {
  color: #8f3838;
  background: #f3e1e1;
}

.stack-boundary-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin-top: 15px;
}

.stack-boundary-flow > div {
  min-width: 170px;
  flex: 1;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.stack-boundary-flow strong {
  display: block;
  font-size: .82rem;
}

.stack-boundary-flow span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .72rem;
}

.stack-boundary-flow > b {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.untouched-box {
  border-color: #caa75c !important;
  background: #f8f1e4 !important;
}


@media (max-width: 1050px) {
  .fold-flow {
    grid-template-columns: 1fr;
  }

  .fold-arrow {
    transform: rotate(90deg);
  }

  .fold-map-row {
    grid-template-columns: 1fr 1fr;
  }

  .fold-map-arrow {
    display: none;
  }
}


@media (max-width: 700px) {
  .safe-stack-state-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .safe-stack-mode {
    display: grid;
    width: 100%;
  }

  .fold-map-row {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   POINT 18 — RELIABILITY, CALIBRATION & THRESHOLDS
   ========================================================== */

.reliability-lab {
  display: grid;
  gap: 18px;
}

.reliability-intro h4 {
  margin: 6px 0;
  max-width: 850px;
  font-size: 1.45rem;
}

.reliability-intro p {
  max-width: 920px;
  color: var(--muted);
  line-height: 1.6;
}

.reliability-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.reliability-flow span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: .78rem;
  font-weight: 750;
}

.reliability-flow b {
  color: var(--muted);
}

.reliability-mode-switch {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #edf1f3;
}

.reliability-mode-button {
  border: 0;
  padding: 9px 15px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.reliability-mode-button.active {
  color: white;
  background: var(--navy);
}

.reliability-state-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.reliability-state-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.reliability-state-grid span {
  display: block;
  color: var(--muted);
  font-size: .69rem;
}

.reliability-state-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.25rem;
}

.reliability-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.reliability-threshold-card,
.reliability-confusion-card,
.calibration-card,
.calibration-bin-card,
.reliability-observations-card,
.reliability-decision-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.reliability-threshold-card h4,
.reliability-confusion-card h4,
.reliability-decision-card h4,
.calibration-bin-card h4,
.reliability-observations-card h4 {
  margin: 5px 0 12px;
}

.reliability-threshold-control {
  display: grid;
  gap: 7px;
}

.reliability-threshold-control > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

.threshold-direction {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.threshold-direction > div {
  padding: 13px;
  border-radius: 9px;
  background: #eef2f4;
}

.threshold-direction strong,
.threshold-direction span {
  display: block;
}

.threshold-direction span {
  margin-top: 5px;
  color: var(--muted);
  font-size: .73rem;
}

.rel-confusion {
  display: grid;
  grid-template-columns:
    minmax(80px,.7fr)
    1fr
    1fr;
  gap: 6px;
}

.rel-conf-heading {
  display: grid;
  place-items: center;
  min-height: 45px;
  color: var(--muted);
  text-align: center;
  font-size: .73rem;
  font-weight: 800;
}

.rel-conf-cell {
  display: grid;
  place-items: center;
  min-height: 80px;
  border-radius: 9px;
}

.rel-conf-cell span {
  color: var(--muted);
  font-size: .7rem;
}

.rel-conf-cell strong {
  font-size: 1.7rem;
}

.rel-good {
  background: #e4efe9;
}

.rel-bad {
  background: #f3e1e1;
}

.reliability-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.reliability-heading h4 {
  margin: 5px 0 10px;
}

.reliability-heading > span {
  color: var(--muted);
  font-size: .72rem;
}

.calibration-chart {
  display: block;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

.cal-axis {
  stroke: #8f9aa3;
  stroke-width: 1.4;
}

.cal-grid {
  stroke: #e4e8eb;
  stroke-width: 1;
}

.cal-label,
.cal-axis-title {
  fill: #74818b;
  font-size: 12px;
}

.cal-axis-title {
  font-weight: 750;
}

.perfect-calibration-line {
  stroke: #8d969d;
  stroke-width: 2;
  stroke-dasharray: 6 5;
}

.calibration-gap-line {
  stroke: #b87927;
  stroke-width: 2;
}

.calibration-point {
  fill: var(--teal);
  stroke: white;
  stroke-width: 2;
}

.calibration-large-gap {
  background: #f5ead8;
  font-weight: 800;
}

.reliability-correct {
  background: #e4efe9;
}

.reliability-error {
  background: #f3e1e1;
}

.operating-scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.operating-scenarios button {
  min-height: 90px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  text-align: left;
}

.operating-scenarios strong {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-size: 1.3rem;
}


@media (max-width: 1100px) {
  .reliability-state-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


@media (max-width: 850px) {
  .reliability-main-grid {
    grid-template-columns: 1fr;
  }

  .operating-scenarios {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 650px) {
  .reliability-state-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .threshold-direction {
    grid-template-columns: 1fr;
  }

  .reliability-mode-switch {
    display: grid;
    width: 100%;
  }
}


/* ==========================================================
   POINT 19 — ENSEMBLE METHODS DAILY REVIEW
   ========================================================== */

.daily-review-lab {
  display: grid;
  gap: 18px;
}

.daily-review-intro h4 {
  margin: 6px 0;
  max-width: 850px;
  font-size: 1.45rem;
}

.daily-review-intro p {
  max-width: 920px;
  color: var(--muted);
  line-height: 1.6;
}

.review-dashboard {
  display: grid;
  grid-template-columns:
    repeat(4, 1fr);
  gap: 8px;
}

.review-dashboard article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.review-dashboard span {
  display: block;
  color: var(--muted);
  font-size: .7rem;
}

.review-dashboard strong {
  display: block;
  margin-top: 5px;
  font-size: 1.4rem;
}

.review-main-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(260px, .65fr);
  gap: 13px;
}

.review-question-card,
.review-navigation-card,
.review-category-card,
.review-principles-card,
.review-reset-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.review-question-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.review-question-heading h4,
.review-navigation-card h4,
.review-category-card h4,
.review-principles-card h4,
.review-reset-card h4 {
  margin: 5px 0 12px;
}

.review-counter {
  height: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf1f3;
  font-size: .72rem;
}

.review-options {
  display: grid;
  gap: 8px;
  margin-top: 17px;
}

.review-option {
  display: grid;
  grid-template-columns:
    auto
    35px
    1fr;
  gap: 9px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  cursor: pointer;
}

.review-option > span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 7px;
  background: #edf1f3;
  font-weight: 850;
  font-size: .75rem;
}

.review-option p {
  margin: 0;
  color: #49545d;
  font-size: .82rem;
  line-height: 1.45;
}

.review-option-correct {
  border-color: #91b7a3;
  background: #e4efe9;
}

.review-option-wrong {
  border-color: #cf9696;
  background: #f3e1e1;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.review-actions button,
.review-nav-buttons button,
.review-reset-card button {
  min-height: 41px;
  padding: 9px 13px;
  border: 1px solid #cbd4db;
  border-radius: 8px;
  background: white;
}

.review-feedback {
  margin-top: 15px;
  padding: 14px;
  border-radius: 9px;
  background: #eef2f4;
  color: var(--muted);
  line-height: 1.5;
}

.review-feedback p {
  margin: 8px 0 0;
}

.review-feedback-correct {
  background: #e4efe9;
}

.review-feedback-wrong {
  background: #f5ead8;
}

.review-return-note {
  font-size: .75rem;
}

.review-question-map {
  display: grid;
  grid-template-columns:
    repeat(5, 1fr);
  gap: 6px;
}

.review-map-button {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 800;
  font-size: .75rem;
}

.review-map-button.active {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
}

.review-map-unanswered {
  color: var(--muted);
}

.review-map-correct {
  color: #286448;
  background: #e4efe9;
}

.review-map-wrong {
  color: #923e3e;
  background: #f3e1e1;
}

.review-nav-buttons {
  display: grid;
  grid-template-columns:
    1fr 1fr;
  gap: 7px;
  margin-top: 17px;
}

.review-category-summary {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.review-category-summary article {
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
}

.review-category-summary strong,
.review-category-summary span,
.review-category-summary em {
  display: block;
}

.review-category-summary strong {
  font-size: .8rem;
}

.review-category-summary span {
  margin-top: 5px;
  color: var(--muted);
  font-size: .7rem;
}

.review-category-summary em {
  margin-top: 8px;
  font-size: .68rem;
  font-style: normal;
  font-weight: 800;
}

.review-category-untested {
  background: #f7f9fa;
}

.review-category-secure {
  background: #e4efe9;
}

.review-category-review {
  background: #f5ead8;
}

.review-category-weak {
  background: #f3e1e1;
}

.review-principles-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.review-principles-flow span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: .75rem;
  font-weight: 750;
}

.review-principles-flow b {
  color: var(--muted);
}

.review-reset-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.review-reset-card p {
  max-width: 650px;
  color: var(--muted);
  font-size: .8rem;
}


@media (max-width: 1000px) {
  .review-main-grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 700px) {
  .review-dashboard {
    grid-template-columns:
      repeat(2, 1fr);
  }

  .review-question-map {
    grid-template-columns:
      repeat(4, 1fr);
  }

  .review-reset-card {
    display: block;
  }

  .review-reset-card button {
    margin-top: 12px;
  }
}


/* ==========================================================
   POINT 20 — REPRODUCIBILITY
   ========================================================== */

.repro-lab {
  display: grid;
  gap: 18px;
}

.repro-intro h4 {
  margin: 6px 0;
  max-width: 850px;
  font-size: 1.45rem;
}

.repro-intro p {
  max-width: 920px;
  color: var(--muted);
  line-height: 1.6;
}

.repro-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.repro-flow span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: .77rem;
  font-weight: 750;
}

.repro-flow b {
  color: var(--muted);
}

.repro-state-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.repro-state-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fa;
}

.repro-state-grid span {
  display: block;
  color: var(--muted);
  font-size: .7rem;
}

.repro-state-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 1.4rem;
}

.repro-main-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 13px;
}

.repro-checklist-card,
.repro-manifest-card,
.repro-replay-card,
.repro-terminal-card,
.repro-definition-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfc;
}

.repro-checklist-card h4,
.repro-manifest-card h4,
.repro-replay-card h4,
.repro-terminal-card h4,
.repro-definition-card h4 {
  margin: 5px 0 12px;
}

.repro-checklist {
  display: grid;
  gap: 7px;
}

.repro-check-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.repro-check-item input {
  margin-top: 4px;
}

.repro-check-item strong,
.repro-check-item small {
  display: block;
}

.repro-check-item strong {
  font-size: .8rem;
}

.repro-check-item small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.repro-manifest-card pre {
  min-height: 500px;
  margin: 0;
  padding: 15px;
  overflow: auto;
  border-radius: 9px;
  color: #e8edf2;
  background: #17212b;
  font-family:
    "SFMono-Regular",
    Consolas,
    monospace;
  font-size: .74rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.repro-replay-card > p {
  max-width: 850px;
  color: var(--muted);
}

.repro-replay-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.repro-replay-grid button {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  text-align: left;
}

.repro-replay-grid button:hover {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.repro-replay-grid span,
.repro-replay-grid strong {
  display: block;
}

.repro-replay-grid span {
  color: var(--muted);
  font-size: .68rem;
}

.repro-replay-grid strong {
  margin-top: 5px;
  font-size: .82rem;
}

.repro-command-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.repro-command-grid > div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.repro-command-grid span,
.repro-command-grid code {
  display: block;
}

.repro-command-grid span {
  color: var(--muted);
  font-size: .7rem;
}

.repro-command-grid code {
  margin-top: 8px;
  padding: 9px;
  overflow-x: auto;
  border-radius: 7px;
  color: #e8edf2;
  background: #17212b;
  font-size: .72rem;
}

.repro-result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.repro-result-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.repro-result-grid strong {
  font-size: .8rem;
}

.repro-result-grid p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.45;
}


@media (max-width: 1000px) {
  .repro-main-grid {
    grid-template-columns: 1fr;
  }

  .repro-result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


@media (max-width: 700px) {
  .repro-state-grid,
  .repro-command-grid,
  .repro-result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ==========================================================
   PRESENTATION CLEANUP — 2026-08-10
   Hide development-only / placeholder UI
   ========================================================== */

/* Guided / Explore currently has no meaningful distinction */
.mode-switch {
  display: none !important;
}

/* Generic placeholder shown on points without a real experiment */
.experiment-preview {
  display: none !important;
}

/* Point 20 — developer-only implementation material */
.repro-terminal-card {
  display: none !important;
}

/* Point 20 — internal terminal-style manifest */
.repro-manifest-card {
  display: none !important;
}

/* Point 20 — dynamic development/status warning */
#repro-interpretation {
  display: none !important;
}

/* Obsolete development badges, if any remain */
.build-state {
  display: none !important;
}


/* ==========================================================
   SLIDE 20 — COMPACT PRESENTATION LAYOUT
   ========================================================== */

/* The manifest column is gone, so use the whole slide width */
.repro-main-grid {
  grid-template-columns: 1fr !important;
}

/* Spread checklist across the available horizontal space */
.repro-checklist {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px 12px !important;
}

/* Make each item tighter for presentation */
.repro-check-item {
  min-height: 0 !important;
  padding: 11px 13px !important;
}

/* Keep heading prominent, supporting text lighter and compact */
.repro-check-item strong {
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
}

.repro-check-item small {
  margin-top: 3px !important;
  font-size: 0.73rem !important;
  line-height: 1.35 !important;
}

/* Reduce unnecessary outer vertical space */
.repro-checklist-card {
  padding: 18px 20px !important;
}

/* Slide 20 can be somewhat wider internally */
.repro-lab {
  gap: 14px !important;
}


/* Tablet / narrow presentation window */
@media (max-width: 850px) {
  .repro-checklist {
    grid-template-columns: 1fr !important;
  }
}


/* ==========================================================
   SLIDE 20 — FURTHER LEARNING
   ========================================================== */

.further-learning-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 12px 2px 2px;
  border-top: 1px solid var(--line);
}

.further-learning-strip > span {
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.further-learning-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.further-learning-strip b {
  margin: 0 4px;
  color: #a1a8ad;
  font-weight: 400;
}


/* ==========================================================
   POINT 17 — DOES COMBINING HELP?
   ========================================================== */

.comparison-intro,
.comparison-controls-card,
.comparison-evidence-card,
.comparison-delta-card,
.comparison-interpretation-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.comparison-intro {
  padding: 18px 20px;
}

.comparison-intro h4,
.comparison-evidence-card h4,
.comparison-delta-card h4 {
  margin: 5px 0 7px;
}

.comparison-intro p,
.comparison-interpretation-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.comparison-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 12px 0;
}

.comparison-flow span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 0.73rem;
  font-weight: 750;
}

.comparison-flow b {
  color: var(--muted);
}

.comparison-controls-card {
  display: grid;
  grid-template-columns:
    minmax(220px, .7fr)
    minmax(300px, 1.3fr);
  gap: 18px;
  padding: 16px 18px;
}

.comparison-controls-card label {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 750;
}

.comparison-controls-card select {
  width: 100%;
  margin-top: 7px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font: inherit;
}

.comparison-gain-control span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.comparison-gain-control input {
  width: 100%;
  margin-top: 13px;
}

.comparison-state-grid {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.comparison-state-grid article {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.comparison-state-grid span,
.comparison-fold-grid small {
  display: block;
  color: var(--muted);
  font-size: 0.67rem;
}

.comparison-state-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
}

.comparison-evidence-card,
.comparison-delta-card,
.comparison-interpretation-card {
  padding: 17px 18px;
  margin-top: 12px;
}

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

.comparison-decision {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.comparison-decision.accepted {
  color: var(--teal);
  background: rgba(0, 128, 128, .08);
}

.comparison-decision.rejected {
  color: var(--muted);
  background: #f0f2f4;
}

.comparison-fold-grid {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.comparison-fold-grid article {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.comparison-fold-grid article > span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.68rem;
  font-weight: 800;
}

.comparison-fold-grid article div {
  margin-top: 5px;
}

.comparison-fold-grid em {
  display: block;
  margin-top: 8px;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
}

.comparison-fold-grid em.positive {
  color: var(--teal);
}

.comparison-fold-grid em.negative {
  color: #7b5050;
}

.comparison-delta-bars {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.comparison-delta-row {
  display: grid;
  grid-template-columns:
    55px 1fr 58px;
  gap: 10px;
  align-items: center;
  font-size: 0.72rem;
}

.comparison-delta-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f2;
}

.comparison-delta-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.comparison-delta-fill.negative {
  opacity: .45;
}

.comparison-boundary {
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
}


@media (max-width: 1000px) {

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

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


@media (max-width: 700px) {

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

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


/* ==========================================================
   FINAL PRESENTATION VISIBILITY RULES
   ========================================================== */

/*
  These structures remain in the DOM because some existing
  learning/reproducibility logic refers to them, but they are
  not part of the public presentation.
*/

.experiment-preview,
.repro-manifest-card {
  display: none !important;
}

/* Developer credit */
.developer-credit {
  margin: 12px 0 0;
  color: #b9c9d6;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ==========================================================
   HERO — CENTERED PRESENTATION HEADER
   ========================================================== */

.hero,
.masthead,
.site-header {
  text-align: center;
}

.hero > *,
.masthead > *,
.site-header > * {
  margin-left: auto;
  margin-right: auto;
}

/* Keep the subtitle readable rather than stretching too wide */
.hero p,
.masthead p,
.site-header p {
  max-width: 760px;
}

/* Developer credit */
.developer-credit {
  margin: 12px 0 0;
  color: #b9c9d6;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: center;
}

/* Keep hero subtitle on one line on desktop */
.hero p:not(.developer-credit),
.masthead p:not(.developer-credit),
.site-header p:not(.developer-credit) {
  max-width: none !important;
  white-space: nowrap;
}

/* Allow wrapping on smaller screens */
@media (max-width: 900px) {
  .hero p:not(.developer-credit),
  .masthead p:not(.developer-credit),
  .site-header p:not(.developer-credit) {
    white-space: normal;
  }
}

.developer-credit {
  margin: 12px 0 0;
  color: #b9c9d6;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: center;
}

.developer-name {
  color: inherit;
  font-weight: 700;
}

.hero p:not(.developer-credit),
.masthead p:not(.developer-credit),
.site-header p:not(.developer-credit) {
  line-height: 1.45;
  color: #d8e3eb;
}

/* Developer credit aligns with left edge of Ensemble Lab */
.developer-credit {
  margin-top: 12px;
  color: #b9c9d6;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: left;
}

.developer-name {
  color: inherit;
  font-weight: 700;
}

/* ==========================================================
   HERO CREDIT — FINAL ALIGNMENT
   ========================================================== */

.developer-credit {
  width: 380px;
  max-width: calc(100% - 32px);

  margin: 11px auto 0;

  color: #c5d2dc;

  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.025em;

  text-align: left !important;
}

.developer-name {
  color: inherit;
  font-weight: inherit;
}

@media (max-width: 700px) {
  .developer-credit {
    width: auto;
    text-align: center !important;
  }
}

/* ==========================================================
   HERO — FINAL POLISH
   ========================================================== */

/* Eyebrow */
.hero .eyebrow,
.masthead .eyebrow,
.site-header .eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  opacity: 0.88;
}

/* Main title: slightly less dominant */
.hero h1,
.masthead h1,
.site-header h1 {
  font-size: clamp(3.4rem, 5.3vw, 4.35rem);
  line-height: 0.98;
  margin-top: 12px;
  margin-bottom: 12px;
}

/* Subtitle: still one line, but visually quieter */
.hero p:not(.developer-credit),
.masthead p:not(.developer-credit),
.site-header p:not(.developer-credit) {
  max-width: 1180px !important;
  margin-left: auto;
  margin-right: auto;
  white-space: nowrap;

  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.4;
  color: #d8e3eb;
}

/* Signature line */
.developer-credit {
  width: 560px;
  max-width: calc(100% - 40px);

  margin: 18px auto 0;

  text-align: left !important;

  color: #bdccd7;
  font-size: 0.76rem;
  font-weight: 550;
  letter-spacing: 0.025em;
  line-height: 1.35;
}

/* Whole credit stays one visual tone */
.developer-name {
  color: inherit;
  font-weight: inherit;
}

@media (max-width: 900px) {
  .hero p:not(.developer-credit),
  .masthead p:not(.developer-credit),
  .site-header p:not(.developer-credit) {
    white-space: normal;
    max-width: 760px !important;
  }

  .developer-credit {
    width: auto;
    text-align: center !important;
  }
}

/* ==========================================================
   HERO — TRUE TITLE / CREDIT ALIGNMENT
   ========================================================== */

/*
   The middle grid column is sized by "Ensemble Lab".
   Both the title and developer credit occupy that SAME column.
   Therefore D in Designed aligns exactly with E in Ensemble.
*/

.hero,
.masthead,
.site-header {
  display: grid !important;
  grid-template-columns: 1fr max-content 1fr;
  text-align: center;
}

/* Eyebrow */
.hero .eyebrow,
.masthead .eyebrow,
.site-header .eyebrow {
  grid-column: 2;
  justify-self: center;
}

/* Ensemble Lab */
.hero h1,
.masthead h1,
.site-header h1 {
  grid-column: 2;
  justify-self: start;

  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Long explanatory sentence stays independently centered */
.hero p:not(.developer-credit),
.masthead p:not(.developer-credit),
.site-header p:not(.developer-credit) {
  grid-column: 1 / -1;
  justify-self: center;

  width: auto !important;
}

/* Exact same left edge as Ensemble Lab */
.developer-credit {
  grid-column: 2;
  justify-self: start;

  width: auto !important;
  max-width: none !important;

  margin: 18px 0 0 !important;

  text-align: left !important;

  color: #bdccd7;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}


/* Mobile: return to normal centered layout */
@media (max-width: 900px) {
  .hero,
  .masthead,
  .site-header {
    grid-template-columns: 1fr;
  }

  .hero .eyebrow,
  .masthead .eyebrow,
  .site-header .eyebrow,
  .hero h1,
  .masthead h1,
  .site-header h1,
  .hero p:not(.developer-credit),
  .masthead p:not(.developer-credit),
  .site-header p:not(.developer-credit),
  .developer-credit {
    grid-column: 1;
    justify-self: center;
  }

  .developer-credit {
    text-align: center !important;
  }
}

/* ==========================================================
   HERO — RESTORE CLEAN CENTERED BASELINE
   ========================================================== */

.hero,
.masthead,
.site-header {
  display: block !important;
  text-align: center !important;
}

.hero .eyebrow,
.masthead .eyebrow,
.site-header .eyebrow,
.hero h1,
.masthead h1,
.site-header h1,
.hero p,
.masthead p,
.site-header p {
  width: auto !important;
  grid-column: auto !important;
  justify-self: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero h1,
.masthead h1,
.site-header h1 {
  text-align: center !important;
}

.developer-credit {
  width: auto !important;
  max-width: none !important;
  margin: 16px auto 0 !important;
  text-align: center !important;
}


/* ==========================================================
   POINT 17 — ENSEMBLE COMPARISON
   ========================================================== */

.point17-intro,
.point17-controls,
.point17-evidence,
.point17-deltas,
.point17-interpretation {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.point17-intro,
.point17-evidence,
.point17-deltas,
.point17-interpretation {
  padding: 17px 18px;
}

.point17-intro h4,
.point17-evidence h4,
.point17-deltas h4 {
  margin: 5px 0 7px;
}

.point17-intro p,
.point17-interpretation p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.point17-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.point17-flow span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 0.72rem;
  font-weight: 750;
}

.point17-flow b {
  color: var(--muted);
}

.point17-controls {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 18px;
  padding: 15px 17px;
}

.point17-controls label > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.point17-controls select {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.point17-controls input {
  width: 100%;
  margin-top: 14px;
}

.point17-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.point17-metrics article {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.point17-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
}

.point17-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 0.84rem;
}

.point17-evidence-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.point17-decision {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: .05em;
}

.point17-decision.accept {
  color: var(--teal);
  background: rgba(0, 128, 128, .08);
}

.point17-decision.reject {
  color: var(--muted);
  background: #eef1f3;
}

.point17-folds {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.point17-folds article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.point17-folds article > span,
.point17-folds small {
  display: block;
  color: var(--muted);
  font-size: .65rem;
}

.point17-folds div {
  margin-top: 6px;
}

.point17-folds em {
  display: block;
  margin-top: 7px;
  font-size: .72rem;
  font-style: normal;
  font-weight: 800;
}

.point17-folds em.positive {
  color: var(--teal);
}

.point17-folds em.negative {
  opacity: .65;
}

.point17-delta-row {
  display: grid;
  grid-template-columns: 52px 1fr 58px;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  font-size: .7rem;
}

.point17-delta-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f2;
}

.point17-delta-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.point17-delta-fill.negative {
  opacity: .4;
}

.point17-boundary {
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: .7rem;
}

@media (max-width: 1000px) {
  .point17-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .point17-folds {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === DATA AI RESPONSIVE FOUNDATION V19.2 === */
/* Supervised ML: preserve desktop, collapse the fixed learning shell on smaller screens. */
html,
body{
  max-width:100%;
}

body{
  overflow-x:hidden;
}

.masthead,
.app-shell,
.journey,
.presentation,
.presentation-header,
.content-layout,
.experiment-pane,
.interpretation-pane,
.experiment-content{
  min-width:0;
  max-width:100%;
}

.experiment-content,
.experiment-content pre,
.experiment-content table,
.presentation pre,
.presentation table{
  max-width:100%;
}

.experiment-content pre,
.presentation pre{
  overflow-x:auto;
}

.experiment-content table,
.presentation table{
  display:block;
  overflow-x:auto;
}

@media (max-width:1100px){
  .app-shell{
    grid-template-columns:minmax(190px,220px) minmax(0,1fr) !important;
  }

  .content-layout{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .interpretation-pane{
    border-left:0 !important;
    border-top:1px solid var(--line, #d9e2e8) !important;
  }
}

@media (max-width:820px){
  .masthead{
    padding-left:20px !important;
    padding-right:20px !important;
  }

  .app-shell{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
  }

  .journey{
    position:static !important;
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    max-height:none !important;
    border-right:0 !important;
    border-bottom:1px solid var(--line, #d9e2e8) !important;
  }

  .point-navigation{
    display:flex !important;
    gap:6px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    max-width:100% !important;
    padding-bottom:6px !important;
    scroll-snap-type:x proximity;
  }

  .point-navigation > *{
    flex:0 0 auto !important;
    min-width:150px !important;
    scroll-snap-align:start;
  }

  .presentation{
    width:100% !important;
    max-width:100% !important;
  }

  .presentation-header{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:14px !important;
    align-items:flex-start !important;
  }

  .presentation-header > :first-child{
    flex:1 1 240px !important;
    min-width:0 !important;
  }

  .navigation-buttons{
    flex:1 1 100% !important;
    width:100% !important;
    max-width:100% !important;
    display:flex !important;
    gap:8px !important;
    overflow-x:auto !important;
    justify-content:flex-start !important;
  }

  .navigation-buttons button{
    flex:0 0 auto !important;
    min-height:40px !important;
  }

  .content-layout{
    display:block !important;
    width:100% !important;
  }
}

@media (max-width:520px){
  .masthead h1{
    overflow-wrap:anywhere !important;
  }

  .presentation,
  .experiment-pane,
  .interpretation-pane{
    padding-left:14px !important;
    padding-right:14px !important;
  }

  .point-navigation > *{
    min-width:136px !important;
  }
}
/* === /DATA AI RESPONSIVE FOUNDATION V19.2 === */

/* === SUPERVISED ML RESPONSIVE REAL FIX v19.7.4 === */
@media (max-width:1100px){
  #point-navigation{
    box-sizing:border-box !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:6px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    overscroll-behavior-x:contain;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    padding-bottom:6px !important;
  }

  #point-navigation::-webkit-scrollbar{
    display:none;
  }

  #point-navigation > .point-button,
  #point-navigation > button{
    flex:0 0 auto !important;
    width:auto !important;
    min-width:136px !important;
    max-width:168px !important;
    scroll-snap-align:start;
  }
}
/* === /SUPERVISED ML RESPONSIVE REAL FIX v19.7.4 === */

/* === VIEWPORT-STABLE JOURNEY RAIL · 2026-09-02 ===
   Long curricula scroll inside their rail so stage changes do not pull
   the document viewport. Compact layouts keep their existing grid/strip. */
@media (min-width:1081px){
  .app-shell > .journey{
    max-height:100vh;
    overflow:hidden;
    overscroll-behavior:contain;
  }

  .app-shell > .journey .point-navigation{
    max-height:calc(100vh - 210px);
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
}


/* === ZOOM-STABLE APPLICATION REFLOW · 2026-09-02 ===
   Browser zoom reduces the effective CSS viewport. Collapse the dense
   curriculum shell before its rail and workbench compete for width, and
   prevent dynamic experiment replacement from moving the document anchor. */
.presentation,
.experiment-content{
  overflow-anchor:none;
}

.presentation img,
.presentation svg,
.presentation canvas,
.presentation video,
.presentation input,
.presentation select,
.presentation textarea{
  max-width:100%;
}

@media (min-width:821px) and (max-width:1100px){
  .app-shell{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
  }

  .app-shell > .journey{
    position:static !important;
    width:100% !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    border-right:0 !important;
    border-bottom:1px solid var(--line, #d9e2e8) !important;
  }

  .app-shell > .journey .point-navigation{
    max-height:none !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    scrollbar-gutter:auto;
  }
}

@media (max-width:1100px){
  .masthead{
    flex-wrap:wrap;
  }

  .presentation-header h2{
    overflow-wrap:anywhere;
  }
}
/* === /ZOOM-STABLE APPLICATION REFLOW · 2026-09-02 === */
