:root {
  --font-ui: "Raleway", "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;

  --bg: #020406;
  --bg-alt: #070b0f;
  --surface: rgba(14, 18, 23, 0.9);
  --surface-strong: rgba(18, 24, 30, 0.96);
  --ink: #e2ebf3;
  --muted: #8ea3b2;
  --line: rgba(146, 169, 184, 0.24);
  --accent: #9cc7e2;
  --accent-soft: rgba(156, 199, 226, 0.14);
  --shadow-lg: 0 30px 74px rgba(0, 0, 0, 0.62);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.44);
  /*--silo-blur: 1.8px;*/
}

:root[data-theme="light"] {
  --bg: #f2f4f7;
  --bg-alt: #e4e9ef;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --ink: #1f2d3a;
  --muted: #6d7c8a;
  --line: rgba(53, 69, 84, 0.14);
  --accent: #315871;
  --accent-soft: rgba(49, 88, 113, 0.15);
  --shadow-lg: 0 22px 40px rgba(101, 118, 136, 0.18);
  --shadow-md: 0 10px 24px rgba(101, 118, 136, 0.14);
  /*--silo-blur: 1.1px;*/
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  line-height: 1.65;
  background:
    radial-gradient(circle at 14% 14%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 24%),
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.04), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.03), transparent 38%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-alt) 100%);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 34%),
    radial-gradient(circle at 86% 16%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-alt) 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.global-3d-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.global-3d-canvas,
.global-3d-fallback {
  position: absolute;
  inset: 0;
}

/*.global-3d-canvas {
  filter: blur(var(--silo-blur));
}*/

.global-3d-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.global-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.global-3d-fallback {
  display: grid;
  place-items: center;
}

.fallback-complex {
  width: min(700px, 78vw);
  height: min(700px, 78vw);
  position: relative;
  transform-style: preserve-3d;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.5));
}

.fallback-complex::before,
.fallback-complex::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px dashed rgba(147, 189, 217, 0.45);
}

.fallback-complex::before {
  width: 500px;
  height: 180px;
  top: 60%;
  transform: translateX(-50%) rotateX(74deg);
}

.fallback-complex::after {
  width: 560px;
  height: 210px;
  top: 55%;
  transform: translateX(-50%) rotateX(74deg);
}

.fallback-complex-core {
  position: absolute;
  left: 50%;
  top: 20%;
  width: 200px;
  height: 380px;
  transform: translateX(-50%) rotateX(8deg);
  border-radius: 120px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(181, 214, 235, 0.24), rgba(42, 60, 77, 0.25));
  animation: fallbackCoreSpin 10s linear infinite;
}

.fallback-complex-core::before,
.fallback-complex-core::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  height: 1px;
  background: rgba(181, 214, 235, 0.35);
  box-shadow: 0 34px 0 rgba(181, 214, 235, 0.24), 0 68px 0 rgba(181, 214, 235, 0.2), 0 102px 0 rgba(181, 214, 235, 0.18), 0 136px 0 rgba(181, 214, 235, 0.16), 0 170px 0 rgba(181, 214, 235, 0.14), 0 204px 0 rgba(181, 214, 235, 0.12), 0 238px 0 rgba(181, 214, 235, 0.1), 0 272px 0 rgba(181, 214, 235, 0.08), 0 306px 0 rgba(181, 214, 235, 0.07);
}

.fallback-complex-core::before {
  top: 16px;
}

.fallback-complex-core::after {
  top: 24px;
  opacity: 0.45;
}

.fallback-complex-ring {
  position: absolute;
  left: 50%;
  border: 1px solid rgba(148, 191, 217, 0.72);
  border-radius: 50%;
  transform: translateX(-50%) rotateX(76deg);
}

.ring-one {
  width: 420px;
  height: 155px;
  top: 66%;
  animation: fallbackPulse 4.4s ease-in-out infinite;
}

.ring-two {
  width: 340px;
  height: 124px;
  top: 72%;
  animation: fallbackPulse 5.2s ease-in-out infinite;
}

