/* SignaPilot (signapilot.com) - Precision Cockpit Design System
 * Theme Lock: Dark Obsidian Cockpit (#08111A) + Signal Lime (#B9EE74) + Telemetry Teal (#50CBB5)
 * Architecture: Double-Bezel ("Doppelrand") enclosures, Button-in-Button CTAs, WCAG AA/AAA contrast, Zero Inline Styles.
 */

@font-face {
  font-family: "SignaSans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Lato-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "SignaSans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/Lato-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "SignaSans";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/Lato-Heavy.ttf") format("truetype");
}
@font-face {
  font-family: "SignaMono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/DejaVuSansMono.ttf") format("truetype");
}

:root {
  --bg-canvas: #08111a;
  --bg-canvas-deep: #060d14;
  --bg-shell: rgba(215, 240, 225, 0.038);
  --bg-core: #0f1f2d;
  --bg-core-elevated: #142838;
  --bg-core-subtle: #0b1722;
  --bg-glass: rgba(11, 23, 34, 0.84);
  --text-primary: #f3f6f1;
  --text-secondary: #a5b8ba;
  --text-muted: #7e9498;
  --accent: #b9ee74;
  --accent-strong: #c8f58d;
  --accent-ink: #0d2116;
  --accent-soft: rgba(185, 238, 116, 0.12);
  --accent-border: rgba(185, 238, 116, 0.34);
  --telemetry: #50cbb5;
  --telemetry-soft: rgba(80, 203, 181, 0.12);
  --warn: #f4b860;
  --warn-soft: rgba(244, 184, 96, 0.14);
  --danger: #f07c72;
  --danger-soft: rgba(240, 124, 114, 0.14);
  --border-outer: rgba(215, 240, 225, 0.11);
  --border-inner: rgba(235, 250, 225, 0.09);
  --shadow-ambient: 0 24px 64px rgba(2, 8, 14, 0.55);
  --radius-shell: 28px;
  --radius-core: 22px;
  --radius-control: 14px;
  --radius-pill: 999px;
  --ease-out-strong: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --section-y: 76px;
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --z-nav: 40;
  --z-modal: 50;
}

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

html {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: "SignaSans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text-primary);
  overflow-x: clip;
}

/* Static ambient light: avoid continuously compositing a viewport-sized gradient behind scrolling text. */
body::before {
  content: "";
  position: fixed;
  inset: -15vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42vmax 28vmax at 80% 12%, rgba(80, 203, 181, 0.12), transparent 62%),
    radial-gradient(36vmax 26vmax at 16% 22%, rgba(185, 238, 116, 0.075), transparent 60%),
    radial-gradient(40vmax 30vmax at 60% 92%, rgba(80, 203, 181, 0.06), transparent 62%);
}

/* Sprite icons: <svg class="icon"><use href="/assets/img/icons.svg#i-name"/></svg> */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

/* Hidden content (inactive tabs, filtered features, closed panels) must never render. */
[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 60;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
}
.skip-link:focus {
  left: 16px;
}

.container {
  width: 100%;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Fluid Island Navigation (single line on desktop, height <= 72px) */
.site-header {
  position: sticky;
  top: 14px;
  z-index: var(--z-nav);
  padding: 0 20px;
}

.nav-island {
  max-width: 1300px;
  height: 68px;
  margin: 0 auto;
  padding: 0 14px 0 20px;
  border-radius: var(--radius-pill);
  background: var(--bg-glass);
  border: 1px solid var(--border-outer);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 16px 40px rgba(3, 9, 15, 0.45);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (prefers-reduced-transparency: reduce) {
  .nav-island {
    background: #0d1c29;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Approved B symbol, with concept A's single-color, tracked uppercase wordmark. */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.17em;
  line-height: 1;
  white-space: nowrap;
}

.brand-word {
  text-transform: uppercase;
}
.brand-word span {
  color: inherit;
}

.brand-symbol {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-symbol-sm {
  width: 24px;
  height: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.nav-links a[aria-current="location"] {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-outer);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: "SignaMono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 80ms ease-out;
}

.lang-btn:focus-visible {
  outline-offset: 0;
}

.lang-btn[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-outer);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  max-width: 1300px;
  margin: 8px auto 0;
  padding: 18px;
  border-radius: 22px;
  background: #0d1c29;
  border: 1px solid var(--border-outer);
  box-shadow: var(--shadow-ambient);
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer-links {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-drawer-links a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  color: var(--text-primary);
}

/* Button-in-Button CTA Architecture */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 7px 7px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 28px rgba(185, 238, 116, 0.18);
  transition: transform 160ms var(--ease-out-strong), background-color 160ms ease;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.5) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform 750ms var(--ease-spring);
}

.btn-primary .icon,
.btn-secondary .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.1;
}

.btn-block {
  width: 100%;
}

.btn-primary .btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(13, 33, 22, 0.14);
  display: inline-grid;
  place-items: center;
  transition: transform 200ms var(--ease-out-strong);
  flex-shrink: 0;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-outer);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.94rem;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease-out-strong), border-color 160ms ease, background-color 160ms ease;
}

