@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-400.woff2") format("woff2"), url("/fonts/inter-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-600.woff2") format("woff2"), url("/fonts/inter-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-600.woff2") format("woff2"), url("/fonts/space-grotesk-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2"), url("/fonts/ibm-plex-mono-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CMU Serif";
  src: url("/fonts/cmunrm.woff2") format("woff2"), url("/fonts/cmunrm.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "CMU Serif", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-label: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease-cinema: cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-theme="cinema-dark"] {
  --bg: #0a0e1a;
  --surface: #141a2e;
  --surface-glass: rgba(20, 26, 46, 0.72);
  --text: #f5f5f0;
  --text-secondary: #c9ccd6;
  --text-muted: #8a90a2;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --usa-red: #bf0d3e;
  --usa-blue: #4d8dff;
  --usa-blue-deep: #002868;
  --usa-gold: #ffb81c;
  --shadow: 0 24px 80px -16px rgba(0, 0, 0, 0.6);
  --canvas-bg: #0a0e1a;
  --dot-olympic: rgba(245, 245, 240, 0.72);
  --dot-paralympic: rgba(245, 245, 240, 0.84);
}

body[data-theme="cinema-light"] {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.84);
  --text: #08142a;
  --text-secondary: #33415d;
  --text-muted: #657088;
  --line: rgba(8, 20, 42, 0.13);
  --line-strong: rgba(8, 20, 42, 0.24);
  --usa-red: #bf0d3e;
  --usa-blue: #002868;
  --usa-blue-deep: #002868;
  --usa-gold: #d99700;
  --shadow: 0 20px 70px rgba(10, 21, 40, 0.14);
  --canvas-bg: #eef3fb;
  --dot-olympic: rgba(0, 40, 104, 0.62);
  --dot-paralympic: rgba(0, 40, 104, 0.72);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--usa-blue) 68%, var(--text-muted)) color-mix(in srgb, var(--surface) 42%, transparent);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--surface) 42%, transparent);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--usa-blue) 68%, var(--text-muted));
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--usa-red) 58%, var(--usa-blue));
  background-clip: padding-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
}

body {
  overflow: hidden;
}

body.is-document {
  overflow: auto;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 12px;
  transform: translateY(-150%);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--bg);
  background: var(--text);
}

.skip-link:focus {
  transform: translateY(0);
}

.atlas-app {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background: var(--canvas-bg);
}

body.is-document .atlas-app,
body.is-method .atlas-app,
body.is-story .atlas-app {
  display: none;
}

.atlas-canvas,
.atmosphere,
.screen-vignette {
  position: absolute;
  inset: 0;
}

.atlas-canvas {
  z-index: 1;
  width: 100%;
  height: 100%;
}

.atmosphere {
  z-index: 2;
  pointer-events: none;
  opacity: 0.46;
  background:
    radial-gradient(circle at 18% 24%, rgba(191, 13, 62, 0.16), transparent 28%),
    radial-gradient(circle at 82% 68%, rgba(56, 189, 248, 0.16), transparent 30%),
    radial-gradient(circle at 54% 48%, rgba(255, 184, 28, 0.08), transparent 36%);
  animation: atmosphereDrift 34s linear infinite;
}

.screen-vignette {
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.72), transparent 24%, transparent 70%, rgba(10, 14, 26, 0.58)),
    radial-gradient(circle at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.42) 100%);
}

body[data-theme="cinema-light"] .screen-vignette {
  background:
    linear-gradient(90deg, rgba(247, 249, 252, 0.66), transparent 26%, transparent 74%, rgba(247, 249, 252, 0.5)),
    radial-gradient(circle at 50% 50%, transparent 46%, rgba(5, 18, 44, 0.1) 100%);
}

.hud-topbar {
  position: fixed;
  top: 18px;
  left: 24px;
  right: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
}

.wordmark,
.icon-nav {
  pointer-events: auto;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-label);
  font-size: 0.92rem;
  font-weight: 600;
}

