:root {
  --night: #050b14;
  --night-2: #0a1628;
  --ink: #e8eef8;
  --muted: #9aadc8;
  --gold: #d4b56a;
  --gold-soft: rgba(212, 181, 106, 0.35);
  --cyan: #6ec8e8;
  --line: rgba(232, 238, 248, 0.12);
  --panel: rgba(8, 18, 34, 0.78);
  --danger: #e08a7a;
  --ok: #8fcaa8;
  --sky-glow: rgba(110, 200, 232, 0.14);
  --glass: rgba(8, 18, 34, 0.62);
  --font-display: "Instrument Serif", "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  --pad: clamp(1.25rem, 3vw, 2.75rem);
  --max: 72rem;
  --jewel-edge: linear-gradient(135deg, rgba(212, 181, 106, 0.45), rgba(110, 200, 232, 0.25), rgba(212, 181, 106, 0.15));
}

body[data-active-sky="judgment"] {
  --sky-glow: rgba(110, 200, 232, 0.16);
}

body[data-active-sky="code"] {
  --sky-glow: rgba(110, 200, 232, 0.22);
}

body[data-active-sky="fiction"] {
  --sky-glow: rgba(212, 181, 106, 0.18);
}

body[data-active-sky="email"] {
  --sky-glow: rgba(143, 202, 168, 0.16);
}

body[data-active-sky="laptop"] {
  --sky-glow: rgba(168, 180, 210, 0.14);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: screen;
}

.lattice {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(110, 200, 232, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 200, 232, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, black, transparent 78%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.55;
  background:
    radial-gradient(1200px 700px at 70% -10%, var(--sky-glow), transparent 55%),
    radial-gradient(900px 600px at 10% 20%, rgba(212, 181, 106, 0.08), transparent 50%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 45%, #07101c 100%);
  transition: background 700ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 80% 18%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1.5px 1.5px at 35% 85%, rgba(212, 181, 106, 0.4), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(255, 255, 255, 0.3), transparent);
  z-index: 0;
}

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--gold);
}

img,
svg {
  max-width: 100%;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: var(--pad);
  top: 0.75rem;
  z-index: 20;
  background: var(--night);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
}

.shell {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--pad);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(212, 181, 106, 0.12);
  backdrop-filter: blur(14px) saturate(1.15);
  background: linear-gradient(180deg, rgba(5, 11, 20, 0.82), rgba(5, 11, 20, 0.52));
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--muted);
  font-size: 0.95rem;
}

.as-of {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  padding: 0.45rem 0.75rem;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.role-chip {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--cyan);
  border: 1px solid rgba(110, 200, 232, 0.35);
  padding: 0.4rem 0.7rem;
}

.config-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(8, 18, 34, 0.7);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  min-height: 48px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.config-btn:hover,
.config-btn:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.config-btn.primary {
  border-color: var(--gold-soft);
  color: var(--gold);
  background: rgba(212, 181, 106, 0.1);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  font-size: 1rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  opacity: 0.85;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1;
  color: var(--gold);
}

.wire {
  display: flex;
  align-items: center;
  height: 4.5rem;
  max-height: 4.5rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(212, 181, 106, 0.35);
  background:
    linear-gradient(180deg, rgba(212, 181, 106, 0.14), transparent 70%),
    rgba(5, 11, 20, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, 0.16);
}

.wire-mark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: 4.5rem;
  padding: 0 0.85rem;
  border-right: 1px solid rgba(212, 181, 106, 0.35);
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(212, 181, 106, 0.1), transparent);
}

.analog {
  width: 3.35rem;
  height: 3.35rem;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 8px rgba(212, 181, 106, 0.28));
}

.analog-face {
  fill: #07101c;
}

.analog-ring {
  fill: none;
  stroke: #d4b56a;
  stroke-width: 2.5;
}

.analog-ticks line {
  stroke: #e8eef8;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.hand {
  transform-origin: 50px 50px;
}

.hand line {
  stroke-linecap: round;
}

.hand.hour line {
  stroke: #f4efe4;
  stroke-width: 3.2;
}

.hand.minute line {
  stroke: #d4b56a;
  stroke-width: 2.2;
}

.hand.second line {
  stroke: #e08a7a;
  stroke-width: 1.15;
}

