/* Geologic Time & Fossils Lab. Everything is scoped under .gt so site.css (loaded after this file) can't collide. */
.gt {
  --gt-ink: #14263a; --gt-muted: #4b6075; --gt-paper: #eef4f7; --gt-card: #ffffff; --gt-line: #cfdce4;
  --gt-accent: #0d6670; --gt-accent-ink: #ffffff; --gt-sun: #e89a2c; --gt-soft: #f3f7f9; --gt-ok: #1f7a3d; --gt-no: #b3261e;
  --gt-shadow: 0 1px 2px rgba(16, 40, 60, .06), 0 8px 24px rgba(16, 40, 60, .07);
  color: var(--gt-ink); font: 16px/1.5 "Atkinson Hyperlegible", system-ui, sans-serif;
  background: radial-gradient(ellipse 90% 60% at 50% -10%, #dcebf3, var(--gt-paper) 70%);
  padding: 0 clamp(12px, 2vw, 28px) 56px; min-height: 70vh;
}
html[data-theme="dark"] .gt {
  --gt-ink: #e6eef3; --gt-muted: #aabdca; --gt-paper: #0f1b26; --gt-card: #172633; --gt-line: #33495a;
  --gt-accent: #3fb5a3; --gt-accent-ink: #062521; --gt-soft: #1d3040; --gt-ok: #7fdc9a; --gt-no: #ff9b93;
  --gt-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  background: radial-gradient(ellipse 90% 60% at 50% -10%, #19324a, var(--gt-paper) 70%);
}
.gt *, .gt *::before, .gt *::after { box-sizing: border-box; }
.gt [hidden] { display: none !important; }
.gt h1, .gt h2, .gt h3 { color: var(--gt-ink); font-family: inherit; }
.gt-eyebrow { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .08em; color: var(--gt-accent); }
.gt-muted { color: var(--gt-muted); }

/* title bar */
.gt-bar { max-width: 1500px; margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 10px 0 8px; }
.gt-titles { flex: 1 1 260px; }
.gt-bar h1 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; }
.gt-level { padding: 4px 12px; border-radius: 999px; background: var(--gt-soft); border: 1px solid var(--gt-line); font-weight: 700; }
.gt-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* buttons */
.gt .gt-btn { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--gt-line); background: var(--gt-card); color: var(--gt-ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.gt .gt-btn:hover { border-color: var(--gt-accent); }
.gt .gt-btn:disabled { opacity: .5; cursor: not-allowed; }
.gt .gt-btn--pri { background: var(--gt-accent); border-color: var(--gt-accent); color: var(--gt-accent-ink); }
.gt .gt-btn--ghost { background: transparent; }
.gt .gt-btn--small { min-height: 36px; padding: 6px 12px; margin-top: 6px; }
.gt button:focus-visible, .gt a:focus-visible, .gt input:focus-visible, .gt select:focus-visible, .gt textarea:focus-visible { outline: 3px solid #eaa33d; outline-offset: 2px; }

/* level gate */
.gt-gate { max-width: 1500px; margin: 8px auto 0; padding: clamp(18px, 4vw, 48px); border-radius: 22px; background: linear-gradient(140deg, #071a30, #11405e 60%, #b9853d); }
.gt-gate-card { max-width: 860px; margin: 0 auto; padding: clamp(22px, 4vw, 44px); border-radius: 18px; background: var(--gt-card); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.gt-gate-card h2 { font-size: clamp(28px, 4vw, 42px); margin: 6px 0; }
.gt-gate-lede { font-size: 18px; color: var(--gt-muted); }
.gt-gate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.gt-gate-grid button { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 2px solid var(--gt-line); border-radius: 14px; cursor: pointer; background: var(--gt-soft); color: var(--gt-ink); }
.gt-gate-grid button:hover, .gt-gate-grid button:focus-visible { border-color: var(--gt-accent); box-shadow: 0 0 0 3px rgba(13, 102, 112, .25); }
.gt-gate-grid button:disabled { opacity: .45; cursor: not-allowed; }
.gt-gate-grid b { font-size: 21px; }
.gt-gate-grid span { color: var(--gt-muted); }
.gt-gate-grid em { font-style: normal; font-weight: 700; color: var(--gt-accent); }

/* tabs */
#workspace { max-width: 1500px; margin: 0 auto; }
.gt-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; }
.gt-tabs button { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; white-space: nowrap; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--gt-line); background: var(--gt-card); color: var(--gt-ink); cursor: pointer; }
.gt-tabs button.is-on { background: var(--gt-ink); color: var(--gt-card); border-color: var(--gt-ink); }

/* stage */
.gt-stage { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.gt-scene { background: #0a1a30; border-radius: 16px; overflow: hidden; box-shadow: var(--gt-shadow); color: #eaf3f8; }
.gt-viewbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px; background: #0d223b; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.gt-views { display: flex; gap: 6px; flex-wrap: wrap; }
.gt-views button { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; padding: 8px 14px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #d7e7f2; cursor: pointer; }
.gt-views button.is-on { background: #f3b54a; color: #1a1408; border-color: #f3b54a; }
.gt-transport { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gt-scene .gt-btn { background: #16304d; border-color: rgba(255, 255, 255, .2); color: #eef6fb; min-height: 40px; padding: 8px 12px; }
.gt-scene .gt-btn:hover { border-color: #f3b54a; }
.gt-speed { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.gt-speed select, .gt-controls select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: #16304d; color: #eef6fb; padding: 6px 8px; }
.gt-canvas-wrap { position: relative; }
#scene { display: block; width: 100%; touch-action: none; }
.gt-caption { margin: 0; padding: 10px 14px; background: #0d223b; color: #d6e6f1; border-top: 1px solid rgba(255, 255, 255, .08); min-height: 3.2em; }
.gt-controls { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 14px 12px; background: #10263f; }
.gt-ctl input[type=range] { margin: 0; }
.gt-ctl { display: flex; flex-direction: column; gap: 2px; font-weight: 700; min-width: 210px; flex: 1 1 210px; }
.gt-ctl input[type=range] { width: 100%; accent-color: #f3b54a; min-height: 28px; }
.gt-out { font-weight: 800; color: #ffd27a; margin-left: 6px; }
.gt-check { display: flex; align-items: center; gap: 8px; font-weight: 700; align-self: center; }
.gt-check input { width: 20px; height: 20px; accent-color: #f3b54a; }

/* readouts */
.gt-readouts { display: flex; flex-direction: column; gap: 12px; }
.gt-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gt-metric { background: var(--gt-card); border: 1px solid var(--gt-line); border-left: 4px solid var(--gt-sun); border-radius: 12px; padding: 7px 10px; box-shadow: var(--gt-shadow); line-height: 1.3; }
.gt-metric--v { border-left-color: var(--gt-accent); }
.gt-metric span, .gt-metric small { display: block; font-size: 16px; color: var(--gt-muted); }
.gt-metric span { font-weight: 700; color: var(--gt-ink); }
.gt-metric b { display: block; font-size: 22px; line-height: 1.25; color: var(--gt-ink); white-space: nowrap; }
.gt-year { background: var(--gt-card); border: 1px solid var(--gt-line); border-radius: 12px; padding: 10px; box-shadow: var(--gt-shadow); }
.gt-year h3 { margin: 0 0 6px; font-size: 18px; }
.gt-year canvas, #labGraph { display: block; width: 100%; }

/* lab work */
.gt-work { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.4fr); gap: 14px; margin-top: 14px; }
.gt-panel { background: var(--gt-card); border: 1px solid var(--gt-line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--gt-shadow); }
.gt-panel h2 { margin: 4px 0 8px; font-size: 22px; line-height: 1.2; }
.gt-panel h3 { margin: 14px 0 6px; font-size: 18px; }
.gt-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.gt-pred { border: 1px solid var(--gt-line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--gt-soft); }
.gt-pred legend { font-weight: 700; padding: 0 4px; }
.gt-pred label { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; cursor: pointer; }
.gt-pred input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gt-accent); }
.gt-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.gt-cards li { border: 1px dashed var(--gt-line); border-radius: 10px; padding: 8px 10px; }
.gt-cards li span { display: block; color: var(--gt-muted); }
.gt-cards li.done { border-style: solid; border-color: var(--gt-ok); background: rgba(31, 122, 61, .08); }
.gt-steps { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gt-steps li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--gt-line); font-weight: 700; }
.gt-steps li.done { border-color: var(--gt-ok); color: var(--gt-ok); }
.gt-months { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.gt .gt-chip { appearance: none; font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; min-width: 56px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--gt-line); background: var(--gt-soft); color: var(--gt-ink); cursor: pointer; }
.gt .gt-chip.done { border-color: var(--gt-ok); color: var(--gt-ok); }
.gt .gt-chip.is-on { outline: 2px solid var(--gt-sun); }
.gt-inline { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.gt-inline select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid var(--gt-line); background: var(--gt-card); color: var(--gt-ink); padding: 6px 8px; max-width: 100%; }
.gt-feedback { min-height: 1.5em; font-weight: 700; color: var(--gt-accent); margin: 8px 0 0; }
.gt-data-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.gt-data-head h3 { margin: 2px 0 8px; font-size: 20px; }
.gt-table { overflow: auto; max-height: 290px; border: 1px solid var(--gt-line); border-radius: 10px; margin-bottom: 12px; }
.gt table { width: 100%; border-collapse: collapse; font-size: 16px; }
.gt th, .gt td { padding: 7px 10px; border-bottom: 1px solid var(--gt-line); text-align: right; white-space: nowrap; color: var(--gt-ink); }
.gt th:first-child, .gt td:first-child, .gt th:nth-child(2), .gt td:nth-child(2) { text-align: left; }
.gt th { position: sticky; top: 0; background: var(--gt-soft); font-weight: 800; }
.gt-empty { text-align: center !important; color: var(--gt-muted) !important; }

/* CER */
.gt-cer { margin-top: 14px; }
.gt-cer-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gt-checklist { list-style: none; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--gt-soft); min-width: 280px; }
.gt-checklist li { padding: 2px 0; color: var(--gt-muted); }
.gt-checklist li.done { color: var(--gt-ok); font-weight: 700; }
.gt-cer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.gt-cer-grid label { display: flex; flex-direction: column; font-weight: 800; }
.gt-cer-grid small { font-weight: 500; color: var(--gt-muted); }
.gt-cer-grid textarea { font: 16px/1.45 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 130px; padding: 10px; margin-top: 4px; border: 1px solid var(--gt-line); border-radius: 10px; background: var(--gt-card); color: var(--gt-ink); resize: vertical; }
.gt-turnin { margin-top: 12px; }

/* test */
.gt-test { margin-top: 14px; max-width: 980px; }
.gt-test-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.gt-test-head h2 small { font-size: 18px; color: var(--gt-muted); }
.gt-progress { flex: 0 1 260px; height: 10px; background: var(--gt-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--gt-line); }
.gt-progress i { display: block; height: 100%; background: var(--gt-accent); }
.gt-tag { display: inline-block; margin: 8px 0 0; padding: 3px 10px; border-radius: 999px; background: #fff1d6; color: #6b4300; font-weight: 700; }
html[data-theme="dark"] .gt-tag { background: #4a3510; color: #ffe2a8; }
.gt-q { font-size: 19px; font-weight: 700; margin: 12px 0; }
.gt-run { margin-bottom: 10px; }
.gt-readout { margin: 8px 0 0; padding: 10px 12px; border-left: 4px solid var(--gt-sun); background: var(--gt-soft); border-radius: 8px; }
.gt-choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.gt-choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--gt-line); border-radius: 12px; cursor: pointer; background: var(--gt-card); }
.gt-choice input { position: absolute; opacity: 0; pointer-events: none; }
.gt-choice:focus-within { outline: 3px solid #eaa33d; outline-offset: 2px; }
.gt-choice.is-picked { border-color: var(--gt-accent); background: var(--gt-soft); }
.gt-choice.ok { border-color: var(--gt-ok); }
.gt-choice.no { border-color: var(--gt-no); }
.gt-choice em { margin-left: auto; font-style: normal; font-weight: 900; font-size: 20px; }
.gt-choice.ok em { color: var(--gt-ok); } .gt-choice.no em { color: var(--gt-no); }
.gt-letter { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--gt-soft); border: 1px solid var(--gt-line); }
.gt-choices:disabled .gt-choice { cursor: default; }
.gt-explain { padding: 10px 12px; border-radius: 10px; background: var(--gt-soft); }
.gt-explain.ok { border-left: 4px solid var(--gt-ok); } .gt-explain.no { border-left: 4px solid var(--gt-no); }
.gt-test-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.gt-test-nav .gt-btn--pri { margin-left: auto; }
.gt-review { padding-left: 22px; }
.gt-review li { margin: 8px 0; }
.gt-review li.ok > b { color: var(--gt-ok); } .gt-review li.no > b { color: var(--gt-no); }

/* dialogs */
.gt-dialog { max-width: 720px; border: 0; border-radius: 16px; padding: 22px 26px; color: #14263a; background: #fff; box-shadow: 0 20px 70px rgba(0, 0, 0, .4); font: 16px/1.55 "Atkinson Hyperlegible", system-ui, sans-serif; }
html[data-theme="dark"] .gt-dialog { background: #172633; color: #e6eef3; }
html[data-theme="dark"] .gt-dialog a { color: #8fd6f0; }
.gt-dialog::backdrop { background: rgba(6, 21, 37, .7); }
.gt-dialog h2 { margin-top: 0; }
.gt-x { float: right; font-size: 28px; line-height: 1; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: inherit; cursor: pointer; }

/* responsive */
@media (max-width: 1100px) {
  .gt-stage { grid-template-columns: minmax(0, 1fr); }
  .gt-metrics { grid-template-columns: repeat(3, 1fr); }
  .gt-work { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .gt-gate-grid, .gt-cer-grid { grid-template-columns: minmax(0, 1fr); }
  .gt-metrics { grid-template-columns: 1fr 1fr; }
  .gt-viewbar { flex-direction: column; align-items: stretch; }
  .gt-views button { flex: 1; }
  .gt-ctl { min-width: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .gt * { transition: none !important; animation: none !important; } }
@media print { .gt-scene, .gt-tabs, .gt-actions, .gt-turnin { display: none !important; } }

.gt small { font-size: 16px; }
.gt .gt-th-title { text-align: left !important; background: var(--gt-card); color: var(--gt-accent); font-weight: 800; position: static; }
.gt .gt-th-sub { position: static; }
.gt-caption { font-size: 16px; }

/* ── v3 structure: modes, tabs, coach, pre-lab, advanced, toast ── */
.gt-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 0 8px; }
.gt-modes-label { font-weight: 800; margin-right: 4px; }
.gt-modes button { appearance: none; font: 700 16px/1.2 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 2px solid var(--gt-line); background: var(--gt-card); color: var(--gt-ink); cursor: pointer; }
.gt-modes button.is-on { border-color: var(--gt-accent); background: var(--gt-accent); color: var(--gt-accent-ink); }
.gt-modes-note { color: var(--gt-muted); }
.gt-tabs button.is-on { background: var(--gt-ink); color: var(--gt-card); border-color: var(--gt-ink); }
.gt-stage { grid-template-columns: minmax(0, 1fr) 350px; }
.gt-side { display: flex; flex-direction: column; gap: 10px; }
.gt-coach { background: var(--gt-card); border: 1px solid var(--gt-line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--gt-shadow); }
.gt-coach h2 { font-size: 18px; margin: 2px 0 6px; }
.gt-next { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--gt-soft); border-left: 4px solid var(--gt-sun); }
.gt-stepchecks { list-style: none; margin: 8px 0; padding: 0; }
.gt-stepchecks li { padding: 2px 0; color: var(--gt-muted); }
.gt-stepchecks li.done { color: var(--gt-ok); font-weight: 700; }
.gt-ch summary { cursor: pointer; font-weight: 800; padding: 4px 0; min-height: 32px; }
.gt-ice canvas { display: block; width: 100%; border-radius: 8px; margin: 6px 0; }
.gt-ice input[type=range] { width: 100%; accent-color: var(--gt-accent); }
.gt-zoom { position: absolute; left: 10px; bottom: 34px; display: flex; flex-direction: column; gap: 6px; }
.gt-zoom button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); background: rgba(10,26,48,.85); color: #fff; font: 800 20px/1 system-ui; cursor: pointer; }
.gt-adv { background: #0d223b; border-top: 1px solid rgba(255,255,255,.08); }
.gt-adv summary { cursor: pointer; padding: 10px 14px; font-weight: 800; color: #ffd27a; min-height: 44px; }
.gt-adv-grid { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 4px 14px 14px; }
.gt-adv-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: 1 1 100%; }
.gt-adv .gt-metric { background: #16304d; border-color: rgba(255,255,255,.12); color: #eaf3f8; }
.gt-adv .gt-metric span, .gt-adv .gt-metric b, .gt-adv .gt-metric small { color: #eaf3f8; }
.gt-seed { display: flex; align-items: center; gap: 10px; }
.gt-seed b { font-size: 20px; color: #ffd27a; }
.gt-ctl small { font-weight: 500; color: #c3dce6; }
.gt-scene select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: #16304d; color: #eef6fb; padding: 6px 8px; }
.gt-flash { animation: gtFlash 2.4s ease-out; border-radius: 10px; }
@keyframes gtFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,184,0,0); } 15%, 55% { box-shadow: 0 0 0 5px #ffb800; } }
.gt-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(640px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px; background: #10253b; color: #fff; font-weight: 700; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
/* pre-lab */
.gt-prelab h3 { margin-top: 18px; }
.gt-qbox { padding: 12px 14px; border-radius: 12px; background: var(--gt-soft); border-left: 5px solid var(--gt-accent); margin: 10px 0; }
.gt-qbox small { display: block; color: var(--gt-muted); font-weight: 700; }
.gt-qbox b { font-size: 19px; }
.gt-prelab-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
.gt-vocab { display: flex; flex-wrap: wrap; gap: 8px; }
.gt .gt-term { position: relative; appearance: none; font: inherit; color: var(--gt-accent); font-weight: 800; background: none; border: 0; border-bottom: 2px dotted currentColor; padding: 0 1px; cursor: help; }
.gt-vocab .gt-term { border: 1px solid var(--gt-line); border-radius: 999px; padding: 6px 12px; background: var(--gt-soft); min-height: 40px; }
.gt-tip { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: min(320px, 80vw); padding: 10px 12px; border-radius: 10px; background: #10253b; color: #fff; font-weight: 500; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.gt-term:hover .gt-tip, .gt-term:focus .gt-tip, .gt-term:focus-visible .gt-tip { display: block; }
.gt-safety { padding-left: 0; list-style: none; }
.gt-safety li { padding: 6px 10px; margin: 6px 0; border-radius: 8px; background: #fff4d6; color: #5a3b00; }
html[data-theme="dark"] .gt-safety li { background: #3d2c0b; color: #ffe2a8; }
.gt-frame { line-height: 2.4; font-size: 17px; }
.gt-frame select { font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 2px solid var(--gt-accent); background: var(--gt-card); color: var(--gt-ink); padding: 4px 8px; }
.gt-because { display: flex; flex-direction: column; font-weight: 700; }
.gt-because textarea { font: 16px/1.45 "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 80px; padding: 10px; margin-top: 4px; border: 1px solid var(--gt-line); border-radius: 10px; background: var(--gt-card); color: var(--gt-ink); }
.gt-varpool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 8px; border: 1px dashed var(--gt-line); border-radius: 12px; }
.gt-varbins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.gt-varbin { min-height: 120px; padding: 8px; border: 2px solid var(--gt-line); border-radius: 12px; background: var(--gt-soft); display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; cursor: pointer; }
.gt-varbin h4 { flex: 1 1 100%; margin: 0 0 4px; }
.gt .gt-varchip { appearance: none; font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--gt-line); background: var(--gt-card); color: var(--gt-ink); cursor: pointer; }
.gt .gt-varchip.picked { border-color: var(--gt-sun); box-shadow: 0 0 0 3px rgba(232,154,44,.35); }
.gt .gt-varchip.right { border-color: var(--gt-ok); } .gt .gt-varchip.wrong { border-color: var(--gt-no); }
/* data + CER */
.gt-data h3 { margin: 14px 0 6px; font-size: 18px; }
#labGraph { margin-top: 14px; border-radius: 10px; }
.gt-pick { margin: 10px 0; border: 1px solid var(--gt-line); border-radius: 12px; padding: 8px 12px; }
.gt-pick summary { cursor: pointer; font-weight: 800; min-height: 32px; }
.gt-rowpick { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.gt-rowpick input { width: 18px; height: 18px; margin-top: 3px; }
#rowPick { max-height: 220px; overflow: auto; }
.gt-done { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(31,122,61,.10); border: 2px solid var(--gt-ok); }
.gt-more { position: relative; }
.gt-more summary { list-style: none; }
.gt-more summary::-webkit-details-marker { display: none; }
.gt-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--gt-card); border: 1px solid var(--gt-line); box-shadow: var(--gt-shadow); min-width: 240px; }
@media (max-width: 1100px) { .gt-prelab-grid { grid-template-columns: minmax(0, 1fr); } .gt-stage { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .gt-varbins { grid-template-columns: minmax(0, 1fr); } .gt-adv-metrics { grid-template-columns: minmax(0, 1fr); } }
@media print {
  .tlg-header, .tlg-footer, .gt-bar .gt-actions, .gt-modes, .gt-tabs, #stageWrap, .gt-pick, .gt-turnin, .gt-toast, #testCard { display: none !important; }
  .gt { background: #fff; color: #000; }
  #tab-data, #tab-cer { display: block !important; box-shadow: none; }
}
/* compact header rows so the scene and its controls fit at 1366×768 */
.gt-titles .gt-eyebrow { display: none; }
.gt-bar { padding: 8px 0 6px; }
.gt-bar h1 { font-size: 26px; white-space: nowrap; }
.gt-bar .gt-btn { min-height: 40px; padding: 7px 12px; }
.gt-modes { padding: 0 0 6px; }
.gt-modes button, .gt-tabs button { min-height: 40px; padding: 7px 13px; }
.gt-tabs { padding: 0 0 8px; }
@media (max-width: 760px) { .gt-bar h1 { white-space: normal; } }
/* scene full width; coach, readouts and graph in a row underneath */
.gt-stage { grid-template-columns: minmax(0, 1fr); }
.gt-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; align-items: start; }
.gt-side .gt-metrics { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .gt-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .gt-side .gt-year { grid-column: 1 / -1; } }
@media (max-width: 760px) { .gt-side { grid-template-columns: minmax(0, 1fr); } }

/* ── Geologic Time & Fossils Lab additions ── */
.gt { --gt-accent: #8a4b16; --gt-sun: #d08a2c; --gt-paper: #f5f1ea; --gt-soft: #f6f0e6; --gt-line: #dccfbd; background: radial-gradient(ellipse 90% 60% at 50% -10%, #efe3cf, var(--gt-paper) 70%); }
html[data-theme="dark"] .gt { --gt-accent: #f0b25e; --gt-accent-ink: #2a1703; --gt-paper: #15120e; --gt-card: #221d17; --gt-soft: #2d261e; --gt-line: #4a3f31; background: radial-gradient(ellipse 90% 60% at 50% -10%, #3a2b1a, var(--gt-paper) 70%); }
.gt-gate { background: linear-gradient(140deg, #2b1a0c, #6b4524 45%, #b08a52 75%, #4f6d63); }
.gt-scene { background: #1b1510; }
.gt-viewbar, .gt-caption, .gt-adv { background: #241c14; }
.gt-controls { background: #2a2118; align-items: center; }
.gt-scene .gt-btn { background: #3a2d20; }
.gt-views button.is-on { background: #f0b25e; border-color: #f0b25e; color: #241605; }
.gt-ctl select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: #3a2d20; color: #fff6ea; padding: 6px 8px; }
.gt-ctl-note { margin: 0; color: #f1e3cf; flex: 1 1 100%; }
.gt-zoom { top: 40px; bottom: auto; left: 10px; flex-direction: row; }
.gt-zoom button { background: rgba(30,22,14,.85); }
.gt-side { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr) minmax(0, 1.05fr); }
.gt-metric { border-left-color: #c47a2c; }
.gt-metric--v { border-left-color: #3f7f72; }
.gt-metric b { font-size: 20px; white-space: normal; }
.gt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.gt .gt-chip { appearance: none; font: 700 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; min-width: 44px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--gt-line); background: var(--gt-soft); color: var(--gt-ink); cursor: pointer; }
.gt .gt-chip.done { border-color: var(--gt-ok); color: var(--gt-ok); }
.gt .gt-chip.is-on { outline: 3px solid var(--gt-sun); outline-offset: 1px; }
.gt .gt-chip.bad { border-color: var(--gt-no); color: var(--gt-no); }
.gt-label { margin: 8px 0 0; font-weight: 800; }
.gt-run { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.gt-run .gt-readout { flex: 1 1 100%; }
.gt-q b { color: var(--gt-accent); }
/* clue panel, sequence strip, sample card */
.gt-cluebox { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--gt-soft); border-left: 4px solid #e0a21f; }
.gt-cluebox p { margin: 0 0 6px; }
.gt-cluebox select, .gt-und select { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; border-radius: 8px; border: 1px solid var(--gt-line); background: var(--gt-card); color: var(--gt-ink); padding: 4px 8px; max-width: 100%; }
.gt-seq { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 48px; padding: 6px; border-radius: 10px; border: 2px dashed var(--gt-line); margin: 6px 0; }
.gt-seq .gt-arrow { color: var(--gt-muted); font-weight: 800; }
.gt .gt-evt { appearance: none; font: 800 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 40px; min-width: 44px; padding: 6px 10px; border-radius: 8px; border: 2px solid var(--gt-line); background: var(--gt-card); color: var(--gt-ink); cursor: pointer; }
.gt .gt-evt small { font-weight: 600; color: var(--gt-muted); margin-left: 4px; }
.gt .gt-evt.placed { background: #3f7f72; border-color: #3f7f72; color: #fff; }
.gt .gt-evt.placed small { color: #e2f2ee; }
.gt .gt-evt.bad { background: #b3261e; border-color: #b3261e; color: #fff; }
.gt-und { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.gt-sample { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--gt-soft); border-left: 4px solid #e89a2c; }
.gt-sample b { font-size: 18px; }
.gt-match { font-weight: 800; }
.gt-match.ok { color: var(--gt-ok); }
.gt-nudge { display: flex; flex-wrap: wrap; gap: 6px; }
.gt-status { list-style: none; padding: 0; margin: 6px 0; }
.gt-status li { padding: 2px 0; color: var(--gt-muted); }
.gt-status li.done { color: var(--gt-ok); font-weight: 700; }
.gt-practice { display: flex; gap: 10px; align-items: center; margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: var(--gt-soft); border: 1px solid var(--gt-line); }
.gt-practice b { display: block; }
.gt-adv .gt-ctl { color: #fff6ea; }
.gt-seed span { font-weight: 800; color: #fff6ea; }
.gt-seed input { font: 600 16px "Atkinson Hyperlegible", system-ui, sans-serif; min-height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: #3a2d20; color: #fff; padding: 4px 8px; }
.gt-adv summary { color: #ffd27a; }
.gt-check { color: #fff6ea; }
html[data-theme="dark"] .gt-dialog a { color: #f0c27e; }
@media (max-width: 1100px) { .gt-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .gt-side .gt-year, .gt-side .gt-coach { grid-column: 1 / -1; } }
@media (max-width: 760px) { .gt-side { grid-template-columns: minmax(0, 1fr); } }
.gt-zoom.gt-zoom--right { left: auto; right: 12px; top: 8px; }
/* notebook tables hold sentences: left-aligned, wrapping text */
.gt th, .gt td { text-align: left; }
.gt td { white-space: normal; min-width: 64px; max-width: 360px; vertical-align: top; }
.gt-table { max-height: 340px; }