.btn-compact {
  padding: 6px 14px;
  font-size: 0.82rem;
}

/* Tactile Press Feedback (instant pointer-down response per apple-design) */
.btn-primary:active,
.btn-secondary:active,
.scenario-btn:active,
.mode-tab:active,
.atlas-tab-btn:active,
.lang-btn:active,
.faq-trigger:active {
  transform: translateY(1px);
  transition-duration: 100ms;
}

/* Pointer-gated Hover States (prevents sticky hover on touch screens) */
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    color: var(--text-primary);
  }
  .btn-primary:hover {
    background: var(--accent-strong);
  }
  .btn-primary:hover .btn-icon {
    transform: translate(2px, -1px);
  }
  .btn-primary:hover::after {
    transform: translateX(130%);
  }
  .atlas-cluster-card:hover,
  .package-step-card:hover,
  .flow-node:hover .flow-icon {
    border-color: rgba(185, 238, 116, 0.28);
  }
  .bezel-core:hover::before {
    opacity: 1;
  }
  .btn-secondary:hover {
    border-color: var(--accent-border);
    background: rgba(185, 238, 116, 0.07);
  }
  .scenario-btn:hover,
  .atlas-tab-btn:not([aria-pressed="true"]):hover {
    border-color: var(--accent-border);
    color: var(--text-primary);
  }
  .lang-btn:not([aria-current="page"]):hover {
    color: var(--text-primary);
  }
  .mode-tab:hover {
    border-color: rgba(185, 238, 116, 0.42);
    background: rgba(255, 255, 255, 0.04);
  }
  .brochure-lang-links a:hover {
    border-color: var(--accent-border);
    color: var(--accent);
  }
  .footer-links a:hover {
    color: var(--text-primary);
    text-decoration: underline;
  }
}

/* Double-Bezel ("Doppelrand") Machined Enclosures */
.bezel-shell {
  padding: 6px;
  border-radius: var(--radius-shell);
  background: var(--bg-shell);
  border: 1px solid var(--border-outer);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-ambient);
}

.bezel-core {
  position: relative;
  isolation: isolate;
  height: 100%;
  border-radius: var(--radius-core);
  background: linear-gradient(180deg, var(--bg-core-elevated) 0%, var(--bg-core) 100%);
  border: 1px solid var(--border-inner);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 26px;
}

/* Fixed light wash: opacity-only hover, no gradient reconstruction for every pointer event. */
.bezel-core::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(460px circle at 50% 0%, rgba(185, 238, 116, 0.075), transparent 62%);
  opacity: 0;
  transition: opacity 300ms ease;
}

/* Eyebrow badge (strictly rationed: max 2 on the entire page) */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: "SignaMono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Section Rhythm & Typography */
.section {
  padding: var(--section-y) 0;
  position: relative;
  scroll-margin-top: 96px;
}

.section-header {
  max-width: 760px;
  margin-bottom: 36px;
}

.section-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section-title em,
.hero-headline em {
  font-style: italic;
  color: var(--accent);
  line-height: 1.15;
  padding-bottom: 0.08em;
  display: inline-block;
}

.section-lead {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 64ch;
  text-wrap: pretty;
}

/* Section 1: Asymmetric Split Hero (fits 100dvh, pt <= 88px, max 4 text elements on left) */
.hero-section {
  padding: 54px 0 40px;
  display: flex;
  align-items: center;
  position: relative;
  isolation: isolate;
}

/* Fine engineering grid behind the hero, faded out with a radial mask. */
.hero-section::before {
  content: "";
  position: absolute;
  inset: -110px 0 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(185, 238, 116, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 238, 116, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 58% 66% at 72% 34%, #000 18%, transparent 74%);
  mask-image: radial-gradient(ellipse 58% 66% at 72% 34%, #000 18%, transparent 74%);
}

/* Entrance: CSS-only so it starts with the first paint (no flash, no JS dependency). */
.hero-grid > div:first-child > * {
  animation: soft-enter 600ms var(--ease-out-strong) both;
}
.hero-grid > div:first-child > :nth-child(2) { animation-delay: 80ms; }
.hero-grid > div:first-child > :nth-child(3) { animation-delay: 160ms; }
.hero-grid > div:first-child > :nth-child(4) { animation-delay: 240ms; }

#cockpit-simulator {
  animation: soft-enter 650ms var(--ease-out-strong) 100ms both;
}

@keyframes soft-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Progressive enhancement: only JS-prepared offscreen nodes get an entrance.
   The initial state exists throughout any delay, so already-painted content never jumps back. */
.section [data-reveal] {
  transition: opacity 480ms ease-out, border-color 200ms ease;
}
[data-reveal="pending"] { opacity: 0; }
[data-reveal="shown"] { opacity: 1; }
html[data-input="keyboard"] [data-reveal] { opacity: 1; transform: none; transition: none; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.14fr;
  gap: 38px;
  align-items: center;
}

.hero-headline {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 4.6vw, 4.15rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-subtext {
  margin: 0 0 28px;
  font-size: 1.18rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 48ch;
  text-wrap: pretty;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* Interactive Cockpit in Hero */
.cockpit-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-outer);
  margin-bottom: 14px;
}

.cockpit-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-indicator {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  flex-shrink: 0;
}

.live-indicator::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  animation: live-ring 2.2s var(--ease-out-strong) infinite;
}

