:root {
  --night: #060b14;
  --night-2: #091421;
  --night-3: #0f1f31;
  --ice: #eef7ff;
  --ice-soft: #c8d8e7;
  --muted: #8ea7b8;
  --line: rgba(184, 222, 255, 0.18);
  --line-strong: rgba(211, 238, 255, 0.34);
  --emerald: #3dffb0;
  --emerald-soft: rgba(61, 255, 176, 0.44);
  --violet: #9d7bff;
  --violet-soft: rgba(157, 123, 255, 0.42);
  --cyan: #91f5ff;
  --cyan-soft: rgba(145, 245, 255, 0.30);
  --warning: #ffd887;
  --kp-level: 0.486;
  --kp-emerald-alpha: 0.12;
  --kp-violet-alpha: 0.14;
  --kp-sky-opacity: 0.25;
  --kp-moon-alpha: 0.11;
  --kp-horizon-alpha: 0.11;
  --kp-title-glow: 148px;
  --kp-rail-alpha: 0.08;
  --kp-console-alpha: 0.18;
  --kp-console-glow: 44px;
  --kp-console-shadow-alpha: 0.11;
  --kp-status-border-alpha: 0.36;
  --kp-status-emerald-alpha: 0.10;
  --kp-status-violet-alpha: 0.07;
  --probe-x: 50%;
  --probe-y: 24%;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max: 1180px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-color: rgba(61, 255, 176, 0.45) #02050a;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #02050a;
}

::-webkit-scrollbar-thumb {
  border: 3px solid #02050a;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(61, 255, 176, 0.76), rgba(157, 123, 255, 0.58));
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--emerald), rgba(157, 123, 255, 0.82));
}

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 76% 6%, rgba(157, 123, 255, var(--kp-violet-alpha)), transparent 36rem),
    radial-gradient(circle at 18% 10%, rgba(61, 255, 176, var(--kp-emerald-alpha)), transparent 32rem),
    linear-gradient(180deg, #02040a 0%, var(--night) 30%, #071321 64%, #03070d 100%);
  color: var(--ice);
  font-family: var(--font-display);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  font-kerning: normal;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 79;
  pointer-events: none;
  opacity: 0.24;
  background:
    linear-gradient(90deg, transparent 0 49.9%, rgba(238, 247, 255, 0.08) 50%, transparent 50.12%),
    linear-gradient(0deg, transparent 0 49.9%, rgba(238, 247, 255, 0.05) 50%, transparent 50.12%);
  background-size: 84px 84px;
  mask-image: linear-gradient(180deg, transparent 0%, black 22%, transparent 86%);
}

body.storming {
  --emerald-soft: rgba(61, 255, 176, 0.72);
  --violet-soft: rgba(157, 123, 255, 0.66);
}

body.kp-extreme {
  --cyan-soft: rgba(145, 245, 255, 0.50);
}

body.storm-flash::before {
  opacity: 0.18;
}

a {
  color: var(--ice);
  text-decoration-color: rgba(61, 255, 176, 0.54);
  text-underline-offset: 0.22em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

a:hover {
  color: var(--emerald);
}

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 4px;
  border-radius: 4px;
}

