:root {
  color-scheme: dark;
  --bg: #080a0d;
  --bg-2: #0d1112;
  --panel: #121719;
  --panel-2: #181d20;
  --line: rgba(216, 222, 208, 0.14);
  --text: #f1f4ed;
  --muted: #a9b2a7;
  --soft: #d8ded0;
  --green: #58f07c;
  --green-2: #1fbf62;
  --amber: #ffb23f;
  --orange: #ff6b35;
  --violet: #8c35ff;
  --black: #040506;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 12%, rgba(88, 240, 124, 0.11), transparent 32rem),
    radial-gradient(circle at 82% 8%, rgba(255, 178, 63, 0.12), transparent 28rem),
    linear-gradient(rgba(88, 240, 124, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 240, 124, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

p,
h1,
h2,
h3,
h4 {
  margin-top: 0;
  overflow-wrap: break-word;
}

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

code {
  padding: 0.12rem 0.35rem;
  border: 1px solid rgba(216, 222, 208, 0.14);
  border-radius: 5px;
  background: rgba(4, 5, 6, 0.52);
  color: var(--soft);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--green);
  color: var(--black);
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 850;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px max(22px, calc((100vw - var(--max)) / 2));
  background: rgba(8, 10, 13, 0.9);
  border-bottom: 1px solid rgba(216, 222, 208, 0.12);
  backdrop-filter: blur(16px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  color: var(--text);
}

.brand img,
.footer-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  padding: 3px;
  border-radius: 8px;
  background: rgba(4, 5, 6, 0.78);
}

.site-nav,
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.site-nav a,
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--soft);
  font-size: 0.94rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  border-color: rgba(88, 240, 124, 0.34);
  color: var(--green);
  outline: none;
}

.hero {
  position: relative;
  min-height: 86svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 44px;
  align-items: center;
  width: min(var(--max), calc(100% - 44px));
  margin: 0 auto;
  padding: 72px 0 94px;
  isolation: isolate;
}

.hero-backdrop {
  position: absolute;
  inset: 0 -12vw 24px;
  z-index: -1;
  border-bottom: 1px solid rgba(216, 222, 208, 0.1);
  background:
    linear-gradient(90deg, rgba(8, 10, 13, 0.98) 0%, rgba(8, 10, 13, 0.9) 36%, rgba(8, 10, 13, 0.48) 72%, rgba(8, 10, 13, 0.78) 100%),
    linear-gradient(180deg, rgba(8, 10, 13, 0.06) 0%, rgba(8, 10, 13, 0.18) 48%, rgba(8, 10, 13, 0.9) 100%),
    radial-gradient(circle at 72% 52%, rgba(140, 53, 255, 0.2), transparent 24rem),
    radial-gradient(circle at 88% 28%, rgba(88, 240, 124, 0.1), transparent 18rem),
    repeating-linear-gradient(90deg, rgba(88, 240, 124, 0.08) 0 1px, transparent 1px 74px),
    url("../img/nasa-bg.jpg");
  background-position: center, center, center, center, center, 56% center;
  background-size: auto, auto, auto, auto, 74px 74px, cover;
}

.hero-content {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin-bottom: 20px;
  color: var(--text);
  font-size: clamp(3rem, 7vw, 5.9rem);
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 32px;
  color: var(--soft);
  font-size: 1.22rem;
}

.hero-actions,
.section-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(216, 222, 208, 0.18);
  border-radius: 6px;
  background: rgba(18, 23, 25, 0.78);
  color: var(--text);
  font-weight: 850;
  white-space: nowrap;
}

.button:hover,
.button:focus-visible {
  border-color: rgba(88, 240, 124, 0.55);
  color: var(--green);
  outline: none;
}

.button-primary {
  border-color: transparent;
  background: var(--green);
  color: var(--black);
}

.button-primary:hover,
.button-primary:focus-visible {
  border-color: transparent;
  background: var(--amber);
  color: var(--black);
}

.hero-panel,
.project-card,
.step-card,
.comparison-grid article,
.connect-card,
.instruction-grid > div,
.notice-box,
.resource-card,
.markdown-panel,
.video-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 25, 0.88);
  box-shadow: 0 10px 46px rgba(0, 0, 0, 0.24);
}

.hero-side {
  align-self: end;
  display: grid;
  gap: 18px;
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 24px;
  background:
    linear-gradient(rgba(88, 240, 124, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 178, 63, 0.05) 1px, transparent 1px),
    rgba(18, 23, 25, 0.94);
  background-size: 28px 28px, 28px 28px, auto;
}

