/* Corneal Endothelium Lab (DEC-052). Its own instrument-style design: dark, quiet, numbers in a fixed-width
   face. Deliberately separate from the Hub's bright theme (owner decision), so nothing here uses hub.css. */

@font-face {
  font-family: Figtree;
  src: url('/fonts/figtree-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url('/fonts/figtree-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url('/fonts/figtree-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #080b0f;
  --panel: #10151b;
  --panel-2: #151b23;
  --line: #242d38;
  --line-2: #344050;
  --text: #e8edf2;
  --dim: #9aa7b6;
  --faint: #8391a1;
  --glow: #7fe3d4; /* instrument read-outs */
  --trial: #f5c063;
  --bench: #c2adff;
  --model: #7cc8f0;
  --warn: #ff9a8a;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif; /* the Hub's typeface, used for everything */
  --mono: var(--sans);
  --amber: #f2a900; /* the Hub's accent, used for text that needs to stand out */
  --r: 14px;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: radial-gradient(1200px 500px at 50% -120px, #13202b 0%, transparent 70%), var(--bg);
  color: var(--text);
  font: 400 17px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
}
h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
a {
  color: var(--model);
}
:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 2px;
  border-radius: 6px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

/* Top bar */
.bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px clamp(16px, 2.4vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgb(8 11 15 / 92%);
  position: sticky;
  top: 0;
  z-index: 20;
}
.home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.home svg {
  width: 22px;
  height: 22px;
}
.home:hover {
  color: var(--text);
}
.name {
  margin-right: auto;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
.name h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.name p {
  color: var(--dim);
  font-size: 13px;
}
.tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}
.tabs button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.tabs button[aria-selected='true'] {
  background: var(--text);
  color: #0a0d11;
}
.present-on,
#present-off {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.present-on:hover,
#present-off:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.notice {
  margin: 0;
  padding: 9px clamp(16px, 2.4vw, 32px);
  color: var(--dim);
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
  background: #0c1116;
}
.notice.error {
  color: var(--warn);
}

/* Labels that say what kind of statement something is */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font: 600 12.5px/1.5 var(--sans);
  white-space: nowrap;
}
.tag.trial {
  color: var(--trial);
}
.tag.bench {
  color: var(--bench);
}
.tag.model {
  color: var(--model);
}

/* Simulator layout */
.sim {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr) minmax(280px, 372px);
  grid-template-areas:
    'rail stage side'
    'rail charts charts';
  grid-template-rows: auto 1fr;
  gap: 16px;
  padding: 16px clamp(16px, 2.4vw, 32px) 28px;
  max-width: 1760px;
  margin: 0 auto;
}
.rail {
  grid-area: rail;
  display: grid;
  gap: 12px;
  align-content: start;
}
.stage {
  grid-area: stage;
  min-width: 0;
}
.side {
  grid-area: side;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.charts {
  grid-area: charts;
}

.panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}
.panel h2 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.slider {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 8px;
  margin-bottom: 12px;
  font-size: 14.5px;
}
.slider output {
  font: 600 14px var(--mono);
  color: var(--amber);
}
.slider input {
  grid-column: 1 / -1;
}
input[type='range'] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 44px;
  margin: -6px 0;
  background: transparent;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
}
input[type='range']::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--text);
}
input[type='range']::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--text);
}
.cohorts,
.plan-note {
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.45;
}
.cohorts b,
.plan-note b {
  color: var(--text);
  font-weight: 600;
}
.cohorts .tag,
.plan-note .tag {
  margin-right: 6px;
}

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.seg label {
  position: relative;
  cursor: pointer;
}
.seg input,
.arms input,
.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.seg span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 9px;
  color: var(--dim);
  font-weight: 700;
  font-size: 14.5px;
}
.seg input:checked + span {
  background: var(--text);
  color: #0a0d11;
}
.seg input:focus-visible + span,
.arms input:focus-visible + span,
.switch input:focus-visible + span {
  outline: 2px solid var(--glow);
  outline-offset: 2px;
}
.arms {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}
.arms legend {
  padding: 0;
  margin-bottom: 6px;
  color: var(--dim);
  font-size: 13px;
}
.arms label {
  position: relative;
  display: block;
  margin-bottom: 4px;
}
.arms span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14.5px;
}
.arms span::before {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--faint);
}
.arms input:checked + span {
  border-color: var(--glow);
  background: rgb(127 227 212 / 7%);
}
.arms input:checked + span::before {
  border-color: var(--glow);
  background: radial-gradient(var(--glow) 0 45%, transparent 50%);
}
.switch {
  position: relative;
  display: block;
  margin-bottom: 12px;
}
.switch span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  color: var(--dim);
}
.switch span::before {
  content: '';
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: radial-gradient(circle at 10px 10px, var(--dim) 0 7px, transparent 8px), var(--line-2);
}
.switch input:checked + span {
  color: var(--text);
}
.switch input:checked + span::before {
  background: radial-gradient(circle at 26px 10px, #0a0d11 0 7px, transparent 8px), var(--bench);
}
.key p {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.4;
}
.key .tag {
  justify-self: start;
}

/* The microscope */
.scope,
.map,
.oct {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #000;
}
.scope canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  touch-action: none;
}
.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font: 500 13px/1.4 var(--sans);
  color: #f3f5f7;
  text-shadow:
    0 1px 2px #000,
    0 0 8px #000;
}
.hud-top {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.hud .tag {
  background: rgb(0 0 0 / 55%);
  text-shadow: none;
}
.read {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 10px;
  background: rgb(0 0 0 / 62%);
  min-width: 190px;
}
.read div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.read dt {
  color: #cfd6de;
}
.read dd {
  font-weight: 700;
  color: #ffffff;
}
.scale {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  gap: 3px;
}
.scale i {
  display: block;
  height: 3px;
  background: var(--glow);
  box-shadow: 0 0 0 1px #000;
}
.scale b {
  font-weight: 600;
}
.quality {
  position: absolute;
  left: 14px;
  bottom: 48px;
  color: var(--trial);
  max-width: 55%;
}

.transport {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}
#play {
  min-width: 84px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--glow);
  color: #06201c;
  font-weight: 700;
  cursor: pointer;
}
#play[aria-pressed='true'] {
  background: var(--text);
  color: #0a0d11;
}
.time {
  display: block;
}
#week-out {
  min-width: 13ch;
  text-align: right;
  font: 600 14px var(--mono);
  color: var(--amber);
}
.speed select {
  appearance: none;
  -webkit-appearance: none;
  height: 44px;
  min-height: 44px;
  padding: 0 30px 0 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa7b6' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
}
.status {
  min-height: 3em;
  margin-top: 10px;
  padding: 0 4px;
  color: var(--dim);
  font-size: 14.5px;
}
.status b {
  color: var(--text);
  font-weight: 600;
}

