:root {
  --night: #071e2a;
  --ink: #102e38;
  --muted: #46626c;
  --teal: #07565b;
  --pale: #e4f0ef;
  --paper: #f5f7f5;
  --rule: #bbcecf;
  --focus: #a94612;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
button, input { font: inherit; }
a { color: var(--teal); text-underline-offset: .2em; }
button, label, summary { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
.wrap { width: min(100% - 48px, 1120px); margin-inline: auto; }
.sr, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(100%); white-space: nowrap; }
.skip:focus { z-index: 3; width: auto; height: auto; padding: 12px; clip-path: none; background: white; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(360px, 47vw, 560px);
  overflow: hidden;
  background: var(--night);
  color: white;
}
.hero img, .hero::before { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero img { object-fit: cover; object-position: center 36%; }
.hero::before {
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 8%, #061f2977 41%, #051a23 100%);
  content: "";
}
.hero-inner { position: relative; padding-block: 96px 42px; }
.eyebrow { display: block; color: var(--teal); font-size: .82rem; font-weight: 780; letter-spacing: .065em; }
.hero .eyebrow { color: #b9efed; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.05; font-weight: 400; }
h1 { margin-top: 10px; font-size: clamp(3.4rem, 9.6vw, 8rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2rem, 4vw, 3.65rem); letter-spacing: -.035em; }
h3, legend { font-size: clamp(1.24rem, 2.1vw, 1.55rem); font-weight: 750; line-height: 1.16; }
.hero p { max-width: 31ch; margin-top: 9px; color: #eefaf9; font-size: clamp(1.14rem, 2.4vw, 1.6rem); }
.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  gap: 16px;
  margin-top: 23px;
  padding: 7px 13px;
  border-radius: 4px;
  color: var(--night);
  background: #ddf4ee;
  font-weight: 750;
  text-decoration: none;
}
.hero-link:hover { background: white; }
.hero-link:focus-visible { outline-color: #fbe1a3; }

main { padding-top: clamp(39px, 6vw, 84px); scroll-margin-top: 15px; }
.lab-heading { display: grid; grid-template-columns: 1fr minmax(205px, 30ch); align-items: end; gap: 24px; margin-bottom: 30px; }
.lab-heading h2, .evidence h2, .teachers h2 { margin-top: 6px; }
.lab-heading p, .station-heading p, .notice, .field-note, .foot p { color: var(--muted); }
.lab { display: grid; grid-template-columns: minmax(0, 1.23fr) minmax(320px, .93fr); gap: clamp(20px, 3.8vw, 52px); align-items: start; }
.station { border: 1px solid var(--rule); border-radius: 9px; overflow: hidden; }
.station-heading { padding: 16px 18px 11px; background: white; }
.station-heading h3 { font-size: 1.08rem; }
.station-heading p { min-height: 3.2em; margin-top: 3px; font-size: .92rem; }
.diagram { position: relative; min-height: 260px; background: linear-gradient(180deg, #0a536a, #073447 55%, #061d30); color: white; font-size: .82rem; }
.sky { position: absolute; inset: 0 0 auto; height: 19%; background: #cbdfe2; }
.ice-band {
  position: absolute;
  inset: 19% 0 auto;
  height: 13%;
  background: repeating-linear-gradient(165deg, #f1f6f780 0 4px, transparent 5px 25px), linear-gradient(#9fc9cc, #d2eded);
  border-bottom: 2px solid #aee2e6;
}
.snow-patch {
  position: absolute;
  top: 13%;
  left: 50%;
  width: 50%;
  height: 6%;
  border-radius: 70% 44% 0 0;
  border-bottom: 1px solid #758a8f;
  background: #f9fcfb;
  transition: left .35s ease;
}
.diagram[data-snow="left"] .snow-patch { left: 0; }
.columns { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.side { position: relative; min-width: 0; }
.right { border-left: 1px dashed #ecffff73; }
.surface-label { position: absolute; top: 3%; width: 100%; padding-inline: 5px; color: var(--night); text-align: center; font-weight: 750; }
.sensor {
  position: absolute;
  z-index: 2;
  top: 69%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: .45em;
  margin: -.75em 0 0 -.72em;
  transition: top .35s ease;
}
.probe { width: 1.42em; height: 1.52em; border: 2px solid white; border-radius: 4px; background: #147381; box-shadow: inset 0 0 0 2px #061d30; }
.sensor-tag { color: #ffffff; font-weight: 800; }
.diagram[data-setup="uneven"] .right .sensor { top: 84%; }
.depth-line { position: absolute; z-index: 1; top: 69%; left: 7%; right: 7%; border-bottom: 1px dashed #9fe4e6; }
.diagram[data-setup="unselected"] .depth-line, .diagram[data-setup="uneven"] .depth-line { opacity: .17; }
.condition-line { padding: 13px 18px; background: white; color: var(--muted); font-size: .92rem; }
.condition-line strong { margin-right: .5rem; color: var(--teal); }
.readings { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); background: var(--pale); }
.readings div { text-align: center; padding: 12px 6px 7px; }
.readings div + div { border-left: 1px solid var(--rule); }
.readings span, .readings strong { display: block; }
.readings strong { font-variant-numeric: tabular-nums; font-size: 2.5rem; line-height: 1.12; }
.readings p { grid-column: 1 / -1; padding: 4px 8px 12px; color: var(--muted); text-align: center; font-size: .86rem; }

.controls { min-width: 0; padding: 21px; border: 1px solid var(--rule); border-radius: 9px; background: white; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.field-note { margin: 8px 0 11px; }
.choice { display: grid; grid-template-columns: 19px minmax(0, 1fr); align-items: start; gap: 10px; margin: 7px 0; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: #f8faf9; }
.choice:has(input:checked) { border-color: var(--teal); background: var(--pale); }
.choice small { display: block; color: var(--muted); font-size: .87rem; }
.choice input { width: 17px; height: 17px; margin-top: .2em; accent-color: var(--teal); }
button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; margin-top: 10px; padding: 7px 15px; border: 1px solid var(--teal); border-radius: 5px; background: var(--teal); color: white; font-weight: 750; text-align: left; }
button:hover { background: var(--night); }
button:disabled { cursor: default; border-color: var(--rule); background: #e8eeee; color: #586c72; }
button.quiet { background: white; color: var(--teal); }
button.quiet:hover { background: var(--pale); }
.notice { padding: 10px 12px; margin-top: 12px; border-left: 4px solid var(--teal); background: var(--pale); }
.stage-note { margin-bottom: 9px; color: var(--teal); font-size: .9rem; font-weight: 750; }
#move-panel > p { margin-top: 10px; }
#reset { margin-top: 19px; }

.evidence, .teachers { margin-top: clamp(45px, 8vw, 94px); padding-block: 26px; border-top: 1px solid var(--rule); }
.evidence h2, .teachers h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
table { width: 100%; border-collapse: collapse; margin-block: 12px 15px; background: white; }
caption { margin: 0 0 6px; text-align: left; color: var(--muted); font-size: .87rem; }
th, td { padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--rule); }
thead { background: var(--pale); }
.transfer { max-width: 650px; margin-top: 27px; }
.film-followup { margin-top: 17px; padding: 9px 14px 13px; border-left: 4px solid var(--teal); background: var(--pale); }
.film-followup a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 750; }
.film-followup p { color: var(--muted); }
.teachers { display: grid; align-items: start; grid-template-columns: .85fr 1fr; gap: 14px 48px; }
.teachers p { margin-top: .65em; }
.resources { list-style: none; padding-left: 0; }
.resources li { border-bottom: 1px solid var(--rule); }
.resources a { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding-block: 10px; min-height: 44px; font-weight: 690; }
#paper-details { grid-column: 1/-1; }
.purchase-options { grid-column: 1/-1; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 6px; background: white; }
.purchase-options h3 { font-size: 1.03rem; line-height: 1.4; }
.purchase-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 0; margin: 8px 0 0; list-style: none; }
.purchase-links a { display: flex; min-height: 44px; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 4px; font-weight: 720; }
.purchase-links a:hover { background: var(--pale); }
.licences { color: var(--muted); font-size: .89rem; }
.research { grid-column: 1/-1; color: var(--muted); font-size: .87rem; }
details { margin-top: 14px; padding: 10px 13px; border: 1px solid var(--rule); border-radius: 6px; background: white; }
summary { min-height: 27px; font-weight: 750; }
.print-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.print-card h3 { margin: 9px 0; }
.print-card li { padding: 3px 0; }
.writing { height: 1.8em; border-bottom: 1px solid var(--rule); }
.foot { display: flex; flex-wrap: wrap; gap: 2px 20px; align-items: baseline; font-size: .86rem; margin-top: 18px; padding: 15px 0 24px; border-top: 1px solid var(--rule); }
.foot span { color: var(--teal); font-weight: 750; }

@media (max-width: 740px) {
  .wrap { width: calc(100% - 32px); }
  .hero-inner { padding-block: 90px 28px; }
  .lab, .lab-heading, .teachers { grid-template-columns: 1fr; }
  .lab-heading { gap: 9px; margin-bottom: 22px; }
  .lab { gap: 15px; }
  .diagram { min-height: 219px; }
  .controls { padding: 16px; }
  th, td { padding: 8px 6px; }
  .teachers { gap: 12px; }
}
@media (max-width: 520px) { .purchase-links { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  @page { size: letter; margin: 17mm; }
  body { background: white; color: black; font-size: 12pt; }
  .skip, .hero, .lab-heading, .lab, .evidence, .foot, noscript, .teachers > :not(#paper-details),
  #paper-details > summary, .print-options, #key-details > summary { display: none !important; }
  main.wrap, .teachers, #paper-details, #key-details { width: auto; display: block; margin: 0; padding: 0; border: 0; }
  html:not([data-print="key"]) #key-details, html[data-print="key"] #student-paper { display: none !important; }
  .print-card, .print-card h3, .print-card p { color: black; }
  .print-card li { margin-bottom: 12px; }
}

.film-home { color: inherit; text-underline-offset: .24em; }
.hero .eyebrow { margin-block: 0; }
