/* Airgap uses the V2 palette and follows the shared theme attribute. */
.airgap-page {
  --bg: #0c0b0a; --surface: #141311; --raise: #1c1b19;
  --line: rgba(240, 237, 229, .08); --line-2: rgba(240, 237, 229, .16);
  --text: #f0ede5; --muted: #a3a097; --faint: #8a877f;
  --accent: #22d3b7; --stage-blue: #7bc2f3; --btn-bg: #f0ede5; --btn-text: #0c0b0a;
  --f-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, monospace;
  color: var(--text);
  font: 400 15px/1.6 var(--f-sans);
}

[data-theme='light'] .airgap-page {
  --bg: #f8f7f3; --surface: #fdfcfa; --raise: #fff;
  --line: rgba(12, 11, 9, .1); --line-2: rgba(12, 11, 9, .18);
  --text: #0c0b09; --muted: #55534d; --faint: #67645e;
  --accent: #046d5f; --stage-blue: #2f6892; --btn-bg: #0c0b09; --btn-text: #f5f3ee;
}

/* The same weight as every other page's a / a:hover, so the shared header and footer rules still win
   (at .airgap-page weight, the footer's Back to top turned teal on hover where every other page dims it) */
:where(.airgap-page) a { color: inherit; text-decoration: none; }
:where(.airgap-page) a:hover { color: var(--accent); }
.airgap-page ::selection { background: var(--accent); color: var(--btn-text); }

.airgap-intro, .airgap-section {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--v2-page-pad);
  border-inline: 1px solid var(--line);
}

.airgap-intro {
  position: relative;
  overflow: hidden;
  padding: 64px var(--v2-page-pad) 72px;
}

.airgap-intro::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 1px 1px, var(--line-2) 1px, transparent 0) 0 0 / 22px 22px;
  mask-image: radial-gradient(70% 60% at 70% 0%, #000, transparent 75%);
  content: '';
}

.airgap-intro .redesign-intro-row { position: relative; }
.airgap-intro .redesign-intro-title {
  font: 500 56px/1.02 var(--f-sans);
  letter-spacing: -.045em;
}

.airgap-intro .redesign-intro-title > span { display: block; }

.airgap-intro .redesign-intro-description { color: var(--muted); }

.airgap-badge, .airgap-label, .airgap-intro dt {
  margin: 0;
  color: var(--faint);
  font: 500 11px/1.25 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.airgap-badge {
  /* 11px line, as every other page's intro badge, so the pill is the same height */
  line-height: 1;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--muted);
}

.airgap-intro .redesign-intro-stats {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.airgap-intro .redesign-intro-stats > div { background: var(--bg); }
.airgap-intro dt.xomea-icon-label { align-items: start; }
.airgap-intro dd { margin: 0; font-weight: 500; }
.airgap-intro .redesign-intro-stats > .airgap-stat--network { background: var(--teal-wash); color: var(--accent); }
.airgap-intro .redesign-intro-stats > .airgap-stat--term { background: var(--brass-wash); color: var(--brass); }
.airgap-intro .redesign-intro-stats :is(.airgap-stat--network, .airgap-stat--term) dt { color: inherit; }
.airgap-intro .redesign-intro-stats :is(.airgap-stat--network, .airgap-stat--term) dd {
  font: 500 clamp(24px, 3.5vw, 34px)/1 var(--f-sans) !important;
  letter-spacing: -.045em;
}

.airgap-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.airgap-intro .airgap-actions { margin-top: 28px; }
.airgap-actions .v2-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 16px;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}
.airgap-actions .v2-action:hover { border-color: var(--muted); color: var(--text); }
.airgap-actions .airgap-primary {
  border-color: transparent;
  background: var(--btn-bg);
  color: var(--btn-text);
}
.airgap-actions .airgap-primary:hover { border-color: transparent; color: var(--btn-text); opacity: .86; }

.airgap-section { border-top: 1px solid var(--line); }
.airgap-section-head {
  display: grid;
  gap: 16px;
  max-width: 65ch;
}
.airgap-section-head > *, .airgap-section-head--split > div > * { margin: 0; }
.airgap-section-head > p:not(.airgap-label) { color: var(--muted); }
.airgap-section-head--split {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 355px), 1fr));
  gap: 16px 48px;
  align-items: end;
  max-width: none;
}

.airgap-section-head--split > div { display: grid; gap: 16px; }
.airgap-section-head--split > p { max-width: 46ch; }
.airgap-section-head .airgap-label { display: flex; align-items: center; gap: 9px; }
.airgap-section-head .airgap-label::before {
  width: 18px;
  height: 1px;
  background: var(--teal-line);
  content: '';
}
.airgap-label--licence { color: var(--brass); }
.airgap-section-head .airgap-label--licence::before { background: var(--brass-line); }

.airgap-stage {
  position: relative;
  overflow: hidden;
  margin: 32px 0 0;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  --airgap-scene-ink: var(--accent);
  --airgap-scene-wash: var(--teal-wash);
}
.airgap-stage[data-chapter='1'] { --airgap-scene-ink: var(--stage-blue); --airgap-scene-wash: var(--blue-wash); }
.airgap-stage[data-chapter='2'] { --airgap-scene-ink: var(--stage-violet); --airgap-scene-wash: var(--violet-wash); }
.airgap-stage[data-chapter='3'],
.airgap-stage[data-chapter='4'] { --airgap-scene-ink: var(--brass); --airgap-scene-wash: var(--brass-wash); }