.hero-panel strong {
  color: var(--text);
  font-size: 1.2rem;
}

.hero-panel span {
  color: var(--muted);
}

.hero-panel a {
  display: block;
  padding: 11px 12px;
  border: 1px solid rgba(216, 222, 208, 0.14);
  border-radius: 6px;
  color: var(--soft);
  font-weight: 800;
}

.hero-panel a:hover,
.hero-panel a:focus-visible {
  border-color: rgba(88, 240, 124, 0.45);
  color: var(--green);
  outline: none;
}

.signal-strip {
  width: min(var(--max), calc(100% - 44px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: -44px auto 0;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(216, 222, 208, 0.14);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.signal-strip div {
  min-height: 112px;
  padding: 20px;
  background: rgba(14, 18, 19, 0.94);
}

.signal-strip strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.95rem;
}

.signal-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.section,
.site-footer {
  width: min(var(--max), calc(100% - 44px));
  margin: 0 auto;
}

.section {
  padding: 104px 0 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading p {
  font-size: 1.05rem;
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: 48px;
  align-items: start;
}

.video-card {
  overflow: hidden;
  background: #050606;
}

.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050606;
}

.steps-grid,
.comparison-grid,
.connect-layout,
.instruction-grid,
.resource-grid {
  display: grid;
  gap: 18px;
}

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

.step-card,
.comparison-grid article,
.connect-card,
.instruction-grid > div,
.notice-box {
  padding: 24px;
}

.step-card span {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--amber);
  font-weight: 950;
  letter-spacing: 0.1em;
}

.resilience-section {
  position: relative;
  isolation: isolate;
}

.resilience-section::before {
  content: "";
  position: absolute;
  inset: 42px -8vw auto;
  height: 520px;
  z-index: -1;
  background:
    radial-gradient(circle at 22% 22%, rgba(88, 240, 124, 0.13), transparent 22rem),
    radial-gradient(circle at 78% 38%, rgba(255, 178, 63, 0.12), transparent 24rem),
    linear-gradient(90deg, transparent, rgba(88, 240, 124, 0.06), transparent);
  opacity: 0.9;
  pointer-events: none;
}

.resilience-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.58fr);
  gap: 34px;
  align-items: stretch;
  margin-bottom: 18px;
}

.resilience-heading,
.resilience-visual,
.resilience-card,
.resilience-caveat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 25, 0.88);
  box-shadow: 0 10px 46px rgba(0, 0, 0, 0.24);
}

.resilience-heading {
  min-height: 390px;
  padding: clamp(28px, 5vw, 54px);
  background:
    linear-gradient(rgba(88, 240, 124, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 240, 124, 0.042) 1px, transparent 1px),
    radial-gradient(circle at 92% 12%, rgba(255, 178, 63, 0.14), transparent 18rem),
    rgba(18, 23, 25, 0.92);
  background-size: 34px 34px, 34px 34px, auto, auto;
}

.resilience-heading h2 {
  display: grid;
  grid-template-rows: auto 1.98em;
  max-width: 820px;
  margin-bottom: 22px;
  color: var(--text);
  font-size: clamp(2.35rem, 5.2vw, 5rem);
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.threat-kicker {
  display: block;
}

.resilience-heading p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--soft);
  font-size: 1.1rem;
}

.threat-rotator {
  display: block;
  position: relative;
  width: fit-content;
  max-width: 100%;
  min-height: 1.98em;
  color: var(--green);
  text-shadow: 0 0 24px rgba(88, 240, 124, 0.35);
}

.threat-rotator::after {
  content: "";
  position: absolute;
  left: 0.03em;
  right: 0.03em;
  bottom: 0.02em;
  height: 0.12em;
  background: linear-gradient(90deg, var(--green), var(--amber));
  opacity: 0.78;
}

.threat-rotator[data-threat-state="swap"] {
  animation: threat-swap 360ms ease;
}

.resilience-visual {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(88, 240, 124, 0.15), transparent 11rem),
    radial-gradient(circle at 30% 70%, rgba(140, 53, 255, 0.16), transparent 13rem),
    linear-gradient(rgba(216, 222, 208, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 222, 208, 0.03) 1px, transparent 1px),
    rgba(4, 5, 6, 0.82);
  background-size: auto, auto, 26px 26px, 26px 26px, auto;
}

.resilience-visual::before,
.resilience-visual::after {
  content: "";
  position: absolute;
  inset: -26%;
  background:
    conic-gradient(from 90deg, transparent, rgba(88, 240, 124, 0.16), transparent 32%),
    conic-gradient(from 270deg, transparent, rgba(255, 178, 63, 0.12), transparent 30%);
  animation: mesh-turn 24s linear infinite;
}

