.page-experiment .site-shell { max-width: 82rem; grid-template-columns: 7rem minmax(0, 1fr); gap: 3rem; padding-top: 3.5rem; }
.page-experiment .site-sidebar { top: 3.5rem; }
.experiment-heading { margin-bottom: 1.8rem; max-width: 52rem; }
.experiment-heading .back-link { margin-bottom: 1rem; }
.experiment-heading h1 { font-size: 2.25rem; }
.experiment-heading > p { color: var(--muted); font-size: .9375rem; margin-top: .6rem; }
.experiment-presets { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.2rem; }
.experiment-presets > span { font-size: .8125rem; color: var(--muted); margin-right: .35rem; }
.flight-experiment button, .number-experiment button { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 4px; padding: .55rem .85rem; cursor: pointer; font-size: .875rem; line-height: 1.5; }
.flight-experiment button:hover, .number-experiment button:hover { border-color: var(--accent); color: var(--accent); }
.flight-experiment button:disabled, .number-experiment button:disabled { opacity: .45; cursor: default; }
.experiment-presets button { border: 0; border-radius: 0; padding: .3rem .1rem; margin-right: .7rem; font-size: .875rem; color: var(--muted); }
.experiment-presets button[aria-pressed="true"] { color: var(--accent); text-decoration: underline; text-underline-offset: .4em; }
.flight-experiment .primary-button { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.flight-experiment .primary-button:hover { filter: brightness(1.12); color: var(--paper); }
.simulator { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2.5rem; align-items: start; }
.flight-stage { min-width: 0; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.flight-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
.flight-actions { display: flex; gap: .45rem; }
.playback-rate { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .8125rem; }
.playback-rate select { font: inherit; color: var(--ink); border: 1px solid var(--line); background: var(--paper); padding: .35rem .3rem; border-radius: 3px; }
.plot-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .5rem; }
.plot-heading h2 { font: 600 .875rem/1.5 var(--sans); }
.plot-heading > span { color: var(--muted); font-size: .75rem; }
.plot-frame { position: relative; width: 100%; height: 11rem; min-width: 0; }
.trajectory-frame { height: clamp(17rem, 29vw, 25rem); }
.plot-frame canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.plot-tooltip { position: absolute; left: .75rem; top: .25rem; z-index: 1; background: var(--paper); border: 1px solid var(--line); padding: .35rem .55rem; font-size: .75rem; pointer-events: none; max-width: calc(100% - 1.5rem); }
.plot-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-size: .75rem; color: var(--muted); margin-top: .5rem; }
.plot-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.plot-legend > span::before { content: ""; width: 17px; height: 0; border-top: 2px solid var(--plot-actual); }
.plot-legend .legend-estimate::before { border-top-color: var(--plot-estimate); border-top-style: dashed; }
.plot-legend .legend-sensor::before { width: 4px; height: 4px; border: 0; border-radius: 50%; background: var(--plot-sensor); }
.plot-legend button { margin-left: auto; font-size: .75rem; padding: .3rem .5rem; }
.flight-metrics, .analysis-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.flight-metrics > div > span, .analysis-summary > div > span { display: block; color: var(--muted); font-size: .75rem; margin-bottom: .2rem; }
.flight-metrics strong, .analysis-summary strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem; font-weight: 400; font-size: 1.25rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.flight-metrics small, .analysis-summary small { color: var(--muted); font-size: .75rem; }
.experiment-hint { color: var(--muted); font-size: .75rem; line-height: 1.6; margin-top: 1rem; }
.flight-controls { grid-column: 2; grid-row: 1 / 3; padding: 1.2rem 0 0 1.5rem; border-left: 1px solid var(--line); }
.flight-controls fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.flight-controls h2 { font: 600 .875rem/1.5 var(--sans); margin-bottom: 1rem; }
.flight-controls h2:not(:first-of-type) { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.experiment-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .6rem; margin-bottom: 1rem; }
.experiment-control label { font-size: .875rem; line-height: 1.5; }
.experiment-control output { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; align-self: baseline; white-space: nowrap; }
.experiment-control input { grid-column: 1 / -1; width: 100%; margin: .1rem 0; accent-color: var(--accent); cursor: pointer; }
.check-control { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .875rem; margin-top: .8rem; cursor: pointer; }
.check-control input { margin: 0; width: 1rem; height: 1rem; accent-color: var(--accent); }
.check-control small { color: var(--muted); font-size: .75rem; flex-basis: 100%; padding-left: 1.5rem; }
.control-help { font-size: .75rem; color: var(--muted); line-height: 1.6; }
.select-control { display: grid; gap: .45rem; font-size: .875rem; margin-top: 1rem; }
.select-control select { font: inherit; color: var(--ink); width: 100%; background: var(--paper); padding: .5rem; border: 1px solid var(--line); border-radius: 3px; }
.vehicle-settings { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.25rem; }
.vehicle-settings summary { cursor: pointer; font-size: .875rem; margin-bottom: 1rem; }
.compare-control { margin-top: 1.4rem; }
.flight-analysis { grid-column: 1; min-width: 0; }
.analysis-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1.2rem 0; margin: 0; border-top: 1px solid var(--line); }
.analysis-switcher { display: flex; flex-wrap: wrap; gap: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.analysis-switcher button { border: 0; border-radius: 0; color: var(--muted); padding: .65rem 0; font-size: .875rem; }
.analysis-switcher button[aria-pressed="true"] { color: var(--ink); box-shadow: 0 1px var(--ink); }
.analysis-frame { height: 13rem; }
.experiment-explanation { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.experiment-explanation summary { font-size: .875rem; cursor: pointer; }
.experiment-explanation p { font-size: .875rem; color: var(--muted); line-height: 1.8; margin-top: .8rem; }
.experiment-index { list-style: none; padding: 0; margin: 0; }
.experiment-index li + li { border-top: 1px solid var(--line); }
.experiment-index a { display: block; padding: .9rem 0; text-decoration: none; }
.experiment-index a > span { display: block; font-size: 1rem; }
.experiment-index a > small { display: block; font-size: .875rem; line-height: 1.6; color: var(--muted); margin-top: .3rem; }
.experiment-index a:hover > span { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 1150px) {
  .page-experiment .site-shell { gap: 2rem; grid-template-columns: 6rem minmax(0, 1fr); }
  .simulator { grid-template-columns: minmax(0, 1fr) 15rem; gap: 1rem; }
}
@media (max-width: 1000px) {
  .simulator { grid-template-columns: minmax(0, 1fr); }
  .flight-controls { grid-column: 1; grid-row: 2; border-left: 0; border-top: 1px solid var(--line); padding: 1.25rem 0 0; }
  .flight-controls fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem; }
  .flight-controls h2, .control-help, .vehicle-settings, .compare-control { grid-column: 1 / -1; }
  .flight-controls h2:not(:first-of-type) { margin-top: .8rem; }
  .flight-analysis { grid-row: 3; }
  .vehicle-settings[open] { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem; }
  .vehicle-settings summary { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .page-experiment .site-shell { display: grid; grid-template-columns: 1fr; padding: .75rem 1.25rem 3rem; gap: 1.75rem; }
  .experiment-heading { margin-bottom: 1.4rem; }
  .experiment-heading h1 { font-size: 2rem; }
  .experiment-heading > p { font-size: .875rem; }
  .flight-stage { padding: 1rem 0 0; }
  .flight-toolbar { gap: .65rem; }
  .trajectory-frame { height: 18rem; }
  .flight-metrics { grid-template-columns: 1fr 1fr; gap: .85rem; }
  .flight-metrics strong, .analysis-summary strong { font-size: 1.1rem; }
  .flight-metrics > div > span, .analysis-summary > div > span { font-size: .75rem; }
  .analysis-summary { gap: .7rem; }
  .flight-actions button { font-size: .8125rem; padding: .5rem .65rem; }
  .plot-legend { gap: .5rem .75rem; }
}
@media (max-width: 380px) {
  .flight-controls fieldset, .vehicle-settings[open] { display: block; }
  .plot-heading { flex-wrap: wrap; }
}
@media print { .page-experiment .site-shell { display: block; padding: 0; } .flight-controls, .flight-actions, .experiment-presets { display: none; } }

/* Set membership, built one number at a time. */
.page-numbers .site-shell { max-width: 76rem; }
.number-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 2rem; align-items: start; }
.number-construction { border-top: 1px solid var(--line); padding: 1.5rem 0; }
.number-topline h2, .number-notation > h2, .number-sequence h2 { font: 600 .9375rem/1.5 var(--sans); }
.number-kicker { display: block; color: var(--muted); font-size: .75rem; margin-top: .25rem; }
.number-stepper { display: flex; align-items: center; justify-content: center; gap: 2rem; margin: 1.5rem 0; }
.number-stepper > output { font: 400 4.75rem/1 var(--serif); min-width: 2ch; text-align: center; }
.number-stepper > button { width: 2.5rem; height: 2.5rem; padding: 0; border-radius: 50%; font-size: 1.25rem; }
.number-form { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .6rem; }
.number-form label { font-size: .8125rem; }
.number-form input { width: 4rem; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); padding: .4rem .5rem; border-radius: 3px; }
.number-form button { font-size: .8125rem; }
.number-form p { flex-basis: 100%; text-align: center; color: var(--muted); font-size: .75rem; }
#numberError:empty { display: none; }
.number-equation { margin-top: 1.5rem; font: 400 1.7rem/1.5 var(--serif); text-align: center; overflow-wrap: anywhere; }
.number-description { color: var(--muted); font-size: .875rem; text-align: center; margin-top: .35rem; }
.number-diagram { max-width: 360px; margin: .7rem auto; }
.number-diagram svg { display: block; width: 100%; height: auto; }
.set-boundary { fill: none; stroke: var(--line); stroke-width: 1.5; }
.member-boundary { fill: var(--surface); stroke: var(--accent); stroke-width: 1; }
.member-symbol { fill: var(--ink); font: 20px var(--serif); }
.empty-symbol { fill: var(--accent); font: 44px var(--serif); }
.number-members { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.number-members button { min-width: 2.3rem; padding: .4rem .6rem; }
.number-notation > p { font-size: .9375rem; color: var(--muted); margin-top: .8rem; line-height: 1.8; }
.set-expression { padding: 1rem 0; margin-top: 1rem; font: 400 1.75rem/1.9 var(--serif); overflow-wrap: anywhere; }
.number-experiment .set-toggle { display: inline; padding: 0 .08em; font: inherit; color: var(--accent); border: 0; border-radius: 0; vertical-align: baseline; text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.number-experiment .set-toggle:hover { background: var(--surface); }
.set-brace, .empty-set { color: var(--accent); }
.construction-rule { margin-top: 1.5rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.construction-rule > span { color: var(--muted); font-size: .75rem; }
.construction-rule p { font: 400 1.5rem/1.8 var(--serif); }
.construction-rule small { display: block; font-size: .8125rem; color: var(--muted); line-height: 1.7; margin-top: .5rem; }
.number-sequence { margin-top: 2.5rem; }
.number-sequence h2 { margin-bottom: 1rem; }
.number-experiment .sequence-row { display: flex; align-items: baseline; width: 100%; gap: 2rem; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .8rem .15rem; text-align: left; font: 400 1.25rem/1.5 var(--serif); }
.sequence-row > span:first-child { width: 2ch; flex-shrink: 0; color: var(--muted); }
.sequence-row > span:last-child { overflow-wrap: anywhere; }
@media (max-width: 1000px) { .number-workspace { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
@media (max-width: 720px) {
  .number-construction { padding: 1rem 0; }
  .number-stepper { margin: 1rem 0; }
  .number-stepper > button, .number-members button { min-width: 44px; min-height: 44px; }
  .number-form input, .number-form button { min-height: 44px; }
  .number-experiment .set-toggle { display: inline-block; min-width: 44px; min-height: 44px; text-align: center; }
  .number-experiment .experiment-explanation summary { min-height: 44px; padding-block: .6rem; }
}

/* A small CEA workbench: one curve, with the inputs beside it. */
.cea-experiment button { background: transparent; border: 0; color: var(--accent); font: inherit; font-size: .875rem; padding: .45rem 0; cursor: pointer; }
.cea-experiment button:hover { text-decoration: underline; text-underline-offset: .25em; }
.cea-experiment button:disabled { color: var(--muted); opacity: .5; cursor: default; text-decoration: none; }
.cea-propellants { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1.35rem; margin-bottom: 1.5rem; }
.cea-propellants > span { color: var(--muted); font-size: .8125rem; }
.cea-propellants button { color: var(--muted); font-size: .875rem; }
.cea-propellants button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: .5em; text-decoration-thickness: 1px; }
.cea-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2.5rem; }
.cea-results { min-width: 0; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.cea-metrics { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1rem; align-items: end; margin-bottom: 2rem; }
.cea-metrics > div > span { display: block; font-size: .75rem; line-height: 1.6; color: var(--muted); }
.cea-metrics strong { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem; font: 400 1.5rem/1.5 var(--sans); font-variant-numeric: tabular-nums; margin-top: .4rem; }
.cea-metrics small { color: var(--muted); font: 400 .75rem/1.5 var(--sans); }
.cea-primary-result strong { font: 400 3.5rem/1.1 var(--serif); letter-spacing: -.04em; color: var(--accent); }
.cea-primary-result small { letter-spacing: 0; }
.cea-chart-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.cea-chart-heading h2 { font: 600 .875rem/1.5 var(--sans); }
.cea-chart-heading > span { font-size: .75rem; color: var(--muted); }
.cea-curve { display: block; width: 100%; height: 280px; margin-top: .75rem; overflow: visible; cursor: crosshair; touch-action: pan-y; }
.cea-grid-line { stroke: var(--line); stroke-width: 1; }
.cea-axis-label { fill: var(--muted); font: 12px var(--sans); font-variant-numeric: tabular-nums; }
.cea-curve-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cea-equilibrium { stroke: var(--plot-actual); }
.cea-frozen { stroke: var(--plot-estimate); }
.cea-curve-line.cea-frozen { stroke-dasharray: 5 4; }
.cea-current-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; opacity: .55; }
.cea-current-point { fill: var(--paper); stroke-width: 2.5; }
.cea-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .75rem; color: var(--muted); margin-top: .75rem; }
.cea-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.cea-legend > span::before { content: ""; width: 18px; border-top: 2px solid var(--plot-actual); }
.cea-legend > span:last-child::before { border-top: 2px dashed var(--plot-estimate); }
.cea-insight { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.cea-insight p { font-size: .8125rem; color: var(--muted); }
.cea-ambient-note { color: var(--muted); font-size: .8125rem; line-height: 1.7; margin-top: .75rem; padding-left: .75rem; border-left: 2px solid var(--accent); }
.cea-controls { border-left: 1px solid var(--line); padding: 1.5rem 0 0 1.5rem; }
.cea-controls .experiment-control { margin-bottom: 1.75rem; }
.cea-controls .experiment-control small { grid-column: 1 / -1; font-size: .75rem; color: var(--muted); }
.cea-conditions { border-top: 1px solid var(--line); padding-top: 1rem; }
.cea-conditions summary { font-size: .875rem; cursor: pointer; }
.cea-conditions .control-help { margin-top: .8rem; }
.cea-experiment .cea-reset { color: var(--muted); margin-top: 1rem; }
.cea-provenance { font-size: .75rem; color: var(--muted); margin-top: 2rem; }
.cea-provenance a { color: inherit; }
.cea-table-scroll { overflow-x: auto; }
.cea-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cea-table caption { text-align: left; font-size: .75rem; color: var(--muted); padding-bottom: .5rem; }
.cea-table th, .cea-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--line); text-align: right; font-weight: 400; }
.cea-table th:first-child { text-align: left; padding-left: 0; }
.cea-table thead th { color: var(--muted); }
.cea-table th small { font-size: .75rem; color: var(--muted); margin-left: .3rem; }
@media (max-width: 1150px) { .cea-workspace { grid-template-columns: minmax(0, 1fr) 14rem; gap: 1.5rem; } }
@media (max-width: 1000px) {
  .cea-workspace { grid-template-columns: minmax(0, 1fr); }
  .cea-controls { border-left: 0; border-top: 1px solid var(--line); padding: 1.5rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
  .cea-conditions { border-top: 0; padding-top: 0; }
  .cea-reset { justify-self: start; }
}
@media (max-width: 720px) {
  .cea-propellants { gap: .4rem 1.1rem; }
  .cea-propellants > span { flex-basis: 100%; }
  .cea-metrics { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .cea-primary-result { grid-column: 1 / -1; }
  .cea-metrics strong { font-size: 1.35rem; }
  .cea-primary-result strong { font-size: 3.25rem; }
}
@media (max-width: 380px) { .cea-controls { grid-template-columns: 1fr; } }
@media print { .cea-controls, .cea-propellants, .cea-experiment button { display: none; } .cea-workspace { display: block; } }