.ring-three {
  width: 280px;
  height: 98px;
  top: 77%;
  animation: fallbackPulse 6s ease-in-out infinite;
}

.fallback-complex-bridge {
  position: absolute;
  width: 160px;
  height: 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(153, 192, 214, 0.28);
}

.bridge-left {
  left: 23%;
  top: 54%;
  transform: rotate(-14deg);
}

.bridge-right {
  right: 23%;
  top: 47%;
  transform: rotate(14deg);
}

.fallback-complex-signal {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 20px;
  height: 350px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(177, 213, 236, 0.55), rgba(101, 140, 168, 0.16));
  transform: translateX(130px);
  animation: fallbackSignal 3.2s ease-in-out infinite;
}

.bg-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.shaft {
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 19%;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(150, 194, 220, 0.08), rgba(80, 112, 136, 0.02) 34%, rgba(121, 164, 190, 0.06));
  filter: blur(0.25px);
}

.shaft-a {
  left: 8%;
  transform: rotate(-2.2deg);
}

.shaft-b {
  left: 40%;
  transform: rotate(1deg);
}

.shaft-c {
  right: 11%;
  transform: rotate(-1.4deg);
}

.page-frame {
  position: fixed;
  inset: 12px;
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 2;
}

.container {
  width: min(1160px, 93vw);
  margin: 0 auto;
  position: relative;
  z-index: 4;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav {
  display: flex;
  gap: 16px;
}

.site-nav a {
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--ink) 88%, #9eb8ca 12%);
  transition: color 160ms ease, border-color 160ms ease;
}

.site-nav a.active {
  border-color: var(--accent);
}

.toggle-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-select {
  position: relative;
  display: inline-flex;
}

.color-select-trigger {
  width: 38px;
  height: 32px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.color-select-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.color-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  box-shadow: var(--shadow-md);
}

.color-select-menu[hidden] {
  display: none !important;
}

.color-chip,
.color-option {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.color-chip-current {
  background: var(--accent);
}

.color-option {
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.color-option[data-accent="#1e90ff"] { background: #1e90ff; }
.color-option[data-accent="#ff7a00"] { background: #ff7a00; }
.color-option[data-accent="#18c964"] { background: #18c964; }
.color-option[data-accent="#8a2be2"] { background: #8a2be2; }
.color-option[data-accent="#ff2d3d"] { background: #ff2d3d; }

.color-option.is-active {
  box-shadow: 0 0 0 2px #fff;
}

.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;
}

.theme-toggle {
  min-width: 78px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.motion-toggle {
  min-width: 98px;
}

.theme-toggle:hover {
  background: var(--accent-soft);
}

.theme-toggle:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.main-content {
  padding: 44px 0 58px;
  display: grid;
  gap: 20px;
}

.hero,
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 34px;
}

.hero-welcome {
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: center;
  gap: 28px;
  padding: 42px;
}

:root[data-theme="light"] .hero,
:root[data-theme="light"] .card,
:root[data-theme="light"] .telemetry-dock,
:root[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 249, 252, 0.92));
}

:root[data-theme="light"] .welcome-orbit-shell {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.6), transparent 56%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 74%);
}

:root[data-theme="light"] .welcome-orbit-card {
  background: rgba(247, 250, 253, 0.96);
  color: var(--ink);
}

.welcome-copy {
  max-width: 640px;
}

.welcome-logo {
  position: relative;
  width: 173px;
  height: 173px;
  margin-bottom: 18px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  background: rgba(255, 255, 255, 0.02);
  box-shadow:
    0 0 0 10px rgba(255, 255, 255, 0.015),
    0 18px 46px color-mix(in srgb, var(--accent) 14%, rgba(0, 0, 0, 0.3));
  animation: logoFloat 8s ease-in-out infinite;
}

.welcome-logo-core,
.welcome-logo-image {
  position: absolute;
}

.welcome-logo-core {
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.welcome-logo-core::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.welcome-logo-image {
  inset: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.28);
}

.welcome-lead {
  max-width: 540px;
  font-size: 1.08rem;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.welcome-orbit {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
}

.welcome-orbit-shell {
  width: min(34vw, 390px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05), transparent 54%),
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 74%);
  box-shadow:
    inset 0 0 0 22px rgba(255, 255, 255, 0.015),
    0 30px 80px rgba(0, 0, 0, 0.22);
  animation: orbitFloat 9s ease-in-out infinite;
}

.welcome-orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent) 38%, transparent);
  opacity: 0.58;
}

