:root { --ink:#173138; --muted:#597075; --paper:#f6f1e7; --panel:#fffdf8; --line:#d8ddd1; --teal:#0b6a69; --dark:#344c46; --pale:#d9b876; --focus:#e3522a; font-family: ui-rounded, "Avenir Next", Avenir, "Segoe UI", sans-serif; color:var(--ink); background:#dce7e1; }
* { box-sizing:border-box; } body { margin:0; min-width:320px; background:radial-gradient(circle at 10% 2%, #eef7f1, transparent 31rem), #dce7e1; } button, select, input { font:inherit; } button { cursor:pointer; } button:focus-visible, select:focus-visible, input:focus-visible { outline:3px solid var(--focus); outline-offset:3px; } .app-shell { max-width:1180px; margin:auto; padding:clamp(1rem,3vw,3.2rem); }
.masthead { display:flex; justify-content:space-between; gap:2rem; align-items:start; padding:1rem 0 1.7rem; } h1,h2,p { margin-top:0; } h1 { font-size:clamp(2.2rem,5vw,4.6rem); line-height:.98; letter-spacing:-.06em; max-width:720px; margin:.35rem 0 .75rem; } h2 { font-size:1.15rem; margin:.2rem 0 0; } .lede { color:var(--muted); font-size:1.05rem; max-width:600px; margin-bottom:0; } .eyebrow { font-size:.69rem; font-weight:800; letter-spacing:.13em; color:#527270; margin:0; } .text-button,.copy-button { border:0; color:var(--teal); font-weight:750; background:transparent; text-decoration:underline; text-underline-offset:3px; padding:.4rem; } .model-notes { background:#e9f1eb; border-left:4px solid var(--teal); padding:1rem 1.1rem; line-height:1.48; margin-bottom:1rem; border-radius:0 .7rem .7rem 0; }
.question-card,.panel { background:var(--panel); border:1px solid rgba(29,65,59,.12); box-shadow:0 14px 38px rgba(29,65,59,.08); border-radius:1rem; } .question-card { padding:1.1rem 1.25rem; display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; } .question-card h2 { font-size:1.25rem; max-width:660px; } .prediction-field { display:grid; gap:.4rem; color:var(--muted); font-size:.82rem; font-weight:700; min-width:220px; } select { background:#fff; border:1px solid var(--line); border-radius:.55rem; padding:.6rem; color:var(--ink); }
.workspace,.evidence-grid { display:grid; grid-template-columns:1.18fr .82fr; gap:1rem; margin-bottom:1rem; }.panel { padding:1.15rem; }.panel-heading { display:flex; justify-content:space-between; gap:1rem; align-items:start; margin-bottom:1rem; }
fieldset { border:0; padding:0 0 1.2rem; margin:0 0 1.2rem; border-bottom:1px solid var(--line); } fieldset:last-of-type { margin-bottom:1rem; } legend { font-size:.85rem; font-weight:800; margin-bottom:.7rem; }.segmented-control { display:grid; gap:.45rem; }.choice { text-align:left; border:1px solid var(--line); border-radius:.55rem; background:#fff; color:var(--ink); padding:.65rem .75rem; font-weight:750; }.choice.active { color:#fff; background:var(--teal); border-color:var(--teal); }.hint { font-size:.83rem; color:var(--muted); line-height:1.4; margin:.65rem 0 0; }.range-label { display:flex; justify-content:space-between; font-size:.85rem; font-weight:750; }.range-label output { color:var(--teal); } input[type=range] { accent-color:var(--teal); width:100%; margin-top:.7rem; }.run-controls { display:grid; grid-template-columns:1fr; gap:.55rem; }.primary-button,.secondary-button { min-height:2.75rem; border-radius:.6rem; font-weight:800; border:1px solid var(--teal); }.primary-button { color:white; background:var(--teal); }.secondary-button { color:var(--teal); background:#eff6f0; }.primary-button:disabled,.secondary-button:disabled { opacity:.6; cursor:wait; }.utility-controls { display:flex; flex-wrap:wrap; margin-top:.5rem; }.seed-readout { margin:1rem 0 0; color:var(--muted); font-size:.75rem; }.seed-readout code { color:var(--ink); }.copy-button { font-size:.75rem; }
.evidence-grid { grid-template-columns:.85fr 1.15fr; }.outcome-copy { min-height:4.5rem; line-height:1.46; color:var(--muted); }.stat-row { display:grid; grid-template-columns:repeat(3,1fr); gap:.5rem; margin:0; }.stat-row div { border-left:3px solid var(--line); padding-left:.55rem; }.stat-row dt { font-size:.72rem; color:var(--muted); font-weight:750; }.stat-row dd { margin:.1rem 0 0; font-size:1.55rem; font-weight:850; }.chart-panel { min-width:0; }.chart-panel svg { display:block; width:100%; overflow:visible; font-size:10px; fill:#657a76; }.grid line { stroke:#dce5dd; stroke-dasharray:3 4; }.line { fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }.table-panel { margin-bottom:1rem; }.table-note { color:var(--muted); font-size:.82rem; margin:0; }.table-wrap { overflow-x:auto; }table { width:100%; border-collapse:collapse; min-width:560px; font-size:.86rem; }th,td { text-align:left; padding:.7rem .45rem; border-bottom:1px solid var(--line); }th { color:#58716c; font-size:.74rem; text-transform:uppercase; letter-spacing:.06em; } footer { color:#58716c; text-align:center; font-size:.78rem; padding:1rem; } .sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
@media (max-width:760px) { .masthead,.question-card { display:block; }.masthead .text-button { margin-top:.8rem; }.prediction-field { margin-top:1rem; max-width:none; }.workspace,.evidence-grid { grid-template-columns:1fr; }.question-card { padding:1rem; }.panel { padding:1rem; } } @media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; } }
.prediction-field small { font-weight:500; line-height:1.35; }.reflection { margin-top:1rem; background:#e9f1eb; border-radius:.65rem; padding:.8rem .9rem; }.reflection p:last-child { margin:.35rem 0 0; color:#395851; line-height:1.45; font-size:.9rem; }



/* ---------- States of Matter Lab ---------- */
:root { --lk-accent:#0b6a69; --lk-ink:#173138; }
.step-label { margin:.25rem 0 .55rem .2rem; }
.checks-panel { margin-bottom:1rem; }
.prediction-field select { width:100%; max-width:100%; text-overflow:ellipsis; }
@media (max-width:760px) { .prediction-field { min-width:0; } }
.workspace { grid-template-columns:1.25fr .75fr; }
.scene-panel, .controls-panel, .outcome, .chart-panel { min-width:0; }
.scene-sub { margin:.25rem 0 0; color:var(--muted); font-size:.86rem; }
.time-badge { padding:.35rem .55rem; border-radius:999px; background:#e8efe9; color:#34524c; white-space:nowrap; font-size:.75rem; font-weight:800; }
.scene-wrap { position:relative; border-radius:.75rem; border:1px solid rgba(0,0,0,.08); background:linear-gradient(#f4f8f6, #e4ece7); overflow:hidden; }
.scene-scroll { overflow-x:auto; }
#scene { display:block; width:100%; height:auto; min-height:220px; font-family:inherit; }
.scene-wrap .event-card { position:static; margin:0 .8rem .8rem; background:rgba(255,253,248,.92); border:1px solid rgba(26,56,52,.14); border-radius:.55rem; padding:.55rem .7rem; text-align:center; font-size:.82rem; font-weight:800; }
.plate-label { font-size:14px; font-weight:800; fill:#395851; }
.thermo-label { font-size:11px; font-weight:800; fill:#9fc4c0; letter-spacing:.08em; }
.thermo-value { font-size:28px; font-weight:900; fill:#fffdf8; font-variant-numeric:tabular-nums; }
.readout text { font-size:15px; font-weight:850; fill:#173138; font-variant-numeric:tabular-nums; }
.view-label { font-size:13px; font-weight:850; fill:#395851; letter-spacing:.06em; }
.view-legend { font-size:12.5px; font-weight:750; fill:#395851; }
.stage-track { list-style:none; display:flex; flex-wrap:wrap; gap:.35rem; margin:.8rem 0 0; padding:0; }
.stage-track li { font-size:.78rem; font-weight:800; color:#6d7f7c; background:#f1f4f1; border:1px solid #d3ddd7; border-radius:999px; padding:.3rem .65rem; }
.stage-track li.change { border-style:dashed; }
.stage-track li.now { color:#fff; background:var(--teal); border-style:solid; border-color:var(--teal); }
.readouts { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:.55rem .9rem; margin:.9rem 0 0; }
.readouts div { border-left:3px solid var(--line); padding-left:.55rem; min-width:0; }
.readouts dt { font-size:.72rem; color:var(--muted); font-weight:750; }
.readouts dd { margin:.1rem 0 0; font-size:.98rem; font-weight:850; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.segmented-control.three { grid-template-columns:repeat(3, 1fr); }
.segmented-control.two { grid-template-columns:repeat(2, 1fr); }
.segmented-control .choice { font-size:.84rem; padding:.55rem .6rem; }
.choice:disabled { opacity:.6; cursor:not-allowed; }
.hint.small { font-size:.76rem; }
.utility-controls .text-button { font-size:.85rem; }
.secondary-button.small { min-height:2.2rem; padding:0 .7rem; font-size:.82rem; }
.mystery-tag { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin:0; }
.mystery-chip { display:inline-block; background:#7a5fb8; color:#fff; font-weight:900; border-radius:.5rem; padding:.45rem .7rem; }
.evidence-grid { grid-template-columns:.9fr 1.1fr; }
.stat-row { grid-template-columns:repeat(2, 1fr); gap:.7rem .5rem; }
.stat-row dd { font-size:1.15rem; font-variant-numeric:tabular-nums; }
.mystery-wrap { margin-top:1.1rem; border-top:1px solid var(--line); padding-top:.9rem; }
.mystery-heading { font-size:.95rem; margin:0 0 .5rem; }
.small-table { max-height:none; margin-bottom:.7rem; }
.small-table table, table.ref-table { min-width:0; font-size:.82rem; }
.ref-table caption { text-align:left; font-size:.76rem; color:var(--muted); padding:.5rem .45rem 0; }
.ref-table th, .ref-table td { padding:.45rem; }
.guess-row { margin-top:.4rem; }
.guess-feedback.right { color:#0b6a69; font-weight:750; } .guess-feedback.wrong { color:#a5401b; font-weight:750; }
.chart-wrap { overflow-x:auto; }
.chart-panel svg { display:block; width:100%; min-width:480px; overflow:visible; font-size:11px; fill:#657a76; }
.chart-key { display:flex; flex-wrap:wrap; gap:.4rem 1rem; color:var(--muted); font-size:.78rem; font-weight:800; margin:-.35rem 0 .35rem; min-height:1rem; }
.key-this { color:#c4581c; } .key-prev { color:#8a979a; }
.grid line { stroke:#dce5dd; stroke-dasharray:3 4; } .zero { stroke:#9fb1ad; stroke-width:1.5; }
.line { fill:none; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.line.this { stroke:#c4581c; } .line.prev { stroke:#a7b3b5; stroke-dasharray:6 4; }
.chart-point .mark { fill:#c4581c; } .chart-point.prev .mark { fill:#fffdf8; stroke:#a7b3b5; stroke-width:1.2; }
.chart-point { cursor:pointer; } .chart-point:focus-visible { outline:none; } .chart-point:focus-visible .point-hit, .selected-point .point-hit { stroke:var(--focus); stroke-width:3; }
.slope-line { stroke:#1d6fb8; stroke-width:2; stroke-dasharray:5 4; }
.annotation line { stroke:#53716a; stroke-dasharray:2 4; } .annotation text { fill:#173138; font-size:10.5px; font-weight:850; paint-order:stroke; stroke:#fffdf8; stroke-width:4px; stroke-linejoin:round; }
.axis-label { fill:#395851; font-size:11px; font-weight:800; }
.chart-empty { font-size:13px; fill:#597075; font-weight:700; }
.chart-selection { min-height:2.6rem; margin:.45rem 0 0; color:#395851; font-size:.84rem; line-height:1.4; }
.table-wrap { max-height:22rem; overflow:auto; border:1px solid var(--line); border-radius:.65rem; }
.table-wrap:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
table { min-width:760px; } thead { position:sticky; top:0; z-index:1; background:var(--panel); }
td { font-variant-numeric:tabular-nums; } td.empty { color:var(--muted); text-align:center; }
.model-notes .lk-term, .hint .lk-term, .reflection .lk-term, .lede .lk-term, h2 .lk-term, legend .lk-term, .table-note .lk-term, .outcome-copy .lk-term, .chart-selection .lk-term { font-weight:inherit; }
@media (max-width:900px) { .workspace, .evidence-grid { grid-template-columns:1fr; } }
@media (max-width:760px) { .masthead, .question-card { display:block; } .panel { padding:.9rem; } }
@media (max-width:620px) {
  #scene { min-width:560px; }
  .readouts { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .table-panel .panel-heading, .chart-panel .panel-heading { display:block; }
  .table-note { margin-top:.4rem; }
}
@media (max-width:420px) { .segmented-control.three { grid-template-columns:1fr; } .stat-row dd { font-size:1rem; } }

/* Decorative lab artwork beside the introduction. */
.masthead{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,360px);align-items:center;gap:1.25rem clamp(1.5rem,4vw,3.5rem)}
.masthead>div:first-child{min-width:0}
.masthead-art{grid-column:2;grid-row:1 / span 2;display:block;width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:1rem;box-shadow:0 16px 30px rgba(17,49,51,.13)}
.masthead>.lk-context-tools{grid-column:1;grid-row:2;justify-self:start}
@media(max-width:760px){.masthead{display:block}.masthead-art{width:min(100%,390px);margin:1.5rem 0 0}.masthead>.lk-context-tools{margin-top:1rem}}