/* Map and cross-section */
.map canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  touch-action: none;
  cursor: crosshair;
}
.oct canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
}
.map figcaption,
.oct figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
  font-size: 13px;
}
.mini {
  min-height: 44px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mini[aria-pressed='true'] {
  background: var(--text);
  border-color: var(--text);
  color: #0a0d11;
}
.ramp {
  flex-basis: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px 0;
  font: 11.5px var(--mono);
}
.ramp i {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #120a29, #2454a8 25%, #29b3a6 50%, #bade4a 75%, #fff5a8);
}
.ramp b {
  font-weight: 500;
}
.ramp b:nth-of-type(2) {
  text-align: center;
}
.ramp b:nth-of-type(3) {
  text-align: right;
}
.reticle {
  position: absolute;
  width: 34px;
  height: 26px;
  margin: -13px 0 0 -17px;
  border: 2px solid var(--glow);
  border-radius: 4px;
  box-shadow:
    0 0 0 1px #000,
    0 0 14px rgb(127 227 212 / 60%);
  pointer-events: none;
}
.sites {
  padding: 12px 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}
.sites .slider {
  margin-bottom: 8px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chips button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.chips button:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* Charts */
.charts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}
@media (max-width: 1560px) {
  .charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.chart {
  padding: 14px 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  min-width: 0;
}
.chart h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.chart .sub {
  min-height: 2.9em;
  margin: 2px 0 6px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.45;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  color: var(--dim);
  font-size: 12px;
}
.chart .legend span::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 0;
  margin-right: 5px;
  vertical-align: middle;
  border-top: 2px solid currentColor;
}
.chart .legend .l-model {
  color: var(--model);
}
.chart .legend .l-cohort {
  color: #b7c3d0;
}
.chart .legend .l-cohort::before {
  border-top-style: dashed;
}
.chart .legend .l-trial {
  color: var(--trial);
}
.chart .legend .l-trial::before {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: currentColor;
}
.chart .legend .l-before {
  color: var(--faint);
}
.chart .legend .l-before::before {
  border-top-style: dotted;
}
.ax {
  stroke: var(--line-2);
  stroke-width: 1;
  fill: none;
}
.grid {
  stroke: var(--line);
  stroke-width: 1;
}
.tick {
  fill: var(--faint);
  font: 10.5px var(--mono);
}
.s-model {
  fill: none;
  stroke: var(--model);
  stroke-width: 2.2;
  stroke-linejoin: round;
}
.s-cohort {
  fill: none;
  stroke: #b7c3d0;
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
}
.s-before {
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.5;
  stroke-dasharray: 2 4;
}
.s-band {
  fill: rgb(124 200 240 / 12%);
  stroke: none;
}
.s-drops {
  fill: rgb(194 173 255 / 10%);
}
.s-now {
  stroke: var(--text);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.s-trial {
  fill: var(--trial);
  stroke: #0a0d11;
  stroke-width: 1;
}
.s-trial-bar {
  stroke: var(--trial);
  stroke-width: 1.5;
}
.s-zone {
  fill: rgb(255 255 255 / 5%);
}
.note {
  fill: var(--dim);
  font: 10.5px var(--sans);
}

/* Learn */
.learn {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(16px, 2.4vw, 32px) 40px;
}
.learn h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.learn .lead {
  max-width: 70ch;
  margin: 10px 0 8px;
  color: var(--dim);
}
.part {
  margin-top: 28px;
}
.part-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 14px;
}
.part-head h3 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.kind {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.kind.core {
  background: var(--text);
  color: #0a0d11;
}
.kind.new {
  background: var(--amber);
  color: #0a0d11;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 12px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}
.part:last-child .card {
  border-color: rgb(242 169 0 / 35%);
}
.card h4 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.card p {
  color: #c9d3de;
  font-size: 15.5px;
}
.card .num {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
}
.card .num a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 4px;
  color: var(--amber);
  font-weight: 600;
}
.show {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.show:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* Evidence */
.evidence {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(16px, 2.4vw, 32px) 40px;
}
.evidence h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.evidence .lead {
  max-width: 70ch;
  margin: 8px 0 18px;
  color: var(--dim);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.filters button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.filters button[aria-pressed='true'] {
  background: var(--text);
  border-color: var(--text);
  color: #0a0d11;
}
.study {
  scroll-margin-top: 84px; /* clear of the sticky top bar when a source link jumps here */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 8px 28px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.study h3 {
  font-size: 17px;
  line-height: 1.3;
}
.study .cite {
  margin-top: 4px;
  color: var(--dim);
  font-size: 13.5px;
}
.study .cite a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.study .design {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--dim);
}
.study .design b {
  color: var(--text);
  font-weight: 600;
}
.study ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.study li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 8px;
  font-size: 14.5px;
  line-height: 1.45;
}
.study li .tag {
  margin-top: 2px;
}
.study .where {
  color: var(--faint);
  font-size: 12.5px;
}
.study .caveat {
  margin-top: 6px;
  padding: 8px 12px;
  border-left: 2px solid var(--trial);
  background: rgb(245 192 99 / 6%);
  color: var(--dim);
  font-size: 13.5px;
}
.bars {
  margin: 4px 0 10px;
}
.method {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}
.method h3 {
  margin-bottom: 8px;
  font-size: 17px;
}
.method p,
.method li {
  color: var(--dim);
  font-size: 14.5px;
}
.method table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font: 13px var(--mono);
}
.method th,
.method td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
.method th:first-child,
.method td:first-child {
  text-align: left;
  font-family: var(--sans);
}
.method th {
  color: var(--dim);
  font-weight: 600;
}

/* Grand rounds: the microscope fills the screen, a caption walks through the story */
.scene {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px clamp(16px, 3vw, 40px) max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-2);
  background: rgb(8 11 15 / 96%);
}
.scene h2 {
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.2;
}
.scene p {
  max-width: 100ch;
  color: #c9d3de;
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.45;
}
.scene .scene-count {
  color: var(--amber);
  font: 600 13px var(--mono);
}
#scene-prev,
#scene-next {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
#scene-prev:hover,
#scene-next:hover {
  border-color: var(--amber);
  color: var(--amber);
}
body.presenting .bar,
body.presenting .notice,
body.presenting .foot,
body.presenting .rail,
body.presenting .key {
  display: none;
}
body.presenting .sim {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 30vw);
  grid-template-areas:
    'stage side'
    'charts charts';
  max-width: none;
  padding-bottom: 190px;
}
body.presenting .read {
  font-size: 16px;
  min-width: 250px;
}
body.presenting .hud {
  font-size: 15px;
}