@keyframes live-ring {
  from { opacity: 0.7; transform: scale(0.4); }
  to { opacity: 0; transform: scale(1.6); }
}

.cockpit-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.scenario-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scenario-btn {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-outer);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: "SignaMono", monospace;
  font-size: 0.72rem;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 80ms ease-out;
}

.scenario-btn[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 700;
}

/* Autoplay progress on the active scenario (app.js sets data-autoplay while the demo rotates). */
.scenario-btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: autoplay-progress 7600ms linear both;
  animation-play-state: paused;
}

[data-autoplay="on"] .scenario-btn[aria-selected="true"]::after { animation-play-state: running; }

@keyframes autoplay-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.cockpit-body {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 14px;
}

/* Live engine sequence. Runs whenever a scenario panel is shown (display change restarts CSS animations):
   signal lines arrive, the gates pane is scanned, each check resolves, then the decision appears. */
.cockpit-scenario .signal-raw-box {
  animation: soft-enter 400ms ease-out both;
}

.cockpit-scenario .plan-list li {
  animation: soft-enter 360ms ease-out both;
}
.cockpit-scenario .plan-list li:nth-child(1) { animation-delay: 1000ms; }
.cockpit-scenario .plan-list li:nth-child(2) { animation-delay: 1120ms; }
.cockpit-scenario .plan-list li:nth-child(3) { animation-delay: 1240ms; }

.cockpit-scenario .cockpit-pane {
  position: relative;
  overflow: hidden;
}

.cockpit-scenario .cockpit-pane:nth-child(2)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 70px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(80, 203, 181, 0.16) 60%, rgba(80, 203, 181, 0.5) 98%, transparent);
  animation: gate-scan 1700ms var(--ease-spring) 250ms both;
}

.cockpit-scenario .cockpit-pane:nth-child(2) .gate-item {
  animation: soft-enter 360ms ease-out both;
}
.cockpit-scenario .cockpit-pane:nth-child(2) .gate-badge {
  animation: soft-enter 280ms ease-out both;
}
.cockpit-scenario .cockpit-pane:nth-child(2) .gate-item:nth-child(1) { animation-delay: 300ms; }
.cockpit-scenario .cockpit-pane:nth-child(2) .gate-item:nth-child(2) { animation-delay: 620ms; }
.cockpit-scenario .cockpit-pane:nth-child(2) .gate-item:nth-child(3) { animation-delay: 940ms; }
.cockpit-scenario .cockpit-pane:nth-child(2) .gate-item:nth-child(4) { animation-delay: 1260ms; }
.cockpit-scenario .cockpit-pane:nth-child(2) .gate-item:nth-child(1) .gate-badge { animation-delay: 560ms; }
.cockpit-scenario .cockpit-pane:nth-child(2) .gate-item:nth-child(2) .gate-badge { animation-delay: 880ms; }
.cockpit-scenario .cockpit-pane:nth-child(2) .gate-item:nth-child(3) .gate-badge { animation-delay: 1200ms; }
.cockpit-scenario .cockpit-pane:nth-child(2) .gate-item:nth-child(4) .gate-badge { animation-delay: 1520ms; }

.cockpit-scenario .cockpit-decision-banner {
  animation: soft-enter 400ms ease-out 1500ms both;
}

@keyframes gate-scan {
  from { opacity: 1; transform: translateY(-80px); }
  85% { opacity: 1; }
  to { opacity: 0; transform: translateY(330px); }
}

/* Hidden panels are measured without exposing them or restarting real animation timelines. */
.cockpit-scenario.is-measuring[hidden] {
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  pointer-events: none;
}
.cockpit-scenario.is-measuring *,
.cockpit-scenario.is-measuring *::after { animation: none !important; transition: none !important; }

.cockpit-pane {
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-core-subtle);
  border: 1px solid var(--border-inner);
}

.pane-kicker {
  font-family: "SignaMono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pane-kicker-spaced {
  margin-top: 14px;
}