.resilience-visual::after {
  animation-direction: reverse;
  animation-duration: 31s;
  opacity: 0.52;
}

.mesh-core,
.mesh-node,
.mesh-line {
  position: absolute;
  z-index: 2;
}

.mesh-core {
  left: 50%;
  top: 50%;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(88, 240, 124, 0.6);
  border-radius: 50%;
  background: rgba(8, 10, 13, 0.86);
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: -0.04em;
  box-shadow:
    0 0 28px rgba(88, 240, 124, 0.28),
    inset 0 0 28px rgba(88, 240, 124, 0.1);
}

.mesh-node {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(216, 222, 208, 0.88);
  border-radius: 50%;
  background: var(--black);
  box-shadow: 0 0 18px rgba(88, 240, 124, 0.42);
}

.mesh-node-a {
  left: 16%;
  top: 24%;
}

.mesh-node-b {
  right: 18%;
  top: 20%;
}

.mesh-node-c {
  left: 22%;
  bottom: 20%;
}

.mesh-node-d {
  right: 16%;
  bottom: 24%;
}

.mesh-node-e {
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
}

.mesh-line {
  left: 50%;
  top: 50%;
  width: 52%;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(88, 240, 124, 0.7), rgba(255, 178, 63, 0));
  opacity: 0.68;
}

.mesh-line-1 {
  transform: rotate(26deg);
}

.mesh-line-2 {
  transform: rotate(143deg);
}

.mesh-line-3 {
  transform: rotate(213deg);
}

.mesh-line-4 {
  transform: rotate(321deg);
}

.resilience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.resilience-card {
  position: relative;
  min-height: 238px;
  padding: 24px;
  overflow: hidden;
}

.resilience-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px solid rgba(88, 240, 124, 0.22);
  background: linear-gradient(135deg, rgba(88, 240, 124, 0.06), transparent 46%);
  pointer-events: none;
}

.resilience-card span {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--amber);
  font-weight: 950;
  letter-spacing: 0.1em;
}

.resilience-card h3 {
  position: relative;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.18;
}

.resilience-card p {
  position: relative;
  margin-bottom: 0;
  font-size: 0.97rem;
}

.resilience-caveat {
  margin-top: 18px;
  padding: 22px 24px;
  border-color: rgba(255, 178, 63, 0.3);
  background:
    linear-gradient(90deg, rgba(255, 178, 63, 0.08), transparent),
    rgba(18, 23, 25, 0.88);
}

.resilience-caveat strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.resilience-caveat p {
  margin-bottom: 0;
}

.step-card h3,
.comparison-grid h3,
.connect-card h3 {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.18;
}

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

.comparison-grid article {
  min-height: 260px;
}

.faq-section {
  position: relative;
}

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

.faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(88, 240, 124, 0.06), transparent 48%),
    rgba(18, 23, 25, 0.84);
}

.faq-item summary {
  cursor: pointer;
  padding: 20px 22px;
  color: var(--text);
  font-weight: 900;
  line-height: 1.25;
}

.faq-item summary::marker {
  color: var(--green);
}

.faq-item p {
  margin: 0;
  padding: 0 22px 22px;
  font-size: 0.96rem;
}

.faq-actions {
  margin-top: 18px;
}

.connect-section {
  position: relative;
}

.connect-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.firmware-warning {
  margin: 0 0 18px;
  border-color: rgba(255, 178, 63, 0.46);
  background:
    linear-gradient(135deg, rgba(255, 178, 63, 0.11), transparent 46%),
    rgba(18, 23, 25, 0.9);
}

.firmware-warning strong {
  color: var(--amber);
}

.firmware-warning p + p {
  margin-top: 10px;
}

.connect-card-primary {
  background:
    linear-gradient(rgba(88, 240, 124, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 178, 63, 0.05) 1px, transparent 1px),
    rgba(18, 23, 25, 0.92);
  background-size: 28px 28px, 28px 28px, auto;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 178, 63, 0.38);
  border-radius: 999px;
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 850;
}

.status-live {
  border-color: rgba(88, 240, 124, 0.5);
  color: var(--green);
}

.status-experimental {
  border-color: rgba(140, 53, 255, 0.56);
  color: #c7a6ff;
}

.endpoint-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.copy-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(216, 222, 208, 0.12);
  border-radius: 7px;
  background: rgba(4, 5, 6, 0.42);
}

.copy-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.copy-row code {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  border-color: rgba(216, 222, 208, 0.1);
  background: rgba(8, 10, 13, 0.68);
  font-size: 0.82rem;
  line-height: 1.45;
}

