:root {
  --bg: #f4fbf7; --panel: #ffffff; --mint: #e3f7ec; --ink: #122033;
  --muted: #52695e; --line: #d4e9dd; --accent: #22c670; --accent-dark: #117a48;
  --field: #138a52; --potential: #a96916; --gold-soft: #fff5e4; --night: #061914;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
button, select { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; }
button { padding: 8px 12px; font-weight: 700; }
button:hover { border-color: var(--accent-dark); background: #f0faf4; }
button:disabled { cursor: not-allowed; opacity: .5; }
select { width: 100%; padding: 8px; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 3px; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 17px; line-height: 1.3; }
h3 { font-size: 15px; }
.app-shell { max-width: 1460px; margin: auto; padding: 0 28px; }
.topbar { min-height: 74px; display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); }
.brand { display: flex; }
.brand img { object-fit: contain; width: 150px; height: 36px; }
.course-badge { font-size: 10px; letter-spacing: .12em; font-weight: 750; color: var(--muted); }
.course-badge span { padding: 0 8px; color: #93b5a2; }
.quiet-button { margin-left: auto; background: transparent; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 21px 0 20px; }
.eyebrow { color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1 { font-size: clamp(29px, 3vw, 40px); font-weight: 760; letter-spacing: -.05em; line-height: 1.15; margin: 3px 0 5px; }
h1 span { color: var(--accent-dark); }
.intro p:last-child { color: var(--muted); }
.check-link { font-size: 12px; text-decoration: none; font-weight: 700; }
.check-link span { margin-left: 10px; }
.lessons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #eaf4ed; margin-bottom: 18px; }
.lessons button { min-height: 48px; background: transparent; border-color: transparent; text-align: left; color: var(--muted); }
.lessons button span { margin-right: 9px; opacity: .75; font-size: 11px; }
.lessons button[aria-pressed="true"] { background: var(--night); color: white; box-shadow: 0 3px 6px #06191415; }
.lessons button[aria-pressed="true"] span { color: #6eefa7; }
.workspace { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 18px; align-items: start; }
.card { border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.controls { padding: 20px 16px 16px; }
.controls h2 { margin-bottom: 19px; }
.control-label { display: block; font-size: 12px; font-weight: 750; margin-bottom: 7px; }
.source-control { margin-top: 16px; }
.small-note { font-size: 11px; color: var(--muted); line-height: 1.55; margin-top: 7px; }
.position-control { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.label-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; }
.point-key { width: 22px; height: 22px; display: inline-grid; place-items: center; margin-right: 4px; font-size: 10px; border-radius: 50%; }
.point-key.a { background: white; border: 2px solid #66776e; }
.point-key.b { background: var(--night); color: white; }
output { font-variant-numeric: tabular-nums; }
input[type="range"] { display: block; width: 100%; height: 28px; margin: 8px 0 15px; accent-color: var(--accent-dark); cursor: pointer; }
input[type="checkbox"] { accent-color: var(--accent-dark); width: 16px; height: 16px; vertical-align: middle; }
.button-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 11px; }
.button-pair button { padding: 5px; font-size: 11px; }
.test-body { margin-top: 18px; }
.investigation { margin-top: 21px; padding: 14px; background: var(--mint); border-radius: 9px; }
.investigation h3 { margin: 5px 0 8px; }
.investigation > p:not(.eyebrow) { color: #365b48; font-size: 12px; line-height: 1.65; }
.primary-button { background: var(--accent); border-color: var(--accent); color: var(--night); width: 100%; margin-top: 12px; font-size: 11px; }
.primary-button:hover { background: #44d889; }
.lab-main { min-width: 0; }
.scene-card { padding: 13px 17px 10px; overflow: hidden; }
.scene-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scene-heading h2 { font-size: 13px; }
.scene-heading span { font-size: 10px; color: var(--muted); }
#fieldScene { display: block; width: 100%; height: 105px; }
.scene-card .small-note { margin: 0; }
.graph-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; font-size: 11px; color: var(--muted); }
.graph-key { display: flex; gap: 16px; }
.graph-key i { display: inline-block; width: 9px; height: 9px; border: 2px solid #596e62; border-radius: 50%; margin-right: 4px; }
.graph-key .key-b { background: var(--night); border-color: var(--night); }
.graph-toolbar label { display: flex; align-items: center; gap: 5px; min-height: 32px; }
.graph-toolbar select { width: auto; min-height: 32px; font-size: 11px; padding: 4px 7px; }
.graphs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.graph-card { overflow: hidden; min-width: 0; }
.graph-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 15px 16px 6px; min-height: 71px; }
.graph-heading h2 { font-size: 16px; margin-top: 3px; }
.graph-heading .eyebrow { font-size: 9px; letter-spacing: .07em; }
.graph-card:nth-child(2) .eyebrow { color: var(--potential); }
.formula { font: italic 14px/1.6 Georgia, serif; white-space: nowrap; padding-top: 14px; }
.graph { width: 100%; height: auto; display: block; cursor: crosshair; touch-action: pan-y; user-select: none; }
.graph-readout { border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; padding: 11px 16px; background: #f7fcf9; }
.graph-readout span { font-size: 11px; color: var(--muted); }
.graph-readout strong { font-size: 19px; color: var(--field); font-variant-numeric: tabular-nums; }
.graph-card:nth-child(2) .graph-readout { background: #fffbf5; }
.graph-card:nth-child(2) .graph-readout strong { color: var(--potential); }
.graph-help { color: var(--muted); font-size: 10px; margin: 8px 2px 13px; }
.connection { padding: 17px 20px; }
.connection-heading { display: flex; gap: 10px; align-items: center; }
.connection-icon { background: var(--mint); color: var(--accent-dark); width: 33px; height: 33px; border-radius: 9px; display: grid; place-items: center; font-size: 25px; }
.connection h2 { font-size: 17px; margin-top: 2px; }
.connection-values { display: grid; grid-template-columns: repeat(3, 1fr); margin: 15px 0 12px; gap: 14px; }
.metric + .metric { border-left: 1px solid var(--line); padding-left: 14px; }
.metric span { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; font-size: 20px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.metric small { font-size: 11px; font-weight: 500; }
.connection > p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.data-details { margin-top: 12px; padding: 0 16px; }
summary { padding: 14px 0; font-size: 12px; font-weight: 700; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 14px; text-align: left; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding-bottom: 8px; color: var(--muted); }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
thead { background: var(--bg); }
.knowledge { margin-top: 22px; padding: 24px; scroll-margin-top: 16px; }
.knowledge-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.knowledge-heading h2 { font-size: 23px; margin-top: 4px; letter-spacing: -.025em; }
.knowledge-heading p:last-child { font-size: 12px; color: var(--muted); margin-top: 7px; }
.progress-badge { flex-shrink: 0; font-size: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 20px; font-weight: 750; }
.quiz-nav { display: flex; gap: 7px; margin: 22px 0; }
.quiz-nav button { width: 38px; min-height: 38px; padding: 4px; border-radius: 50%; font-size: 11px; }
.quiz-nav button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--night); border-color: white; }
.quiz-nav button.complete { background: var(--mint); border-color: var(--accent-dark); color: var(--accent-dark); }
.quiz-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; }
#quizQuestion { font-size: 17px; max-width: 720px; margin: 6px 0 16px; }
.quiz-answers { display: grid; gap: 8px; }
.quiz-answers button { text-align: left; font-size: 12px; font-weight: 600; min-height: 44px; }
.quiz-answers button[aria-pressed="true"] { border: 2px solid var(--accent-dark); }
.quiz-answers button.incorrect { border-color: #b84950; background: #fff5f5; }
.quiz-response { border-left: 1px solid var(--line); padding-left: 28px; display: flex; flex-direction: column; align-items: flex-start; }
#quizFeedback { font-size: 13px; line-height: 1.8; color: var(--muted); }
.quiz-response button { margin-top: 18px; }
.teacher-notes { margin: 16px 0; padding: 0 22px; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 4px 0 15px; }
.notes-grid p { font-size: 12px; color: var(--muted); margin-top: 9px; }
.curriculum { border-top: 1px solid var(--line); padding: 15px 0; font-size: 11px; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); padding: 10px 0 28px; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 15px; top: -70px; z-index: 10; background: white; padding: 12px; }
.skip-link:focus { top: 10px; }
.noscript { padding: 25px; }
@media (min-width: 1500px) { .workspace { grid-template-columns: 270px minmax(0, 1fr); } }
@media (max-width: 1100px) { .app-shell { padding: 0 18px; } .workspace { grid-template-columns: 220px minmax(0, 1fr); gap: 12px; } .graphs-grid { gap: 10px; } .graph-heading { flex-wrap: wrap; min-height: 91px; } .formula { padding-top: 0; } .lessons button { font-size: 12px; padding: 8px; } .metric strong { font-size: 17px; } }
@media (max-width: 800px) {
  .workspace { grid-template-columns: 1fr; } .controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .controls h2 { grid-column: 1 / -1; margin: 0; } .controls > .control-label { margin: 0; align-self: center; } .controls > select { grid-column: 2; }
  .source-control { margin-top: 0; } .position-control { grid-column: 2; grid-row: 3 / span 2; padding: 0; margin: 0; border: 0; }
  .investigation { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 15px; } .investigation .eyebrow, .investigation h3, .investigation p { grid-column: 1; margin: 0; } .investigation button { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin: 0; }
  .test-body { margin: 0; } .graph-heading { min-height: 70px; } .graph { min-height: 220px; } .course-badge { display: none; }
}
@media (max-width: 560px) {
  .app-shell { padding: 0 12px; } .topbar { min-height: 62px; } .brand img { width: 128px; } .intro { padding: 18px 0; } .check-link { max-width: 110px; font-size: 11px; }
  .intro p:last-child { font-size: 12px; } .lessons { grid-template-columns: 1fr 1fr; gap: 3px; } .lessons button { min-height: 42px; font-size: 11px; } .lessons button span { margin-right: 5px; }
  .controls { padding: 15px; gap: 12px; } .controls h2 { font-size: 15px; } .controls select { font-size: 12px; } .controls > .control-label { font-size: 11px; grid-column: 1 / -1; } .controls > select { grid-column: 1 / -1; } .position-control { grid-row: 4 / span 2; }
  .label-row { font-size: 10px; } .point-key { width: 19px; height: 19px; margin-right: 1px; } .button-pair { grid-template-columns: 1fr; } .button-pair button { min-height: 36px; }
  .investigation { display: block; } .investigation h3 { margin: 5px 0; } .investigation button { margin-top: 12px; } .scene-heading { align-items: flex-start; } .scene-heading span { max-width: 90px; text-align: right; } .scene-heading h2 { font-size: 12px; }
  #fieldScene { height: 90px; } .graphs-grid { grid-template-columns: 1fr; } .graph-heading { min-height: 67px; flex-wrap: nowrap; } .formula { padding-top: 13px; }
  .graph { min-height: 0; } .graph-help { font-size: 10px; } .connection { padding: 16px; } .connection h2 { font-size: 15px; }
  .connection-values { gap: 8px; } .metric + .metric { padding-left: 8px; } .metric strong { font-size: 15px; } .metric small { font-size: 10px; } .metric span { font-size: 9px; }
  .knowledge { padding: 18px; } .knowledge-heading { align-items: flex-start; } .knowledge-heading h2 { font-size: 20px; } .progress-badge { font-size: 10px; padding: 6px 8px; } .quiz-layout { grid-template-columns: 1fr; gap: 15px; } .quiz-response { border: 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
  .notes-grid { grid-template-columns: 1fr; gap: 16px; } footer { flex-direction: column; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .controls, .lessons, .topbar button, .quiz-nav, .quiz-answers, .quiz-response button, .check-link, footer { display: none; } .workspace { display: block; } .card { break-inside: avoid; } .app-shell { max-width: none; padding: 0; } }
