/* A Trip to a Black Hole — exhibit styling.
 * Dark space atmosphere, serif display type, glass panels, and accents
 * drawn from the disk's own palette (ember amber -> blue-hot).
 */

:root {
  --bg: #04060b;
  --panel: rgba(10, 13, 22, 0.78);
  --panel-solid: #0a0d16;
  --line: rgba(255, 180, 107, 0.16);
  --line-soft: rgba(140, 160, 200, 0.14);
  --amber: #ffb46b;
  --amber-deep: #ff7a3c;
  --blue: #8fc7ff;
  --cyan: #78dcff;
  --ink: #eef2f8;
  --ink-dim: #b8c2d4;
  --ink-faint: #8593a8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: grab;
  touch-action: none;
}
#gl.grabbing { cursor: grabbing; }

#fatal {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  max-width: 480px; margin: 0 16px; padding: 18px 22px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px); z-index: 60;
}
#fatal h2 { margin: 0 0 6px; font-size: 18px; }

/* ---------- intro ---------- */

#intro {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, rgba(6,8,14,0.55), rgba(3,4,8,0.88) 75%);
  transition: opacity 0.8s ease;
}
#intro.gone { opacity: 0; pointer-events: none; }
.intro-card { text-align: center; padding: 32px; max-width: 640px; }
.intro-eyebrow {
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 18px;
}
#intro h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05; margin: 0 0 18px;
  font-weight: 500;
  text-shadow: 0 0 60px rgba(255, 160, 80, 0.25);
}
.intro-sub { color: var(--ink-dim); font-size: 18px; margin: 0 0 8px; }
.intro-audience { color: var(--ink-faint); font-style: italic; margin: 0 0 26px; font-family: var(--serif); }
.intro-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.intro-hint { color: var(--ink-faint); font-size: 13px; margin: 0; }

/* ---------- buttons & controls ---------- */

.btn {
  appearance: none; border: 1px solid var(--line);
  background: rgba(255, 180, 107, 0.08);
  color: var(--ink); font-family: var(--sans);
  font-size: 14.5px; padding: 10px 18px; border-radius: 999px;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.btn:hover { background: rgba(255, 180, 107, 0.16); border-color: rgba(255, 180, 107, 0.4); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .marker:focus-visible, .gterm:focus-visible, .quiz-opt:focus-visible,
summary:focus-visible, .tab-btn:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}
.btn.primary {
  background: linear-gradient(135deg, rgba(255, 180, 107, 0.9), rgba(255, 122, 60, 0.9));
  color: #241206; font-weight: 600; border-color: transparent;
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 13px; font-size: 13px; }
.btn[disabled] { opacity: 0.35; cursor: default; }
.btn.active { border-color: var(--cyan); background: rgba(120, 220, 255, 0.12); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; background: transparent; cursor: pointer; margin: 2px 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 122, 60, 0.55), rgba(255, 180, 107, 0.25));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd9ae, var(--amber-deep));
  margin-top: -7px; box-shadow: 0 0 10px rgba(255, 150, 80, 0.6);
}
input[type="range"]::-moz-range-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 122, 60, 0.55), rgba(255, 180, 107, 0.25));
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: radial-gradient(circle at 35% 35%, #ffd9ae, var(--amber-deep));
}

.ctl { margin: 12px 0; }
.ctl label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13.5px; color: var(--ink-dim); margin-bottom: 2px;
}
.ctl output { color: var(--amber); font-variant-numeric: tabular-nums; }
.ctl-note { font-size: 12px; color: var(--ink-faint); margin-top: 1px; }

.toggles { display: flex; flex-direction: column; gap: 9px; margin: 14px 0; }
.toggles label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-dim); cursor: pointer; user-select: none;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 36px; height: 20px; border-radius: 999px; flex: none;
  background: rgba(140, 160, 200, 0.22); position: relative; transition: background 0.2s;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #cfd8e6; transition: transform 0.2s, background 0.2s;
}
.switch input:checked + .track { background: rgba(255, 160, 90, 0.5); }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--amber); }
.switch input:focus-visible + .track { outline: 2px solid var(--cyan); outline-offset: 2px; }

.view-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ctl.quality { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ctl.quality label { margin: 0; }
select {
  background: rgba(20, 24, 36, 0.9); color: var(--ink); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; font-family: var(--sans);
}

/* ---------- top bar ---------- */

#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(rgba(4, 6, 11, 0.75), rgba(4, 6, 11, 0));
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd9ae, #ff7a3c);
  box-shadow: 0 0 14px rgba(255, 150, 80, 0.9);
}
.brand-name {
  font-family: var(--serif); font-size: 17px; letter-spacing: 0.02em; color: var(--ink);
}
.top-actions { display: flex; gap: 8px; }

