:root {
  --bg: #05070c;
  --bg-soft: #0a1220;
  --ink: #f7f2e6;
  --muted: #c9c3b2;
  --muted-strong: #f2e8c6;
  --line: rgba(240, 224, 186, 0.16);
  --line-strong: rgba(240, 224, 186, 0.28);
  --panel: rgba(12, 16, 28, 0.8);
  --panel-strong: rgba(8, 12, 22, 0.92);
  --gold: #e8c06a;
  --gold-soft: #ffe8ad;
  --teal: #7ed5d0;
  --teal-deep: #0d4449;
  --copper: #d97943;
  --shadow: 0 32px 120px rgba(0, 0, 0, 0.45);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(232, 192, 106, 0.08), transparent 28%),
    radial-gradient(circle at right 20%, rgba(126, 213, 208, 0.11), transparent 24%),
    linear-gradient(180deg, #03050a 0%, #06101b 40%, #05070c 100%);
  font-family: "Syne", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black, transparent 88%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

input,
textarea,
select {
  color: var(--ink);
}

.mono,
.eyebrow,
.topnav,
.button,
.status-bar,
.payload-list,
.trail-meta,
.sample-pill {
  font-family: "IBM Plex Mono", monospace;
}

.backdrop,
.starfield,
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.starfield {
  opacity: 0.55;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.56) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px),
    radial-gradient(circle at 34% 70%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1px),
    radial-gradient(circle at 83% 76%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1px);
  background-size: 180px 180px;
}

.aurora {
  filter: blur(60px);
  opacity: 0.34;
}

.aurora-left {
  background: radial-gradient(circle, rgba(232, 192, 106, 0.28), transparent 62%);
  transform: translate(-20%, -35%);
}

.aurora-right {
  background: radial-gradient(circle, rgba(126, 213, 208, 0.24), transparent 58%);
  transform: translate(36%, -18%);
}

.page-shell {
  position: relative;
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.topbar,
.panel {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 999px;
  position: sticky;
  top: 16px;
  z-index: 20;
  backdrop-filter: blur(22px);
  background: rgba(7, 10, 18, 0.66);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(232, 192, 106, 0.32);
  background: radial-gradient(circle, rgba(232, 192, 106, 0.2), rgba(126, 213, 208, 0.08));
  color: var(--gold-soft);
  box-shadow: 0 0 24px rgba(232, 192, 106, 0.24);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.topnav a:hover {
  color: var(--gold-soft);
}

.panel {
  background:
    linear-gradient(180deg, rgba(10, 15, 26, 0.95), rgba(6, 10, 18, 0.88)),
    linear-gradient(135deg, rgba(232, 192, 106, 0.05), rgba(126, 213, 208, 0.05));
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-grid,
.section-grid {
  display: grid;
  gap: 22px;
  align-items: stretch;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  padding-top: 30px;
}

.section-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  margin-top: 24px;
}

.section-grid-reverse {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.hero-copy,
.section-main,
.postcard-panel,
.facts-section,
.section-side,
.postcard-side {
  padding: 26px;
}

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--gold-soft);
}

.hero-copy h1,
.section-head h2 {
  margin: 0;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(3.4rem, 7vw, 6rem);
}

.section-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
}

.lead,
.section-head p,
.aside-block p,
.context-head p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions,
.search-actions,
.control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, rgba(232, 192, 106, 0.22), rgba(217, 121, 67, 0.16));
  color: var(--gold-soft);
}

.button-secondary,
.button-ghost {
  background: rgba(255, 255, 255, 0.02);
}

.hero-metrics {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-metrics li {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.hero-metrics strong {
  display: block;
  font-size: 1.2rem;
  color: var(--muted-strong);
}

.hero-metrics span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.orbital-stage {
  position: relative;
  min-height: 610px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.orbit,
.orbit-pulse {
  position: absolute;
  border-radius: 50%;
  inset: 50%;
  transform: translate(-50%, -50%);
}

.orbit {
  border: 1px solid rgba(240, 224, 186, 0.18);
  box-shadow: 0 0 0 1px rgba(126, 213, 208, 0.04) inset;
}

.orbit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-soft), transparent 72%);
  transform: translateY(-50%);
}

