:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #17382f;
  background: #f5f6f0;
  --panel: #fff;
  --border: #dce5da;
  --muted: #53695f;
  --accent: #177157;
  --kinetic: #08795b;
  --potential: #92501e;
  --total: #51458f;
}
* { box-sizing: border-box; }
a:focus-visible { outline: 3px solid #a96e16; outline-offset: 4px; border-radius: 4px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.section-link { text-underline-offset: 3px; }
.catalog { padding-bottom: 36px; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.topics a { padding: 8px 13px; color: #244a3d; background: #e7eee1; border-radius: 100px; text-decoration: none; font-size: .9rem; }
.topics a:hover { background: #d8e9cb; }
.catalog-section { scroll-margin-top: 16px; }
.catalog-section > h2 { margin-bottom: 12px; font-size: 1.5rem; }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.subject { padding: 17px 19px; scroll-margin-top: 16px; }
.subject h3 { font-size: 1rem; }
.subject p { color: var(--muted); margin-top: 10px; }
.experiment-link { display: grid; gap: 4px; padding: 11px 12px; margin-top: 10px; border-radius: 9px; color: #17634d; background: #edf3e9; text-decoration: none; }
.experiment-link span { color: var(--muted); line-height: 1.4; font-size: .9rem; }
.experiment-link:hover { background: #e0ecdc; }
.empty-sections { margin-top: 20px; }
.result-detail { display: block; color: var(--muted); font-size: .85rem; margin: 0; }
.readings .chart output { margin: 7px 0; }
.run-status { margin-top: 10px; min-height: 1.4em; }
.flight-charts .chart:last-child { grid-column: 1 / -1; }
.flight-charts .result-detail { margin-top: 6px; }
.lever-canvas { touch-action: none; cursor: grab; }
.lever-canvas:active { cursor: grabbing; }
.probe-canvas { touch-action: none; cursor: crosshair; }
.controls [hidden] { display: none; }
.controls button:disabled { cursor: default; opacity: .62; }
.option-control { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 12px; font-size: .9rem; }
.option-control select { appearance: none; flex: 1 1 auto; color: #17382f; background: #f5f7f2; border: 1px solid var(--border); border-radius: 8px; padding: 8px 30px 8px 10px; font: inherit;
  background-image: linear-gradient(45deg, transparent 50%, #345348 50%), linear-gradient(135deg, #345348 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; }
.option-control input { accent-color: var(--accent); }
.option-control select:focus-visible { outline: 3px solid #a96e16; outline-offset: 3px; }
.experiment-status:empty { display: none; }
.experiment-status { margin-top: 10px; }
.lab-table { padding: 12px 14px; }
.lab-table table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.lab-table caption { text-align: left; font-weight: 650; margin: 3px 0 8px; }
.lab-table th, .lab-table td { padding: 8px 5px; text-align: right; border-bottom: 1px solid var(--border); }
.lab-table th:first-child { text-align: left; }
.lab-table th { font-weight: 600; }
.lab-table tr:last-child td, .lab-table tbody tr:last-child th { border-bottom: 0; }
.lab-plot { margin-top: 12px; }
.formula-panel { padding: 13px 18px; margin: 18px 0; }
.formula-panel summary { cursor: pointer; font-weight: 650; }
.formula-panel summary:focus-visible { outline: 3px solid #a96e16; outline-offset: 4px; }
.formula-panel dl { display: grid; gap: 10px; margin: 13px 0 2px; }
.formula-panel dl > div { display: grid; gap: 4px; padding: 8px 11px; background: #edf3e9; border-radius: 8px; }
.formula-panel dt { font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.formula-panel dd { margin: 0; color: var(--muted); line-height: 1.45; }
.compare-panel { margin-top: 12px; padding: 14px; }
.compare-panel .result-detail { margin-top: 4px; }
.compare-panel .lab-table { padding: 9px 0 4px; }
.compare-panel th, .compare-panel td { overflow-wrap: anywhere; }
.study-single-chart { grid-template-columns: minmax(0, 1fr); }
.sandbox-link { background: #dceee2; }
.sandbox { padding-bottom: 18px; }
.circuit-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .35fr); align-items: start; gap: 14px; }
.circuit-palette { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 11px; }
.circuit-palette button { min-height: 36px; padding: 6px 10px; }
.circuit-palette [aria-pressed="true"] { background: #17634d; color: #fff; }
.circuit-scroll { overflow-x: auto; margin-inline: 12px; background: #edf3e9; border-radius: 10px; }
.circuit-board { position: relative; min-width: 590px; }
.circuit-board canvas { height: 340px; }
.circuit-overlay { position: absolute; inset: 0; pointer-events: none; }
.circuit-overlay button { position: absolute; pointer-events: auto; transform: translate(-50%, -50%); padding: 0;
  min-height: 0; border-radius: 50%; width: 32px; height: 32px; background: transparent; border: 2px solid transparent; }
.circuit-overlay button:hover, .circuit-overlay button[aria-pressed="true"] { border-color: #187359; background: rgb(23 113 87 / 10%); }
.circuit-footer { padding: 12px; }
.circuit-sidebar { display: grid; gap: 12px; }
.circuit-card { min-width: 0; padding: 14px; }
.circuit-card .option-control { margin: 9px 0 4px; }
.circuit-card select, .circuit-values input { width: 100%; min-height: 36px; padding: 6px 8px; border: 1px solid #b9cabc;
  border-radius: 8px; color: #17382f; background: #f5f7f2; font: inherit; }
.circuit-card select { margin-bottom: 9px; }
.circuit-values { display: grid; gap: 7px; }
.circuit-values label { display: grid; gap: 3px; font-size: .9rem; }
.circuit-readout { padding: 8px 9px; margin-top: 8px; border-radius: 8px; background: #e7eee1; font-size: .9rem; line-height: 1.5; }
.circuit-scope { margin-top: 14px; }
.circuit-scope[hidden] { display: none; }
@media (max-width: 950px) {
  .circuit-workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 570px) {
  .section-grid { grid-template-columns: minmax(0, 1fr); }
}
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #a96e16; outline-offset: 4px; }
.shell { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: #123d32; color: #fff; }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #d8e9cb; color: #123d32; font: 700 25px Georgia, serif; }
.brand-name { font-size: 1rem; font-weight: 650; }
.header-topic { margin-left: auto; color: #d8e9cb; font-size: .9rem; }
.intro { padding: 32px 0 25px; }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 750; letter-spacing: .13em; }
h1, h2, h3, p { margin: 0; }
.intro h1 { margin: 6px 0 10px; font-size: clamp(2.2rem, 4vw, 3.5rem); line-height: 1.08; letter-spacing: -.038em; }
.intro > p:last-child { max-width: 660px; color: var(--muted); line-height: 1.55; }
.workspace { display: grid; grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.4fr); align-items: start; gap: 24px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 17px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 19px; }
h2 { font-size: 1.18rem; letter-spacing: -.015em; }
.clock { display: flex; align-items: center; gap: 7px; border-radius: 100px; background: #edf3e9; padding: 5px 11px; color: #345348; font-size: .87rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock-dot { width: 7px; height: 7px; background: #758b81; border-radius: 50%; }
.clock.running .clock-dot { background: #08795b; }
canvas { display: block; width: 100%; }
.pendulum { height: 265px; width: calc(100% - 24px); margin: 0 12px; border-radius: 11px; background: #edf3e9; }
.controls { padding: 16px 19px 19px; }
.slider { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; row-gap: 4px; align-items: baseline; margin-bottom: 9px; }
.slider label { font-size: .875rem; font-weight: 620; }
.slider output { color: var(--accent); font-size: .875rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type=range] { grid-column: 1 / -1; width: 100%; margin: 0; height: 22px; accent-color: var(--accent); cursor: pointer; }
.setup-note, .graph-note { font-size: .84rem; color: var(--muted); line-height: 1.5; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
button { border: 1px solid transparent; border-radius: 9px; min-height: 42px; padding: 7px 15px; font-size: .875rem; font-weight: 650; }
.primary { color: #fff; background: #17634d; min-width: 110px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.primary:hover { background: #104b39; }
#play-icon { font-size: .74rem; }
.secondary { color: #244a3d; border-color: var(--border); background: #f5f7f2; }
.secondary:hover { background: #e9f0e6; }
.results-head { min-height: 48px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 8px 0; }
.results-head p { color: var(--muted); font-size: .86rem; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chart { display: flex; flex-direction: column; min-width: 0; padding: 14px 13px 11px; }
.chart h3 { font-size: .94rem; }
.chart h3 span { color: var(--muted); font-size: .83rem; font-weight: 500; white-space: nowrap; margin-left: 4px; }
.chart output { margin-top: 4px; color: var(--accent); font-size: 1.42rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.chart canvas { height: 145px; margin-top: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 2px 10px; list-style: none; padding: 0; margin: 2px 0 0; font-size: .81rem; }
.legend li { display: inline-flex; align-items: center; gap: 5px; }
.legend li::before { content: ""; width: 13px; border-top: 2px solid currentColor; }
.legend .kinetic { color: var(--kinetic); }
.legend .potential { color: var(--potential); }
.legend .potential::before { border-top-style: dashed; }
.legend .total { color: var(--total); }
.legend .total::before { border-top-style: dotted; }
.graph-note { margin-top: 12px; }
.challenge { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 9px 23px; margin: 22px 0 34px; padding: 17px 19px; border-radius: 12px; border-left: 3px solid #618b62; background: #e7eee1; }
.challenge h2 { font-size: 1rem; }
.challenge p { line-height: 1.55; color: #345348; font-size: .94rem; }
@media (max-width: 900px) {
  .shell { width: calc(100% - 36px); }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pendulum { height: 275px; }
}
@media (max-width: 460px) {
  .shell { width: calc(100% - 28px); }
  .header-topic { display: none; }
  .intro { padding-top: 24px; }
  .pendulum { height: 245px; }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .challenge { grid-template-columns: 1fr; }
}
