:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070914;
  color: #f7f8ff;
  font-synthesis: none;
  --aqua: #78f6df;
  --pink: #ff8ad8;
  --panel: rgba(15, 20, 47, 0.76);
  --muted: #aab1cc;
  --line: rgba(200, 211, 255, 0.17);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 12%, rgba(84, 78, 198, 0.24), transparent 31rem),
    radial-gradient(circle at 83% 32%, rgba(226, 74, 175, 0.15), transparent 29rem),
    #070914;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.site-header,
main,
footer {
  width: min(1200px, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  color: #fff;
  font-size: 0.93rem;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.wordmark-mark {
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--aqua);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(120, 246, 223, 0.12), 0 0 24px rgba(120, 246, 223, 0.55);
}

.header-link {
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
}

.header-link:hover {
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 5rem 0;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--aqua);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3.2rem, 6.7vw, 6.5rem);
  font-weight: 720;
  letter-spacing: -0.072em;
  line-height: 0.94;
}

.lede {
  max-width: 41rem;
  margin: 1.8rem 0 0;
  color: #c3c9df;
  font-size: clamp(1.05rem, 1.45vw, 1.25rem);
  line-height: 1.65;
}

.node-status {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-height: 1.5rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.status-light {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #68708d;
  box-shadow: 0 0 0 5px rgba(104, 112, 141, 0.12);
}

.node-status[data-status="ready"] .status-light {
  background: var(--aqua);
  box-shadow: 0 0 0 5px rgba(120, 246, 223, 0.11), 0 0 18px rgba(120, 246, 223, 0.45);
}

.node-status[data-status="error"] .status-light {
  background: #ff7893;
  box-shadow: 0 0 0 5px rgba(255, 120, 147, 0.12);
}

.node-status[data-status="limited"] .status-light {
  background: #ffc96b;
  box-shadow: 0 0 0 5px rgba(255, 201, 107, 0.12);
}

.primary-button,
.secondary-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary-button {
  display: inline-flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  min-width: 14.5rem;
  margin-top: 1.5rem;
  padding: 1rem 1rem 1rem 1.35rem;
  border-radius: 999px;
  background: #f8f9ff;
  color: #090b17;
  font-weight: 800;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 52px rgba(120, 246, 223, 0.12);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.button-arrow {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: #10152a;
  color: var(--aqua);
  font-size: 1.25rem;
}

.button-note {
  margin: 0.8rem 0 0;
  color: #777f9d;
  font-size: 0.76rem;
}

.experiment-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(200, 211, 255, 0.18);
  border-radius: 2rem;
  background: linear-gradient(145deg, rgba(20, 27, 62, 0.82), rgba(7, 9, 20, 0.92));
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.44), inset 0 1px rgba(255, 255, 255, 0.04);
}

.experiment-shell::before {
  position: absolute;
  inset: -35% 20% 65% -10%;
  content: "";
  border-radius: 50%;
  background: rgba(100, 84, 244, 0.17);
  filter: blur(40px);
}

.experiment-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: 1.25rem 1.4rem 0;
  color: #9da5c2;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.globe {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
  padding: 0.5rem;
}

.globe svg {
  width: 100%;
  overflow: visible;
  filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.32));
}

.globe-body {
  fill: url(#globe-fill);
  stroke: rgba(190, 204, 255, 0.2);
  stroke-width: 2;
}

.globe-grid {
  fill: none;
  stroke: rgba(173, 190, 244, 0.1);
  stroke-width: 1;
}

.continent {
  fill: rgba(116, 135, 192, 0.12);
  stroke: rgba(162, 181, 232, 0.17);
  stroke-width: 1;
}

.event-arc {
  fill: none;
  stroke: url(#split-line);
  stroke-width: 2;
  stroke-dasharray: 6 8;
  opacity: 0.46;
}

.node-ring {
  fill: none;
  stroke-width: 2;
  opacity: 0.75;
}

.node-core {
  fill: #fff;
}

.node-a .node-ring {
  stroke: var(--aqua);
}

.node-b .node-ring {
  stroke: var(--pink);
}

.experiment-shell[data-state="measuring"] .node-ring {
  animation: pulse-ring 1.1s ease-out infinite;
}

.experiment-shell[data-state="success"] .event-arc {
  stroke-dasharray: none;
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(120, 246, 223, 0.6));
}

.experiment-shell[data-state="inconclusive"] .event-arc {
  opacity: 0.7;
}

.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  background: rgba(7, 9, 20, 0.64);
  backdrop-filter: blur(5px);
}