::selection {
  background: var(--emerald);
  color: #00120c;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
td,
li {
  text-wrap: pretty;
}

.brand-code,
.hero-rail b,
.console-head output,
.console-grid b,
.quick-telemetry b,
.chart-stats b,
.kp-pill,
.diary-entry time,
.signal-stack b,
.guide-ledger b {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: 14px;
  z-index: 200;
  transform: translateY(-140%);
  opacity: 0;
  padding: 12px 16px;
  background: #02050a;
  border: 1px solid var(--emerald);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.skip-link:focus {
  transform: none;
  opacity: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(184, 222, 255, 0.16);
  background: rgba(4, 9, 17, 0.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ice);
  text-decoration: none;
}

.brand-sigil {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(61, 255, 176, 0.6);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  box-shadow: 0 0 24px rgba(61, 255, 176, 0.18), inset 0 0 18px rgba(61, 255, 176, 0.12);
  background: linear-gradient(135deg, rgba(61, 255, 176, 0.10), rgba(157, 123, 255, 0.05));
}

.brand-name,
.brand-code {
  display: block;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-code {
  margin-top: -2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ice-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-nav a:hover {
  border-color: rgba(61, 255, 176, 0.36);
  color: var(--emerald);
  background: rgba(61, 255, 176, 0.08);
  box-shadow: inset 0 0 18px rgba(61, 255, 176, 0.06);
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.58fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(42px, 8vh, 88px) clamp(16px, 5vw, 76px) clamp(104px, 15vh, 150px);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: var(--kp-sky-opacity);
  background:
    linear-gradient(100deg, transparent 0 12%, rgba(145, 245, 255, 0.13) 18%, transparent 24% 48%, rgba(61, 255, 176, 0.10) 56%, transparent 66%),
    radial-gradient(ellipse at 47% 88%, rgba(238, 247, 255, 0.13), transparent 37%);
  mix-blend-mode: screen;
  mask-image: linear-gradient(180deg, black 0%, black 72%, transparent 96%);
}

.aurora-stage,
.aurora-stage canvas,
.sky-fallback,
.sky-grain,
.moon-ring {
  position: absolute;
  inset: 0;
}

.aurora-stage {
  z-index: -3;
  background:
    radial-gradient(circle at 48% 4%, rgba(238, 247, 255, var(--kp-moon-alpha)), transparent 13rem),
    radial-gradient(ellipse at 50% 70%, rgba(61, 255, 176, var(--kp-horizon-alpha)), transparent 54rem),
    linear-gradient(180deg, #02040a 0%, #060b14 54%, #0a1422 100%);
}

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

.sky-fallback {
  background:
    radial-gradient(circle at 20% 16%, rgba(238, 247, 255, 0.75) 0 1px, transparent 2px),
    radial-gradient(circle at 71% 24%, rgba(238, 247, 255, 0.64) 0 1px, transparent 2px),
    radial-gradient(circle at 83% 13%, rgba(238, 247, 255, 0.42) 0 1px, transparent 2px),
    radial-gradient(circle at 42% 20%, rgba(238, 247, 255, 0.38) 0 1px, transparent 2px),
    linear-gradient(110deg, transparent 15%, rgba(61, 255, 176, 0.16) 36%, transparent 58%),
    linear-gradient(82deg, transparent 36%, rgba(157, 123, 255, 0.12) 52%, transparent 71%);
  background-size: auto, auto, auto, auto, 100% 100%, 100% 100%;
  opacity: 0.66;
}

.sky-grain {
  opacity: 0.22;
  background:
    repeating-linear-gradient(90deg, rgba(238, 247, 255, 0.08) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, transparent 0%, rgba(3, 7, 14, 0.38) 52%, rgba(3, 7, 14, 0.88) 100%);
  mix-blend-mode: soft-light;
}

.moon-ring {
  width: 38rem;
  height: 38rem;
  left: auto;
  right: max(-18rem, -12vw);
  top: -14rem;
  border: 1px solid rgba(238, 247, 255, 0.08);
  border-radius: 50%;
  box-shadow: inset 0 0 90px rgba(157, 123, 255, 0.08), 0 0 120px rgba(61, 255, 176, 0.05);
}

.load-line {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 100%;
  height: 2px;
  transform-origin: left;
  background: linear-gradient(90deg, transparent, var(--emerald), var(--violet), transparent);
  animation: loadSweep 1600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ion-probe {
  position: absolute;
  left: var(--probe-x);
  top: var(--probe-y);
  z-index: 1;
  width: 0;
  height: 0;
  pointer-events: none;
  opacity: 0.64;
  filter: drop-shadow(0 0 22px rgba(61, 255, 176, 0.26));
  transform: translate3d(0, 0, 0);
  transition: opacity 260ms ease, filter 260ms ease;
  animation: probeWake 1800ms 520ms cubic-bezier(0.16, 0.84, 0.28, 1) both;
}

.ion-probe::before,
.ion-probe::after {
  content: "";
  position: absolute;
  background: var(--emerald);
  opacity: 0.58;
}

.ion-probe::before {
  left: 0;
  top: -44svh;
  width: 1px;
  height: 96svh;
  background: linear-gradient(180deg, transparent, rgba(61, 255, 176, 0.72), rgba(157, 123, 255, 0.35), transparent);
  box-shadow: 0 0 24px rgba(61, 255, 176, 0.34), 18px 0 0 rgba(238, 247, 255, 0.06);
}

.ion-probe::after {
  left: -70px;
  top: 0;
  width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(238, 247, 255, 0.82), transparent);
}

.probe-card {
  position: absolute;
  left: 14px;
  top: -40px;
  width: clamp(168px, 16vw, 218px);
  padding: 10px 12px 11px;
  border: 1px solid rgba(184, 222, 255, 0.22);
  border-left-color: rgba(61, 255, 176, 0.82);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(61, 255, 176, 0.12), rgba(157, 123, 255, 0.08)),
    rgba(3, 8, 15, 0.72);
  box-shadow: inset 0 0 24px rgba(61, 255, 176, 0.06), 0 20px 54px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.ion-probe.is-left .probe-card {
  left: auto;
  right: 14px;
}

.probe-kicker,
.probe-card span:last-child {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.probe-card b {
  display: block;
  margin: 4px 0 3px;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ion-probe.is-active,
.ion-probe.is-pinned {
  opacity: 0.98;
  filter: drop-shadow(0 0 34px rgba(61, 255, 176, 0.42)) drop-shadow(0 0 58px rgba(157, 123, 255, 0.18));
}

.ion-probe.is-pinned .probe-card {
  border-color: rgba(238, 247, 255, 0.52);
}

.ion-probe.is-redline .probe-card {
  border-left-color: rgba(157, 123, 255, 0.95);
  box-shadow:
    inset 0 0 30px rgba(157, 123, 255, 0.10),
    0 0 48px rgba(61, 255, 176, 0.20),
    0 0 80px rgba(157, 123, 255, 0.16);
}

.hero-copy,
.kp-console {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 720px;
  align-self: center;
  position: relative;
}

.hero-copy::before {
  content: "MAG-OBS / KP9 / POLAR NIGHT";
  position: absolute;
  left: -28px;
  top: 6px;
  writing-mode: vertical-rl;
  transform: translateX(-100%);
  color: rgba(238, 247, 255, 0.42);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--ice);
  font-size: clamp(4.9rem, 14.6vw, 13.8rem);
  font-weight: 200;
  line-height: 0.78;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 34px rgba(61, 255, 176, 0.20),
    0 0 78px rgba(157, 123, 255, 0.14),
    0 0 var(--kp-title-glow) rgba(145, 245, 255, 0.10);
}

.hero-lede {
  max-width: 590px;
  margin: 30px 0 0;
  color: var(--ice-soft);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  font-weight: 300;
  line-height: 1.45;
}

.hero-rail {
  width: min(100%, 680px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(184, 222, 255, 0.18);
  background: rgba(184, 222, 255, 0.12);
  box-shadow: 0 0 42px rgba(61, 255, 176, var(--kp-rail-alpha));
}

.hero-rail div {
  min-height: 72px;
  padding: 14px 16px;
  background:
    linear-gradient(135deg, rgba(61, 255, 176, 0.08), rgba(157, 123, 255, 0.04)),
    rgba(2, 6, 12, 0.72);
}

.hero-rail span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-rail b {
  display: block;
  margin-top: 6px;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: clamp(0.92rem, 1.8vw, 1.24rem);
  font-weight: 500;
}

.kp-console {
  align-self: end;
  margin-bottom: 5vh;
  padding: 18px;
  border: 1px solid rgba(184, 222, 255, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at var(--kp-console-x, 48%) 0%, rgba(61, 255, 176, var(--kp-console-alpha)), transparent 18rem),
    linear-gradient(180deg, rgba(9, 20, 33, 0.76), rgba(4, 9, 17, 0.88)),
    repeating-linear-gradient(90deg, rgba(238, 247, 255, 0.04) 0 1px, transparent 1px 26px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.34),
    0 0 var(--kp-console-glow) rgba(61, 255, 176, var(--kp-console-shadow-alpha)),
    inset 0 0 34px rgba(61, 255, 176, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.kp-extreme .kp-console {
  border-color: rgba(238, 247, 255, 0.54);
  box-shadow:
    0 36px 110px rgba(0, 0, 0, 0.46),
    0 0 88px rgba(61, 255, 176, 0.22),
    0 0 130px rgba(157, 123, 255, 0.18),
    inset 0 0 44px rgba(238, 247, 255, 0.08);
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(184, 222, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console-head output {
  color: var(--emerald);
  font-size: 1.05rem;
  text-shadow: 0 0 20px var(--emerald-soft);
}

.range-wrap {
  display: block;
  padding: 18px 0 16px;
}

.range-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input[type="range"] {
  width: 100%;
  min-height: 44px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  accent-color: var(--emerald);
}

input[type="range"]:focus-visible {
  outline: 2px solid rgba(61, 255, 176, 0.92);
  outline-offset: 8px;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid rgba(238, 247, 255, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(61, 255, 176, 0.40), rgba(61, 255, 176, 0.96) var(--range-progress, 49%), rgba(157, 123, 255, 0.54), #f8fbff),
    #0b1522;
  box-shadow: 0 0 24px rgba(61, 255, 176, 0.15);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border: 2px solid #f8fbff;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 18%, var(--emerald) 20% 48%, #042015 52%);
  box-shadow: 0 0 28px var(--emerald-soft), 0 0 70px var(--violet-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

input[type="range"]:focus-visible::-webkit-slider-thumb,
input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.08);
}

input[type="range"]::-moz-range-track {
  height: 8px;
  border: 1px solid rgba(238, 247, 255, 0.24);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(61, 255, 176, 0.28), rgba(61, 255, 176, 0.9), rgba(157, 123, 255, 0.9), #f8fbff);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 2px solid #f8fbff;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 28px var(--emerald-soft), 0 0 70px var(--violet-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.console-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.console-grid div,
.quick-telemetry div,
.signal-stack div,
.chart-stats span {
  border: 1px solid rgba(184, 222, 255, 0.15);
  border-radius: 6px;
  background: rgba(4, 9, 17, 0.48);
}

.console-grid div {
  min-height: 78px;
  padding: 12px;
}

.console-grid span,
.quick-telemetry span,
.note-tile span,
.signal-stack span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console-grid b,
.quick-telemetry b,
.signal-stack b {
  display: block;
  margin-top: 5px;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 500;
}

.storm-status {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(61, 255, 176, var(--kp-status-border-alpha));
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(61, 255, 176, var(--kp-status-emerald-alpha)), rgba(157, 123, 255, var(--kp-status-violet-alpha))),
    rgba(2, 6, 12, 0.62);
}

.storm-status span {
  display: block;
  color: var(--ice-soft);
  font-size: 0.86rem;
}

.storm-status b {
  display: block;
  margin-top: 4px;
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.station-silhouette {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: min(33vh, 280px);
}

.snow-ridge {
  position: absolute;
  left: -3vw;
  right: -3vw;
  bottom: 0;
  height: 58%;
  background: linear-gradient(180deg, #eaf5ff, #8aa6bc 44%, #182a3b 100%);
  clip-path: polygon(0 56%, 8% 48%, 18% 53%, 28% 31%, 39% 43%, 50% 22%, 63% 46%, 74% 34%, 86% 48%, 100% 28%, 100% 100%, 0 100%);
  opacity: 0.88;
  filter: drop-shadow(0 -8px 32px rgba(238, 247, 255, 0.10));
}

.ridge-back {
  bottom: 42px;
  opacity: 0.24;
  transform: scaleX(1.06);
  filter: blur(1px);
}

.ridge-front {
  height: 49%;
}

.hut {
  position: absolute;
  right: clamp(38px, 12vw, 220px);
  bottom: clamp(52px, 8vh, 78px);
  width: clamp(120px, 16vw, 220px);
  height: clamp(82px, 10vw, 130px);
}

.hut-body,
.hut-roof,
.hut-window,
.hut-door,
.hut-shadow {
  position: absolute;
  display: block;
}

.hut-body {
  left: 12%;
  right: 10%;
  bottom: 0;
  height: 62%;
  border: 1px solid rgba(238, 247, 255, 0.42);
  background:
    linear-gradient(90deg, rgba(238, 247, 255, 0.10) 0 1px, transparent 1px 16px),
    linear-gradient(180deg, #13273a, #07101b);
  box-shadow: inset 0 0 24px rgba(61, 255, 176, 0.04), 0 16px 34px rgba(0, 0, 0, 0.44);
}

.hut-roof {
  left: 3%;
  right: 2%;
  top: 9%;
  height: 32%;
  background: linear-gradient(180deg, #f6fbff, #7795aa 48%, #23384c 52%);
  clip-path: polygon(6% 100%, 18% 20%, 74% 0, 96% 100%);
  box-shadow: 0 0 24px rgba(238, 247, 255, 0.16);
}

.hut-window {
  left: 28%;
  bottom: 30%;
  width: 26%;
  height: 24%;
  border: 1px solid rgba(61, 255, 176, 0.62);
  background: radial-gradient(circle, rgba(61, 255, 176, 0.95), rgba(61, 255, 176, 0.24) 55%, rgba(3, 9, 15, 0.9));
  box-shadow: 0 0 22px rgba(61, 255, 176, 0.42);
}

.hut-door {
  right: 18%;
  bottom: 0;
  width: 22%;
  height: 46%;
  border: 1px solid rgba(238, 247, 255, 0.18);
  background: #050b13;
}

.hut-shadow {
  left: -18%;
  right: -28%;
  bottom: -10%;
  height: 18%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.62), transparent 72%);
}

.mast {
  position: absolute;
  bottom: 72px;
  width: 2px;
  height: clamp(120px, 22vw, 270px);
  background: linear-gradient(180deg, rgba(238, 247, 255, 0.7), rgba(238, 247, 255, 0.1));
}

.mast span {
  position: absolute;
  left: 50%;
  top: 0;
  width: 54px;
  height: 1px;
  transform: translateX(-50%);
  background: rgba(238, 247, 255, 0.55);
  box-shadow: 0 24px 0 rgba(238, 247, 255, 0.36), 0 48px 0 rgba(238, 247, 255, 0.22);
}

.mast-left {
  left: clamp(42px, 13vw, 190px);
}

.mast-right {
  right: clamp(88px, 28vw, 420px);
  height: clamp(92px, 16vw, 200px);
}

.guy-line {
  position: absolute;
  bottom: 70px;
  width: 1px;
  height: 210px;
  background: rgba(238, 247, 255, 0.18);
  transform-origin: bottom;
}

.line-a {
  left: clamp(42px, 13vw, 190px);
  transform: rotate(24deg);
}

.line-b {
  right: clamp(88px, 28vw, 420px);
  transform: rotate(-22deg);
}

.antenna-array {
  position: absolute;
  left: clamp(124px, 30vw, 460px);
  bottom: 68px;
  display: flex;
  gap: 28px;
  align-items: flex-end;
}

.antenna-array span {
  width: 2px;
  height: 48px;
  background: rgba(238, 247, 255, 0.48);
}

.antenna-array span:nth-child(2) {
  height: 76px;
}

.antenna-array span:nth-child(3) {
  height: 36px;
}

.section {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(58px, 8vw, 110px) clamp(18px, 4vw, 34px);
}

.section::after {
  content: "";
  position: absolute;
  inset: 18% auto auto clamp(18px, 4vw, 34px);
  width: 18px;
  height: 1px;
  background: rgba(238, 247, 255, 0.34);
  box-shadow:
    32px 0 0 rgba(61, 255, 176, 0.20),
    0 26px 0 rgba(238, 247, 255, 0.18),
    44px 26px 0 rgba(157, 123, 255, 0.16);
  opacity: 0.7;
  pointer-events: none;
}

.section::before {
  content: "";
  position: absolute;
  left: clamp(18px, 4vw, 34px);
  right: clamp(18px, 4vw, 34px);
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61, 255, 176, 0.34), rgba(157, 123, 255, 0.18), transparent);
}

.section-title {
  max-width: 760px;
}

.section-title h2,
.closing-copy h2 {
  margin: 0;
  color: var(--ice);
  font-size: clamp(2.5rem, 6.6vw, 6.4rem);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.65fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: start;
}

.intro-text {
  color: var(--ice-soft);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  font-weight: 300;
}

.intro-text p {
  margin: 0 0 1.15em;
}

.quick-telemetry {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 0.85fr 1.1fr;
  gap: 1px;
  padding: 1px;
  border: 1px solid rgba(184, 222, 255, 0.18);
  background: rgba(184, 222, 255, 0.12);
}

.quick-telemetry div {
  min-height: 112px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(61, 255, 176, 0.09), rgba(157, 123, 255, 0.05)),
    rgba(4, 9, 17, 0.62);
}

.quick-telemetry div:first-child,
.quick-telemetry div:last-child {
  background:
    linear-gradient(135deg, rgba(61, 255, 176, 0.15), rgba(145, 245, 255, 0.04)),
    rgba(4, 9, 17, 0.72);
}

.quick-telemetry b {
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
}

.instrument-section {
  max-width: 1260px;
}

.instrument-layout {
  display: grid;
  grid-template-columns: 1.14fr 0.9fr 1.08fr 0.96fr;
  gap: 12px;
  margin-top: 46px;
  align-items: start;
}

.instrument-card,
.note-tile,
.diary-entry {
  position: relative;
  min-height: 330px;
  padding: 22px;
  border: 1px solid rgba(184, 222, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(61, 255, 176, 0.10), transparent 13rem),
    linear-gradient(180deg, rgba(13, 28, 45, 0.66), rgba(5, 11, 20, 0.82));
  box-shadow: inset 0 1px 0 rgba(238, 247, 255, 0.06);
  overflow: hidden;
}

.instrument-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.36;
  background:
    linear-gradient(90deg, rgba(238, 247, 255, 0.08) 0 1px, transparent 1px 22px),
    radial-gradient(circle at 18% 88%, rgba(61, 255, 176, 0.20), transparent 7rem);
  mask-image: linear-gradient(180deg, transparent 0%, black 28%, transparent 100%);
}

.instrument-card::after,
.diary-entry::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--emerald), transparent, var(--violet));
  opacity: 0.58;
}

.instrument-card:nth-child(even) {
  transform: translateY(42px);
  background:
    radial-gradient(circle at 80% 0%, rgba(157, 123, 255, 0.12), transparent 13rem),
    linear-gradient(180deg, rgba(13, 28, 45, 0.66), rgba(5, 11, 20, 0.82));
}

.instrument-card:nth-child(1) {
  min-height: 390px;
}

.instrument-card:nth-child(3) {
  margin-top: -34px;
  min-height: 365px;
}

.instrument-card:nth-child(4) {
  margin-top: 64px;
}

.instrument-number {
  display: block;
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.instrument-card h3,
.chart-head h3,
.diary-entry h3 {
  margin: 16px 0 12px;
  color: var(--ice);
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1.05;
}

.instrument-card p,
.note-tile p,
.diary-entry p,
.closing-copy p {
  color: var(--ice-soft);
  font-weight: 300;
}

.instrument-card dl {
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}

.instrument-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 9px;
  border-top: 1px solid rgba(184, 222, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.instrument-card dt {
  color: var(--muted);
}

.instrument-card dd {
  margin: 0;
  color: var(--ice);
}

.chart-section {
  max-width: 1280px;
  padding-bottom: clamp(30px, 3.5vw, 52px);
}

.forecast-section {
  padding-top: clamp(36px, 4.5vw, 62px);
}

.chart-board {
  margin-top: 36px;
  padding: clamp(14px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(5, 13, 23, 0.84), rgba(3, 7, 13, 0.94)),
    repeating-linear-gradient(90deg, rgba(238, 247, 255, 0.035) 0 1px, transparent 1px 28px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32), inset 0 0 40px rgba(61, 255, 176, 0.04);
  position: relative;
  overflow: hidden;
}

.chart-board::before {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--emerald), var(--cyan), var(--violet), transparent);
  opacity: 0.64;
  filter: blur(0.5px);
}

.chart-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.mono-label {
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chart-head h3 {
  margin: 7px 0 0;
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
}

.chart-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chart-stats span {
  min-width: 112px;
  padding: 10px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.chart-stats b {
  color: var(--ice);
  font-size: 1rem;
  font-weight: 500;
}

#magChart {
  width: 100%;
  height: clamp(210px, 34vw, 360px);
  display: block;
  border: 1px solid rgba(184, 222, 255, 0.16);
  border-radius: 6px;
  background: #02060b;
}

.chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.forecast-wrap {
  margin-top: 36px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 9, 17, 0.58);
  box-shadow: inset 0 0 34px rgba(61, 255, 176, 0.035);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-family: var(--font-mono);
}

caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

th,
td {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(184, 222, 255, 0.12);
  text-align: left;
  vertical-align: top;
  font-size: 0.82rem;
}

thead th {
  color: var(--emerald);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: rgba(61, 255, 176, 0.05);
}

tbody th {
  color: var(--ice);
  font-weight: 600;
}

tbody td {
  color: var(--ice-soft);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.kp-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(61, 255, 176, 0.35);
  border-radius: 999px;
  color: var(--emerald);
  background: rgba(61, 255, 176, 0.08);
  white-space: nowrap;
}

.kp-pill.hot {
  border-color: rgba(157, 123, 255, 0.56);
  color: #d9cdff;
  background: rgba(157, 123, 255, 0.12);
}

.forecast-notes {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 12px;
  margin-top: 12px;
}

.note-tile {
  min-height: auto;
}

.note-tile b {
  display: block;
  margin: 9px 0 10px;
  color: var(--ice);
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.15;
}

.diary-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 12px;
  margin-top: 40px;
}

.diary-entry {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.diary-entry:nth-child(2) {
  margin-top: 78px;
}

.diary-entry:nth-child(3) {
  margin-top: 26px;
}

.diary-entry time {
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
}

.closing-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.62fr);
  gap: clamp(30px, 7vw, 100px);
  align-items: center;
  padding-bottom: clamp(90px, 14vw, 170px);
  overflow: hidden;
  max-width: 1320px;
}

.closing-section::after {
  content: "";
  position: absolute;
  right: clamp(18px, 9vw, 130px);
  top: 12%;
  bottom: 12%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(61, 255, 176, 0.55), rgba(157, 123, 255, 0.35), transparent);
  box-shadow: -28px 60px 0 rgba(61, 255, 176, 0.10), 38px 120px 0 rgba(157, 123, 255, 0.10);
  opacity: 0.8;
}

.closing-copy p:last-child {
  max-width: 560px;
  margin-top: 24px;
  font-size: 1.16rem;
}

.closing-instrument {
  position: relative;
  z-index: 1;
}

.storm-aperture {
  min-height: 240px;
  position: relative;
  margin-bottom: -42px;
  border: 1px solid rgba(184, 222, 255, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(61, 255, 176, 0.17), transparent 54%),
    linear-gradient(180deg, rgba(7, 17, 30, 0.78), rgba(2, 6, 12, 0.92));
  box-shadow: inset 0 0 70px rgba(61, 255, 176, 0.07);
}

.storm-aperture::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(238, 247, 255, 0.12) 49%, transparent 50%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(238, 247, 255, 0.045) 39px 40px);
  opacity: 0.7;
}

.storm-aperture span {
  position: absolute;
  left: 8%;
  bottom: 10%;
  width: 9%;
  height: 86%;
  border-radius: 999px 999px 30px 30px;
  background: linear-gradient(180deg, transparent, rgba(61, 255, 176, 0.08), rgba(61, 255, 176, 0.60), rgba(157, 123, 255, 0.12), transparent);
  filter: blur(2px);
  mix-blend-mode: screen;
  transform: skewX(-6deg);
  animation: apertureBreath 4200ms ease-in-out infinite alternate;
}

.storm-aperture span:nth-child(1) { left: 8%; animation-delay: -900ms; }
.storm-aperture span:nth-child(2) { left: 25%; animation-delay: -1500ms; width: 13%; }
.storm-aperture span:nth-child(3) { left: 47%; animation-delay: -300ms; }
.storm-aperture span:nth-child(4) { left: 64%; animation-delay: -2100ms; width: 12%; }
.storm-aperture span:nth-child(5) { left: 82%; animation-delay: -600ms; }

.signal-stack {
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.signal-stack div {
  position: relative;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(61, 255, 176, 0.10), transparent 48%, rgba(157, 123, 255, 0.10)),
    rgba(4, 9, 17, 0.58);
}

.signal-stack div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: linear-gradient(180deg, var(--emerald), var(--violet));
  opacity: 0.75;
}

.signal-stack div:nth-child(2),
.signal-stack div:nth-child(4) {
  transform: translateX(24px);
}

.signal-stack b {
  font-size: 1.1rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 44px);
  border-top: 1px solid rgba(184, 222, 255, 0.16);
  background:
    linear-gradient(90deg, rgba(61, 255, 176, 0.06), transparent 38%, rgba(157, 123, 255, 0.07)),
    #03070d;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
}

