/* One typographic voice throughout ANOMALIE, scaled by hierarchy. */
:root {
  --anomalie-type-meta: 1rem;
  --anomalie-type-control: 1rem;
  --anomalie-type-body: 1.125rem;
  --anomalie-heading-display: -0.045em;
  --anomalie-heading-section: -0.035em;
  --anomalie-heading-dialog: -0.025em;
  --anomalie-heading-detail: 0.005em;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  text-wrap: balance;
}
h1 {
  letter-spacing: var(--anomalie-heading-display);
}
h2 {
  letter-spacing: var(--anomalie-heading-section);
}
h3,
h4,
h5,
h6 {
  letter-spacing: var(--anomalie-heading-detail);
  line-height: 1.22;
}

/* Large typography keeps a little optical compression without crushed letters. */
.hero.hero-anomaly h1 {
  letter-spacing: var(--anomalie-heading-display);
  line-height: 1.02;
}
.intro h2,
.worlds h2,
.architect h2 {
  letter-spacing: var(--anomalie-heading-section);
  line-height: 1.03;
}
.hidden-signal h3 {
  letter-spacing: var(--anomalie-heading-section);
  line-height: 1.08;
}
.experience-dialog-title,
.dialog-title,
.science-ending h2,
.epilogue h2,
.architect-reveal h3 {
  letter-spacing: var(--anomalie-heading-dialog);
  line-height: 1.11;
  font-weight: 600;
}
.science-final-variant h3 {
  letter-spacing: var(--anomalie-heading-detail);
  line-height: 1.22;
  font-weight: 600;
}
.anomalie-reset-dialog h2 {
  letter-spacing: var(--anomalie-heading-dialog);
  line-height: 1.18;
}
.quote blockquote {
  letter-spacing: -0.025em;
  line-height: 1.2;
  font-weight: 500;
}
.world .card-bottom strong {
  letter-spacing: -0.025em;
  line-height: 1.14;
}

/* The route overview has a small technical label and a calm, readable title. */
.consequence-route .route-heading .route-kicker {
  display: block;
  color: #91c9ea;
  font:
    500 1rem/1.55 'DM Mono',
    monospace;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}
.consequence-route .route-heading h3 {
  margin: 12px 0 22px;
  max-width: 28ch;
  color: #eef7ff;
  font:
    500 clamp(23px, 3.2vw, 34px) / 1.23 'Space Grotesk',
    sans-serif;
  letter-spacing: var(--anomalie-heading-detail);
  text-wrap: balance;
}
.consequence-route .science-method {
  font:
    400 1rem/1.65 'Space Grotesk',
    sans-serif;
  letter-spacing: 0.01em;
  color: #9bbcd2;
}
@media (max-width: 680px) {
  .intro h2,
  .worlds h2 {
    font-size: clamp(39px, 10.5vw, 64px);
    letter-spacing: -0.03em;
    line-height: 1.06;
  }
  .hero.hero-anomaly h1 {
    letter-spacing: -0.055em;
    line-height: 1.02;
  }
  .consequence-route .route-heading h3 {
    font-size: clamp(22px, 6.1vw, 28px);
    line-height: 1.27;
  }
}

/* Shared readable scale for labels, supporting copy, and controls. */
.signal,
nav,
.eyebrow,
.footnote,
.corner,
.count,
.card-top,
.card-bottom small,
.card-bottom > span,
.cards-footer,
.quote-credit,
.architect small,
.architect a,
footer,
.modal-head,
.modal-foot,
.dialog-kicker,
.feedback,
.anomaly-banner .tiny,
.terminal-label,
.terminal-button,
.terminal-skip,
.experience-track,
.experience-step,
.experience-foot,
.experience-response strong,
.science-phase,
.science-outcome,
.science-route-row b,
.science-route-row a,
.science-method,
.science-replay,
.science-final-variant b,
.fragment b,
.fragment .fragment-status,
.completion-fragment .glyph,
.completion-fragment p,
.assembled:empty:before,
.puzzle-actions button,
.puzzle-message,
.echo-hint,
.final-count,
.architect-reveal small,
.architect-reveal a,
.route-label,
.route-toast,
.science-impact {
  font-size: var(--anomalie-type-meta);
}
.meta,
.quote-credit,
.dialog-kicker,
.science-impact {
  font-size: var(--anomalie-type-control);
}
.hero.hero-anomaly .eyebrow,
.hero.hero-anomaly .footnote {
  font-size: var(--anomalie-type-meta);
}
.hero.hero-anomaly p.hero-thought,
.intro-grid p,
.dialog-copy,
.science-branch,
.science-reaction,
.bridge,
.experience-response,
.experience-stat span,
.architect-reveal p,
.completion-fragment p,
.puzzle-message,
.science-method {
  font-size: var(--anomalie-type-body);
}
.primary,
.option,
.hidden-signal button,
.experience-next,
.science-option,
.science-continue,
.code-input button,
.puzzle-actions button,
.puzzle-form button,
.finish,
.terminal-button,
.fragment-puzzle button,
.science-replay,
.anomalie-reset-dialog button,
.anomalie-reset-dialog .anomalie-reset-link {
  font-size: var(--anomalie-type-control);
}
.quote-credit {
  line-height: 1.55;
}
@media (max-width: 480px) {
  .signal-route a,
  .anchor-return,
  .route-label {
    font-size: var(--anomalie-type-meta);
  }
  .hero.hero-anomaly .eyebrow {
    letter-spacing: 0.1em;
  }
}

.world-heading .count {
  display: block;
  font-size: 1rem;
  line-height: 1.5;
}
.world-heading .count b {
  font-size: 1em;
  font-weight: 600;
}
.consequence-route .science-route-row span {
  font-size: 1.0625rem;
  line-height: 1.5;
}

.consequence-route .science-route-row :is(b, span, a) {
  font-size: 1.125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.consequence-route .science-method {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: #bdd5e5;
}
body.anomalie-site .consequence-route .science-route-row {
  grid-template-columns: minmax(9rem, max-content) minmax(0, 1fr);
}
.card-top,
.modal-head,
.modal-foot {
  flex-wrap: wrap;
}
@media (max-width: 680px) {
  body.anomalie-site .consequence-route .science-route-row {
    grid-template-columns: 1fr;
  }
  .world-heading {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

.consequence-route .science-route-row b {
  white-space: nowrap;
}

body.anomalie-site .consequence-route:has(.trace-details) {
  padding: 0;
  margin: 1rem 0;
  background: transparent;
  border: solid #34546b;
  border-width: 1px 0;
}
.trace-details summary {
  padding: 0.8rem 0.25rem;
  cursor: pointer;
  font-size: 1.125rem;
}
.trace-details summary span {
  float: right;
  color: #afd2e8;
}
.trace-details ul {
  list-style: none;
  padding: 0 0.25rem 0.75rem;
  margin: 0;
}
.trace-details li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.35rem 0;
  font-size: 1.0625rem;
}
.trace-details li span {
  color: #bad1df;
}