.countdown[hidden] {
  display: none;
}

.countdown span {
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 760;
  letter-spacing: -0.07em;
}

.countdown small {
  color: var(--aqua);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.node-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 1.5rem 1.4rem;
}

.node-labels > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.6rem;
  align-items: center;
}

.node-labels strong {
  font-size: 0.83rem;
}

.node-labels small {
  grid-column: 2;
  margin-top: 0.15rem;
  color: #7f87a4;
  font-size: 0.68rem;
}

.node-label-right {
  text-align: right;
}

.node-dot {
  width: 0.48rem;
  height: 0.48rem;
  grid-row: span 2;
  border-radius: 50%;
}

.node-dot-a {
  background: var(--aqua);
}

.node-dot-b {
  background: var(--pink);
}

.result-panel,
.explanation {
  scroll-margin-top: 2rem;
  padding: clamp(4.5rem, 9vw, 8rem) 0;
  border-top: 1px solid var(--line);
}

.result-heading {
  max-width: 780px;
}

.result-heading h2,
.explanation h2 {
  margin: 0;
  font-size: clamp(2.6rem, 5.5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.result-heading > p:last-child {
  max-width: 46rem;
  color: #b7bed6;
  font-size: 1.12rem;
  line-height: 1.65;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  margin-top: 3rem;
}

.order-card,
.facts-card {
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.order-card-topline {
  display: flex;
  justify-content: space-between;
  color: #9fa7c4;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#velocity-output {
  color: var(--aqua);
}

#velocity-slider {
  width: 100%;
  margin: 2rem 0 0.75rem;
  accent-color: var(--aqua);
}

.velocity-labels {
  display: flex;
  justify-content: space-between;
  color: #68708d;
  font-size: 0.65rem;
}

.observer-answer {
  display: grid;
  gap: 0.35rem;
  margin-top: 2.5rem;
  padding: 1.4rem;
  border-radius: 1rem;
  background: rgba(5, 8, 24, 0.55);
}

.observer-answer span,
.observer-answer small {
  color: #8e96b4;
  font-size: 0.74rem;
}

.observer-answer strong {
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  letter-spacing: -0.035em;
}

.secondary-button {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(120, 246, 223, 0.25);
  border-radius: 999px;
  background: rgba(120, 246, 223, 0.06);
  color: var(--aqua);
  font-size: 0.76rem;
  font-weight: 750;
}

.facts-card dl {
  margin: 0;
}

.facts-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.facts-card dl div:first-child {
  padding-top: 0;
}

.facts-card dt {
  color: #8f97b4;
  font-size: 0.78rem;
}

.facts-card dd {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  text-align: right;
}

.certificate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--aqua);
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 0.24rem;
}

.physics-details {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(11, 15, 35, 0.62);
}

.physics-details summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  color: #cbd1e7;
  font-size: 0.85rem;
  font-weight: 750;
}

.physics-content {
  padding: 0 1.5rem 1.5rem;
  color: #aab1ca;
  line-height: 1.65;
}

.physics-content pre {
  max-height: 28rem;
  overflow: auto;
  padding: 1rem;
  border-radius: 0.8rem;
  background: #050712;
  color: #a8eedf;
  font-size: 0.7rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.explanation > h2 {
  max-width: 850px;
}

.explanation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 3.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--line);
}

.explanation-grid article {
  padding: 2rem;
  background: #0a0d1d;
}

.explanation-grid span {
  color: var(--aqua);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
}

.explanation-grid h3 {
  margin: 2.7rem 0 0.8rem;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
}

.explanation-grid p,
.honesty-note {
  color: #929ab6;
  font-size: 0.88rem;
  line-height: 1.65;
}

.honesty-note {
  max-width: 56rem;
  margin: 2rem 0 0;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: #717997;
  font-size: 0.76rem;
}

footer a {
  color: #aeb5ce;
}

@keyframes pulse-ring {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 5rem 0;
  }

  .experiment-shell {
    width: 100%;
  }

  .result-grid,
  .explanation-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-header,
  main,
  footer {
    width: min(100% - 1.5rem, 1200px);
  }

  .hero {
    padding-top: 3.5rem;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.7rem);
  }

  .globe {
    min-height: 240px;
  }

  .node-labels {
    padding-inline: 1rem;
  }

  .velocity-labels span:nth-child(2) {
    display: none;
  }

  .facts-card dl div {
    display: grid;
    gap: 0.35rem;
  }

  .facts-card dd {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