.analog-pin {
  fill: #d4b56a;
  stroke: #07101c;
  stroke-width: 0.6;
}

.wire-readout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 7.5rem;
}

.wire-live {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.wire-kicker {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.wire-viewport {
  flex: 1 1 auto;
  min-width: 0;
  height: 4.5rem;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 1.25rem, #000 calc(100% - 1.25rem), transparent);
}

.wire-track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  height: 4.5rem;
  animation: wire-run 80s linear infinite;
}

.wire:hover .wire-track,
.wire:focus-within .wire-track {
  animation-play-state: paused;
}

.wire-run {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  height: 4.5rem;
  padding-right: 0.75rem;
}

.wire-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  height: 2.35rem;
  padding: 0 0.75rem 0 0.3rem;
  border: 1px solid rgba(212, 181, 106, 0.28);
  background: rgba(8, 18, 34, 0.45);
  white-space: nowrap;
}

.wire-kind {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--night);
  background: linear-gradient(180deg, #f3e2b0, var(--gold));
  padding: 0.2rem 0.45rem;
}

.wire-copy {
  font-size: 1.05rem;
  color: var(--ink);
}

.wire-item {
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--ink);
  white-space: nowrap;
}

@keyframes wire-run {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.hero {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  grid-template-rows: 1fr auto;
  padding: var(--pad);
  padding-bottom: 2rem;
}

.hero-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  place-items: center;
  align-items: start;
  position: relative;
  width: min(100%, 64rem);
  margin: 0 auto 0.5rem;
}

@media (min-width: 1040px) {
  .hero-stage {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
    align-items: start;
    gap: 1.25rem 1.75rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sky-legend {
  width: 100%;
  max-width: 26rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--glass), var(--glass)) padding-box,
    var(--jewel-edge) border-box;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  text-align: left;
}

.legend-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--gold);
}

.legend-lede,
.legend-note,
.legend-loading {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
}

.legend-grid {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.legend-grid dt {
  margin: 0 0 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--cyan);
  text-transform: uppercase;
}

.legend-grid dd {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--muted);
}

.legend-grid dd strong {
  color: var(--ink);
}

.swatches {
  list-style: none;
  margin: 0.35rem 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.swatches li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.swatch {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 1px solid rgba(5, 11, 20, 0.85);
  flex-shrink: 0;
}

.swatch.cyan {
  background: var(--cyan);
}

.swatch.gold {
  background: var(--gold);
}

.swatch.dim {
  background: #7f93b0;
}

.ring-caption {
  font-size: 10px;
}

.hero-copy {
  max-width: 44rem;
  text-align: center;
  margin: 0 auto 1.5rem;
}

.phi {
  display: inline-block;
  margin-right: 0.35rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.15em;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}

.title-quiet {
  color: var(--ink);
}

.hero h1 {
  background: linear-gradient(180deg, #fff8e8 0%, var(--gold) 42%, #f4efe4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 .title-quiet {
  background: none;
  -webkit-text-fill-color: var(--ink);
  color: var(--ink);
}

.hero h1 em {
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.hero-lead {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.orrery-wrap {
  width: 100%;
  max-width: min(96vw, 52rem);
  aspect-ratio: 1;
  position: relative;
  padding: 0.75rem;
  border: 1px solid rgba(212, 181, 106, 0.18);
  background:
    radial-gradient(85% 85% at 50% 42%, rgba(110, 200, 232, 0.07), transparent 62%),
    radial-gradient(70% 70% at 50% 50%, rgba(8, 18, 34, 0.4), rgba(5, 11, 20, 0.92));
  box-shadow:
    0 0 0 1px rgba(110, 200, 232, 0.06) inset,
    0 28px 80px rgba(0, 0, 0, 0.45),
    0 0 120px rgba(212, 181, 106, 0.08);
}

@media (min-width: 900px) {
  .orrery-wrap {
    max-width: min(92vw, 56rem);
    min-height: min(82vh, 56rem);
    aspect-ratio: auto;
    height: min(82vh, 56rem);
  }
}

.orrery-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(38% 38% at var(--lx, 50%) var(--ly, 40%), rgba(255, 236, 196, 0.16), transparent 70%);
  mix-blend-mode: screen;
}

.orrery-wrap::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 80px rgba(110, 200, 232, 0.06) inset;
}

.bezel .tick {
  stroke: rgba(212, 181, 106, 0.28);
  stroke-width: 1;
}

.bezel .tick.major {
  stroke: rgba(232, 238, 248, 0.55);
  stroke-width: 1.4;
}

.bezel-ring {
  fill: none;
  stroke: rgba(212, 181, 106, 0.22);
  stroke-width: 1;
}

.constellation {
  fill: none;
  stroke: rgba(110, 200, 232, 0.16);
  stroke-width: 0.8;
}

.score-filament {
  height: 4px;
  background: rgba(232, 238, 248, 0.08);
  overflow: hidden;
}

.score-filament span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
}

.orrery-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.void-disc {
  pointer-events: none;
}

.star {
  fill: #e8eef8;
  pointer-events: none;
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.85;
  }
}