.site-footer a {
  color: var(--ice-soft);
}

.site-footer a:hover {
  color: var(--emerald);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 720ms ease, transform 720ms cubic-bezier(0.18, 0.84, 0.26, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero-copy.reveal {
  transition-delay: 140ms;
}

.kp-console.reveal {
  transition-delay: 420ms;
}

.guide-hero {
  min-height: 64svh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(280px, 0.52fr);
  align-items: end;
  gap: clamp(28px, 6vw, 88px);
  padding: clamp(86px, 12vw, 142px) clamp(18px, 5vw, 76px) clamp(64px, 8vw, 96px);
  background:
    radial-gradient(circle at 73% 18%, rgba(157, 123, 255, 0.16), transparent 25rem),
    radial-gradient(circle at 22% 18%, rgba(61, 255, 176, 0.16), transparent 28rem),
    linear-gradient(180deg, #02050b 0%, #07101b 72%, #03070d 100%);
  overflow: hidden;
}

.guide-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.76;
  background:
    linear-gradient(96deg, transparent 7%, rgba(61, 255, 176, 0.20) 16%, transparent 27%),
    linear-gradient(88deg, transparent 43%, rgba(157, 123, 255, 0.18) 55%, transparent 68%),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(238, 247, 255, 0.05) 47px 48px);
  mask-image: linear-gradient(180deg, black 0%, black 72%, transparent 98%);
}

.guide-hero::after {
  content: "";
  position: absolute;
  right: min(8vw, 110px);
  bottom: 12%;
  width: min(36vw, 430px);
  aspect-ratio: 1;
  border: 1px solid rgba(61, 255, 176, 0.18);
  border-radius: 50%;
  box-shadow: inset 0 0 80px rgba(61, 255, 176, 0.06), 0 0 90px rgba(157, 123, 255, 0.08);
}

.guide-hero-copy,
.guide-schematic {
  position: relative;
  z-index: 1;
}

.guide-hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(3.4rem, 9.4vw, 8.8rem);
  font-weight: 200;
  line-height: 0.86;
  text-transform: uppercase;
}