.signal-raw-box {
  font-family: "SignaMono", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: pre-line;
}

.gate-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-list {
  font-size: 0.81rem;
  color: var(--text-secondary);
  padding-left: 16px;
  list-style: disc;
}

.gate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.83rem;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.gate-item-text {
  flex: 1;
}

.gate-badge {
  font-family: "SignaMono", monospace;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.gate-badge.ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.gate-badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.gate-badge.block {
  background: var(--danger-soft);
  color: var(--danger);
}

.cockpit-decision-banner {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(185, 238, 116, 0.08);
  border: 1px solid var(--accent-border);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.cockpit-decision-banner.is-blocked {
  background: var(--danger-soft);
  border-color: rgba(240, 124, 114, 0.38);
}

/* Section 2: Architecture & Compatibility Strip */
.compat-strip {
  padding: 26px 0;
  border-top: 1px solid var(--border-outer);
  border-bottom: 1px solid var(--border-outer);
  background: rgba(11, 23, 34, 0.55);
}

.compat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.compat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  min-height: 76px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.compat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--telemetry-soft);
  color: var(--telemetry);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.compat-label {
  font-family: "SignaMono", monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
}

.compat-icon .icon {
  width: 20px;
  height: 20px;
}

.compat-label {
  margin-bottom: 3px;
  letter-spacing: 0.04em;
}

.compat-val {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.3;
  color: var(--text-primary);
  text-wrap: balance;
}

/* Signal path: one connected rail, not four independent feature cards. */
.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding: 0 0 32px;
  margin: 0 0 32px;
  list-style: none;
  border-bottom: 1px solid var(--border-outer);
}

.flow-node {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px 14px;
  align-content: start;
}

.flow-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(185, 238, 116, 0.14), rgba(80, 203, 181, 0.05));
  border: 1px solid var(--accent-border);
  color: var(--accent);
  transition: border-color 200ms ease;
}

.flow-icon .icon { width: 23px; height: 23px; }
.flow-step {
  align-self: center;
  font: 400 0.72rem "SignaMono", monospace;
  color: var(--text-muted);
}
.flow-title { grid-column: 1 / -1; font-size: 1.06rem; line-height: 1.3; }
.flow-copy { grid-column: 1 / -1; font-size: 0.9rem; line-height: 1.5; color: var(--text-secondary); }

.flow-node:not(:last-child)::before,
.flow-node:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 65px;
  right: -10px;
  top: 23px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(80, 203, 181, 0.3));
  pointer-events: none;
}
.flow-node:not(:last-child)::after {
  left: auto;
  right: -10px;
  width: 30%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--telemetry));
  transform-origin: left;
  animation: flow-pulse 3.6s linear infinite both;
}
.flow-node:nth-child(2)::after { animation-delay: 450ms; }
.flow-node:nth-child(3)::after { animation-delay: 900ms; }
@keyframes flow-pulse {
  0%, 10% { opacity: 0; transform: translateX(-100%); }
  35%, 55% { opacity: 0.8; }
  85%, 100% { opacity: 0; transform: translateX(0); }
}

.demo-controls { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.demo-caption { font-size: 0.72rem; color: var(--text-muted); }
.demo-playback {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 3px 0;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
}
.demo-playback::before {
  content: "";
  width: 8px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.demo-playback[aria-pressed="false"]::before {
  border: 0;
  border-left: 8px solid currentColor;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* Pause decorative work when the document or animated module is not visible. */
[data-motion="paused"],
[data-motion="paused"] *,
[data-motion="paused"] *::after,
[data-motion="paused"] *::before {
  animation-play-state: paused !important;
}
body[data-motion="paused"]::before { animation-play-state: paused; }

/* Section 3: Interactive 3-Mode Switcher & 4-Stage Pipeline */
.mode-workspace {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 28px;
  align-items: stretch;
}

.mode-selector-list {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 12px;
}

.mode-tab {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  padding: 20px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-outer);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 80ms ease-out;
}

.mode-tab[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(185, 238, 116, 0.13), rgba(80, 203, 181, 0.07));
  border-color: var(--accent);
}

.mode-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mode-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "SignaMono", monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.mode-tag {
  font-family: "SignaMono", monospace;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.mode-icon {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  stroke-width: 1.9;
}

.mode-tab[aria-selected="false"] .mode-icon {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-outer);
}

.mode-tab p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.mode-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 16px;
  padding: 0;
  list-style: none;
}

.mode-panel:not([hidden]) {
  animation: soft-enter 220ms ease-out both;
}
.mode-pipeline-step {
  position: relative;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(185, 238, 116, 0.07);
  border: 1px solid var(--accent-border);
  font-family: "SignaMono", monospace;
  font-size: 0.71rem;
  line-height: 1.35;
  color: var(--accent);
  font-weight: 700;
}