.star:nth-child(3n) {
  animation: star-twinkle 5.5s ease-in-out infinite;
}

.star:nth-child(5n) {
  animation: star-twinkle 7.2s ease-in-out infinite 0.8s;
}

.orrery-rings {
  transform-origin: 240px 240px;
  animation: orrery-sheen 120s linear infinite;
}

@keyframes orrery-sheen {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orrery-rings,
  .star,
  .orrery-sun .sun-corona,
  .orrery-sun .sun-halo {
    animation: none !important;
  }
}

.ring {
  fill: none;
  stroke-width: 1.25;
  pointer-events: none;
}

.ring-major {
  stroke: var(--gold-soft);
  stroke-dasharray: 2 10 6 14;
  opacity: 0.95;
}

.ring-trace {
  stroke: rgba(110, 200, 232, 0.08);
  stroke-width: 1;
}

.ring-tier {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  pointer-events: none;
}

.spiral {
  stroke: rgba(212, 181, 106, 0.12);
  stroke-width: 0.75;
  opacity: 0.5;
}

.ring-label {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.ring-caption {
  font-size: 11px;
}

.body-node {
  cursor: pointer;
}

.body-node .spoke {
  stroke: rgba(212, 181, 106, 0.12);
  stroke-width: 1;
  pointer-events: none;
}

.body-node .orbit-arc {
  fill: none;
  stroke: rgba(110, 200, 232, 0.18);
  stroke-width: 1;
  pointer-events: none;
}

.body-node .orbit-node {
  fill: none;
  stroke: rgba(232, 238, 248, 0.12);
  stroke-width: 1;
  pointer-events: none;
}

.body-node circle.core {
  stroke: rgba(5, 11, 20, 0.65);
  stroke-width: 1.25;
  transition:
    r 220ms ease,
    filter 220ms ease,
    stroke 220ms ease;
}

.body-node circle.core-shine {
  fill: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  mix-blend-mode: screen;
}

.body-node:focus-visible circle.core,
.body-node:hover circle.core {
  stroke: var(--gold);
  stroke-width: 2;
}

.body-node:hover .spoke {
  stroke: rgba(212, 181, 106, 0.35);
}

.body-node:hover .orbit-node {
  stroke: rgba(110, 200, 232, 0.35);
}

.body-node .body-label {
  fill: var(--ink);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(5, 11, 20, 0.85);
  stroke-width: 3px;
}

.orrery-sun .sun-corona {
  fill: url(#sunCorona);
  opacity: 0.9;
  animation: sun-pulse 6s ease-in-out infinite;
}

.orrery-sun .sun-halo {
  fill: none;
  stroke: rgba(212, 181, 106, 0.35);
  stroke-width: 1;
  stroke-dasharray: 3 9;
  animation: sun-pulse 6s ease-in-out infinite reverse;
}

@keyframes sun-pulse {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
    transform-origin: 240px 240px;
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
    transform-origin: 240px 240px;
  }
}

.sun {
  stroke: rgba(255, 244, 214, 0.5);
  stroke-width: 1;
}

.sun-label {
  fill: var(--night);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-anchor: middle;
  letter-spacing: 0.12em;
}

.sky-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0 0.5rem;
}

.sky-switch button {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(8, 18, 34, 0.7);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  min-height: 48px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  border-radius: 0;
}