.ring-a {
  width: min(28vw, 320px);
  aspect-ratio: 1;
  animation: orbitSpin 22s linear infinite;
}

.ring-b {
  width: min(22vw, 250px);
  aspect-ratio: 1;
  animation: orbitSpinReverse 18s linear infinite;
}

.ring-c {
  width: min(16vw, 180px);
  aspect-ratio: 1;
  animation: orbitSpin 14s linear infinite;
}

.welcome-orbit-card {
  position: absolute;
  top: 50%;
  left: 50%;
  --orbit-label-radius: min(17vw, 195px);
  --orbit-label-angle: 0deg;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 74%, var(--line));
  background: rgba(10, 14, 20, 0.76);
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent),
    0 0 18px color-mix(in srgb, var(--accent) 16%, transparent);
  text-decoration: none;
  animation: orbitLabelSpin 120s linear infinite;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.welcome-orbit-card:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 92%, white);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent),
    0 0 24px color-mix(in srgb, var(--accent) 22%, transparent);
}

.card-a {
  --orbit-label-angle: -90deg;
}

.card-b {
  --orbit-label-angle: 150deg;
}

.card-c {
  --orbit-label-angle: 30deg;
}

.welcome-orbit-center {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.03);
}

.welcome-orbit-center-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--accent) 42%, transparent);
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -140px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 160, 188, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.hero.compact {
  padding: 26px;
}

.hero-spotlight {
  transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0);
  transition: transform 220ms ease-out;
}

.hero-console {
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: end;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero h1 {
  font-family: var(--font-ui);
  font-weight: 800;
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.14;
}

.hero p {
  margin: 0;
}

.hero-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 6px 10px;
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  border-radius: 4px;
}

.control-deck {
  position: relative;
  z-index: 2;
  width: 100%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 95%, transparent);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.control-deck-floating {
  position: fixed;
  right: 18px;
  bottom: 42px;
  width: min(360px, calc(100vw - 34px));
  max-height: min(78vh, 680px);
  overflow: auto;
  z-index: 1180;
}

.deck-head h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.2rem;
}

.deck-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.deck-floors {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.deck-floor {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(20, 30, 38, 0.72);
  color: var(--ink);
  padding: 8px 10px;
  font-size: 0.86rem;
  cursor: pointer;
}

:root[data-theme="light"] .deck-floor {
  background: rgba(255, 255, 255, 0.82);
}

.deck-floor.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.deck-status {
  margin-top: 12px;
}

.telemetry-list li {
  font-size: 0.86rem;
}

.telemetry-dock {
  position: fixed;
  right: 18px;
  bottom: 36px;
  width: min(360px, calc(100vw - 34px));
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 97%, transparent);
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
  backdrop-filter: blur(10px);
  z-index: 1190;
}

:root[data-theme="light"] .telemetry-dock {
  border-color: rgba(40, 52, 64, 0.18);
  background: rgba(255, 255, 255, 0.94);
  color: #1f2b36;
  box-shadow: 0 18px 42px rgba(60, 74, 92, 0.18);
}

:root[data-theme="light"] .telemetry-dock .kicker {
  color: #5a6876;
}

:root[data-theme="light"] .telemetry-list li {
  color: #263543;
}

:root[data-theme="light"] .telemetry-list strong:not(.metric) {
  color: #132230;
}

.has-custom-cursor,
.has-custom-cursor body,
.has-custom-cursor * {
  cursor: none !important;
}