.brand-flag {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 18px;
  overflow: hidden;
  border-radius: 3px;
  background:
    linear-gradient(
      to bottom,
      #b31942 0 7.69%,
      #fff 7.69% 15.38%,
      #b31942 15.38% 23.07%,
      #fff 23.07% 30.76%,
      #b31942 30.76% 38.45%,
      #fff 38.45% 46.14%,
      #b31942 46.14% 53.83%,
      #fff 53.83% 61.52%,
      #b31942 61.52% 69.21%,
      #fff 69.21% 76.9%,
      #b31942 76.9% 84.59%,
      #fff 84.59% 92.28%,
      #b31942 92.28% 100%
    );
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-flag span {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 10px;
  background: #0a3161;
}

.icon-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.ghost-button,
.story-button,
.cta-pill {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  cursor: pointer;
  transition: transform 220ms var(--ease-cinema), border-color 180ms ease, background 180ms ease;
}

.icon-button {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.icon-button:hover,
.ghost-button:hover,
.story-button:hover,
.cta-pill:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.cold-open {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 36px));
  transform: translate(-50%, -52%);
  text-align: center;
  pointer-events: none;
  transition: opacity 700ms var(--ease-cinema), transform 900ms var(--ease-cinema);
}

.atlas-app.calibration-mode .cold-open,
.atlas-app.mapped-mode .cold-open,
.atlas-app.timewarp-mode .cold-open {
  opacity: 0;
  transform: translate(-50%, -58%);
}

.overline,
.result-kicker,
.range-field > span,
.calibration-row span,
.chip-field legend {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cold-open h1 {
  margin: 12px 0 16px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 10vw, 8.5rem);
  font-weight: 400;
  line-height: 0.92;
}

.cold-open p:last-child {
  width: min(620px, 100%);
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  line-height: 1.58;
}

.bottom-hud {
  position: fixed;
  z-index: 24;
  left: 50%;
  bottom: 28px;
  width: min(560px, calc(100vw - 28px));
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.bottom-hud > * {
  pointer-events: auto;
}

.cta-pill {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-label);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.atlas-app.calibration-mode #beginButton,
.atlas-app.mapped-mode #beginButton,
.atlas-app.timewarp-mode #beginButton {
  display: none;
}

.calibration-card,
.result-hud {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(20, 26, 46, 0.72);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  box-shadow: var(--shadow);
}

body[data-theme="cinema-light"] .calibration-card,
body[data-theme="cinema-light"] .result-hud {
  border-color: rgba(0, 40, 104, 0.12);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px -24px rgba(8, 20, 42, 0.28);
}

.calibration-card {
  display: none;
  width: min(560px, calc(100vw - 28px));
  padding: 28px 32px;
  transform-origin: 50% 100%;
}

.settings-popover,
.info-sheet,
.voice-orb {
  border: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  box-shadow: var(--shadow);
}

.atlas-app.calibration-mode .calibration-card {
  display: grid;
  gap: 14px;
  animation: hudRise 620ms var(--ease-cinema) both;
}

.calibration-head,
.result-actions,
.sheet-header,
.zoom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calibration-card h2,
.result-hud h2,
.info-sheet h2,
.document-page h1,
.story-page h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
}

.calibration-card h2 {
  font-size: 2rem;
}

.ghost-button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.range-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
}

.range-field strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
}

.range-field input {
  grid-column: 1 / -1;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--usa-gold);
}

body[data-theme="cinema-light"] input[type="range"] {
  accent-color: var(--usa-blue);
}

.calibration-row {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 10px;
}

.calibration-row label {
  display: grid;
  gap: 6px;
}

input[type="number"],
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
}

body[data-theme="cinema-light"] input[type="number"],
body[data-theme="cinema-light"] select {
  border-color: rgba(0, 40, 104, 0.16);
  color: #08142a;
  background: rgba(0, 40, 104, 0.045);
}

body[data-theme="cinema-light"] select option {
  color: #08142a;
  background: #ffffff;
}

.interest-drawer summary,
.result-section summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--font-label);
  font-size: 0.85rem;
  font-weight: 600;
}