.sky-switch button[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 181, 106, 0.08);
}

.sky-blurb {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin: 0.35rem 0 0;
  min-height: 1.6em;
}

.picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  width: min(100%, var(--max));
  margin: 1.75rem auto 0;
}

.picks-role {
  grid-column: 1 / -1;
  margin: 0 0 0.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}

.pick {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
}

.pick .kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.pick strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
}

.pick p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  flex: 1;
}

.pick button {
  margin-top: auto;
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  min-height: 48px;
  width: 100%;
  cursor: pointer;
}

.pick button:hover,
.pick button:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.section {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 3.5rem var(--pad);
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
}

.section .lede {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 40rem;
}

.offers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.offer {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 100%;
}

.offer h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
}

.offer-price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold);
}

.offer-price span {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--muted);
}

.offer p {
  margin: 0;
  color: var(--muted);
  flex: 1;
}

.offer-lead {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32), 0 0 28px var(--sky-glow);
}

.offer-btn {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--gold-soft);
  color: var(--gold);
  text-decoration: none;
  font-size: 1.05rem;
}

.offer-btn:hover,
.offer-btn:focus-visible {
  background: rgba(212, 181, 106, 0.1);
  color: var(--gold);
}

.till-note {
  margin: 1.25rem 0 0;
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.05rem;
}

@media (max-width: 1100px) {
  .offers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .offers {
    grid-template-columns: 1fr;
  }
}

.task-list {
  display: grid;
  gap: 1.25rem;
}

.task {
  display: grid;
  gap: 0.65rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.task h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.task-grid dt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

.task-grid dd {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}

.task .avoid {
  color: var(--danger);
}

.task .evidence {
  color: var(--muted);
  font-size: 0.98rem;
}

.plates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

.plate {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 1.1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 100%;
}

.plate h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
}

.plate .meta {
  color: var(--muted);
  font-size: 0.98rem;
}

.plate .price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--cyan);
}

.plate ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.plate .open {
  margin-top: auto;
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  min-height: 48px;
  width: 100%;
  cursor: pointer;
}

.plate .open:hover,
.plate .open:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.clock-list,
.method-list,
.disagree-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.clock-list li,
.disagree-list li,
.method-list li {
  border-left: 2px solid var(--gold-soft);
  padding: 0.2rem 0 0.2rem 1rem;
}

.clock-list time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.disagree-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.footer {
  padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}

.footer .inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.dialog {
  border: 1px solid var(--line);
  background: #07101c;
  color: var(--ink);
  padding: 0;
  width: min(92vw, 40rem);
  max-height: 90vh;
}

.dialog::backdrop {
  background: rgba(2, 6, 12, 0.72);
}

.dialog-body {
  padding: 1.5rem;
  overflow: auto;
  max-height: 90vh;
}

.dialog-body h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 2rem;
}

.dialog-body .close {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  min-height: 48px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  margin-top: 1.25rem;
}

.status {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  background: rgba(7, 16, 28, 0.92);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  max-width: 20rem;
}

@media (max-width: 860px) {
  .picks,
  .task-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }
}

.workshop-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.workshop-form [data-for][hidden] {
  display: none;
}

.workshop-form .config-btn {
  min-height: 48px;
}

.workshop-form input[type="number"] {
  font: inherit;
  font-size: 1.05rem;
  min-height: 48px;
  padding: 0.55rem 0.75rem;
  color: var(--ink);
  background: rgba(8, 18, 34, 0.9);
  border: 1px solid var(--line);
  width: 100%;
}

.workshop-out {
  margin: 0;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  background: rgba(8, 18, 34, 0.78);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.45;
  overflow: auto;
  max-height: 28rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.welcome,
.config-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(2, 6, 12, 0.78);
}

.welcome[hidden],
.config-drawer[hidden] {
  display: none;
}

.welcome-card,
.config-panel {
  width: min(100%, 40rem);
  max-height: min(92vh, 48rem);
  overflow: auto;
  background: #07101c;
  border: 1px solid var(--line);
  padding: 1.5rem 1.4rem 1.35rem;
}

.welcome-card h2,
.config-panel h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
}

.welcome-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.role-grid {
  display: grid;
  gap: 0.75rem;
}