/* ---------- panels ---------- */

.panel {
  position: fixed; z-index: 25;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.p-title {
  margin: 0 0 10px; font-size: 12px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--amber); font-weight: 600;
}

/* journey card */
#journeyCard {
  left: 20px; bottom: 20px; width: min(460px, calc(100vw - 40px));
  max-height: min(66vh, 560px); display: flex; flex-direction: column;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
#journeyCard .j-inner { overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.j-collapse { display: flex; justify-content: center; flex: none; cursor: pointer; padding: 2px 0 8px; }
.j-handle { width: 42px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); }
#journeyCard.collapsed .j-inner { display: none; }
#journeyCard.collapsed { padding-bottom: 12px; }
#journeyCard.collapsed::after {
  content: "Open the journey"; font-size: 12px; color: var(--ink-faint);
}
.j-kicker { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--amber); }
#jTitle {
  font-family: var(--serif); font-weight: 500; font-size: clamp(21px, 2.6vw, 26px);
  margin: 6px 0 10px; line-height: 1.15;
}
.j-body p { margin: 0 0 10px; font-size: 15px; color: var(--ink); }
.j-onscreen {
  font-size: 13.5px; color: var(--ink-dim); border-left: 3px solid var(--amber);
  background: rgba(255, 180, 107, 0.07); padding: 9px 12px; border-radius: 0 10px 10px 0;
  margin: 12px 0;
}
.j-onscreen strong { color: var(--amber); }
.j-try { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.try-btn { font-size: 13px; padding: 8px 14px; }
.j-fact {
  font-size: 13px; color: var(--ink-faint); font-style: italic; font-family: var(--serif);
  margin: 0 0 12px;
}
.j-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dots { display: flex; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); cursor: pointer; }
.dot.done { background: rgba(255, 180, 107, 0.45); }
.dot.on { background: var(--amber); box-shadow: 0 0 8px rgba(255, 180, 107, 0.7); }

/* controls & data cards (right column on desktop) */
#controlsCard {
  right: 20px; top: 74px; width: min(320px, calc(100vw - 40px));
  max-height: calc(100vh - 96px); overflow-y: auto; scrollbar-width: thin;
}
#dataCard {
  right: 20px; bottom: 20px; width: min(320px, calc(100vw - 40px));
  max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin;
}

.readout { display: flex; flex-direction: column; gap: 8px; }
.r-row { display: flex; flex-direction: column; gap: 1px; }
.r-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.r-val { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.r-val .sub { display: block; font-size: 12px; color: var(--ink-faint); }
.r-val .sub:empty { display: none; }

.clocks { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 6px; }
.clock { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-faint); }
.clock.you span { color: var(--amber); }
.vs { color: var(--ink-faint); font-size: 12px; font-style: italic; }
.data-note { font-size: 12.5px; color: var(--ink-faint); margin: 8px 0 0; }

/* ---------- markers ---------- */

#markers { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.marker {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; pointer-events: auto;
  padding: 6px;
}
.m-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  animation: ping 2.2s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 220, 180, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(255, 220, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 220, 180, 0); }
}
#mShadow .m-dot { background: #9aa7bd; }
#mRing .m-dot { background: var(--cyan); }
#mDiskNear .m-dot, #mDiskFar .m-dot { background: var(--amber); }
.m-label {
  font-size: 11.5px; color: rgba(238, 242, 248, 0.85);
  background: rgba(6, 8, 14, 0.55); padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  pointer-events: none;   /* clicks hit the dot, labels never block other markers */
}
#mDiskFar .m-label { border-color: rgba(255, 180, 107, 0.4); color: var(--amber); }

/* ---------- photon inset ---------- */

#inset {
  position: fixed; left: 20px; top: 74px; z-index: 24;
  width: min(320px, calc(100vw - 40px));
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px); box-shadow: var(--shadow);
  padding: 14px 16px;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