.airgap-viewport {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(370px, 43vw, 490px);
  isolation: isolate;
  background:
    radial-gradient(ellipse at 38% 54%, color-mix(in srgb, var(--airgap-scene-wash) 72%, var(--bg)), transparent 65%),
    var(--bg);
}

.airgap-viewport::after {
  --corner-line: linear-gradient(var(--airgap-scene-ink), var(--airgap-scene-ink));
  position: absolute;
  z-index: 1;
  inset: 8px;
  background:
    var(--corner-line) top left / 12px 1px,
    var(--corner-line) top left / 1px 12px,
    var(--corner-line) top right / 12px 1px,
    var(--corner-line) top right / 1px 12px,
    var(--corner-line) bottom left / 12px 1px,
    var(--corner-line) bottom left / 1px 12px,
    var(--corner-line) bottom right / 12px 1px,
    var(--corner-line) bottom right / 1px 12px;
  background-repeat: no-repeat;
  opacity: .42;
  pointer-events: none;
  content: '';
}

.airgap-viewport canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
}

.airgap-stage[data-ready] canvas { visibility: visible; }
.airgap-stage[data-ready] .airgap-stage-fallback { display: none; }
.airgap-stage:not([data-ready]) .airgap-stage-link { display: none; }

.airgap-stage-zones {
  position: absolute;
  z-index: 1;
  inset: 20px 24px auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.airgap-stage-zones span:first-child { color: var(--accent); }
.airgap-stage-zones span:last-child { text-align: end; }

.airgap-stage-link {
  position: absolute;
  bottom: 16px;
  right: 24px;
  padding: 5px 8px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  pointer-events: none;
}

.airgap-stage-fallback {
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 44ch;
  padding: 52px 20px 30px;
  text-align: center;
}
.airgap-stage-fallback > * { margin: 0; }

.airgap-stage-caption {
  display: grid;
  min-height: 65px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.airgap-stage-caption p { grid-area: 1 / 1; max-width: 78ch; margin: 0; }
.airgap-stage-caption p[hidden],
.airgap-stage:not([data-ready]) .airgap-stage-caption p:not(:first-child) { display: block; visibility: hidden; }
.airgap-stage-caption strong { color: var(--text); font-weight: 600; }

.airgap-stage-rail:not([hidden]) { display: flex; }
.airgap-stage-rail {
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.airgap-stage-rail button {
  position: relative;
  display: flex;
  flex: 1 1 0;
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  background: var(--surface);
  color: var(--muted);
  font: 500 13px/1.2 var(--f-sans);
  text-align: left;
  cursor: pointer;
}
.airgap-stage-rail button:is(:hover, [aria-pressed='true']) { background: var(--raise); color: var(--text); }
.airgap-stage-rail button:focus-visible { outline-offset: -3px; }
.airgap-chapter-name { min-width: 0; }
.airgap-stage-rail button[aria-pressed='true'] .xomea-page-icon { color: var(--airgap-scene-ink); }
.airgap-stage-rail button[aria-pressed='true']::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--airgap-scene-ink);
  transform: scaleX(var(--airgap-progress, 1));
  transform-origin: left;
  content: '';
}

.airgap-deployment {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 24px 48px;
  margin-top: 48px;
}

.airgap-deployment > header { flex: 0 1 270px; }
.airgap-subheading { font-size: clamp(22px, 2.4vw, 28px); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; }
/* The muted phrase starts its own line at every width: in the narrow column it wrapped after "the",
   so the tone changed mid-line */
.airgap-subheading span { display: block; }
.airgap-controls {
  flex: 1 1 560px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-2);
  list-style: none;
}

.airgap-controls li {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.airgap-controls h4 {
  /* Wide enough for every title on one line: "Host the dependencies inside" needs 293px with its
     icon (two of the four wrapped at 245px) */
  flex: 0 1 300px;
  display: grid;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.airgap-control-icon, .airgap-step-icon { width: 20px; height: 20px; }
.airgap-control-icon { color: var(--accent); }
.airgap-controls li:nth-child(2) .airgap-control-icon { color: var(--stage-blue); }
.airgap-controls li:nth-child(3) .airgap-control-icon, .airgap-step-icon { color: var(--brass); }
.airgap-controls p { flex: 1 1 300px; max-width: 65ch; margin: 0; color: var(--muted); }

.airgap-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1px;
  margin: 32px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  list-style: none;
}
.airgap-steps li {
  padding: 24px;
  background: var(--bg);
}
.airgap-steps li:last-child { background: color-mix(in srgb, var(--brass-wash) 60%, var(--bg)); }
.airgap-steps h3 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}
.airgap-steps p { margin: 0; color: var(--muted); }

.airgap-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: radial-gradient(ellipse at 15% 100%, color-mix(in srgb, var(--teal-wash) 45%, var(--bg)), transparent 65%), var(--bg);
}
.airgap-cta::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 48%;
  background: radial-gradient(circle at 1px 1px, var(--line-2) 1px, transparent 0) 0 0 / 18px 18px;
  mask-image: radial-gradient(ellipse at 86% 45%, #000, transparent 75%);
  content: '';
}

.airgap-cta .airgap-section-head { flex: 1 1 420px; }

/* Setting names and Setup switches in running text, as on Features (.ais code). */
.airgap-page code { padding: 1px 4px; border-radius: 4px; background: var(--raise); font: 400 .92em/1 var(--f-mono); color: var(--text); overflow-wrap: anywhere; }