.role-card {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(8, 18, 34, 0.85);
  color: var(--ink);
  font: inherit;
  padding: 1rem 1.05rem;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
  min-height: 4.5rem;
}

.role-card strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
}

.role-card span {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.role-card:hover,
.role-card:focus-visible {
  border-color: var(--gold);
}

.text-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1rem;
  min-height: 48px;
  padding: 0.5rem 0;
  cursor: pointer;
  margin-top: 0.75rem;
}

.text-btn:hover,
.text-btn:focus-visible {
  color: var(--gold);
}

.config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.config-head .text-btn {
  margin-top: 0;
}

.cfg-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.cfg-field span {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.cfg-field select {
  font: inherit;
  font-size: 1.05rem;
  min-height: 48px;
  padding: 0.55rem 0.75rem;
  color: var(--ink);
  background: rgba(8, 18, 34, 0.9);
  border: 1px solid var(--line);
}

.cfg-check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
  color: var(--ink);
  cursor: pointer;
}

.cfg-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

body.welcome-open,
body.config-open {
  overflow: hidden;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.section.room {
  position: relative;
}

.section.room::before {
  content: "";
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 181, 106, 0.55), rgba(110, 200, 232, 0.35), transparent);
}

.jewel {
  position: relative;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(8, 18, 34, 0.88), rgba(8, 18, 34, 0.72)) padding-box,
    var(--jewel-edge) border-box;
  padding: 1.1rem 1.15rem 1.15rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.jewel:hover,
.jewel:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32), 0 0 28px var(--sky-glow);
}

.pick.jewel {
  border-top: 0;
  padding-top: 1.1rem;
}

.task.jewel {
  border-bottom: 0;
  padding: 1.15rem 1.2rem;
}

.plate.jewel {
  overflow: hidden;
}

.plate-orbit {
  position: absolute;
  top: -2.2rem;
  right: -2.2rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: 1px solid rgba(110, 200, 232, 0.18);
  box-shadow: inset 0 0 24px rgba(212, 181, 106, 0.08);
  pointer-events: none;
}

.plate.tier-strong .plate-orbit {
  border-color: rgba(110, 200, 232, 0.45);
}

.plate.tier-mid .plate-orbit {
  border-color: rgba(212, 181, 106, 0.45);
}

.plate.tier-dim .plate-orbit {
  border-color: rgba(127, 147, 176, 0.4);
}

.body-node.is-selected .core {
  stroke: var(--gold);
  stroke-width: 2.5;
}

.body-node.is-selected .spoke {
  stroke: rgba(212, 181, 106, 0.55);
}

.orrery-wrap.sky-shift {
  animation: sky-bloom 700ms ease;
}

@keyframes sky-bloom {
  0% {
    box-shadow:
      0 0 0 1px rgba(110, 200, 232, 0.06) inset,
      0 28px 80px rgba(0, 0, 0, 0.45),
      0 0 0 rgba(110, 200, 232, 0);
  }
  40% {
    box-shadow:
      0 0 0 1px rgba(212, 181, 106, 0.35) inset,
      0 28px 80px rgba(0, 0, 0, 0.45),
      0 0 90px var(--sky-glow);
  }
  100% {
    box-shadow:
      0 0 0 1px rgba(110, 200, 232, 0.06) inset,
      0 28px 80px rgba(0, 0, 0, 0.45),
      0 0 120px rgba(212, 181, 106, 0.08);
  }
}

.sky-switch button {
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.dialog {
  border: 1px solid transparent;
  background:
    linear-gradient(#07101c, #07101c) padding-box,
    var(--jewel-edge) border-box;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.welcome-card,
.config-panel {
  border: 1px solid transparent;
  background:
    linear-gradient(#07101c, #0a1628) padding-box,
    var(--jewel-edge) border-box;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.status {
  backdrop-filter: blur(10px);
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(7, 16, 28, 0.92), rgba(7, 16, 28, 0.92)) padding-box,
    var(--jewel-edge) border-box;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .atmosphere,
  .lattice {
    display: none;
  }

  .body-node circle.core,
  .jewel,
  body {
    transition: none;
  }

  .orrery-wrap.sky-shift,
  .jewel:hover,
  .jewel:focus-within {
    animation: none;
    transform: none;
  }
}