#inset.open { opacity: 1; transform: none; pointer-events: auto; }
.inset-head { display: flex; flex-direction: column; margin-bottom: 8px; position: relative; padding-right: 26px; }
.inset-head strong { font-size: 14px; }
.inset-head span { font-size: 12px; color: var(--ink-faint); }
.inset-close {
  position: absolute; top: -2px; right: -6px; background: none; border: none;
  color: var(--ink-faint); font-size: 14px; cursor: pointer; padding: 4px 6px;
}
.inset-close:hover { color: var(--ink); }
#insetCanvas { width: 100%; aspect-ratio: 1; display: block; border-radius: 10px; }
.inset-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--ink-dim); margin: 8px 0 4px; }
.inset-legend .sw { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.sw.caught { background: #ff7d6b; }
.sw.orbit { background: #ffc46b; }
.sw.esc { background: #8fb8ff; }
.inset-note { font-size: 12.5px; color: var(--ink-faint); margin: 4px 0 0; }

/* ---------- toast & popover ---------- */

#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(16px);
  z-index: 40; max-width: min(520px, calc(100vw - 32px));
  background: rgba(12, 15, 24, 0.92); border: 1px solid rgba(255, 180, 107, 0.35);
  border-radius: 12px; padding: 11px 18px; font-size: 14px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s;
  backdrop-filter: blur(10px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#popover {
  position: fixed; z-index: 45; width: min(340px, calc(100vw - 24px));
  background: rgba(12, 15, 24, 0.96); border: 1px solid rgba(255, 180, 107, 0.35);
  border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.18s;
}
#popover.show { opacity: 1; pointer-events: auto; }
#popover h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 500; font-size: 18px; color: var(--amber); }
.pop-body p { margin: 0 0 8px; font-size: 14px; }
.pop-more { font-size: 12px; color: var(--ink-faint); font-style: italic; }
.pop-close {
  position: absolute; top: 10px; right: 10px; background: none; border: none;
  color: var(--ink-faint); font-size: 15px; cursor: pointer; padding: 4px;
}
.pop-close:hover { color: var(--ink); }

.gterm {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--cyan); font: inherit;
  border-bottom: 1px dotted rgba(120, 220, 255, 0.55);
}
.gterm:hover { color: #b8ecff; border-bottom-style: solid; }

/* ---------- sheet tabs (mobile) ---------- */

#sheetTabs {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  background: rgba(6, 8, 14, 0.9); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  gap: 6px;
}
.tab-btn {
  flex: 1; appearance: none; background: none; border: none; color: var(--ink-faint);
  font-size: 13.5px; padding: 10px 4px; border-radius: 10px; cursor: pointer;
  font-family: var(--sans);
}
.tab-btn.active { color: var(--amber); background: rgba(255, 180, 107, 0.1); }

/* scrolled past the simulation: overlays stand down until the reader returns */
body.past-sim #sheetTabs { display: none; }
@media (max-width: 1023px) {
  body.past-sim #journeyCard, body.past-sim #controlsCard, body.past-sim #dataCard { display: none; }
}

/* ---------- extras (below the fold) ---------- */

#extras {
  position: relative; z-index: 10;
  margin-top: 100vh; background: linear-gradient(rgba(4, 6, 11, 0), #05070d 120px, #05070d);
}
.extras-inner { max-width: 1060px; margin: 0 auto; padding: 40px 22px 80px; }
.x-head { text-align: center; margin-bottom: 34px; }
.x-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4.5vw, 44px); margin: 0 0 6px; }
.x-head p { color: var(--ink-faint); margin: 0; font-family: var(--serif); font-style: italic; }
.x-block {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px 28px; margin: 26px 0;
}
.x-block.pulse { animation: pulseBorder 0.6s ease 2; }
@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 180, 107, 0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 180, 107, 0.25); }
}
.x-title {
  margin: 0 0 6px; font-family: var(--serif); font-weight: 500;
  font-size: clamp(21px, 3vw, 26px);
}
.x-sub { color: var(--ink-dim); margin: 0 0 18px; font-size: 15px; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.fact {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 16px;
}
.fact-icon { font-size: 22px; flex: none; }
.fact p { margin: 0; font-size: 14.5px; color: var(--ink-dim); }

/* challenges */
.challenge {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line-soft); margin: 10px 0;
  transition: border-color 0.4s, background 0.4s;
}
.challenge h3 { margin: 0 0 3px; font-size: 16px; }
.challenge p { margin: 0; font-size: 14px; color: var(--ink-dim); }
.ch-icon { font-size: 24px; flex: none; }
.ch-check {
  margin-left: auto; flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2); color: transparent;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.challenge.done { border-color: rgba(120, 220, 160, 0.45); background: rgba(120, 220, 160, 0.05); }
.challenge.done .ch-check {
  border-color: #7de0a4; color: #0a2415; background: #7de0a4;
}