.chip-field {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.chip-field label {
  cursor: pointer;
}

.chip-field input {
  position: absolute;
  opacity: 0;
}

.chip-field span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

body[data-theme="cinema-light"] .chip-field span {
  border-color: rgba(0, 40, 104, 0.14);
  color: #33415d;
  background: rgba(0, 40, 104, 0.04);
}

.chip-field input:checked + span {
  border-color: var(--usa-gold);
  color: var(--text);
  background: color-mix(in srgb, var(--usa-gold) 14%, transparent);
}

body[data-theme="cinema-light"] .chip-field input:checked + span {
  border-color: rgba(0, 40, 104, 0.34);
  color: #002868;
  background: rgba(0, 40, 104, 0.1);
}

.cta-submit {
  width: 100%;
  color: #0a0e1a;
  background: var(--usa-gold);
}

body[data-theme="cinema-light"] .cta-submit {
  border-color: rgba(0, 40, 104, 0.28);
  color: #ffffff;
  background: #002868;
}

.result-hud {
  position: fixed;
  z-index: 25;
  top: 86px;
  right: 24px;
  bottom: 24px;
  width: min(390px, calc(100vw - 32px));
  overflow: auto;
  padding: 28px 32px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 36px)) scale(1.04);
  transition: opacity 300ms ease, transform 600ms var(--ease-cinema);
}

.atlas-app.mapped-mode .result-hud,
.atlas-app.timewarp-mode .result-hud {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  animation: resultHudIn 600ms var(--ease-cinema) both;
}

.atlas-app.timewarp-mode .result-hud {
  top: 82px;
  right: 24px;
  bottom: auto;
  width: min(340px, calc(100vw - 32px));
  max-height: none;
  overflow: hidden;
  padding: 16px 18px;
}

.atlas-app.timewarp-mode .result-section,
.atlas-app.timewarp-mode .parity-strip,
.atlas-app.timewarp-mode .result-actions,
.atlas-app.timewarp-mode .result-hud > p {
  display: none;
}

.atlas-app.timewarp-mode .result-hud h2 {
  margin-top: 4px;
  font-size: clamp(1.55rem, 4vw, 2rem);
}

.atlas-app.timewarp-mode .result-kicker {
  margin-bottom: 0;
}

.result-hud h2 {
  margin-top: 8px;
  font-size: clamp(2.6rem, 6vw, 3.4rem);
}

.result-hud > p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.parity-strip {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.parity-strip h3 {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.parity-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  color: var(--text-secondary);
}

.parity-row strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 500;
  text-align: right;
}

.parity-caveat {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.55;
}

.inline-link {
  justify-self: start;
  border: 0;
  color: var(--usa-gold);
  background: transparent;
  padding: 3px 0;
  cursor: pointer;
  font-size: 0.82rem;
}