:root[data-theme="dark"] .cursor-orbit {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 72%, #1d2530);
  background: rgba(20, 26, 34, 0.96);
  pointer-events: none;
  z-index: 2000;
  display: grid;
  place-items: center;
  transition: opacity 140ms ease, box-shadow 140ms ease;
  box-shadow:
    0 0 0 1px rgba(20, 26, 34, 0.28),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] .cursor-orbit {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 70%, #eef4fa);
  background: rgba(248, 251, 255, 0.96);
  pointer-events: none;
  z-index: 2000;
  display: grid;
  place-items: center;
  transition: opacity 140ms ease, box-shadow 140ms ease;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 22px color-mix(in srgb, var(--accent) 20%, rgba(0, 0, 0, 0.16));
}

.cursor-orbit-core {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 24%, transparent);
}

:root[data-theme="dark"] .cursor-orbit-core {
  background: color-mix(in srgb, var(--accent) 84%, #0c1116);
}

:root[data-theme="light"] .cursor-orbit-core {
  background: color-mix(in srgb, var(--accent) 86%, white);
}

.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1998;
  background: color-mix(in srgb, var(--accent) 68%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 34%, transparent);
  opacity: 0;
}

.cursor-orbit.is-hover {
  box-shadow:
    0 0 0 10px color-mix(in srgb, var(--accent) 12%, transparent),
    0 0 22px color-mix(in srgb, var(--accent) 26%, transparent);
}

.cursor-orbit.is-pressed {
  transform: scale(0.92);
}

.metric {
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 800;
}

.metric-good {
  background: rgba(43, 140, 82, 0.24);
  color: #8ce0ab;
}

.metric-warn {
  background: rgba(176, 115, 24, 0.24);
  color: #ffc982;
}

.metric-alert {
  background: rgba(167, 45, 45, 0.3);
  color: #ff9d9d;
}

:root[data-theme="light"] .metric-good {
  background: rgba(30, 139, 74, 0.18);
  color: #136d3c;
}

:root[data-theme="light"] .metric-warn {
  background: rgba(205, 125, 20, 0.2);
  color: #9b5b08;
}

:root[data-theme="light"] .metric-alert {
  background: rgba(214, 58, 58, 0.18);
  color: #b42323;
}

.muted.small {
  font-size: 0.82rem;
}

.signal-meter {
  margin: 8px 0 8px;
  height: 8px;
  border: 1px solid var(--line);
  background: rgba(72, 98, 120, 0.2);
  position: relative;
  overflow: hidden;
}

.signal-meter span {
  display: block;
  height: 100%;
  width: 65%;
  background: linear-gradient(90deg, #6a96b3, #b3e2ff);
  transition: width 360ms ease;
}

.kicker {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.stack {
  display: grid;
  gap: 12px;
}

.card {
  padding: 24px;
  border-radius: 4px;
}

.card h1,
.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-family: var(--font-ui);
  font-weight: 800;
}

.article-card p {
  margin-bottom: 1rem;
}

.markdown-article {
  margin-top: 18px;
}

.markdown-article h1,
.markdown-article h2,
.markdown-article h3,
.markdown-article h4 {
  margin: 1.4rem 0 0.8rem;
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1.15;
}

.markdown-article h1:first-child,
.markdown-article h2:first-child,
.markdown-article h3:first-child {
  margin-top: 0;
}

.markdown-article p,
.markdown-article ul,
.markdown-article ol,
.markdown-article pre {
  margin: 0 0 1rem;
}

.markdown-article ul,
.markdown-article ol {
  padding-left: 1.2rem;
}

.markdown-article li + li {
  margin-top: 0.35rem;
}

.markdown-article code {
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  border: 1px solid var(--line);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.94em;
}

.markdown-article pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
}

.markdown-article pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.markdown-article .diagram-box {
  margin: 0 0 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.82rem;
}

.tag-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.tag-outline {
  border-style: dashed;
}

.diagram-box {
  border: 1px solid var(--line);
  padding: 12px;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  overflow-x: auto;
}

.custom-svg svg {
  width: 100%;
  height: auto;
}