.foot {
  padding: 18px clamp(16px, 2.4vw, 32px) 32px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
}
.foot p + p {
  margin-top: 4px;
}

/* Narrower screens */
@media (max-width: 1240px) {
  .sim {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-areas:
      'rail stage'
      'rail side'
      'rail charts';
    grid-template-rows: auto auto 1fr;
  }
  .side {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  }
  .side .sites {
    grid-column: 1;
  }
  .side .oct {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
  }
  .charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .bar {
    flex-wrap: wrap;
    gap: 8px 12px;
    position: static;
  }
  .home span {
    display: none;
  }
  .name {
    padding-left: 12px;
  }
  .present-on {
    display: none;
  }
  .sim,
  body.presenting .sim {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'stage'
      'side'
      'rail'
      'charts';
    grid-template-rows: none;
    padding: 12px 12px 24px;
  }
  .side {
    grid-template-columns: minmax(0, 1fr);
  }
  .side .oct {
    grid-column: auto;
    grid-row: auto;
  }
  .charts {
    grid-template-columns: minmax(0, 1fr);
  }
  .transport {
    grid-template-columns: auto minmax(0, 1fr);
  }
  #week-out {
    grid-column: 1 / -1;
    text-align: left;
    min-width: 0;
  }
  .hud-top {
    top: 8px;
    left: 9px;
    right: 9px;
  }
  .read {
    right: 8px;
    bottom: 8px;
  }
  .scale {
    left: 9px;
    bottom: 9px;
  }
  .mini {
    margin-left: 0;
  }
  .transport .speed {
    display: none;
  }
  .read {
    min-width: 0;
    padding: 7px 9px;
    font-size: 11.5px;
  }
  .hud {
    font-size: 11.5px;
  }
  .quality {
    bottom: 44px;
  }
  .study {
    grid-template-columns: minmax(0, 1fr);
  }
  .study li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .study li .tag {
    justify-self: start;
  }
  /* The fit table becomes one small block per trial arm. */
  .method thead {
    display: none;
  }
  .method tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .method td {
    display: block;
    border: 0;
    text-align: left;
    padding: 3px 0;
  }
  .method td:first-child {
    grid-column: 1 / -1;
    font-weight: 600;
    color: var(--text);
  }
  .method td[data-h]::before {
    content: attr(data-h) ': ';
    color: var(--dim);
    font-family: var(--sans);
  }
  .key p {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }
  .scene {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  #present-off {
    grid-column: 1 / -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