.sport-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.parity-item,
.sport-lane {
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.parity-item strong,
.sport-lane strong {
  display: block;
  color: var(--text);
  font-family: var(--font-label);
  font-size: 0.9rem;
  line-height: 1.1;
}

.parity-item span,
.sport-lane span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.result-actions {
  margin: 18px 0;
}

.story-button {
  flex: 1;
  min-height: 44px;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.result-section {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.result-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.mini-metrics div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mini-metrics strong {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.mini-metrics span {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.zone-reveal {
  position: fixed;
  z-index: 30;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  pointer-events: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 9vw, 8rem);
  line-height: 0.96;
  text-align: center;
  opacity: 0;
}

.zone-reveal.visible {
  animation: zoneReveal 1600ms var(--ease-cinema) both;
}

.timewarp-panel {
  position: fixed;
  z-index: 24;
  left: 24px;
  right: 24px;
  bottom: 22px;
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 22px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(36px);
  transition: opacity 360ms ease, transform 620ms var(--ease-cinema);
}

.atlas-app.timewarp-mode .timewarp-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.decade-caption strong {
  display: block;
  color: var(--usa-gold);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.decade-caption span {
  display: block;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.5;
}

.decade-caption {
  transition: opacity 400ms ease, transform 400ms var(--ease-cinema);
}

.decade-caption.fading {
  opacity: 0;
  transform: translateY(8px);
}

.timeline-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.voice-orb {
  position: fixed;
  z-index: 32;
  left: 50%;
  bottom: 24px;
  display: none;
  width: min(560px, calc(100vw - 32px));
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 18px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(18px) scale(0.98);
  transition: opacity 260ms ease, transform 420ms var(--ease-cinema);
}

.voice-orb.open {
  display: grid;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.voice-modal-head,
.voice-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.voice-modal-head h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1.05;
}

.orb-button {
  min-width: 156px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #0a0e1a;
  background: var(--usa-gold);
  font-family: var(--font-label);
  font-weight: 700;
  box-shadow: none;
}

.voice-orb.speaking .orb-button {
  color: #f5f5f0;
  background: var(--usa-red);
}

.voice-copy p {
  max-height: 168px;
  overflow: auto;
  margin: 0;
  padding-right: 4px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-legend {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 22;
  max-width: min(560px, calc(100vw - 48px));
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.atlas-app.calibration-mode .map-legend,
.atlas-app.mapped-mode .map-legend,
.atlas-app.timewarp-mode .map-legend {
  opacity: 0;
  pointer-events: none;
}

.prompt-chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-secondary);
  background: transparent;
  padding: 6px 9px;
  font-size: 0.72rem;
}

.settings-popover,
.info-sheet {
  position: fixed;
  z-index: 60;
  top: 76px;
  right: 24px;
  width: min(360px, calc(100vw - 32px));
  padding: 18px;
  border-radius: 22px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 180ms ease, transform 260ms var(--ease-cinema);
}

.settings-popover.open,
.info-sheet.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.settings-popover label {
  display: block;
  margin: 12px 0;
  color: var(--text-secondary);
}

.zoom-row button {
  flex: 1;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: transparent;
}

.sheet-body {
  color: var(--text-secondary);
  line-height: 1.6;
}

.sheet-body h3 {
  margin: 20px 0 6px;
  color: var(--text);
  font-family: var(--font-label);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.tooltip {
  position: fixed;
  z-index: 80;
  max-width: 270px;
  transform: translate(-50%, calc(-100% - 18px));
  opacity: 0;
  pointer-events: none;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-secondary);
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 0.78rem;
  line-height: 1.4;
  transition: opacity 120ms ease;
}

.tooltip.visible {
  opacity: 1;
}

.screen-reader-summary {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.document-page,
.story-page {
  display: none;
  min-height: 100svh;
  padding: 34px clamp(20px, 7vw, 92px) 70px;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 14%, rgba(191, 13, 62, 0.12), transparent 28%),
    radial-gradient(circle at 88% 32%, rgba(56, 189, 248, 0.1), transparent 30%),
    var(--bg);
}

body.is-method .document-page,
body.is-story .story-page {
  display: block;
}

.back-link {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--text-secondary);
  text-decoration: none;
}

.document-page h1,
.story-page h1 {
  max-width: 820px;
  font-size: clamp(3.8rem, 10vw, 8rem);
}

.document-page section,
.story-step {
  max-width: 920px;
  min-height: 58svh;
  padding: 54px 0;
  border-top: 1px solid var(--line);
}

.document-page h2,
.story-page h2 {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
}

.document-page p,
.story-page p {
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.72;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0;
}

.method-grid div {
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-glass);
}

.method-grid strong,
.method-grid span {
  display: block;
}

.method-grid span {
  margin-top: 10px;
  color: var(--text-muted);
  line-height: 1.5;
}

.cta-inline {
  color: var(--usa-gold);
  text-decoration: none;
}

@keyframes atmosphereDrift {
  from {
    transform: rotate(0deg) scale(1.1);
  }
  to {
    transform: rotate(360deg) scale(1.1);
  }
}

@keyframes hudRise {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  70% {
    transform: translateY(-4px) scale(1.01);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes resultHudIn {
  0% {
    opacity: 0;
    transform: translateX(calc(100% + 36px)) scale(1.04);
  }
  72% {
    opacity: 1;
    transform: translateX(-6px) scale(1.012);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes zoneReveal {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  24%,
  68% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -56%) scale(0.96);
  }
}

@keyframes orbPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

@media (max-width: 880px) {
  .hud-topbar {
    left: 14px;
    right: 14px;
  }

  .icon-button {
    min-width: 38px;
    padding: 0 8px;
    font-size: 0.62rem;
  }

  .result-hud {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 68svh;
  }

  .atlas-app.timewarp-mode .result-hud {
    top: 76px;
    left: auto;
    right: 12px;
    bottom: auto;
    width: min(320px, calc(100vw - 24px));
    max-height: none;
  }

  .timewarp-panel {
    left: 12px;
    right: 12px;
    grid-template-columns: 1fr;
  }

  .parity-strip,
  .sport-lanes,
  .method-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .wordmark span:last-child {
    display: none;
  }

  .cold-open h1 {
    font-size: 4.4rem;
  }

  .calibration-row {
    grid-template-columns: 1fr;
  }

  .voice-orb {
    border-radius: 22px;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