.mode-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.mode-stat-box {
  padding: 12px 15px;
  border-radius: 14px;
  background: var(--bg-core-subtle);
  border: 1px solid var(--border-inner);
}

.mode-stat-box span {
  display: block;
  font-family: "SignaMono", monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.mode-stat-box strong {
  display: block;
  margin-top: 6px;
  font-size: 0.98rem;
  color: var(--text-primary);
}

/* Section 4: Interactive Whole-Trade Cash-Goal & Risk Calculator */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 28px;
  align-items: stretch;
}

.control-group {
  margin-bottom: 20px;
}

.control-group-last {
  margin-bottom: 0;
}

.control-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.control-val-pill {
  font-family: "SignaMono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.range-slider {
  width: 100%;
  accent-color: var(--accent);
  height: 8px;
  border-radius: 8px;
  background: #0a1520;
  cursor: pointer;
}

.select-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0a1520;
  border: 1px solid var(--border-outer);
  color: var(--text-primary);
  font-size: 0.96rem;
  cursor: pointer;
}

/* The ratio compares illustrative cash amounts, not forecast returns or win probability. */
.calc-ratio {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-outer);
}
.calc-ratio-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}
.calc-ratio-head strong { color: var(--telemetry); font-family: "SignaMono", monospace; }
.ratio-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.2fr) minmax(40px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  font-size: 0.79rem;
}
.ratio-label { color: var(--text-secondary); }
.ratio-row strong { font: 400 0.75rem "SignaMono", monospace; font-variant-numeric: tabular-nums; }
.ratio-track { height: 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.ratio-fill { display: block; height: 100%; border-radius: inherit; transform-origin: left; transition: transform 240ms var(--ease-out-strong); }
.ratio-fill-risk { background: var(--warn); }
.ratio-fill-goal { background: var(--telemetry); transform: scaleX(0.5); }

.calc-output-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.calc-metric-card {
  padding: 15px;
  border-radius: 16px;
  background: var(--bg-core-subtle);
  border: 1px solid var(--border-inner);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-metric-card span {
  display: block;
  font-family: "SignaMono", monospace;
  font-size: 0.69rem;
  line-height: 1.35;
  color: var(--text-muted);
  text-transform: uppercase;
  min-height: 2.75em;
}

.calc-metric-card strong {
  display: block;
  margin-top: 7px;
  font-family: "SignaMono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.32rem;
  color: var(--accent);
}

.calc-metric-card small {
  display: block;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.legs-breakdown {
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-core-subtle);
  border: 1px solid var(--border-inner);
}

.leg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-outer);
  font-size: 0.88rem;
}