.guide-hero-copy p:last-child {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--ice-soft);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 300;
}

.guide-schematic {
  min-height: 360px;
  border: 1px solid rgba(184, 222, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(238, 247, 255, 0.05), transparent 28%),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(238, 247, 255, 0.055) 35px 36px),
    rgba(2, 6, 12, 0.38);
  box-shadow: inset 0 0 70px rgba(61, 255, 176, 0.06);
}

.guide-schematic span {
  position: absolute;
  bottom: 0;
  width: 12%;
  height: 78%;
  border-radius: 999px 999px 24px 24px;
  background: linear-gradient(180deg, transparent, rgba(61, 255, 176, 0.14), rgba(61, 255, 176, 0.72), rgba(157, 123, 255, 0.16), transparent);
  filter: blur(2px);
  mix-blend-mode: screen;
  animation: apertureBreath 5200ms ease-in-out infinite alternate;
}

.guide-schematic span:nth-child(1) { left: 9%; animation-delay: -1200ms; }
.guide-schematic span:nth-child(2) { left: 27%; width: 16%; animation-delay: -600ms; }
.guide-schematic span:nth-child(3) { left: 49%; animation-delay: -2100ms; }
.guide-schematic span:nth-child(4) { left: 66%; width: 14%; animation-delay: -300ms; }
.guide-schematic span:nth-child(5) { left: 84%; animation-delay: -1700ms; }