.orbit-a {
  width: min(78vw, 430px);
  height: min(78vw, 430px);
  animation: spin 22s linear infinite;
}

.orbit-b {
  width: min(62vw, 330px);
  height: min(62vw, 330px);
  animation: spinReverse 18s linear infinite;
}

.orbit-c {
  width: min(44vw, 240px);
  height: min(44vw, 240px);
  animation: spin 14s linear infinite;
}

.orbit-d {
  width: min(90vw, 520px);
  height: min(90vw, 520px);
  border-style: dashed;
  border-color: rgba(126, 213, 208, 0.16);
  animation: spinReverse 32s linear infinite;
}

.orbit-pulse {
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(232, 192, 106, 0.18), transparent 70%);
  filter: blur(12px);
  animation: breathe 6s ease-in-out infinite;
}

.pi-core {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.pi-symbol {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(5.4rem, 9vw, 8rem);
  line-height: 1;
  color: var(--gold-soft);
  text-shadow: 0 0 34px rgba(232, 192, 106, 0.22);
}

.pi-subtitle {
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.orbit-caption {
  position: absolute;
  display: grid;
  gap: 4px;
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.orbit-caption strong {
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}

.orbit-caption-left {
  left: 28px;
  top: 34px;
}

.orbit-caption-right {
  right: 30px;
  top: 92px;
  text-align: right;
}

.orbit-caption-bottom {
  left: 28px;
  right: 28px;
  bottom: 30px;
}

.search-form,
.postcard-controls {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.field .field-meta {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(232, 192, 106, 0.48);
  box-shadow: 0 0 0 4px rgba(232, 192, 106, 0.08);
}

.sample-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sample-pill {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.sample-pill:hover {
  color: var(--gold-soft);
  border-color: rgba(232, 192, 106, 0.28);
  transform: translateY(-1px);
}

.sample-pill.is-selected {
  color: var(--ink);
  border-color: rgba(232, 192, 106, 0.38);
  background: rgba(232, 192, 106, 0.12);
  box-shadow: 0 12px 28px rgba(232, 192, 106, 0.12);
}

.sample-note {
  margin: -2px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.sample-drawer {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.sample-drawer-trigger {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}

.sample-drawer-trigger::-webkit-details-marker {
  display: none;
}

.sample-drawer-title {
  color: var(--muted-strong);
}

.sample-drawer-meta {
  color: var(--muted);
  text-align: right;
}

.sample-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.sample-drawer-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.sample-drawer-card:hover {
  transform: translateY(-1px);
  border-color: rgba(232, 192, 106, 0.24);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.18);
}

.sample-drawer-card.is-selected {
  border-color: rgba(126, 213, 208, 0.34);
  background: rgba(126, 213, 208, 0.08);
  box-shadow: 0 18px 32px rgba(126, 213, 208, 0.08);
}

.sample-drawer-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sample-drawer-card-sequence {
  color: var(--ink);
  font-size: 1rem;
}

.sample-drawer-card-tag {
  color: var(--gold-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sample-drawer-card-title {
  color: var(--muted-strong);
}

.sample-drawer-card-note {
  color: var(--muted);
  line-height: 1.6;
}

.status-bar {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(126, 213, 208, 0.18);
  background: rgba(126, 213, 208, 0.06);
  color: var(--muted-strong);
}

.status-bar.is-busy {
  border-color: rgba(232, 192, 106, 0.22);
  background: rgba(232, 192, 106, 0.06);
}

.status-bar.is-error {
  border-color: rgba(217, 121, 67, 0.28);
  background: rgba(217, 121, 67, 0.08);
}

.stats-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-value {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--muted-strong);
  letter-spacing: -0.03em;
}

.stat-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.context-panel {
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.context-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.context-window {
  margin-top: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #e6eee6;
  line-height: 1.9;
  word-break: break-word;
}

.context-window .dim {
  color: rgba(230, 238, 230, 0.5);
}

.context-window .match {
  color: var(--gold-soft);
  background: rgba(232, 192, 106, 0.12);
  padding: 2px 4px;
  border-radius: 6px;
}

.aside-block + .aside-block {
  margin-top: 20px;
}

.aside-block h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.occurrence-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.occurrence-view-button {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.occurrence-view-button:hover {
  color: var(--gold-soft);
  border-color: rgba(232, 192, 106, 0.22);
  transform: translateY(-1px);
}

.occurrence-view-button.is-selected {
  color: var(--ink);
  border-color: rgba(126, 213, 208, 0.34);
  background: rgba(126, 213, 208, 0.12);
  box-shadow: 0 14px 30px rgba(126, 213, 208, 0.1);
}

.occurrence-rail {
  position: relative;
  margin-top: 22px;
  height: 160px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at center, rgba(126, 213, 208, 0.08), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.occurrence-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 160ms ease;
}

.occurrence-rail.is-canvas-view .occurrence-canvas {
  opacity: 1;
}

.occurrence-rail.is-heatmap {
  background:
    radial-gradient(circle at 50% 46%, rgba(232, 192, 106, 0.06), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.occurrence-rail.is-constellation {
  background:
    radial-gradient(circle at 30% 24%, rgba(126, 213, 208, 0.08), transparent 32%),
    radial-gradient(circle at 70% 68%, rgba(232, 192, 106, 0.05), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.01));
}

.occurrence-baseline {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(232, 192, 106, 0.08), rgba(126, 213, 208, 0.22), rgba(232, 192, 106, 0.08));
}

.occurrence-rail.is-canvas-view .occurrence-baseline {
  opacity: 0.08;
}

.occurrence-marker {
  position: absolute;
  top: 24px;
  width: 2px;
  height: 112px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232, 192, 106, 0.14), rgba(126, 213, 208, 0.95), rgba(232, 192, 106, 0.1));
  box-shadow: 0 0 12px rgba(126, 213, 208, 0.22);
}

.occurrence-heat-segment {
  position: absolute;
  bottom: 24px;
  min-width: 0.8%;
  border-radius: 999px;
  opacity: calc(0.18 + var(--heat, 0.5) * 0.78);
  background:
    linear-gradient(180deg, rgba(255, 242, 204, 0.18), rgba(126, 213, 208, 0.5)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 calc(10px + var(--heat, 0.5) * 18px) rgba(126, 213, 208, 0.16);
  pointer-events: auto;
}

.occurrence-heat-segment::after {
  content: "";
  position: absolute;
  inset: auto 12% -10px 12%;
  height: 10px;
  border-radius: 999px;
  background: rgba(126, 213, 208, 0.18);
  filter: blur(8px);
}

.occurrence-heat-pin {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 245, 220, 0.72);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 12px rgba(232, 192, 106, 0.22);
}

.trail-meta {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 720px) {
  .sample-drawer-grid {
    grid-template-columns: 1fr;
  }
}

.aside-block-emphasis {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(232, 192, 106, 0.14);
  background: linear-gradient(180deg, rgba(232, 192, 106, 0.08), rgba(126, 213, 208, 0.04));
}

.postcard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.44fr);
  gap: 18px;
  margin-top: 20px;
}

.postcard-canvas-wrap {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.picker {
  position: relative;
  width: 100%;
}

.picker-trigger {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  user-select: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.picker-trigger::-webkit-details-marker {
  display: none;
}

.picker-trigger:hover {
  border-color: rgba(232, 192, 106, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.picker-trigger:focus-visible {
  outline: 0;
  border-color: rgba(232, 192, 106, 0.34);
  box-shadow: 0 0 0 4px rgba(232, 192, 106, 0.08);
}

.picker[open] .picker-trigger {
  border-color: rgba(232, 192, 106, 0.32);
  box-shadow: 0 0 0 4px rgba(232, 192, 106, 0.08);
}

.picker-trigger-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.picker-trigger-preview {
  flex: 0 0 auto;
  width: 54px;
  height: 34px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at top left, rgba(232, 192, 106, 0.12), transparent 55%);
}

.picker-trigger-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.picker-trigger-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.picker-trigger-copy strong {
  font-size: 0.95rem;
}

.picker-trigger-copy span {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.picker-trigger-arrow {
  color: var(--muted-strong);
  font-size: 0.95rem;
  transition: transform 160ms ease;
}

.picker[open] .picker-trigger-arrow {
  transform: rotate(180deg);
}

.picker-menu {
  position: static;
  display: grid;
  gap: 8px;
  max-height: 360px;
  margin-top: 8px;
  padding: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(10, 15, 26, 0.98), rgba(7, 11, 19, 0.98)),
    linear-gradient(135deg, rgba(232, 192, 106, 0.05), rgba(126, 213, 208, 0.05));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.style-gallery,
.resolution-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mode-gallery {
  display: grid;
  gap: 10px;
}

.mode-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.style-option,
.resolution-option,
.mode-option {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.style-option:hover,
.style-option.is-selected,
.resolution-option:hover,
.resolution-option.is-selected,
.mode-option:hover,
.mode-option.is-selected {
  transform: translateY(-1px);
  border-color: rgba(232, 192, 106, 0.34);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.style-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
}

.style-option.is-selected {
  border-color: var(--style-accent, rgba(232, 192, 106, 0.5));
  box-shadow:
    0 0 0 1px var(--style-accent, rgba(232, 192, 106, 0.5)),
    0 18px 36px rgba(0, 0, 0, 0.22);
}

.style-option-preview {
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: calc(var(--radius-md) - 4px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
    radial-gradient(circle at top left, rgba(232, 192, 106, 0.16), transparent 55%);
  width: 60px;
  height: 38px;
}

.style-option-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  opacity: 0.96;
}

.style-option-copy,
.resolution-option-copy {
  display: grid;
  gap: 4px;
}

.style-option-copy {
  flex: 1 1 auto;
}

.style-option-copy strong,
.resolution-option-copy strong,
.mode-option strong {
  font-size: 0.95rem;
}

.style-option-copy span,
.resolution-option-copy span,
.mode-option span,
.toggle-card-copy small {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resolution-option,
.mode-option {
  width: 100%;
  padding: 12px 14px;
  text-align: left;
}

.button-mini {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
}

.toggle-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.toggle-card input {
  margin-top: 3px;
  accent-color: var(--gold);
}

.toggle-card-copy {
  display: grid;
  gap: 6px;
}

.fact-picker-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(232, 192, 106, 0.04), rgba(126, 213, 208, 0.04));
}

.fact-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.fact-picker-copy {
  display: grid;
  gap: 6px;
}

.fact-picker-kicker,
.fact-picker-note {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fact-picker-copy strong {
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.3;
}

.fact-picker-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

#postcard-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - 6px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  background: #0b1119;
}

.canvas-caption {
  margin: 12px 4px 0;
  color: var(--muted);
  line-height: 1.7;
}

.payload-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.payload-list li {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.payload-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.fact-quote {
  margin: 14px 0 0;
  padding: 18px;
  border-left: 2px solid rgba(232, 192, 106, 0.4);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--muted-strong);
  line-height: 1.7;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
}

.facts-section {
  margin-top: 24px;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--gold);
}

.facts-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.fact-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.fact-card-button {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.fact-card-button:hover,
.fact-card-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(232, 192, 106, 0.28);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.2);
}

.fact-card-button:focus-visible {
  outline: 0;
}

.fact-card h3 {
  margin: 0 0 10px;
  font-size: 1.24rem;
}

.fact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.fact-card-meta {
  display: inline-flex;
  margin-top: 16px;
  color: var(--gold-soft);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes spinReverse {
  from {
    transform: translate(-50%, -50%) rotate(360deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(0deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.92);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@media (max-width: 1080px) {
  .hero-grid,
  .section-grid,
  .section-grid-reverse,
  .postcard-grid,
  .facts-grid,
  .hero-metrics,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .orbital-stage {
    min-height: 520px;
  }

  .mode-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
  }

  .topbar {
    border-radius: 24px;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy,
  .section-main,
  .postcard-panel,
  .facts-section,
  .section-side,
  .postcard-side {
    padding: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(2.8rem, 12vw, 4.6rem);
  }

  .orbital-stage {
    min-height: 460px;
  }

  .orbit-caption-bottom,
  .orbit-caption-left,
  .orbit-caption-right {
    position: static;
    margin-top: 14px;
    text-align: left;
  }

  .orbital-stage {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .mode-gallery {
    grid-template-columns: 1fr;
  }

  .fact-picker-head {
    flex-direction: column;
  }
}