.leg-row strong {
  font-family: "SignaMono", monospace;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

.leg-row:last-child {
  border-bottom: 0;
}

.calc-daily-banner {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--telemetry-soft);
  border: 1px solid rgba(80, 203, 181, 0.3);
  font-family: "SignaMono", monospace;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.calc-disclaimer {
  margin: 18px 0 0;
  max-width: 90ch;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.availability-note {
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 2px solid var(--telemetry);
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.5;
}
.risk-disclosure-box h3 { margin: 0 0 8px; color: var(--text-primary); font-size: 0.92rem; }
.risk-disclosure-box p { margin: 0; }
.legal-stack h2 { margin: 0 0 10px; color: var(--text-primary); font-size: 1.1rem; line-height: 1.4; }
.legal-stack section p { margin: 0; }

.calc-coord-note {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Section 5: 5-Cell Asymmetric Double-Bezel Bento Grid */
.bento-grid-five {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.bento-span-7 {
  grid-column: span 7;
}
.bento-span-5 {
  grid-column: span 5;
}
.bento-span-4 {
  grid-column: span 4;
}

.bento-grid-five .bezel-core {
  display: flex;
  flex-direction: column;
}

.bento-grid-five .specimen-strip,
.bento-grid-five .mini-check-grid {
  margin-top: auto;
}

.bento-grid-five .bento-copy {
  margin-bottom: 18px;
}

.bento-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.bento-icon .icon {
  width: 21px;
  height: 21px;
}

.bento-core-accent {
  background:
    radial-gradient(circle at 88% 14%, rgba(185, 238, 116, 0.14), transparent 48%),
    linear-gradient(180deg, #152b3b 0%, #0f1f2d 100%);
}

.bento-core-telemetry {
  background:
    radial-gradient(circle at 85% 18%, rgba(80, 203, 181, 0.15), transparent 52%),
    linear-gradient(180deg, #132938 0%, #0e1d2a 100%);
}

.bento-kicker {
  font-family: "SignaMono", monospace;
  font-size: 0.72rem;
  color: var(--telemetry);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}

.bento-kicker-tight {
  margin-bottom: 0;
}

.bento-title {
  margin: 0 0 10px;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1.2;
  text-wrap: balance;
}

.bento-title-lg {
  font-size: 1.65rem;
}

.bento-title-md {
  font-size: 1.55rem;
}

.bento-copy {
  margin: 0 0 16px;
  font-size: 0.96rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.bento-copy-lg {
  font-size: 1.02rem;
}

.bento-copy-tight {
  margin-bottom: 0;
}

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

.mini-check-pill {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-inner);
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-check-pill .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.mini-check-pill svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* Tactile Telemetry Specimens inside Bento Cells 2-5 */
.specimen-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-outer);
}

.specimen-pill {
  font-family: "SignaMono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 9px;
  background: var(--bg-core-subtle);
  border: 1px solid var(--border-inner);
  color: var(--text-primary);
}

.specimen-pill-accent {
  border-color: var(--accent-border);
  color: var(--accent);
  background: rgba(185, 238, 116, 0.07);
}

/* Section 6: 36-Feature Atlas Explorer & PDF Brochure Download */
.atlas-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.atlas-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.atlas-search-wrap {
  position: relative;
  min-width: 320px;
  flex: 1 1 440px;
  max-width: 520px;
}

.atlas-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.atlas-result {
  flex-basis: 100%;
  margin: 0;
  font-family: "SignaMono", monospace;
  font-size: 0.78rem;
  color: var(--telemetry);
}

.atlas-search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-outer);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-primary);
  font-size: 0.86rem;
}

.atlas-search-input::placeholder {
  color: var(--text-muted);
}

.atlas-tab-btn {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-outer);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 80ms ease-out;
}

.atlas-tab-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

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

.atlas-cluster-card {
  --cluster-color: var(--telemetry);
  --cluster-tint: rgba(80, 203, 181, 0.045);
  --cluster-span: 5;
  grid-column: span var(--cluster-span);
  min-width: 0;
  padding: 24px 26px 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--cluster-tint), rgba(255, 255, 255, 0.015) 68%);
  border: 1px solid var(--border-outer);
  border-top: 2px solid var(--cluster-color);
  transition: border-color 200ms ease;
}
[data-atlas-cluster="execution"] { --cluster-span: 7; --cluster-color: var(--accent); --cluster-tint: rgba(185, 238, 116, 0.065); }
[data-atlas-cluster="risk"] { --cluster-span: 7; --cluster-color: var(--warn); --cluster-tint: rgba(244, 184, 96, 0.06); }
[data-atlas-cluster="rules"] { --cluster-color: var(--accent); --cluster-tint: rgba(185, 238, 116, 0.045); }
[data-atlas-cluster="visibility"] { --cluster-color: #a6c6dc; --cluster-tint: rgba(166, 198, 220, 0.035); }
[data-atlas-cluster="continuity"] { --cluster-span: 7; --cluster-color: #a6c6dc; --cluster-tint: rgba(166, 198, 220, 0.02); }
.atlas-clusters-grid.is-filtered .atlas-cluster-card { grid-column: 1 / -1; }
.atlas-heading { min-width: 0; }
.atlas-stage {
  display: block;
  margin-bottom: 5px;
  color: var(--cluster-color);
  font: 400 0.64rem "SignaMono", monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.atlas-purpose {
  margin: 0 0 18px;
  max-width: 54ch;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
[data-atlas-cluster="risk"] .atlas-icon,
[data-atlas-cluster="rules"] .atlas-icon { border-radius: 50%; }


.atlas-cluster-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.atlas-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--cluster-color);
  background: var(--cluster-tint);
  border: 1px solid color-mix(in srgb, var(--cluster-color) 30%, transparent);
}

.atlas-icon .icon {
  width: 19px;
  height: 19px;
}

.atlas-cluster-card h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
  color: var(--text-primary);
}

/* Light list instead of 36 boxes: hairline rows with an accent tick. */
.atlas-items-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.atlas-items-grid li {
  position: relative;
  padding: 9px 0 9px 20px;
  border-top: 1px solid rgba(235, 250, 225, 0.065);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.atlas-items-grid li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.95em;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--cluster-color);
  border-bottom: 2px solid var(--cluster-color);
  transform: rotate(-45deg);
}

.atlas-empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-outer);
  text-align: center;
  color: var(--text-secondary);
}

.atlas-brochure-shell {
  margin-top: 28px;
}

.brochure-banner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.brochure-cta-wrap {
  display: flex;
  justify-content: flex-end;
}

.brochure-lang-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.brochure-lang-links a {
  font-family: "SignaMono", monospace;
  font-size: 0.76rem;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-outer);
  color: var(--text-secondary);
  transition: border-color 150ms ease, color 150ms ease;
}

/* Section 7: Self-Service Purchase & Instant Delivery Package */
.purchase-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  align-items: stretch;
}

.package-steps-heading { margin: 0; font-weight: 400; }