.copy-row-key {
  align-items: start;
}

.copy-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(88, 240, 124, 0.35);
  border-radius: 6px;
  background: rgba(88, 240, 124, 0.08);
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: rgba(255, 178, 63, 0.55);
  color: var(--amber);
  outline: none;
}

.copy-button[data-copy-state="copied"] {
  border-color: rgba(88, 240, 124, 0.65);
  background: rgba(88, 240, 124, 0.18);
  color: var(--text);
}

.trust-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.notice-box-strong {
  margin-top: 0;
}

.install-command {
  margin-top: 18px;
  grid-template-columns: 104px minmax(0, 1fr) auto;
}

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

.instruction-grid strong,
.notice-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.instruction-grid p,
.notice-box p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.notice-box {
  margin-top: 18px;
  border-color: rgba(255, 178, 63, 0.28);
}

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

.resource-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.resource-card:hover,
.resource-card:focus-visible {
  border-color: rgba(88, 240, 124, 0.45);
  outline: none;
}

.resource-card span {
  width: fit-content;
  margin-bottom: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(88, 240, 124, 0.32);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
}

.resource-card strong {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.2;
}

.resource-card small {
  margin-top: auto;
  color: var(--muted);
}

.deep-dive-section {
  padding-bottom: 52px;
}

.markdown-panel {
  max-height: 760px;
  overflow: auto;
  padding: 30px;
  scrollbar-color: var(--green) rgba(18, 23, 25, 0.88);
}

.markdown-panel h3,
.markdown-panel h4 {
  color: var(--text);
  line-height: 1.18;
}

.markdown-panel h3 {
  margin: 0 0 18px;
  font-size: 1.8rem;
}

.markdown-panel h4 {
  margin: 34px 0 14px;
  font-size: 1.34rem;
}

.markdown-panel p {
  margin: 0 0 18px;
}

.markdown-panel ul,
.markdown-panel ol {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding-left: 1.35rem;
  color: var(--muted);
}

.markdown-panel li::marker {
  color: var(--green);
}

.markdown-panel strong {
  color: var(--soft);
}

.markdown-panel pre {
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(216, 222, 208, 0.14);
  border-radius: 8px;
  background: rgba(4, 5, 6, 0.72);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 54px 0 42px;
  color: var(--muted);
}

@keyframes threat-swap {
  0% {
    opacity: 0;
    transform: translateY(0.18em) skewX(-5deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) skewX(0);
  }
}

@keyframes mesh-turn {
  to {
    transform: rotate(1turn);
  }
}

@media (max-width: 1040px) {
  .hero,
  .section-split,
  .resilience-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 520px;
    align-self: auto;
  }

  .hero-side {
    max-width: 620px;
  }

  .steps-grid,
  .instruction-grid,
  .resource-grid,
  .resilience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

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

  .signal-strip,
  .comparison-grid,
  .connect-layout,
  .trust-path-grid,
  .faq-grid,
  .resilience-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .site-header,
  .section,
  .site-footer,
  .signal-strip,
  .hero {
    width: auto;
  }

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

  .site-nav a {
    padding: 8px 9px;
  }

  .hero,
  .section,
  .site-footer {
    width: calc(100% - 36px);
  }

  .hero {
    min-height: auto;
    padding: 48px 0 72px;
  }

  .hero-backdrop {
    inset: 18px -18px 0;
    background:
      linear-gradient(180deg, rgba(8, 10, 13, 0.92) 0%, rgba(8, 10, 13, 0.72) 54%, rgba(8, 10, 13, 0.94) 100%),
      radial-gradient(circle at 66% 28%, rgba(140, 53, 255, 0.18), transparent 18rem),
      url("../img/nasa-bg.jpg");
    background-position: center, center, 56% center;
    background-size: auto, auto, cover;
  }

  .hero-copy {
    font-size: 1.08rem;
  }

  .resilience-heading h2 {
    grid-template-rows: auto 2.82em;
  }

  .button {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .copy-row,
  .install-command {
    grid-template-columns: 1fr;
  }

  .copy-button {
    width: 100%;
  }

  .signal-strip {
    width: calc(100% - 36px);
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 76px;
  }

  .steps-grid,
  .instruction-grid,
  .resource-grid,
  .resilience-grid {
    grid-template-columns: 1fr;
  }

  .markdown-panel {
    max-height: none;
    padding: 22px;
  }
}

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

  .threat-rotator[data-threat-state="swap"],
  .resilience-visual::before,
  .resilience-visual::after {
    animation: none;
  }
}