.guide-body {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(28px, 6vw, 76px);
  padding: clamp(56px, 9vw, 110px) clamp(20px, 5vw, 36px);
}

.guide-ledger {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  display: grid;
  gap: 1px;
  padding: 1px;
  border: 1px solid rgba(184, 222, 255, 0.16);
  background: rgba(184, 222, 255, 0.12);
}

.guide-ledger div {
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(61, 255, 176, 0.08), rgba(157, 123, 255, 0.04)),
    rgba(3, 8, 15, 0.78);
}

.guide-ledger span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-ledger b {
  display: block;
  margin-top: 5px;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 500;
}

.guide-body article {
  display: grid;
  gap: 34px;
}

.guide-body section {
  padding: 0 0 34px;
  border-bottom: 1px solid rgba(184, 222, 255, 0.14);
}

.guide-body h2 {
  margin: 0 0 14px;
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.guide-body p,
.guide-body li {
  max-width: 860px;
  color: var(--ice-soft);
  font-size: clamp(1.02rem, 1.42vw, 1.16rem);
  font-weight: 300;
  line-height: 1.68;
}

.guide-body p {
  margin: 0 0 1em;
}

.guide-body ul {
  margin: 0;
  padding-left: 1.2em;
}

.guide-body strong {
  color: var(--ice);
  font-weight: 400;
}

@keyframes loadSweep {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  24% {
    opacity: 1;
  }
  to {
    transform: scaleX(1);
    opacity: 0;
  }
}

@keyframes apertureBreath {
  from {
    opacity: 0.42;
    transform: translateY(10px) skewX(-7deg) scaleY(0.92);
  }
  to {
    opacity: 0.92;
    transform: translateY(-12px) skewX(4deg) scaleY(1.08);
  }
}

@keyframes probeWake {
  from {
    opacity: 0;
    transform: translate3d(-22px, 0, 0) scaleY(0.86);
  }
  46% {
    opacity: 1;
  }
  to {
    opacity: 0.64;
    transform: translate3d(0, 0, 0) scaleY(1);
  }
}

@media (hover: hover) {
  .brand-sigil {
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  }

  .brand:hover .brand-sigil {
    transform: translateY(-1px);
    border-color: rgba(238, 247, 255, 0.74);
    box-shadow: 0 0 34px rgba(61, 255, 176, 0.28), inset 0 0 22px rgba(61, 255, 176, 0.16);
  }

  .instrument-card,
  .note-tile,
  .diary-entry,
  .kp-console,
  .chart-board {
    transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
  }

  .instrument-card:hover,
  .note-tile:hover,
  .diary-entry:hover {
    border-color: rgba(61, 255, 176, 0.38);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28), inset 0 0 40px rgba(61, 255, 176, 0.06);
  }

  .instrument-card:nth-child(even):hover {
    transform: translateY(34px);
  }

  .instrument-card:nth-child(odd):hover,
  .note-tile:hover,
  .diary-entry:hover {
    transform: translateY(-8px);
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    min-height: calc(100svh - 112px);
    grid-template-columns: 1fr;
    align-content: start;
    padding-top: 58px;
  }

  .kp-console {
    max-width: 520px;
    margin: 0;
  }

  .hero-copy::before {
    display: none;
  }

  .ion-probe {
    opacity: 0.46;
  }

  .ion-probe::after,
  .probe-card {
    display: none;
  }

  .intro-grid,
  .closing-section {
    grid-template-columns: 1fr;
  }

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

  .instrument-card:nth-child(even) {
    transform: none;
  }

  .instrument-card:nth-child(3),
  .instrument-card:nth-child(4) {
    margin-top: 0;
  }

  .quick-telemetry {
    grid-template-columns: repeat(2, 1fr);
  }

  .diary-grid {
    grid-template-columns: 1fr;
  }

  .diary-entry,
  .diary-entry:nth-child(2),
  .diary-entry:nth-child(3) {
    min-height: 260px;
    margin-top: 0;
  }

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

  .guide-schematic {
    min-height: 240px;
  }

  .guide-body {
    grid-template-columns: 1fr;
  }

  .guide-ledger {
    position: relative;
    top: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 112px;
  }

  .site-header {
    padding: 8px 14px;
  }

  .brand {
    width: 100%;
  }

  .brand-name {
    font-size: 0.86rem;
  }

  .brand-code {
    font-size: 0.58rem;
  }

  .site-nav a {
    padding: 0 10px;
    font-size: 0.66rem;
  }

  .hero {
    min-height: 850px;
    padding: 34px 14px 150px;
  }

  .ion-probe {
    opacity: 0.42;
  }

  .ion-probe::before {
    top: -320px;
    height: 680px;
  }

  .ion-probe::after,
  .probe-card {
    display: none;
  }

  .hero h1 {
    font-size: clamp(4rem, 18.2vw, 5.4rem);
  }

  .hero-lede {
    margin-top: 22px;
    font-size: 1.02rem;
  }

  .hero-rail {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .hero-rail div {
    min-height: 58px;
    padding: 11px 12px;
  }

  .eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.13em;
  }

  .kp-console {
    padding: 12px;
  }

  .console-grid div {
    min-height: 62px;
    padding: 10px;
  }

  .station-silhouette {
    height: 220px;
  }

  .hut {
    right: 26px;
    bottom: 58px;
    width: 132px;
    height: 88px;
  }

  .mast-right,
  .guy-line.line-b,
  .antenna-array {
    display: none;
  }

  .section {
    padding: 54px 16px;
  }

  .section-title h2,
  .closing-copy h2 {
    font-size: clamp(2.35rem, 12vw, 3.5rem);
  }

  .quick-telemetry,
  .instrument-layout,
  .forecast-notes {
    grid-template-columns: 1fr;
  }

  .quick-telemetry div {
    min-height: 88px;
  }

  .instrument-card {
    min-height: 280px;
  }

  .chart-head {
    align-items: start;
    flex-direction: column;
  }

  .chart-stats {
    width: 100%;
    justify-content: stretch;
  }

  .chart-stats span {
    flex: 1 1 130px;
  }

  .chart-foot span:nth-child(even) {
    display: none;
  }

  .forecast-wrap {
    margin-left: 0;
    margin-right: 0;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  tbody,
  tr,
  th,
  td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tbody tr {
    border: 1px solid rgba(184, 222, 255, 0.16);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(61, 255, 176, 0.08), rgba(157, 123, 255, 0.05)),
      rgba(4, 9, 17, 0.66);
    overflow: hidden;
  }

  tbody th {
    padding: 14px 14px 8px;
    border-bottom: 0;
    color: var(--emerald);
    font-family: var(--font-mono);
    letter-spacing: 0.10em;
    text-transform: uppercase;
  }

  tbody td {
    display: grid;
    grid-template-columns: minmax(86px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 14px 14px;
    border-bottom: 1px solid rgba(184, 222, 255, 0.10);
  }

  tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  tbody tr:last-child th,
  tbody tr:last-child td,
  tbody td:last-child {
    border-bottom: 0;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .guide-hero {
    padding: 72px 18px 58px;
  }

  .guide-hero::after {
    right: -120px;
    width: 280px;
  }

  .guide-schematic {
    min-height: 190px;
  }

  .guide-ledger {
    grid-template-columns: 1fr;
  }

  .guide-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .storm-aperture {
    min-height: 190px;
    margin-bottom: -30px;
  }

  .signal-stack div:nth-child(2),
  .signal-stack div:nth-child(4) {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