.package-steps-core {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.package-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.package-step-card {
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-core-subtle);
  border: 1px solid var(--border-inner);
}

.package-step-card {
  transition: border-color 200ms ease;
}

.package-step-card .step-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "SignaMono", monospace;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.step-head .icon {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 9px;
  background: var(--accent-soft);
  stroke-width: 1.9;
}

.package-step-card h4 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.package-step-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.price-display-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--border-outer);
  border-bottom: 1px solid var(--border-outer);
  margin: 18px 0;
}

.pkg-price-kicker {
  font-family: "SignaMono", monospace;
  font-size: 0.74rem;
  color: var(--text-muted);
  display: block;
}

.price-amount {
  font-size: 2.8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.pkg-vat-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
  max-width: 260px;
}

.pkg-checklist {
  margin-bottom: 24px;
}

.pkg-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pkg-steps-banner {
  margin-top: 16px;
}

/* Section 8: FAQ Accordion & Footer */
.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.faq-item {
  interpolate-size: allow-keywords;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-outer);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-weight: 900;
  font-size: 1rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  transition: transform 80ms ease-out;
}

.faq-trigger::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 300ms var(--ease-spring), color 200ms ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-item[open] {
  border-color: rgba(185, 238, 116, 0.22);
}

/* Smooth open/close where ::details-content is supported; instant elsewhere. */
.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 240ms var(--ease-out-strong), content-visibility 240ms allow-discrete;
}

.faq-item[open]::details-content {
  block-size: auto;
}

.faq-panel {
  padding: 0 20px 18px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.risk-disclosure-box {
  margin-top: 56px;
  padding: 20px 24px;
  border-radius: 18px;
  background: rgba(185, 238, 116, 0.05);
  border: 1px solid var(--border-outer);
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--border-outer);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
}

/* Modal for Instant Self-Service Package & Checkout Preview */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(4, 10, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 680px;
  max-height: 90dvh;
  overflow-y: auto;
  opacity: 1;
  transform: translateY(0);
  transition: transform 220ms var(--ease-out-strong), opacity 180ms ease;
}

@starting-style {
  .modal-dialog {
    opacity: 0;
    transform: translateY(6px);
  }
}

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-checklist {
  margin-bottom: 20px;
}

.modal-footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

/* Legal & 404 Layout Utilities */
.legal-main {
  max-width: 920px;
}

.legal-title {
  font-size: 2.2rem;
}