/* spaghettifier */
.sp-stage {
  display: flex; align-items: center; gap: 30px; justify-content: center;
  min-height: 230px; margin: 8px 0 14px;
  background: radial-gradient(circle at 12% 50%, rgba(255, 122, 60, 0.14), transparent 55%);
  border: 1px solid var(--line-soft); border-radius: 14px; padding: 18px;
}
.sp-hole { position: relative; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center; flex: none; }
.sp-hole span {
  width: 74px; height: 74px; border-radius: 50%; background: #000;
  box-shadow: 0 0 34px 6px rgba(255, 150, 70, 0.5), inset 0 0 20px rgba(0, 0, 0, 1);
  border: 1px solid rgba(255, 180, 107, 0.5);
}
.sp-probe-wrap { display: flex; align-items: center; height: 210px; }
#probe {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform 0.15s ease-out; transform-origin: center;
}
#probe span { display: block; }
.p-head { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe9d2, #ffb46b 60%, #ff9552); }
.p-body { width: 26px; height: 58px; border-radius: 12px; background: linear-gradient(#e8eef8, #b9c6da); }
.p-legs { width: 22px; height: 34px; border-radius: 0 0 10px 10px; background: linear-gradient(#b9c6da, #8fa0ba); }
.sp-read { font-size: 14px; color: var(--ink-dim); text-align: center; }
.sp-read b { color: var(--amber); font-variant-numeric: tabular-nums; }
.sp-status { text-align: center; font-family: var(--serif); font-style: italic; font-size: 15px; margin-top: 8px; }
.sp-status.ok { color: #9fe0b4; }
.sp-status.warn { color: var(--amber); }
.sp-status.danger { color: #ff7d6b; font-weight: 600; }

/* quiz */
.quiz-progress { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.quiz-q { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 0 0 14px; }
.quiz-opts { display: flex; flex-direction: column; gap: 9px; }
.quiz-opt {
  text-align: left; appearance: none; cursor: pointer; font-family: var(--sans);
  background: rgba(255, 255, 255, 0.04); color: var(--ink);
  border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 12px 16px; font-size: 14.5px; transition: border-color 0.2s, background 0.2s;
}
.quiz-opt:hover:not(:disabled) { border-color: rgba(255, 180, 107, 0.5); }
.quiz-opt.right { border-color: #7de0a4; background: rgba(125, 224, 164, 0.1); }
.quiz-opt.wrong { border-color: #ff7d6b; background: rgba(255, 125, 107, 0.08); }
.quiz-why { font-size: 14px; color: var(--ink-dim); border-left: 3px solid var(--amber); padding: 8px 12px; margin: 14px 0; border-radius: 0 8px 8px 0; }
#quiz .btn { margin-top: 8px; }
.quiz-end { text-align: center; padding: 12px 0; }
.quiz-score { font-family: var(--serif); font-size: 52px; color: var(--amber); }
.quiz-title { font-size: 19px; margin: 4px 0 10px; }
.quiz-end p { color: var(--ink-dim); max-width: 480px; margin: 0 auto 14px; }

/* glossary */
.gloss-intro { color: var(--ink-faint); font-size: 14px; }
.gloss {
  border: 1px solid var(--line-soft); border-radius: 10px;
  padding: 10px 16px; margin: 8px 0; background: rgba(255, 255, 255, 0.02);
}
.gloss summary { cursor: pointer; font-size: 15px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.gloss summary::-webkit-details-marker { display: none; }
.gloss summary::after { content: "+"; color: var(--amber); font-size: 17px; }
.gloss[open] summary::after { content: "\2013"; }
.gloss p { margin: 8px 0 2px; font-size: 14px; color: var(--ink-dim); }

/* how real */
.how-intro { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-dim); }
.how-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-top: 16px; }
.how-h { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 10px; }
.how-h.real { color: #7de0a4; }
.how-h.approx { color: var(--amber); }
.how-cols ul { margin: 0; padding-left: 18px; }
.how-cols li { font-size: 14px; color: var(--ink-dim); margin-bottom: 10px; }

/* footer */
.x-foot { text-align: center; color: var(--ink-faint); font-size: 13.5px; padding-top: 10px; }

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  #controlsCard, #dataCard { width: 300px; }
}

@media (max-width: 1023px) {
  #sheetTabs { display: flex; }
  .j-collapse { display: none; }
  #journeyCard, #controlsCard, #dataCard {
    left: 12px; right: 12px; top: auto; bottom: 66px; width: auto;
    max-height: 46vh; display: none;
  }
  #journeyCard { display: flex; }
  #journeyCard.sheet-open, #controlsCard.sheet-open, #dataCard.sheet-open { display: flex; }
  #inset { top: 64px; left: 12px; width: min(280px, calc(100vw - 24px)); }
  #topbar { padding: 10px 14px; }
  .brand-name { font-size: 15px; }
  #toast { bottom: 130px; }
  .intro-actions .btn { padding: 12px 22px; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .x-block { padding: 20px 16px; }
  .facts { grid-template-columns: 1fr; }
  .sp-stage { gap: 14px; }
  .top-actions .btn.small { padding: 6px 10px; font-size: 12px; }
  #fatal { top: 70px; }
}

/* reduced motion: calm the pulses, keep the physics */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .m-dot { animation: none; box-shadow: 0 0 0 3px rgba(255, 220, 180, 0.25); }
  #intro, .panel, #toast, #inset, #popover { transition: none; }
  #probe { transition: none; }
}