pre.mermaid {
  margin: 0;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.muted {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 34px;
  position: relative;
  z-index: 4;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

html[data-motion="off"] [data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}

html[data-motion="off"] .hero-spotlight,
html[data-motion="off"] .fallback-complex-core,
html[data-motion="off"] .fallback-complex-ring,
html[data-motion="off"] .fallback-complex-signal,
html[data-motion="off"] .signal-meter span,
html[data-motion="off"] .welcome-orbit-card {
  transition: none;
  animation: none;
}

.motion-paused .control-deck {
  opacity: 0.93;
}

@keyframes fallbackCoreSpin {
  0% {
    transform: translateX(-50%) rotateX(8deg) rotateY(0deg);
  }
  100% {
    transform: translateX(-50%) rotateX(8deg) rotateY(360deg);
  }
}

@keyframes fallbackPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: translateX(-50%) rotateX(76deg) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) rotateX(76deg) scale(1.08);
  }
}

@keyframes fallbackSignal {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.95;
  }
}

@media (max-width: 980px) {
  .two-columns,
  .three-columns {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .footer-inner {
    flex-direction: column;
  }

  .hero-console {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-welcome {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .welcome-orbit {
    min-height: 320px;
  }

  .welcome-orbit-shell {
    width: min(76vw, 340px);
  }

  .control-deck-floating {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    max-height: none;
    z-index: 2;
  }

  .telemetry-dock {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    z-index: 3;
  }

  .hero-copy {
    max-width: 100%;
  }

  .fallback-complex {
    transform: scale(0.82);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .welcome-orbit-shell,
  .ring-a,
  .ring-b,
  .ring-c {
    animation: none !important;
  }
}

.model-page {
  min-height: calc(100vh - 9rem);
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  align-items: stretch;
}

.model-viewer-shell {
  position: relative;
  min-height: 72vh;
  border: 1px solid rgba(145, 178, 206, 0.28);
  background: radial-gradient(circle at 20% 20%, rgba(73, 111, 143, 0.15), rgba(8, 12, 20, 0.7));
  box-shadow: inset 0 0 120px rgba(8, 20, 38, 0.72), 0 24px 70px rgba(0, 0, 0, 0.45);
}

.model-viewer-shell canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.model-hud {
  border: 1px solid rgba(145, 178, 206, 0.28);
  background: rgba(8, 14, 24, 0.78);
  backdrop-filter: blur(8px);
  padding: 1.2rem;
}

.model-hud h1 {
  margin-top: 0.3rem;
}

.model-hud ul {
  margin: 0.8rem 0 0;
  padding-left: 1rem;
}

@keyframes orbitFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes orbitLabelSpin {
  from {
    transform:
      translate(-50%, -50%)
      rotate(var(--orbit-label-angle))
      translateX(var(--orbit-label-radius))
      rotate(calc(-1 * var(--orbit-label-angle)));
  }
  to {
    transform:
      translate(-50%, -50%)
      rotate(calc(var(--orbit-label-angle) + 360deg))
      translateX(var(--orbit-label-radius))
      rotate(calc(-1 * (var(--orbit-label-angle) + 360deg)));
  }
}


@keyframes orbitSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbitSpinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@media (max-width: 980px) {
  .model-page {
    grid-template-columns: 1fr;
  }

  .model-viewer-shell {
    min-height: 58vh;
  }
}

@keyframes pixelNoiseJitter {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }
  20% {
    background-position: 1px -1px, -14px 10px, 1px 0, 0 1px;
  }
  40% {
    background-position: -1px 1px, 9px -11px, -1px 1px, 1px -1px;
  }
  60% {
    background-position: 1px 1px, -10px -7px, 0 -1px, -1px 0;
  }
  80% {
    background-position: -1px 0, 11px 13px, 1px 1px, -1px -1px;
  }
  100% {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }
}

@keyframes pixelNoiseFlicker {
  0% {
    opacity: 0.3;
  }
  30% {
    opacity: 0.36;
  }
  55% {
    opacity: 0.32;
  }
  80% {
    opacity: 0.38;
  }
  100% {
    opacity: 0.31;
  }
}