.legal-stack {
  color: var(--text-secondary);
  font-size: 0.98rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rule {
  height: 1px;
  background: var(--border-outer);
}

.notfound-main {
  max-width: 680px;
  text-align: center;
}

/* High-Contrast Accessibility Preference */
@media (prefers-contrast: more) {
  :root {
    --border-outer: rgba(215, 240, 225, 0.32);
    --border-inner: rgba(235, 250, 225, 0.26);
    --text-secondary: #d4e2e4;
  }
}

/* Responsive Collapse (< 1024px and < 768px) */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .hero-grid,
  .mode-workspace,
  .calc-grid,
  .brochure-banner,
  .purchase-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .compat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mode-selector-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mode-tab { padding: 18px; justify-content: flex-start; }
  .mode-tab-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .bento-grid-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-grid-five .bento-span-7 { grid-column: 1 / -1; }
  .bento-grid-five .bento-span-5,
  .bento-grid-five .bento-span-4 { grid-column: auto; }
  .brochure-cta-wrap {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 14px;
  }
  .site-header {
    padding: 0 10px;
  }
  .nav-island {
    padding: 0 8px 0 12px;
    height: 58px;
    gap: 8px;
  }
  .brand-link {
    font-size: 0.76rem;
    gap: 7px;
  }
  .brand-link .brand-symbol {
    width: 28px;
    height: 28px;
  }
  .lang-btn {
    padding: 5px 8px;
    font-size: 0.7rem;
  }
  .nav-actions .btn-primary {
    display: none;
  }
  :root { --section-y: 46px; }
  .section-header { margin-bottom: 26px; }
  .section-title { font-size: clamp(1.9rem, 7.8vw, 2.4rem); }
  .section-lead { font-size: 1rem; }
  .hero-subtext { font-size: 1.06rem; }
  .hero-grid { gap: 28px; }
  .compat-strip { padding: 20px 0; }
  .compat-grid { gap: 10px; grid-auto-rows: 1fr; }
  .compat-item { padding: 12px; min-height: 94px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .compat-icon { width: 30px; height: 30px; border-radius: 9px; }
  .compat-icon .icon { width: 17px; height: 17px; }
  .compat-label { font-size: 0.62rem; }
  .compat-val { font-size: 0.86rem; text-wrap: pretty; }
  .compat-item:last-child { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 64px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; padding-bottom: 26px; margin-bottom: 24px; }
  .flow-copy { font-size: 0.85rem; }
  .flow-node:nth-child(2)::before, .flow-node:nth-child(2)::after { display: none; }
  .flow-node::after { max-width: 25%; }
  .mode-selector-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mode-tab { padding: 15px 16px; }
  .mode-tab-top { flex-direction: row; align-items: center; gap: 8px; }
  .mode-tab p { font-size: 0.88rem; }
  .mode-code { font-size: 1.05rem; }
  .mode-tag { font-size: 0.62rem; padding: 4px 7px; }
  .mode-workspace, .calc-grid, .purchase-grid { gap: 18px; }
  .mode-pipeline-grid, .mode-detail-grid { gap: 8px; }
  .mode-stat-box { padding: 12px; }
  .mode-stat-box strong { font-size: 0.9rem; }
  .select-control, .atlas-search-input { font-size: 1rem; }
  .control-label-row { gap: 6px; }
  .control-val-pill { font-size: 0.8rem; }
  .calc-output-metrics { gap: 8px; grid-template-columns: minmax(0, 1fr); }
  .calc-metric-card { padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
  .calc-metric-card strong { margin-top: 0; white-space: nowrap; }
  .calc-metric-card small { grid-column: 1 / -1; }
  .calc-metric-card span { min-height: 0; }
  .calc-metric-card strong { font-size: 1.1rem; }
  .calc-metric-card small { font-size: 0.72rem; }
  .bento-grid-five { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bento-grid-five > * { grid-column: 1 / -1; }
  .bento-icon { margin-bottom: 12px; }
  .bento-title { font-size: 1.3rem; }
  .atlas-cluster-card { grid-column: 1 / -1; padding: 20px 18px 14px; }
  .atlas-purpose { font-size: 0.9rem; margin-bottom: 16px; }
  .atlas-stage { font-size: 0.61rem; }
  .atlas-search-wrap { min-width: 0; }
  .atlas-tab-btn { padding: 9px 13px; min-height: 40px; }
  .atlas-filter-bar { gap: 6px; }
  .atlas-items-grid { column-gap: 14px; }
  .atlas-items-grid li { font-size: 0.82rem; padding-left: 16px; }
  .atlas-cluster-card h3 { font-size: 1.04rem; }
  .package-steps-grid { gap: 10px; }
  .package-step-card { padding: 14px; }
  .risk-disclosure-box { margin-top: 30px; padding: 18px; }
  .site-footer { padding: 28px 0 36px; }
  .lang-btn { min-height: 32px; display: inline-flex; align-items: center; }
  .scenario-btn { min-height: 36px; }
  .mobile-drawer { max-height: calc(100dvh - 90px); overflow-y: auto; }
  .menu-icon path { stroke: currentColor; stroke-width: 2; stroke-linecap: round; transform-origin: 10px 10px; transition: transform 180ms var(--ease-out-strong), opacity 120ms ease; }
  [aria-expanded="true"] .menu-icon path:nth-child(1) { transform: rotate(45deg) translateY(4px); }
  [aria-expanded="true"] .menu-icon path:nth-child(2) { opacity: 0; }
  [aria-expanded="true"] .menu-icon path:nth-child(3) { transform: rotate(-45deg) translateY(-4px); }

  .hero-section {
    padding: 38px 0 40px;
    min-height: auto;
  }
  .hero-headline {
    font-size: 2.15rem;
  }
  .cockpit-header,
  .control-label-row,
  .leg-row,
  .price-display-row,
  .gate-item,
  .atlas-toolbar {
    flex-wrap: wrap;
  }
  .atlas-search-wrap {
    max-width: 100%;
    width: 100%;
  }
  .btn-primary,
  .btn-secondary {
    white-space: normal;
    max-width: 100%;
  }
  .compat-grid,
  .mode-pipeline-grid,
  .mode-detail-grid,
  .mini-check-grid,
  .package-steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cockpit-body,
  .atlas-clusters-grid,
  .faq-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .bezel-core {
    padding: 18px 15px;
  }
}

@media print {
  body::before, .demo-playback, .site-header, .hero-cta-row, .atlas-toolbar { display: none; }
  [data-scenario-panel], [data-mode-panel] { break-inside: avoid; }
  .faq-item::details-content { block-size: auto; content-visibility: visible; }
}

/* Keyboard commands should never wait for decorative sequences. */
html[data-input="keyboard"] #workflow .mode-panel,
html[data-input="keyboard"] #workflow .mode-panel *,
html[data-input="keyboard"] #cockpit-simulator .cockpit-scenario *,
html[data-input="keyboard"] #cockpit-simulator .cockpit-scenario *::after { animation: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .cockpit-scenario .cockpit-pane:nth-child(2)::after,
  .flow-node::after,
  .demo-playback { display: none; }
  [data-reveal] { opacity: 1; transform: none; }
}
