* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* FORCE RESET: kill purple/blue visited links globally */
a, a:link, a:visited, a:active {
  color: inherit !important;
  text-decoration: none !important;
}

:root {
  /* Contrast hierarchy: layered navy (not flat black) */
  --foundation: #0B0F14;
  --panel: #111821;
  --panel2: #151d28;
  --tg-surface-border: #1C2632;
  --white: #FFFFFF;
  /* Typography — WCAG-friendly on dark base */
  --tg-text-heading: #D6E2F0;
  --tg-text-body: #B7C4D4;
  --tg-text-muted: #9FB0C3;
  --steel: #B7C4D4;
  --steel-bright: #D6E2F0;
  /* Primary nav (desktop + overlay links) */
  --tg-nav-link: #B7C4D4;
  --tg-nav-hover: #E2F0FF;
  --signal: #FF3B30;
  --accent: #00E58A;
  --accent-dim: rgba(0, 229, 138, 0.7);
  --dim-green: rgba(0, 229, 138, 0.15);
  /* Surgical emerald — technical, not phosphor */
  --signal-green: #00E58A;
  --tech-green: #00E58A;
  --tech-bg: rgba(0, 229, 138, 0.06);
  --threat-red: rgba(231, 76, 60, 0.3);
  --glass: rgba(17, 24, 33, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --mono: 'Geist Mono', 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --sans: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  /* Layout: single shell width (prose still uses ch on inner blocks) */
  --content-max: 1200px;
  /* Repeated UI colors — prefer these over raw hex in new rules */
  --tg-scroll-track: #151d28;
  --tg-label-sky: #b8e4fc;
  --tg-border-panel: #1C2632;
  --tg-hero-mobile-bg: #111821;
  --tg-cyan-bright: #00e6ff;
  --tg-mid-gray: #9FB0C3;
  --tg-header-bg: #0B0F14;
  /* Reserved space below fixed header (~80px bar + breathing); single source of truth */
  --tg-header-height: 108px;
  --section-padding-y: 96px;
  --gutter: clamp(20px, 5vw, 48px);
  /* Mobile: overridden in @media for consistent layout */
  --gutter-m: 24px;
  --gutter-s: 16px;
  --section-padding-m: 80px;
  --section-padding-s: 56px;
  /* Stacking — overlays, menus, modals (single ladder; avoid ad-hoc z-index) */
  --tg-z-mobile-overlay: 1000;
  --tg-z-menu-trigger: 1002;
  --tg-z-dropdown-panel: 1003;
  --tg-z-modal: 9999;
  --tg-z-consent-banner: 99999;
  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --heading-2: clamp(1.5rem, 3vw, 2.25rem);
  --heading-hero: clamp(1.75rem, 4vw, 2.75rem);
}

html {
  height: 100%;
  width: 100%;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--tg-scroll-track);
}

body {
  font-family: var(--sans);
  background: var(--foundation) !important;
  color: var(--steel);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: var(--text-sm);
  font-weight: 300;
  padding-top: var(--tg-header-height);
  margin: 0;
  display: flex;
  flex-direction: column;
}

html {
  background: var(--foundation) !important;
}

html, body {
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Protocol texture: faint scanline overlay so background isn’t flat */
/* Passive Data Grid: 50px technical schematic (desktop + mobile consistent) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image:
    linear-gradient(rgba(0, 229, 138, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 138, 0.012) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* HUD corner brackets: 1px Emerald frame at viewport corners (desktop + mobile) */
.hud-brackets {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.hud-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: rgba(0, 229, 138, 0.6);
  border-style: solid;
  border-width: 0;
}
.hud-corner.tl { top: 20px; left: 20px; border-top-width: 1px; border-left-width: 1px; }
.hud-corner.tr { top: 20px; right: 20px; border-top-width: 1px; border-right-width: 1px; }
.hud-corner.bl { bottom: 20px; left: 20px; border-bottom-width: 1px; border-left-width: 1px; }
.hud-corner.br { bottom: 20px; right: 20px; border-bottom-width: 1px; border-right-width: 1px; }
@media (max-width: 768px) {
  .hud-corner.tl { top: 12px; left: 12px; }
  .hud-corner.tr { top: 12px; right: 12px; }
  .hud-corner.bl { bottom: 12px; left: 12px; }
  .hud-corner.br { bottom: 12px; right: 12px; }
}

/* Ambient glow: mouse-follow radial (subtle flashlight behind glass) */
.ambient-glow {
  position: fixed;
  width: 120vmax;
  height: 120vmax;
  left: -60vmax;
  top: -60vmax;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at center, rgba(0, 229, 138, 0.06) 0%, transparent 45%);
  opacity: 1;
  transform: translate(0, 0);
  transition: transform 0.15s ease-out;
}

/* CURSOR_SCAN_LIGHT: subtle spotlight following mouse (depth-of-field) */
.cursor-scan-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(
    circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    transparent 0%,
    rgba(11, 15, 20, 0.42) 100%
  );
}
@media (prefers-reduced-motion: reduce) {
  .cursor-scan-light { opacity: 0.5; }
}

@media (max-width: 768px) {
  /* Mouse-follow vignette reads as smear on touch; lighten so typography stays crisp */
  .cursor-scan-light {
    opacity: 0.22;
  }
}

/* Protocol texture: faint overlay */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.06) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.015), rgba(0, 255, 0, 0.008), rgba(0, 0, 255, 0.015));
  background-size: 100% 4px, 3px 100%;
  pointer-events: none;
  z-index: 999;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Two-column shell → single column on mobile (Stripe/Vercel-style contract for new sections) */
.site-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.site-grid > * {
  min-width: 0;
}
@media (max-width: 900px) {
  .site-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   DESIGN SYSTEM — CONTRACT (see DESIGN_RULES.md)
   ========================================================= */

.tg-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  text-align: left;
}

.container.tg-container {
  max-width: var(--content-max);
}

.hero-gateway .hero-container.tg-container {
  max-width: var(--content-max);
  padding-left: 24px;
  padding-right: 24px;
}

.page-home .hero-system-panel {
  margin-top: 14px;
  margin-bottom: 12px;
  max-width: 100%;
  box-sizing: border-box;
}
.page-home .hero-system-panel .hero-snippet-glass {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-home section.tg-section {
  margin-top: 68px;
}

.page-home .hero.hero-gateway + section.tg-section {
  margin-top: 34px;
}

/* Execution trace sits after decision model — extra separation from system bar on mobile */
.page-home #trace-example-home.section.tg-section,
.page-home .execution-trace.section.tg-section {
  margin-top: 48px !important;
  margin-bottom: 0 !important;
}
.page-home #hero-request-example.section.tg-section {
  margin-top: 28px !important;
}
.page-home #the-missing-layer.section.tg-section {
  padding-bottom: 12px;
}

.page-home section.tg-section.tg-section--band {
  background: var(--foundation);
}

.page-home .tg-label {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  opacity: 0.92;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--tg-label-sky);
  margin-bottom: 12px;
  text-shadow: 0 0 28px rgba(125, 211, 252, 0.14);
}

.page-home .tg-body {
  font-size: 16px;
  line-height: 1.65;
  opacity: 0.94;
  color: var(--steel-bright);
  margin-bottom: 4px;
}

.page-home .tg-body p {
  margin: 0 0 0.7rem;
  max-width: 58ch;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  opacity: 1;
  font-weight: 500;
}

/* // HOW TRIGGUARD WORKS — stack, timeline, control/data plane */
.page-home #how-trigguard-works {
  margin-top: 40px;
}

.page-home #how-trigguard-works .tg-arch-node ,

.page-architecture .tg-arch-node {
  border: 1px solid var(--line-strong);
  background: rgba(10, 10, 10, 0.92);
  padding: 1rem 1.15rem;
  text-align: center;
  border-radius: 2px;
}

.page-home #how-trigguard-works .tg-arch-node--gate ,

.page-architecture .tg-arch-node--gate {
  border-color: rgba(0, 229, 138, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 229, 138, 0.08), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.page-home #how-trigguard-works .tg-arch-node--authority ,

.page-architecture .tg-arch-node--authority {
  border-color: rgba(125, 211, 252, 0.35);
}

.page-home #how-trigguard-works .tg-arch-node--surface ,

.page-architecture .tg-arch-node--surface {
  border-color: rgba(255, 255, 255, 0.14);
}

.page-home #how-trigguard-works .tg-arch-node__title ,

.page-architecture .tg-arch-node__title {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-bright);
  font-weight: 500;
  line-height: 1.45;
}

.page-home #how-trigguard-works .tg-arch-node__meta ,

.page-architecture .tg-arch-node__meta {
  display: block;
  margin-top: 0.45rem;
  font-size: var(--text-xs);
  color: var(--steel);
  line-height: 1.5;
}

.page-home #how-trigguard-works .tg-arch-node__surfaces ,

.page-architecture .tg-arch-node__surfaces {
  display: block;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--accent-dim);
  line-height: 1.5;
}

.page-home #how-trigguard-works .tg-arch-bullets ,

.page-architecture .tg-arch-bullets {
  list-style: none;
  margin: 2rem auto 0;
  max-width: 42ch;
  padding: 0;
}

.page-home #how-trigguard-works .tg-arch-bullets li ,

.page-architecture .tg-arch-bullets li {
  position: relative;
  padding-left: 1.1rem;
  margin: 0.65rem 0;
  font-size: var(--text-sm);
  color: var(--steel-bright);
  line-height: 1.5;
  font-weight: 400;
}

.page-home #how-trigguard-works .tg-arch-bullets li::before ,

.page-architecture .tg-arch-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(0, 229, 138, 0.35);
}

.page-home #how-trigguard-works .tg-arch-subtitle ,

.page-architecture .tg-arch-subtitle {
  margin: 2.75rem 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-bright);
  font-weight: 500;
}

.page-home #how-trigguard-works .tg-arch-subcopy ,

.page-architecture .tg-arch-subcopy {
  margin-top: 0.25rem !important;
  margin-bottom: 0 !important;
}

.page-home #how-trigguard-works .tg-arch-timeline ,

.page-architecture .tg-arch-timeline {
  margin: 1.1rem auto 0;
  max-width: min(100%, 520px);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem 1rem 1.1rem;
  border-radius: 2px;
}

.page-home #how-trigguard-works .tg-arch-tl-row ,

.page-architecture .tg-arch-tl-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem 0.65rem;
  align-items: center;
  padding: 0.42rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: var(--text-xs);
}

.page-home #how-trigguard-works .tg-arch-tl-row:last-child ,

.page-architecture .tg-arch-tl-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.page-home #how-trigguard-works .tg-arch-tl-row--gate .tg-arch-tl-actor ,

.page-architecture .tg-arch-tl-row--gate .tg-arch-tl-actor {
  color: var(--accent);
}

.page-home #how-trigguard-works .tg-arch-tl-row--authority .tg-arch-tl-actor ,

.page-architecture .tg-arch-tl-row--authority .tg-arch-tl-actor {
  color: var(--tg-label-sky);
}

.page-home #how-trigguard-works .tg-arch-tl-actor ,

.page-architecture .tg-arch-tl-actor {
  font-family: var(--mono);
  color: var(--steel-bright);
  letter-spacing: 0.04em;
}

.page-home #how-trigguard-works .tg-arch-tl-arrow ,

.page-architecture .tg-arch-tl-arrow {
  color: var(--tg-mid-gray);
  text-align: center;
}

.page-home #how-trigguard-works .tg-arch-tl-phase ,

.page-architecture .tg-arch-tl-phase {
  font-family: var(--mono);
  color: var(--steel);
  text-align: right;
  letter-spacing: 0.03em;
}

.page-home #how-trigguard-works .tg-arch-split ,

.page-architecture .tg-arch-split {
  margin: 1.1rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 560px;
}

.page-home #how-trigguard-works .tg-arch-cp__banner,
.page-home #how-trigguard-works .tg-arch-dp__banner,
.page-architecture .tg-arch-cp__banner,
.page-architecture .tg-arch-dp__banner {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tg-label-sky);
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.page-home #how-trigguard-works .tg-arch-cp ,

.page-architecture .tg-arch-cp {
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(8, 20, 28, 0.55);
  padding: 1rem 1.15rem 1.1rem;
  border-radius: 2px 2px 0 0;
}

.page-home #how-trigguard-works .tg-arch-cp__lead ,

.page-architecture .tg-arch-cp__lead {
  display: block;
  font-size: var(--text-sm);
  color: var(--steel-bright);
  font-weight: 500;
}

.page-home #how-trigguard-works .tg-arch-cp__detail ,

.page-architecture .tg-arch-cp__detail {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--text-xs);
  color: var(--steel);
}

.page-home #how-trigguard-works .tg-arch-split-connector ,

.page-architecture .tg-arch-split-connector {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.page-home #how-trigguard-works .tg-arch-split-connector__line ,

.page-architecture .tg-arch-split-connector__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.page-home #how-trigguard-works .tg-arch-split-connector__tag ,

.page-architecture .tg-arch-split-connector__tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tg-mid-gray);
  white-space: nowrap;
}

.page-home #how-trigguard-works .tg-arch-dp ,

.page-architecture .tg-arch-dp {
  border: 1px solid var(--line-strong);
  border-top: 0;
  background: rgba(10, 10, 10, 0.88);
  padding: 1rem 1.15rem 1.15rem;
  border-radius: 0 0 2px 2px;
}

.page-home #how-trigguard-works .tg-arch-dp__inner ,

.page-architecture .tg-arch-dp__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.page-home #how-trigguard-works .tg-arch-dp__row ,

.page-architecture .tg-arch-dp__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--steel-bright);
  letter-spacing: 0.04em;
  padding: 0.38rem 0;
}

.page-home #how-trigguard-works .tg-arch-dp__row--gate ,

.page-architecture .tg-arch-dp__row--gate {
  color: var(--accent);
}

.page-home #how-trigguard-works .tg-arch-dp__row--authority ,

.page-architecture .tg-arch-dp__row--authority {
  color: var(--tg-label-sky);
}

.page-home #how-trigguard-works .tg-arch-dp__hint ,

.page-architecture .tg-arch-dp__hint {
  font-size: 0.65rem;
  color: var(--steel);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.page-home #how-trigguard-works .tg-arch-dp__chev ,

.page-architecture .tg-arch-dp__chev {
  text-align: center;
  font-size: 0.55rem;
  color: var(--tg-mid-gray);
  line-height: 1;
  padding: 0.1rem 0 0.15rem;
}

@media (max-width: 600px) {
  .page-home #how-trigguard-works .tg-arch-tl-row ,
  .page-architecture .tg-arch-tl-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    text-align: left;
  }

  .page-home #how-trigguard-works .tg-arch-tl-arrow ,

  .page-architecture .tg-arch-tl-arrow {
    display: none;
  }

  .page-home #how-trigguard-works .tg-arch-tl-phase ,

  .page-architecture .tg-arch-tl-phase {
    text-align: left;
    padding-left: 0.15rem;
    opacity: 0.9;
  }
}

/* // THE MISSING LAYER — protocol tone, tight stanzas */
.page-home #the-missing-layer .tg-body--protocol {
  line-height: 1.58;
}

.page-home #the-missing-layer .tg-body--protocol p {
  max-width: 52ch;
}

.page-home #the-missing-layer .tg-stanza-gap {
  margin-top: 0.35rem;
}

.page-home #the-missing-layer hr.tg-rule {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 1.1rem 0 1rem;
  max-width: 40ch;
}

.page-home #the-missing-layer .tg-outcomes-intro {
  margin-top: 0.75rem;
  margin-bottom: 0.15rem;
}

.page-home .tg-protocol-token {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page-home .tg-protocol-token--permit {
  color: var(--accent);
}

.page-home .tg-protocol-token--deny {
  color: #f87171;
}

.page-home .tg-protocol-token--silence {
  color: #94a3b8;
}

.page-home .tg-outcomes {
  font-family: var(--mono);
  font-size: 0.95rem;
  margin: 0 0 0.2rem;
  letter-spacing: 0.02em;
}

.page-home .tg-protocol-sep {
  opacity: 0.45;
  font-weight: 400;
}

/* Terminal-style output for // THE MISSING LAYER */
.tg-terminal {
  font-family: 'Space Grotesk', 'Inter', monospace;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.75);
  max-width: 720px;
}

.tg-terminal .divider {
  opacity: 0.2;
  margin: 12px 0;
}

.tg-decision {
  color: #7ee787;
  letter-spacing: 2px;
  font-weight: 600;
}

/* Execution licensing band (homepage): no SaaS grid */
.page-home .page-home-authority .tg-licensing-headline {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 1.25rem;
  max-width: 22ch;
  line-height: 1.25;
}

.page-home .tg-body--licensing p {
  max-width: 52ch;
}

.page-home .tg-cta-inline {
  margin-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.page-home .tg-cta-inline a {
  color: var(--accent);
  opacity: 0.88;
  text-decoration: none;
}

.page-home .tg-cta-inline a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-home .page-home-authority.tg-section--band {
  padding: 80px 0;
  background: var(--panel);
}

.page-home .tg-title {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--white);
  margin: 0 0 16px;
}

.page-home h2.tg-flow {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 24px !important;
  max-width: 100%;
}

.page-home .tg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  font-family: var(--mono);
}

.page-home .tg-chips span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: var(--steel-bright);
  background: var(--panel);
}

.page-home .tg-flow-path {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 4px;
  max-width: 42rem;
  font-family: var(--mono);
  font-size: 14px;
}

.page-home .tg-flow-path__step {
  background: var(--panel);
  padding: 10px 14px;
  border: 1px solid var(--line);
  color: var(--steel-bright);
}

.page-home .tg-flow-path__step--accent {
  background: rgba(0, 229, 138, 0.1);
  border-color: rgba(0, 229, 138, 0.35);
  color: var(--accent);
  font-weight: 600;
}

.page-home .tg-flow-path__arrow {
  opacity: 0.55;
  padding-left: 4px;
  line-height: 1;
}

.page-home #hero-request-example > .tg-container > .tg-label {
  margin-bottom: 14px !important;
}

.page-home .execution-flow-section .tg-container .flow-diagram-wrap {
  margin-left: 0;
  margin-right: auto;
}

.page-home .execution-flow-caption {
  text-align: left;
  max-width: 60ch;
  font-size: 0.95rem;
  line-height: 1.62;
  opacity: 0.92;
}

.page-home .execution-flow-steps.execution-flow-steps--compact {
  align-items: flex-start;
  margin-top: 20px;
}

.page-home .execution-flow-section-label {
  margin-bottom: 12px !important;
}

@media (max-width: 768px) {
  .tg-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-home h2.tg-flow {
    font-size: 22px;
  }

  .page-home .tg-title {
    font-size: 36px;
  }

  .page-home .tg-label {
    font-size: 13px;
    letter-spacing: 0.12em;
  }

  .page-home .tg-body {
    font-size: 15px;
  }
}

section {
  padding: var(--section-padding-y) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

section + section {
  border-top: none;
}

h1, h2, h3, h4 {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--tg-text-heading);
  text-align: left;
}

p {
  max-width: 60ch;
  line-height: 1.7;
  color: var(--steel);
  text-align: left;
  font-weight: 300;
}

/* Accent: soft green for hovers only; body text stays readable (steel/white) */
a:visited {
  color: inherit;
}
.nav-link,
.nav-links a,
.mobile-overlay .glitch-link,
.tg-footer-col a {
  color: var(--tg-nav-link);
}
.nav-link:hover,
.nav-links a:hover,
.mobile-overlay .glitch-link:hover,
.tg-footer-col a:hover {
  color: var(--tg-nav-hover) !important;
  text-shadow: 0 0 12px rgba(0, 229, 138, 0.12);
}
.text-accent {
  color: var(--accent) !important;
  text-shadow: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 1px solid var(--steel);
  outline-offset: 2px;
}

/* =========================================================
   HEADER (80px tall)
   ========================================================= */

/* Only .header — never bare `header` or in-page <header> (e.g. tg-failure-report__header)
   would inherit fixed 80px bar and clip its content. */
.header,
.nav-container,
.top-bar {
  height: 80px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--tg-header-bg) !important;
  background-image: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1001;
  padding: 0;
}


.header .container {
  display: flex;
  flex-wrap: nowrap;
  min-width: 0;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  max-width: var(--content-max);
  padding: 0 24px;
  gap: 10px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  min-width: max-content;
}

.logo-container a {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #E0E0E0;
}

.logo-name {
  font-weight: 600;
  letter-spacing: 0.14em;
}

.logo-divider {
  width: 1px;
  height: 18px;
  background: rgba(224,224,224,0.15);
}

.logo-rev {
  color: rgba(224,224,224,0.45);
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: clamp(14px, 1.8vw, 28px);
  justify-content: center;
  margin-left: clamp(10px, 1.2vw, 20px);
  margin-right: clamp(8px, 1vw, 16px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  /* Hide stray scrollbar on very wide viewports (no overflow) */
  scrollbar-color: rgba(0, 229, 138, 0.38) transparent;
}

.nav-links::-webkit-scrollbar {
  height: 4px;
}

.nav-links::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 138, 0.38);
  border-radius: 2px;
}

.nav-links a,
.nav-links .nav-link {
  position: relative;
  color: var(--tg-nav-link);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  transition: color 0.2s ease;
  padding-bottom: 4px;
}

.nav-links a:hover,
.nav-links .nav-link:hover {
  color: var(--tg-nav-hover);
  animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes glitch-skew {
  0% { transform: skew(0deg); }
  20% { transform: skew(-3deg); }
  40% { transform: skew(3deg); }
  60% { transform: skew(-1deg); }
  80% { transform: skew(1deg); }
  100% { transform: skew(0deg); }
}

.nav-links .nav-link:hover::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0.8;
  color: var(--tg-nav-hover);
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  animation: glitch-anim 0.3s linear alternate-reverse infinite;
  pointer-events: none;
}

@keyframes glitch-anim {
  0% { clip-path: polygon(0 15%, 100% 15%, 100% 30%, 0 30%); transform: translateX(-2px); }
  100% { clip-path: polygon(0 70%, 100% 70%, 100% 85%, 0 85%); transform: translateX(2px); }
}

.nav-links a.active,
.nav-links .nav-link.active {
  color: var(--tg-text-heading) !important;
  border-bottom: 1px solid var(--tg-surface-border);
}

/* Auth: sibling of .nav-links — stays on one row while primary links scroll horizontally */
.header .nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.header .nav-auth .nav-link-login {
  color: var(--tg-nav-link) !important;
  opacity: 1;
}

.header .nav-auth .nav-link-login:hover {
  color: var(--tg-nav-hover) !important;
  opacity: 1;
}

/* Sign up: scanline border (top + bottom only), no solid fill */
.nav-auth .nav-link-cta {
  padding: 6px 12px;
  border: none;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  border-radius: 0;
  background: transparent !important;
  color: var(--accent) !important;
}

.nav-auth .nav-link-cta:hover {
  border-top-color: rgba(0, 229, 138, 0.9);
  border-bottom-color: rgba(0, 229, 138, 0.9);
  color: var(--accent) !important;
}

/* Primary conversion CTA — visible on desktop header */
.nav-auth .nav-link-demo {
  padding: 7px 12px;
  border: 1px solid rgba(0, 229, 138, 0.55);
  border-radius: 0;
  background: rgba(0, 229, 138, 0.1);
  color: #00E58A !important;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-auth .nav-link-demo:hover {
  background: rgba(0, 229, 138, 0.18);
  border-color: rgba(0, 229, 138, 0.95);
  color: #00E58A !important;
}

@media (max-width: 900px) {
  .header .nav-auth .nav-link-demo {
    display: none;
  }
}

/* Same CTA style outside header (e.g. pricing hero) */
a.nav-link-demo {
  padding: 8px 14px;
  border: 1px solid rgba(0, 229, 138, 0.55);
  border-radius: 0;
  background: rgba(0, 229, 138, 0.1);
  color: #00E58A !important;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

a.nav-link-demo:hover {
  background: rgba(0, 229, 138, 0.18);
  border-color: rgba(0, 229, 138, 0.95);
  color: #00E58A !important;
}

/* Mobile overlay: Login / Sign up on one line */
.overlay-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.overlay-auth-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  pointer-events: none;
}

@media (max-width: 500px) {
  .header {
    height: auto;
    min-height: 60px;
    padding: 10px 0;
  }
  .header .container {
    padding: 0 var(--gutter);
  }
  .nav-links {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .nav-links a {
    font-size: 0.68rem;
  }
  /* Keep TRIGGUARD wordmark visible on mobile for consistency */
}

/* =========================================================
   MOBILE: Single breakpoint for consistent gutters and layout
   ========================================================= */
@media (max-width: 768px) {
  :root {
    --gutter-m: 24px;
    --section-padding-m: 80px;
  }
  .container,
  .hero-container {
    padding-left: var(--gutter-m);
    padding-right: var(--gutter-m);
  }
  section {
    padding: var(--section-padding-m) 0;
  }
  .section-label {
    font-size: 0.7rem;
    margin-bottom: 10px;
  }
  .section h2,
  section h2 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-bottom: 16px;
  }
  .section > .container > p,
  .section > .container > h2 + p {
    font-size: 0.9rem;
  }
  .page-hero {
    padding: 80px 0 48px;
  }
  .page-hero h1 {
    font-size: clamp(1.35rem, 5vw, 1.85rem);
  }
  .page-hero p {
    font-size: 0.9rem;
  }
  .code-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .code-example pre,
  .code-example code {
    font-size: 0.72rem;
  }
  .system-matrix .matrix-row {
    padding: 12px var(--gutter-m);
    font-size: 0.78rem;
  }
  .handshake-form,
  .request-form {
    max-width: 100%;
  }
  .access-request-section,
  .contact-section {
    padding-top: var(--section-padding-m) !important;
    padding-bottom: var(--section-padding-m) !important;
  }
  .contact-grid.access-grid {
    gap: 32px;
  }
  .bento-section,
  .execution-flow-section {
    padding: var(--section-padding-m) 0;
  }
  /* Stack 4- and 5-column grids (pricing, CTA) on mobile to match desktop content order */
  #pricing-hint > .container > div[style*="grid"],
  #cta > .container > div[style*="grid"],
  .section div[style*="repeat(4, 1fr)"],
  .section div[style*="repeat(5, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  /* Where it runs (design contract): readable on small screens */
  .page-home .tg-flow-path {
    font-size: 0.8rem;
    gap: 6px;
  }
  /* Hero terminal (execution protocol): no horizontal overflow */
  .hero-snippet-glass,
  .terminal-window.hero-snippet-order-mobile {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .hero-snippet-glass .hero-bridge {
    word-break: break-word;
  }
  /* Execution flow steps: vertical stack */
  .execution-flow-steps {
    gap: 6px;
    justify-content: center;
  }
  .flow-diagram-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .flow-diagram-wrap .flow-diagram-svg {
    max-width: 100%;
    height: auto;
  }
  .diagram-caption {
    max-width: 100%;
    font-size: 0.75rem;
  }
  /* Boundary and security sections: full width on mobile */
  .boundary-diagram {
    max-width: 100%;
  }
  .works-with {
    max-width: 100%;
  }
  .works-with span {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  .security-proof-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .spec-links {
    grid-template-columns: 1fr !important;
  }
  .surface-registry .surface-entry {
    padding: 16px 0;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter-s: 16px;
    --section-padding-s: 56px;
  }
  .container,
  .hero-container {
    padding-left: var(--gutter-s);
    padding-right: var(--gutter-s);
  }
  section {
    padding: var(--section-padding-s) 0;
  }
  .section h2,
  section h2 {
    font-size: 1.25rem;
  }
  .page-hero {
    padding: 56px 0 32px;
  }
  .page-hero h1 {
    font-size: 1.3rem;
  }
  .system-matrix .matrix-row {
    padding: 10px var(--gutter-s);
  }
  .integrity-footer.system-bar {
    padding: 0 var(--gutter-s);
  }
  .access-request-section,
  .contact-section {
    padding-top: var(--section-padding-s) !important;
    padding-bottom: var(--section-padding-s) !important;
  }
}

@media (max-width: 768px) {
  .menu-trigger {
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 1002; /* above fixed header so label never collides visually */
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid rgba(0, 229, 138, 0.4);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  }
  .header,
  .mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--mono);
    font-size: 10px;
    color: #555;
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    /* Match page background exactly — no tint, no blur */
    background: var(--foundation) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .header {
    height: auto;
    min-height: 56px;
    /* Safe area: bar extends to top of screen; content sits below notch/Dynamic Island */
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-bottom: 10px;
    /* Horizontal padding lives on .container only — avoids double gutters + lopsided hero alignment */
    padding-left: 0;
    padding-right: 0;
    background: var(--foundation) !important;
  }
  .header .container {
    flex-wrap: nowrap;
    gap: 0;
    padding: 0 16px;
    padding-right: 80px; /* reserve for fixed MENU control */
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    align-items: center;
  }
  .nav-links {
    display: none !important;
    visibility: hidden !important;
  }
  .logo-meta {
    margin-right: auto;
    display: flex !important;
    font-size: 10px;
    letter-spacing: 0.2em;
  }
  .logo-name {
    display: inline-block !important;
    letter-spacing: 0.2em;
  }
  .nav-links a,
  .nav-link {
    flex-shrink: 0;
    color: #888 !important;
  }
  .nav-links a:hover,
  .nav-link:hover {
    color: var(--tech-green) !important;
  }
  .nav-links a.active,
  .nav-link.active {
    color: #fff !important;
  }
  .hero h1,
  .hero .gradient-text {
    margin-bottom: 32px !important;
  }
  .hero-snippet-glass,
  .code-snippet-live,
  .quickstart-code,
  pre,
  .code-split .code-block {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
  }
}

/* =========================================================
   BOOT OVERLAY (Terminal intro — once per session)
   ========================================================= */

.boot-overlay {
  position: fixed;
  inset: 0;
  background: var(--foundation);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.5rem;
  z-index: var(--tg-z-modal);
  font-family: var(--mono), 'JetBrains Mono', monospace;
  color: #00E58A;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.boot-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

.boot-overlay .boot-text {
  position: relative;
  z-index: 1;
  padding-top: 15vh;
}

.boot-line {
  font-size: 14px;
  letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(0, 229, 138, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.boot-line-ok {
  color: #00E58A;
  margin-top: 0.5rem;
}

/* =========================================================
   HERO SECTION (Homepage — wider layout, grid, data beam)
   ========================================================= */

.hero {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 0;
  background: var(--foundation);
  border-top: none;
  overflow: visible;
}

.hero-gateway {
  display: grid;
  grid-template-columns: 1fr;
  align-items: flex-start;
  gap: 2rem;
  min-height: 0;
  flex-shrink: 0;
  background: var(--foundation);
  overflow: visible;
  max-width: 100vw;
  position: relative;
  padding-top: 0;
}

/* Hero background: subtle grid + framing brackets (desktop only) */
.hero-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 200, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 200, 0.06) 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: 0.02;
}

.hero-bracket-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1200px;
  max-width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-bracket {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono), monospace;
  font-size: 420px;
  line-height: 1;
  opacity: 0.04;
  color: var(--tg-cyan-bright);
}

.hero-bracket-left { left: -0.08em; }
.hero-bracket-right { right: -0.08em; left: auto; }

@media (max-width: 1199px) {
  .hero-bg-layer { display: none; }
}

@media (min-width: 1200px) {
  .hero-gateway {
    grid-template-columns: 1fr minmax(200px, 280px);
    align-items: start;
    gap: 2rem 2rem;
    max-width: min(var(--content-max), 100%);
    margin: 0 auto;
    padding: 0 24px;
  }
  .hero-gateway .hero-flank.left-flank { display: none !important; }
  .hero-gateway .hero-container.hero-center { grid-column: 1; }
  .hero-gateway .hero-flank.right-flank {
    grid-column: 2;
    justify-self: end;
    max-width: none;
    width: auto;
    margin: 0;
    align-self: start;
  }
  .hero-gateway .hero-flank { position: relative; z-index: 1; }
  /* No giant bracket frame between columns — was causing L-shaped clutter */
  .hero-gateway .hero-bg-layer,
  .hero-gateway .hero-bracket-frame { display: none !important; }
}


.hero-gateway .hero-container {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  min-width: 0;
  overflow: visible;
}

@media (min-width: 1200px) {
  .hero-gateway .hero-container.hero-center {
    grid-row: 1;
    align-self: start;
    position: relative;
    z-index: 1;
  }
}

/* Data wall hidden — hero is content-only for a clean landing */
.hero-gateway #canvas-container {
  display: none !important;
}

/* Hero flanks: left trace is decorative/off. Right specs panel stacks under hero < 1200px (credibility). */
.hero-flank.left-flank {
  display: none !important;
  padding-left: 2rem;
}

.hero-flank.right-flank {
  display: block;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  max-width: 420px;
  margin: clamp(12px, 4vw, 24px) auto 0;
  justify-self: center;
  pointer-events: auto;
}

/* Stacked specs panel: left-align labels (was right-aligned for desktop sidebar) */
@media (max-width: 1199px) {
  .hero-flank.right-flank .specs-bracket-block {
    text-align: left;
  }
}

@media (max-width: 900px) {
  .page-home .hero-gateway .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .hero-flank.right-flank {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-flank.right-flank .specs-bracket-block .specs-label {
    font-size: 11px;
    letter-spacing: 0.08em;
  }
}

.live-trace-monitor {
  position: relative;
  top: 15%;
  bottom: 15%;
  width: 100%;
  max-width: 250px;
  font-family: var(--mono), 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(0, 229, 138, 0.25);
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.live-trace-monitor .trace-scroll-container {
  display: flex;
  flex-direction: column;
  animation: scroll-trace 60s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .live-trace-monitor .trace-scroll-container {
    animation: none;
  }
}

@keyframes scroll-trace {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.trace-line {
  margin-bottom: 10px;
  white-space: nowrap;
  opacity: 0.15;
}

.trace-line .status {
  color: rgba(0, 229, 138, 0.5);
  margin-right: 8px;
}

.protocol-specs-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 16px;
  gap: 0;
  background: var(--panel);
  border: 1px solid rgba(183, 196, 212, 0.14);
  border-radius: 6px;
  min-width: 180px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.2);
}

/* Vertical trace line connecting parameter boxes (data stream) */
.protocol-specs-sidebar.specs-trace-stream {
  position: relative;
}
.specs-trace-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 229, 138, 0.1);
  pointer-events: none;
  border-radius: 1px;
}

.specs-bracket-block {
  position: relative;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(183, 196, 212, 0.1);
  background: rgba(11, 15, 20, 0.35);
  min-width: 0;
  text-align: right;
  border-left: 2px solid rgba(0, 229, 138, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.specs-bracket-block:last-child {
  border-bottom: none;
}

.specs-bracket-block::before,
.specs-bracket-block::after {
  display: none;
}

.specs-bracket-block .specs-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: rgba(0, 229, 138, 0.6);
  margin-bottom: 2px;
}

.specs-bracket-block .specs-value {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--tg-text-muted);
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 8% clamp(2rem, 5vh, 3rem) 8%;
}

.hero-main {
  max-width: var(--content-max);
  min-width: 0;
  margin: 0;
  padding: 0;
  display: block;
  opacity: 1 !important;
  position: relative;
  z-index: 10;
  padding-left: 0;
  padding-right: 0;
  pointer-events: auto;
  background: rgba(17, 24, 33, 0.92);
  border: 1px solid var(--tg-surface-border);
  border-left: 3px solid rgba(0, 229, 138, 0.45);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
  padding: 24px 20px 28px;
  overflow: visible;
}

.hero-main * {
  pointer-events: auto;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: clamp(32px, 4vw, 60px);
  min-height: 0;
  padding-top: 0;
}

/* System header: no brackets, wide letter-spacing, vertical anchor */
.hero-boundary-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.78;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-boundary-label::before {
  content: "";
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .hero-boundary-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 6px;
    line-height: 1.35;
    max-width: 100%;
    padding-right: 2px;
    box-sizing: border-box;
  }
  .hero-boundary-label::before {
    height: 10px;
    margin-top: 3px;
    flex-shrink: 0;
  }
}

/* Monolith: code block + CTAs as single interface */
.hero-interface {
  margin-top: 0;
  border: 1px solid var(--tg-border-panel);
  background: rgba(0, 229, 138, 0.05);
  box-shadow: 0 0 0 1px rgba(0, 229, 138, 0.08);
}

/* Terminal window: header bar + compact code block */
.terminal-window {
  border: 1px solid rgba(0, 229, 138, 0.2);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(15, 15, 15, 0.95);
}
.terminal-header {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: rgba(0, 229, 138, 0.5);
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.3);
}
.terminal-window .hero-snippet-glass {
  margin-top: 0;
  padding: 12px 16px;
  border-radius: 0;
  border: none;
  border-left: none;
  background: transparent;
  box-shadow: none;
}
.hero-interface .hero-snippet-glass {
  margin-top: 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.hero-interface .hero-ctas {
  margin: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--tg-border-panel);
  background: rgba(0, 0, 0, 0.25);
}

.hero-left {
  padding-right: clamp(12px, 2vw, 24px);
  max-width: var(--content-max);
}

.hero-left h1:not(.hero-headline-kernel),
.hero-main h1:not(.hero-headline-kernel) {
  max-width: 100%;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  color: var(--white) !important;
}

.hero-left h1.hero-headline-kernel,
.hero-main h1.hero-headline-kernel {
  max-width: 100%;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  color: var(--white) !important;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Single sub-headline: 24px below headline, 32px above rule, dimmed for hierarchy */
.hero-subheadline {
  font-family: var(--sans);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.7;
  margin-bottom: 32px;
  max-width: 42ch;
  line-height: 1.6;
  font-weight: 400;
}

.hero-headline-kernel {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-shadow:
    0 0 24px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(0, 229, 138, 0.12),
    0 0 40px rgba(0, 229, 138, 0.06);
}

.hero-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  align-items: center;
}

.hero-actions .cta-primary,
.hero-actions .cta-secondary {
  flex: 0 1 auto;
  min-width: 140px;
  white-space: nowrap;
}

/* 3D canvas: expansive, scaled and softened so it doesn't feel tiny or harsh */
.hero-right {
  position: absolute !important;
  top: 0;
  right: 0;
  bottom: 0;
  width: 45%;
  max-width: 520px;
  z-index: 0 !important;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
#canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 50vh;
  z-index: 0;
  pointer-events: none;
  background: var(--foundation);
  -webkit-mask-image: linear-gradient(to left, black 60%, transparent 100%);
  mask-image: linear-gradient(to left, black 60%, transparent 100%);
}

#canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-left {
  position: relative;
  z-index: 10;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 3;
  max-height: 520px;
  min-height: 280px;
  margin: 0 auto;
  background: transparent;
  transform: scale(1.15);
  filter: blur(0.5px);
  -webkit-mask-image: radial-gradient(ellipse 80% 95% at 60% 50%, black 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 95% at 60% 50%, black 25%, transparent 80%);
}

.hero-right .hero-canvas-wrapper {
  max-width: 100%;
}

/* Attestation log stream (fixed overlay; does not affect layout width) */
#attestation-stream {
  position: fixed !important;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  height: 200px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--signal-green);
  opacity: 0.85;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 2;
}

#attestation-stream .log-entry {
  animation: attestation-fade 2s forwards;
  white-space: nowrap;
  padding-left: 8px;
  border-left: 2px solid transparent;
  min-width: max-content;
}

#attestation-stream .log-entry.success {
  color: #00E58A;
  border-left-color: #00E58A;
}

#attestation-stream .log-entry.failure {
  color: #e74c3c;
  border-left-color: #e74c3c;
  text-shadow: 0 0 5px rgba(231, 76, 60, 0.4);
}

@keyframes attestation-fade {
  0% { opacity: 0; transform: translateX(15px); }
  10% { opacity: 1; transform: translateX(0); }
  85% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* System interference (headline flicker on intercept) */
.glitch-active {
  animation: system-flicker 0.15s ease-out 2;
}

@keyframes system-flicker {
  0% { opacity: 1; transform: skew(0deg); color: #fff; }
  20% { opacity: 0.3; transform: skew(2deg); color: #e74c3c; }
  40% { opacity: 1; transform: skew(-1deg); }
  60% { opacity: 0.5; color: #e74c3c; }
  100% { opacity: 1; transform: skew(0deg); color: inherit; }
}

/* Narrow viewport: single column so hero snippet + CTAs don't get cut off */
@media (max-width: 1024px) {
  .hero-gateway {
    grid-template-columns: 1fr;
    min-height: 60vh;
  }
  .hero-gateway #canvas-container {
    display: none !important;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-links a,
  .nav-links .nav-link {
    font-size: 0.68rem;
  }
}

@media (max-width: 768px) {
  #attestation-stream {
    display: none !important; /* Free full width for hero on mobile; stream is decorative */
  }
  .hero-gateway {
    grid-template-columns: 1fr;
    min-height: 60vh;
  }
  .hero-gateway #canvas-container {
    display: none !important; /* Stack text only on mobile */
  }
}

/* Vertical data beam through particle funnel */
.data-beam {
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 130%;
  max-height: 520px;
  background: linear-gradient(
    to bottom,
    rgba(0, 200, 255, 0),
    rgba(0, 200, 255, 0.6),
    rgba(0, 200, 255, 0)
  );
  filter: blur(2px);
  opacity: 0.7;
  pointer-events: none;
  animation: beamPulse 4s ease-in-out infinite;
}

@keyframes beamPulse {
  0% { opacity: 0.4; }
  50% { opacity: 0.9; }
  100% { opacity: 0.4; }
}

/* Platform glow under particle funnel */
.platform-glow {
  display: none;
}

#monolith-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
}

.boundary-tag {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  /* Hidden: looked like debug text in production */
}

.hero h1,
.hero .gradient-text {
  font-size: var(--heading-hero);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--tg-text-heading);
  margin-bottom: 0;
  line-height: 1.15;
  text-align: left;
  opacity: 0.98;
  text-shadow: 0 0 28px rgba(214, 226, 240, 0.06);
}

.hero-spec {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--steel);
  opacity: 0.35;
  margin-bottom: 32px;
}

.hero-subtitle {
  font-family: var(--sans);
  font-size: var(--text-sm);
  color: var(--tg-text-body);
  margin-bottom: 1.5rem;
  max-width: 42ch;
  line-height: 1.65;
  font-weight: 400;
  text-align: left;
}

/* Inline system status rail — compact infra chips (home hero) */
.hero-status-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 2px 0 18px;
  max-width: 100%;
}
.hero-status-rail[role="status"] {
  font-family: var(--mono);
}
.hero-status-chip {
  display: inline-block;
  padding: 8px 10px;
  border: 1px solid rgba(183, 196, 212, 0.12);
  background: rgba(17, 24, 33, 0.72);
  color: var(--tg-text-muted);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.25;
}

/* Protocol rule: indented nested logic, 32px below subheadline, 40px above code */
.hero-rule-line {
  font-family: var(--mono), 'JetBrains Mono', monospace;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  margin-left: 20px;
  margin-bottom: 40px;
  max-width: 52ch;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.access-link {
  display: inline-block;
  color: var(--white);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--white);
  padding-bottom: 2px;
  font-weight: 400;
}

.access-link:hover {
  border-bottom-color: var(--steel);
}

/* Code card hero — readable, not harsh */
.hero-snippet-glass {
  margin-top: 24px;
  padding: 20px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(17, 24, 33, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--tg-surface-border);
  border-left: 3px solid rgba(0, 229, 138, 0.4);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hero-snippet-glass .hero-bridge {
  margin-top: 0;
}

.hero-bridge {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--steel);
  font-family: var(--mono);
  letter-spacing: 0.02em;
  text-align: left;
  font-weight: 300;
  max-width: 42ch;
}

/* Terminal pulse cursor: blinking underscore, Emerald (hero + all code blocks) */
.code-cursor::after {
  content: "_";
  animation: cursor-blink 1s step-end infinite;
  color: #00E58A;
  margin-left: 2px;
}
.terminal-cursor {
  display: inline;
  font-family: inherit;
  animation: cursor-blink 1s step-end infinite;
  color: #00E58A;
  margin-left: 2px;
}

@keyframes cursor-blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

/* Syntax: dim braces and arrow so keys pop */
.hero-bridge .snippet-brace,
.hero-bridge .snippet-arrow {
  opacity: 0.5;
  color: var(--steel);
}
.hero-bridge .snippet-token {
  color: rgba(0, 229, 138, 0.95);
}
.hero-bridge .snippet-line {
  color: rgba(0, 229, 138, 0.9);
}

/* Interactive snippet: clickable tokens with tooltips */
.hero-bridge.code-snippet-live .snippet-line,
.hero-bridge.code-snippet-live .snippet-token {
  cursor: help;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
  position: relative;
}
.hero-bridge.code-snippet-live .snippet-line:hover,
.hero-bridge.code-snippet-live .snippet-token:hover {
  color: rgba(0, 229, 138, 1);
}
.hero-bridge .snippet-line:focus-visible,
.hero-bridge .snippet-token:focus-visible {
  outline: 1px solid var(--steel);
  outline-offset: 2px;
}

/* Hero CTAs */
.hero-ctas {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

/* Equal-width buttons when two CTAs sit side by side */
.hero-ctas .cta-primary,
.hero-ctas .cta-secondary {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  min-width: 160px;
}

/* Primary CTA: scanline outline — matches 3D field, no solid “screaming” block */
.cta-primary,
.btn-primary {
  display: inline-block;
  padding: 14px 28px;
  background: transparent !important;
  color: var(--signal-green) !important;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--signal-green) !important;
  box-shadow: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.cta-primary:hover,
.btn-primary:hover {
  background: rgba(0, 229, 138, 0.08) !important;
  border-color: var(--signal-green) !important;
  box-shadow: 0 0 12px rgba(0, 229, 138, 0.25);
  transform: translateY(-2px);
}

.cta-secondary {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s ease, color 0.2s ease;
  border-radius: 2px;
}

.cta-secondary:hover {
  border-color: var(--steel-bright);
  color: var(--white);
}

/* Code example block */
.code-example {
  margin-top: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.code-example pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
}

.code-example code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--steel-bright);
  line-height: 1.6;
  white-space: pre;
}

.code-example .code-comment {
  color: var(--steel);
  opacity: 0.6;
}

/* Verify block */
.verify-block {
  margin-top: 48px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.verify-block h3 {
  font-size: 0.85rem;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.verify-block p {
  font-size: 0.85rem;
  margin: 0;
}

.verify-block code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--white);
  background: rgba(255,255,255,0.05);
  padding: 2px 6px;
}

/* Receipt features */
.receipt-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 48px;
  background: var(--line);
  border: 1px solid var(--line);
}

.receipt-feature {
  background: var(--panel);
  padding: 28px 24px;
}

.receipt-feature strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  font-weight: 500;
}

.receipt-feature p {
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .hero-ctas {
    flex-direction: column;
    gap: 12px;
  }
  .cta-primary,
  .cta-secondary {
    text-align: center;
  }
  .receipt-features {
    grid-template-columns: 1fr;
  }
}

/* Execution flow diagram (SVG path animation) */
.execution-flow-section {
  padding: var(--section-padding-y) 0;
  background: var(--foundation);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.flow-diagram-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.flow-diagram-svg {
  display: block;
  margin: 0 auto;
}

.flow-line {
  stroke-dasharray: 8;
  animation: flow 3s linear infinite;
}

@keyframes flow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -40; }
}

.engine-node {
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.6));
}

.execution-flow-steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--steel);
}
.flow-step-item { color: var(--white); }
.flow-step-arrow { opacity: 0.5; }

/* Mobile-first rescue: breathing room, ghost buttons, 3D scale */
@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 0;
    padding: 64px 0 80px;
    overflow: visible;
  }
  .hero-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
  }
  .hero-main {
    padding-left: 0;
    padding-right: 0;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    height: auto;
    gap: 40px;
  }
  .hero-left {
    padding-right: 0;
    padding-top: 0;
    gap: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
  }
  .hero h1,
  .hero .gradient-text {
    font-size: 2.2rem !important;
    line-height: 1.1;
    margin-top: 15vh;
    margin-bottom: 12px;
    letter-spacing: -1px;
  }
  /* Home: boundary label + H1 stack under the fixed header — drop viewport-based H1 offset */
  .page-home .hero-main h1.hero-headline-kernel,
  .page-home .hero-main h1.gradient-text {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
  }
  .hero-subtitle,
  .hero-rule-line,
  .hero-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 25px;
  }
  .hero-rule-line {
    margin-bottom: 20px;
  }
  .hero-actions,
  .hero-ctas {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
  }
  .hero-actions .cta-primary,
  .hero-actions .cta-secondary,
  .hero-ctas .cta-primary,
  .hero-ctas .cta-secondary,
  .btn-primary,
  .btn-ghost {
    width: 100%;
    padding: 16px;
    text-align: center;
    font-size: 0.8rem;
    background: rgba(0, 229, 138, 0.05) !important;
    border: 1px solid rgba(0, 229, 138, 0.4) !important;
    color: var(--signal-green) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
  }
  .hero-actions .cta-secondary,
  .hero-ctas .cta-secondary {
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
  }
  .hero-actions .cta-secondary:hover,
  .hero-ctas .cta-secondary:hover {
    border-color: #e0e0e0 !important;
    color: #fff !important;
  }
  #canvas-container {
    top: 0;
    left: 0;
    right: auto;
    width: 100vw;
    height: 100vh;
    transform: scale(1.5);
    opacity: 0.2;
    position: fixed !important;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero-right {
    position: relative;
    width: 100%;
    min-height: 240px;
    order: -1;
  }
  .hero-canvas-wrapper {
    position: relative;
    max-height: 320px;
    min-height: 200px;
    aspect-ratio: 4 / 3;
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 45%, black 40%, transparent 85%);
    mask-image: radial-gradient(ellipse 90% 90% at 50% 45%, black 40%, transparent 85%);
  }
  .data-beam {
    max-height: 360px;
    top: -10%;
  }
  .execution-flow-section {
    padding: var(--section-padding-y) 0;
  }
  .flow-diagram-svg {
    max-height: 160px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 56px 0 72px;
  }
  .hero h1,
  .hero .gradient-text {
    font-size: 1.75rem !important;
    margin-top: 12vh;
  }
  .page-home .hero-main h1.hero-headline-kernel,
  .page-home .hero-main h1.gradient-text {
    margin-top: 0 !important;
  }
  .hero-subtitle,
  .hero-rule-line {
    font-size: 0.9rem;
  }
}

/* =========================================================
   SECTIONS
   ========================================================= */

.section-label {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--steel);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.5;
}

.section h2, section h2 {
  font-size: var(--heading-2);
  color: var(--white);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  text-align: left;
}

.section > .container > p {
  font-size: clamp(0.88rem, 1.3vw, 0.95rem);
  color: var(--steel);
  max-width: 60ch;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

/* Home page: brighter text + tighter visual hierarchy */
.page-home {
  color: var(--steel-bright);
}
.page-home p,
.page-home .section > .container > p,
.page-home .hero-subtitle,
.page-home .hero-rule-line,
.page-home .hero-bridge,
.page-home .hero-bridge .snippet-brace,
.page-home .hero-bridge .snippet-arrow,
.page-home .section-label,
.page-home .tg-body,
.page-home .tg-body p,
.page-home .tg-chips span,
.page-home .tg-flow-path__step,
.page-home .tg-flow-path__step--accent,
.page-home .tg-flow-path__arrow,
.page-home .execution-flow-steps,
.page-home .flow-step-arrow,
.page-home .flow-caption-oneline,
.page-home .diagram-caption,
.page-home .hero-boundary-label,
.page-home .hero-arch-line,
.page-home .hero-subheadline,
.page-home .bento-item p {
  color: var(--steel-bright) !important;
}
.page-home .section-label {
  opacity: 0.88;
  margin-bottom: 8px;
}
.page-home .hero-subheadline {
  opacity: 0.92;
}
.page-home .hero-boundary-label {
  opacity: 0.9;
}
.page-home .specs-bracket-block .specs-label {
  color: rgba(0, 229, 138, 0.88);
}
.page-home .specs-bracket-block .specs-value {
  color: rgba(255, 255, 255, 0.78);
}
.page-home .hero-bridge .snippet-brace,
.page-home .hero-bridge .snippet-arrow {
  opacity: 0.75;
}
.page-home .nav-links a,
.page-home .nav-links .nav-link {
  color: var(--tg-nav-link);
}
.page-home .nav-links a.active,
.page-home .nav-links .nav-link.active {
  color: var(--tg-text-heading) !important;
}
/* Tighter section spacing on home (~12% denser vertical rhythm) */
.page-home section,
.page-home .execution-flow-section {
  padding: 54px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.page-home section + section {
  border-top: none;
}
.page-home .section h2,
.page-home section h2 {
  margin-bottom: 14px;
}
.page-home .section > .container > p {
  margin-bottom: 0.25rem;
}
.page-home .flow-diagram-wrap + .execution-flow-steps {
  margin-top: 16px;
}
.page-home .execution-flow-section h2:not(.tg-flow) {
  margin-bottom: 32px !important;
}

/* Hero fit viewport: compact so [ REQUEST → DECISION ] + snippet + CTAs visible above fold */
.page-home .hero-gateway {
  padding-top: 0;
  padding-bottom: 16px;
}

@media (max-width: 768px) {
  .page-home .hero.hero-gateway {
    padding-top: 48px;
    padding-bottom: 32px;
  }
  .page-home .hero-gateway .hero-container.tg-container {
    max-width: min(680px, 100%);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }
  .page-home .hero-main {
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }
  .page-home .hero-main > p.hero-bridge.code-snippet-live:first-of-type {
    max-width: 100%;
  }
  /* Breathing room above trace block so the fixed system bar doesn’t crowd the last terminal */
  .page-home #trace-example-home.section.tg-section,
  .page-home .execution-trace.section.tg-section {
    padding-bottom: 56px !important;
  }
  .page-home #trace-example-home .home-trace-silence-note,
  .page-home .execution-trace .home-trace-silence-note {
    margin-bottom: 8px;
  }
}

@media (min-width: 1200px) {
  .page-home .hero-gateway {
    max-width: min(var(--content-max), 100%);
    grid-template-columns: 1fr minmax(200px, 260px);
    gap: 2rem 2.5rem;
  }
  .page-home .hero-container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  .page-home .hero-container.tg-container {
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
  }
  .page-home .hero-main {
    max-width: min(var(--content-max), 100%);
    padding: 20px 28px 24px !important;
    border-radius: 10px;
    border-left-width: 4px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 24px rgba(0, 0, 0, 0.2);
  }
}
.page-home .hero-container .hero-grid {
  gap: 12px;
}
.page-home .hero-container {
  padding-top: 0.5rem;
  padding-bottom: clamp(1rem, 3vh, 1.5rem);
}
.page-home .hero-main {
  padding: 16px 18px 20px !important;
}

/* Mobile: must follow rule above — opaque card + padding so header doesn’t “bleed” through blur */
@media (max-width: 768px) {
  .page-home .hero-main {
    padding: 28px 18px 26px !important;
    background: var(--tg-hero-mobile-bg) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    margin-top: 4px;
  }
}

.page-home .hero-boundary-label {
  margin-bottom: 6px;
}
.page-home .hero-main h1.hero-headline-kernel {
  margin-bottom: 10px !important;
  font-size: clamp(32px, 6vw, 56px) !important;
  line-height: 1.1 !important;
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
}

@media (max-width: 768px) {
  .page-home .hero-main h1.hero-headline-kernel {
    font-size: 34px !important;
    line-height: 1.1 !important;
  }
}
.page-home .hero-left h1:not(.hero-headline-kernel),
.page-home .hero-main h1:not(.hero-headline-kernel) {
  margin-bottom: 10px !important;
  font-size: clamp(1.65rem, 4.2vw, 2.6rem) !important;
}

/* Hero tagline (first line under H1): body text contrast, not muted */
.page-home .hero-main > p.hero-bridge.code-snippet-live:first-of-type {
  font-size: 0.9rem !important;
  max-width: 44ch;
  line-height: 1.55 !important;
  margin-bottom: 12px !important;
  font-weight: 500 !important;
  color: var(--tg-text-body) !important;
  opacity: 1;
}
.page-home .hero-main .hero-status-rail + .hero-system-panel {
  margin-top: 0;
}
.page-home .hero-status-chip {
  color: var(--tg-text-muted) !important;
  border-color: rgba(183, 196, 212, 0.14) !important;
  background: rgba(17, 24, 33, 0.78) !important;
}

/* SYSTEM + TRACE terminal lines: denser, slightly larger, higher contrast */
.page-home .hero-system-panel .hero-bridge,
.page-home #trace-example-home .hero-bridge,
.page-home .execution-trace .hero-bridge {
  font-size: 0.85rem !important;
  line-height: 1.42 !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.page-home #trace-example-home .hero-bridge .snippet-token,
.page-home .execution-trace .hero-bridge .snippet-token {
  color: rgba(125, 211, 252, 0.95) !important;
}

/* Execution protocol card: +1px, tighter lines, keep green keys */
.page-home .hero-interface .terminal-window .hero-bridge {
  font-size: 0.82rem !important;
  line-height: 1.44 !important;
  font-weight: 500 !important;
}
.page-home .hero-arch-line {
  margin: 6px 0 4px !important;
}
.page-home .hero-subheadline {
  margin-bottom: 10px !important;
}
.page-home .hero-rule-line {
  margin-bottom: 12px !important;
  margin-left: 12px;
}
.page-home .hero-interface {
  margin-top: 0;
}
.page-home .terminal-header {
  padding: 5px 10px;
  font-size: 0.58rem;
}
.page-home .hero-system-panel .terminal-header {
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  opacity: 0.95;
  color: rgba(125, 211, 252, 0.9) !important;
}
.page-home .home-trace-context {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.74);
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

/* Homepage: bridge from concept → implementation (single install + sketch + /docs) */
.page-home #quick-start .home-quickstart-lede {
  margin-bottom: 14px;
  max-width: 62ch;
}
.page-home #quick-start .home-quickstart-lede a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-home #quick-start .home-quickstart-terminal {
  border-color: rgba(0, 229, 138, 0.22);
  max-width: 100%;
}
.page-home #quick-start .home-quickstart-pre {
  font-family: var(--mono), monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  background: transparent;
  border: none;
}
.page-home #quick-start .home-quickstart-pre code {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
.page-home #quick-start .home-quickstart-cta {
  margin-top: 18px;
  margin-bottom: 0;
}
.page-home #quick-start .home-quickstart-cta a {
  color: var(--accent);
  letter-spacing: 0.06em;
}

/* Homepage: explicit operational guarantees (determinism, fail-closed, verification) */
.page-home #trust-guarantees .home-trust-kicker {
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.page-home #trust-guarantees .tg-trust-guarantees {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 22px);
  margin-top: 12px;
  margin-bottom: 4px;
}
.page-home #trust-guarantees .tg-trust-guarantee {
  margin: 0;
  padding: clamp(14px, 2vw, 18px) clamp(16px, 2.5vw, 20px);
  border-left: 3px solid rgba(0, 229, 138, 0.4);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  border-radius: 0 6px 6px 0;
}
.page-home #trust-guarantees .tg-trust-guarantee__title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 8px 0;
  line-height: 1.25;
  text-transform: none;
}
.page-home #trust-guarantees .tg-trust-guarantee__body {
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--steel-bright);
  margin: 0;
  max-width: 62ch;
  font-weight: 400;
}
.page-home #trust-guarantees .home-trust-cta {
  margin-top: 22px;
  margin-bottom: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.page-home #trust-guarantees .home-trust-cta a {
  color: var(--accent);
}
/* Tagline after // THE MISSING LAYER terminal (replaces prior WHY THIS EXISTS placement) */
.page-home #the-missing-layer .tg-missing-layer-tagline {
  margin-top: 24px;
  margin-bottom: 0;
}
.page-home .home-trace-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: rgba(111, 227, 255, 0.9);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.page-home #trace-example-home .hero-snippet-glass.trace-box-home,
.page-home .execution-trace .hero-snippet-glass.trace-box-home {
  border: 1px solid rgba(111, 227, 255, 0.25);
  background: rgba(111, 227, 255, 0.02);
}
.page-home #trace-example-home .home-trace-terminal.terminal-window,
.page-home .execution-trace .home-trace-terminal.terminal-window {
  border-color: rgba(111, 227, 255, 0.22);
  background: transparent;
}
.page-home .terminal-window .hero-snippet-glass {
  padding: 8px 12px !important;
}
.page-home .hero-interface .hero-ctas {
  padding: 10px 14px !important;
}
.page-home .hero-interface .hero-bridge {
  margin-top: 0 !important;
  margin-bottom: 2px !important;
}
.page-home .hero-snippet-arrow {
  margin: 2px 0 !important;
  color: var(--steel-bright);
}
.page-home .hero-actions {
  margin-top: 6px;
  gap: 8px;
}

/* Wider hero: visual polish for request/decision block and CTAs */
.page-home .hero-interface {
  border-radius: 6px;
  overflow: hidden;
  border-color: rgba(0, 229, 138, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.page-home .terminal-window {
  border-radius: 4px 4px 0 0;
  border-color: rgba(0, 229, 138, 0.25);
}
.page-home .hero-interface .hero-ctas {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  gap: 12px;
}
.page-home .hero-actions .cta-primary,
.page-home .hero-actions .cta-secondary {
  min-width: 120px;
}
@media (min-width: 1200px) {
  .page-home .hero-actions {
    gap: 12px;
  }
  .page-home .hero-subheadline {
    max-width: 52ch;
  }
  .page-home .hero-rule-line {
    max-width: 56ch;
  }
}

/* Feature grid */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 48px;
  text-align: left;
  background: var(--line);
  border: 1px solid var(--line);
  overflow: hidden;
}

.spec-item {
  background: var(--panel);
  padding: 28px 24px;
}

.spec-item h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 8px;
}

.spec-item p {
  font-size: 0.85rem;
  color: var(--steel);
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 600px) {
  .spec-grid {
    grid-template-columns: 1fr;
  }
}

/* Binary toggle section */
.binary-toggle {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.toggle-state {
  padding: 10px 24px;
  border: 1px solid var(--line-strong);
  color: var(--steel);
  cursor: pointer;
  transition: none;
  user-select: none;
  font-weight: 300;
}

.toggle-state.active {
  border-color: var(--signal);
  color: var(--signal);
}

.toggle-divider {
  color: var(--steel);
  font-size: 0.7rem;
  opacity: 0.4;
}

/* System matrix */
.system-matrix {
  margin-top: 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}

.matrix-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.matrix-row:last-child {
  border-bottom: none;
}

.matrix-label {
  color: var(--steel);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.matrix-value {
  color: var(--white);
  font-weight: 400;
  text-align: right;
  letter-spacing: 0.02em;
}

.matrix-value.signal {
  color: var(--signal);
  font-weight: 600;
}

/* Audit log */
#audit-log {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--steel);
  letter-spacing: 0.04em;
  max-height: 120px;
  overflow: hidden;
  opacity: 0.4;
  margin-top: 12px;
  padding: 0 4px;
  border-left: 1px solid var(--line);
}

#audit-log .log-entry {
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#audit-log .log-block {
  color: var(--signal);
  opacity: 0.8;
}

/* =========================================================
   SUBSCRIBE / REQUEST ACCESS
   ========================================================= */

.subscribe-section {
  padding: 160px 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.subscribe-section .container {
  text-align: left;
}

.subscribe-section h2 {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-align: left;
}

.subscribe-text {
  font-size: 0.92rem;
  color: var(--steel);
  margin-bottom: 28px;
}

/* =========================================================
   CONTACT
   ========================================================= */

/* Next Step (breadcrumbs of trust) */
.next-step-section {
  padding: 32px 0;
  background: var(--foundation);
  border-top: 1px solid var(--line);
}

.next-step-label {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-step-label a {
  color: var(--steel);
  text-decoration: none;
  transition: color 0.15s;
}

.next-step-label a:hover {
  color: var(--accent);
}

.contact-section {
  padding: 72px 0;
  background: var(--foundation);
  border-top: 1px solid var(--line);
}

.contact-section h2 {
  font-family: var(--mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.contact-section p {
  color: var(--steel);
  font-size: 0.88rem;
}

.contact-section a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  padding: 40px 0 32px;
  background: var(--foundation);
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
}

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

.footer-logo svg {
  flex-shrink: 0;
}

.footer-logo span {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social a {
  color: var(--steel);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: none;
  opacity: 0.5;
}

.footer-social a:hover {
  color: var(--white);
  opacity: 1;
}

/* Desktop: 4-column horizontal grid — Brand, Product, Company, Legal */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 32px;
  width: 100%;
  margin-bottom: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.footer-grid .footer-col-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  width: 100%;
  margin-bottom: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer-col-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  opacity: 0.4;
}

.footer-col a,
.footer-col span {
  display: block;
  color: var(--steel);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 3px 0;
  font-weight: 300;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-info {
  text-align: left;
  color: var(--steel);
  font-size: 0.75rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  width: 100%;
}

.footer-info p {
  margin-bottom: 4px;
  max-width: 100%;
}

/* Registered office + HQ — structured, scannable (London + Manchester) */
.footer-locations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin-top: 16px;
  margin-bottom: 6px;
  max-width: 560px;
}
@media (max-width: 560px) {
  .footer-locations {
    grid-template-columns: 1fr;
  }
}
.footer-location {
  margin-top: 0;
  font-size: 13px;
  color: var(--tg-text-muted);
  line-height: 1.6;
}
/* City line — matches across London / Manchester (no extra chrome) */
.footer-city {
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--tg-text-body);
  font-family: var(--sans);
  letter-spacing: 0.02em;
}
.footer-address {
  font-style: normal;
  color: var(--tg-text-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.footer-company {
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--steel);
  opacity: 0.75;
  line-height: 1.5;
}

.footer-bottom .footer-company {
  margin-top: 0;
  margin-left: 1em;
  font-size: 0.7rem;
  opacity: 0.7;
}

.disclaimer-section {
  padding: 48px 0;
  background: var(--foundation);
}

.disclaimer-section .disclaimer {
  margin: 0;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  color: var(--steel);
  line-height: 1.6;
  max-width: 56ch;
}

.footer-disclaimer {
  margin-top: 10px;
  opacity: 0.4;
  max-width: 520px;
  font-size: 11px;
  line-height: 1.5;
}

.footer-trace {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--steel);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.3;
  margin-top: 12px;
}

/* =========================================================
   PAGE HERO (Product, Research, Legal, Runtime)
   ========================================================= */

.page-hero {
  padding: 100px 0 80px;
  background: var(--foundation);
  border-top: none;
}

.product-page .page-hero {
  padding: 80px 0 60px;
}

.page-hero .container {
  text-align: left;
}

.page-hero h1 {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: -0.06em;
  color: var(--white);
  margin-bottom: 14px;
  text-align: left;
}

.page-hero p {
  font-size: 0.92rem;
  color: var(--steel);
  max-width: 42ch;
  line-height: 1.65;
  text-align: left;
}

/* =========================================================
   PRODUCT PAGE
   ========================================================= */

.page-content {
  padding: 0 0 48px;
  position: relative;
  z-index: 1000;
}

.content-section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.content-section:first-child {
  border-top: none;
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  text-align: left;
}

.section-divider {
  width: 32px;
  height: 1px;
  background: var(--line-strong);
  margin: 10px 0 16px;
}

.content-section h2 {
  font-family: var(--mono);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 10px;
  text-align: left;
}

.content-section p {
  color: var(--steel);
  line-height: 1.7;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  max-width: 60ch;
}

/* Execution intercept protocol (simulator) */
.intercept-protocol-section {
  padding: 80px 0 60px;
  border-top: 1px solid var(--line);
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.intercept-protocol-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--steel);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 48px;
  opacity: 0.5;
  text-align: left;
}

.intercept-protocol-svg {
  width: 70vw;
  max-width: 900px;
  display: block;
}

.intercept-protocol-summary {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--steel);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.latency-display {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--steel);
  margin-top: 20px;
  letter-spacing: 0.06em;
  opacity: 0;
  text-align: left;
}

.latency-display.active {
  opacity: 1;
}

.protocol-audit-log {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--steel);
  letter-spacing: 0.06em;
  text-align: left;
}

.protocol-audit-entry {
  padding: 2px 0;
  opacity: 0.5;
}

.protocol-audit-entry.block-entry {
  color: var(--signal);
  opacity: 0.7;
}

/* Execution rail (product page) */
.execution-rail {
  position: fixed;
  left: 5vw;
  top: 0;
  height: 100vh;
  width: 100px;
  pointer-events: none;
  z-index: 1;
}

/* Rail technical labels */
.rail-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  fill: var(--steel);
  opacity: 0.4;
}

/* Guarantees */
.guarantees-section {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.guarantees-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  margin-top: 14px;
  padding: 0;
}

.guarantees-grid li {
  font-size: 0.85rem;
  color: var(--steel);
  line-height: 1.5;
  padding: 6px 0;
  padding-left: 18px;
  position: relative;
  list-style: none;
  font-weight: 300;
}

.guarantees-grid li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 4px;
  height: 4px;
  background: var(--steel);
  opacity: 0.4;
}

@media (max-width: 600px) {
  .guarantees-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   REQUEST ACCESS FORM
   ========================================================= */

.request-access-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.request-access-section h2 {
  text-align: left;
  font-family: var(--mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

.request-form {
  max-width: 440px;
}

.request-form .form-row {
  margin-bottom: 12px;
}

.request-form input[type="text"],
.request-form input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 300;
}

.request-form input::placeholder {
  color: var(--steel);
  opacity: 0.4;
}

.request-form input:focus {
  outline: none;
  border-color: var(--line-strong);
}

.request-form button {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--white);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 6px;
  transition: none;
}

.request-form button:hover {
  border-color: var(--white);
}

.form-disclaimer {
  text-align: left;
  font-size: 0.72rem;
  color: var(--steel);
  margin-top: 16px;
  max-width: 400px;
  line-height: 1.5;
  font-family: var(--mono);
  opacity: 0.4;
}

.form-msg-inline {
  text-align: left;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.82rem;
}

/* =========================================================
   SECURE HANDSHAKE FORM (Request Access — protocol theme)
   ========================================================= */
.handshake-form,
.request-access-section .handshake-form {
  max-width: 440px;
  font-family: var(--mono);
}

.handshake-form .form-row {
  margin-bottom: 16px;
}

.handshake-form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--steel);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.handshake-form input[type="text"],
.handshake-form input[type="email"],
.handshake-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--foundation);
  border: 1px solid #00E58A;
  border-radius: 0;
  color: var(--white);
  font-family: 'JetBrains Mono', var(--mono);
  font-size: 0.82rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.handshake-form input::placeholder,
.handshake-form textarea::placeholder {
  color: var(--steel);
  opacity: 0.5;
}

.handshake-form input:focus,
.handshake-form textarea:focus {
  outline: none;
  border-color: #00E58A;
  box-shadow: 0 0 12px rgba(0, 229, 138, 0.35);
}

.handshake-form textarea {
  min-height: 100px;
  resize: vertical;
}

.handshake-form .btn-handshake {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid #00E58A;
  border-radius: 0;
  color: #00E58A;
  font-family: 'JetBrains Mono', var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.handshake-form .btn-handshake:hover:not(:disabled) {
  background: rgba(0, 229, 138, 0.08);
  box-shadow: 0 0 12px rgba(0, 229, 138, 0.25);
}

.handshake-form .btn-handshake:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.handshake-status {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  min-height: 1.4em;
}

.handshake-status.verifying {
  color: #00E58A;
}

.handshake-status.success {
  color: #00E58A;
}

.handshake-status.error {
  color: #e74c3c;
}

/* Terminal spinner for verifying state */
.handshake-spinner {
  display: inline-block;
  width: 1.2em;
  text-align: center;
  animation: handshake-slash 0.4s step-end infinite;
}

@keyframes handshake-slash {
  0% { content: "/"; }
  25% { content: "-"; }
  50% { content: "\\"; }
  75% { content: "|"; }
  100% { content: "/"; }
}

.handshake-spinner::after {
  content: "|";
  animation: handshake-slash-char 0.4s step-end infinite;
}

@keyframes handshake-slash-char {
  0% { content: "/"; }
  25% { content: "-"; }
  50% { content: "\\"; }
  75% { content: "|"; }
  100% { content: "/"; }
}

/* Emerald pulse on system bar (triggered after successful handshake) */
.system-bar .emerald.pulse {
  animation: emerald-pulse 1.2s ease-out;
}

@keyframes emerald-pulse {
  0% { text-shadow: 0 0 8px rgba(0, 229, 138, 0.4); opacity: 1; }
  50% { text-shadow: 0 0 20px rgba(0, 229, 138, 0.8); opacity: 1; }
  100% { text-shadow: 0 0 8px rgba(0, 229, 138, 0.4); opacity: 1; }
}

/* =========================================================
   MODAL
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(5, 5, 5, 0.88);
  z-index: var(--tg-z-modal);
}

.modal.open {
  display: grid;
}

.modal-card {
  width: min(440px, 90vw);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 36px;
  text-align: left;
}

.modal-card h3 {
  font-family: var(--mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.modal-card p {
  color: var(--steel);
  font-size: 0.88rem;
  margin: 0 0 20px;
  max-width: 100%;
}

.modal-card .ok {
  padding: 12px 32px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: none;
}

.modal-card .ok:hover {
  border-color: var(--white);
}

/* =========================================================
   STATE PANEL
   ========================================================= */

/* Shown only on runtime page; hidden on all others so TRACE/VERIFY are not empty everywhere */
.state-panel {
  display: none;
  position: fixed;
  bottom: 44px;
  right: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--steel);
  z-index: var(--tg-z-modal);
  letter-spacing: 0.06em;
  line-height: 1.8;
  min-width: 180px;
}

body.page-runtime .state-panel {
  display: block;
}

.state-panel span {
  color: var(--white);
}

/* =========================================================
   BACK LINK
   ========================================================= */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--steel);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 300;
  margin: 24px 0 0 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--white);
}

/* =========================================================
   RESEARCH PAGE (Whitepaper layout)
   ========================================================= */

.research-layout {
  display: grid;
  grid-template-columns: 20vw 1fr;
  gap: 0;
  min-height: 60vh;
}

.research-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  padding-top: 40px;
}

.research-sidebar a {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--steel);
  text-decoration: none;
  letter-spacing: 0.06em;
  padding: 8px 0;
  text-transform: uppercase;
  font-weight: 300;
  opacity: 0.6;
}

.research-sidebar a:hover,
.research-sidebar a.active {
  color: var(--white);
  opacity: 1;
}

.research-main {
  padding-top: 0;
}

.research-group {
  margin-bottom: 1.5rem;
}

.research-group h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--white);
  margin-bottom: 10px;
}

.reference-list {
  list-style: none;
  padding: 0;
}

.reference-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--steel);
  font-size: 0.85rem;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .research-layout {
    grid-template-columns: 1fr;
  }
  .research-sidebar {
    position: relative;
    top: 0;
    padding-top: 0;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
    padding: 12px 0;
    margin-bottom: 12px;
  }
  .footer {
    padding: 20px 0 16px;
  }
  .footer .container {
    padding-left: var(--gutter-m);
    padding-right: var(--gutter-m);
  }
  .footer-top {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    padding: 12px 0;
    margin-bottom: 12px;
    border-top-width: 1px;
    border-bottom-width: 1px;
  }
  .footer-col-title {
    font-size: 0.58rem;
    margin-bottom: 4px;
  }
  .footer-col a,
  .footer-col span {
    font-size: 0.68rem;
    padding: 1px 0;
  }
  .footer-info {
    font-size: 0.65rem;
  }
  .footer-info p {
    margin-bottom: 2px;
  }
  .footer-disclaimer {
    font-size: 10px;
    margin-top: 6px;
  }

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

  .intercept-protocol-section {
    padding: 60px 0 40px;
  }

  .intercept-protocol-svg {
    width: 90vw;
  }

  .execution-rail {
    display: none;
  }
}

@media (max-width: 480px) {
  .state-panel {
    bottom: 120px;
    right: 10px;
    padding: 8px 12px;
    font-size: 8px;
    min-width: 140px;
  }

  .matrix-row {
    padding: 10px 14px;
    font-size: 0.72rem;
  }

  .spec-item {
    padding: 20px 16px;
  }

  .footer {
    padding: 20px 0 16px;
  }

  /* Keep 2 columns on small mobile so footer is balanced, not a long stack */
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
    padding: 12px 0;
    margin-bottom: 12px;
  }
  .footer-top {
    gap: 8px;
    margin-bottom: 10px;
  }
  .footer-disclaimer {
    font-size: 10px;
    margin-top: 6px;
  }

  .request-form input[type="text"],
  .request-form input[type="email"] {
    font-size: 16px;
  }

  .binary-toggle {
    gap: 10px;
    font-size: 0.78rem;
  }

  .toggle-state {
    padding: 8px 16px;
  }

  .guarantees-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .intercept-protocol-section {
    padding: 40px 0 32px;
  }
}

@media (max-width: 400px) {
  .nav-links {
    gap: 12px;
  }
  .nav-links a {
    font-size: 0.62rem;
  }
  .logo span {
    font-size: 0.7rem;
  }
  .logo img {
    width: 22px;
    height: 22px;
  }
}

/* =========================================================
   AUDIT TICKER (fixed bottom bar)
   ========================================================= */

#tg-audit-ticker {
  display: none !important;
}

.ticker-track {
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--steel);
  letter-spacing: 0.08em;
  animation: tickerScroll 40s linear infinite;
  padding-left: 100%;
  opacity: 0.4;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =========================================================
   AUDIT TERMINAL (fixed bottom-left)
   ========================================================= */

#tg-status-bar {
  display: none; /* Hidden on production; was overlapping footer and looked like debug UI */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  z-index: 9997;
  align-items: center;
  padding: 0 5vw;
  opacity: 0.5;
  transition: opacity 0.05s;
}

#tg-status-bar #status-bar-text {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--steel);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.05s;
}

.telem-spinner {
  display: inline-block;
  width: 10px;
  text-align: center;
  color: #79D2D2;
  opacity: 0.6;
}

@media (max-width: 768px) {
  #tg-status-bar #status-bar-text {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
}

@media (max-width: 480px) {
  #tg-status-bar #status-bar-text {
    font-size: 7px;
    letter-spacing: 0.3px;
  }
}


/* =========================================================
   MOBILE PROGRESS BAR (replaces execution rail)
   ========================================================= */

#mobile-progress-bar {
  display: none;
}

@media (max-width: 768px) {
  #mobile-progress-bar {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--steel);
    z-index: 99;
    transition: width 0s;
  }
}

/* =========================================================
   RUNTIME BOUNDARY PAGE
   ========================================================= */

.runtime-grid {
  display: grid;
  grid-template-columns: 40% 60%;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.runtime-label {
  color: var(--steel);
  letter-spacing: 0.04em;
  opacity: 0.4;
}

.runtime-value {
  color: var(--white);
  letter-spacing: 0.02em;
  word-break: break-all;
}

.runtime-value.surface-enforced {
  color: var(--steel);
  font-weight: 400;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.runtime-button {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  border: 1px solid var(--line-strong);
  padding: 10px 18px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: none;
  margin-right: 12px;
  margin-top: 8px;
  font-weight: 400;
}

.runtime-button:hover {
  border-color: var(--white);
}

.runtime-section {
  margin-bottom: 48px;
}

.runtime-section-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--steel);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.5;
}

#state-history-viewer {
  height: 300px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--steel);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.verify-result {
  font-family: var(--mono);
  font-size: 0.82rem;
  margin-top: 12px;
  letter-spacing: 0.04em;
}

@media (max-width: 600px) {
  .runtime-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .runtime-label {
    font-size: 0.75rem;
  }
  .runtime-value {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }
  #state-history-viewer {
    height: 200px;
    font-size: 10px;
  }
}
/* Developer Conversion Block */
.code-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.code-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--steel);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .code-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Protocol Trust Block */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.trust-item {
  padding: 24px 16px;
  background: var(--foundation);
  border: 1px solid var(--line);
}

.trust-value {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--white);
  margin-bottom: 8px;
  word-break: break-word;
}

.trust-label {
  font-size: 0.75rem;
  color: var(--steel);
  opacity: 0.7;
}

@media (max-width: 900px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

/* Spec Links */
.spec-links a:hover {
  border-color: var(--steel) !important;
}

@media (max-width: 600px) {
  .spec-links {
    grid-template-columns: 1fr !important;
  }
}

/* Boot Sequence */
#boot-sequence {
  font-family: var(--mono);
}

.boot-line {
  transition: opacity 0.3s ease;
}

/* =========================================================
   PREMIUM: Glass, gradient text, scroll fade, glow, flow
   ========================================================= */

.gradient-text {
  background: linear-gradient(90deg, #7aa2ff, #00e5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade.show {
  opacity: 1;
  transform: translateY(0);
}

/* Data-streaming entrance (horizontal wipe) */
.stream-in {
  animation: stream-in-wipe 0.5s ease-out forwards;
}

@keyframes stream-in-wipe {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

.glow-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(120, 160, 255, 0.05),
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(70, 120, 255, 0.08);
  backdrop-filter: blur(6px);
}

/* Horizontal architecture flow — surgical schematic (sharp nodes + emerald top-bar) */
.architecture-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin: 80px auto;
  max-width: 1200px;
  padding: 0 5vw;
}

.architecture-flow .flow-step {
  padding: 1.5rem;
  padding-top: calc(1.5rem + 2px);
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 229, 138, 0.3);
  border-radius: 0;
  width: 220px;
  min-width: 200px;
  text-align: left;
  line-height: 1.6;
  position: relative;
}

.architecture-flow .flow-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0, 229, 138, 0.5);
}

.architecture-flow .step-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 10px;
  opacity: 0.7;
  letter-spacing: 0.2em;
  font-family: 'JetBrains Mono', var(--mono);
  margin: 0;
}

.architecture-flow .flow-step h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  margin-right: 2.5rem;
  text-transform: none;
  line-height: 1.5;
  font-family: 'JetBrains Mono', var(--mono);
  text-align: left;
}

.architecture-flow .flow-step p {
  font-size: 0.875rem;
  color: var(--steel);
  margin: 0;
  max-width: 100%;
  line-height: 1.6;
  font-family: 'JetBrains Mono', var(--mono);
}

.architecture-flow .flow-arrow {
  color: rgba(255, 255, 255, 0.2);
  font-size: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .architecture-flow {
    flex-direction: column;
    gap: 20px;
    margin: 48px auto;
  }
  .architecture-flow .flow-arrow {
    transform: rotate(90deg);
  }
  .architecture-flow .flow-step {
    width: 100%;
    min-width: 0;
    max-width: 360px;
    margin: 0 auto;
  }
  .architecture-flow .step-number {
    font-size: 8px;
    letter-spacing: 0.2em;
  }
}

/* Diagram container — sharp schematic (matches flow-step emerald border) */
.diagram-container {
  max-width: var(--content-max);
  margin: 60px auto;
  padding: 40px;
  border-radius: 0;
  background: var(--panel);
  border: 1px solid rgba(0, 229, 138, 0.3);
  overflow-x: auto;
}

/* Schematic variant: no outer box feel — nodes are the visual anchors */
.diagram-container.diagram-schematic {
  background: transparent;
  border: none;
  padding: 24px 0;
}

.diagram-container img {
  width: 100%;
  display: block;
}

.diagram-caption {
  text-align: center;
  font-size: 14px;
  opacity: 0.6;
  margin-top: 16px;
  font-family: var(--mono);
}

/* Single-line flow caption: no wrap, horizontal scroll on narrow viewports */
.flow-caption-oneline {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  font-size: 0.8rem;
}

/* HUD caption: 9px monospace, aligned to left bracket (surgical spec feel) */
.diagram-schematic .diagram-caption {
  text-align: left;
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  opacity: 0.5;
  margin-top: 20px;
  padding-left: 2rem;
}

/* Surgical brackets — architecture nodes (symmetrical 1px edges, no manual |) */
.architecture-node {
  position: relative;
  padding: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 5, 5, 0.6);
  margin: 2rem 0;
  transition: background 0.2s ease-in-out;
}
.architecture-node::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #00E58A;
  box-shadow: 0 0 8px rgba(0, 229, 138, 0.3);
  transition: box-shadow 0.2s ease-in-out, background 0.2s ease-in-out;
}
.architecture-node::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}
/* Sensor activation hover — desktop only (not touch); feels like live radar, not flashy */
@media (hover: hover) {
  .architecture-node:hover {
    background: rgba(5, 5, 5, 0.8);
  }
  .architecture-node:hover::before {
    background: #00E58A;
    box-shadow: 0 0 15px rgba(0, 229, 138, 0.6);
  }
  .architecture-node:hover .architecture-node-title {
    color: #00E58A;
  }
}
.architecture-node-title {
  transition: all 0.2s ease-in-out;
}
/* Execution surfaces: horizontal multi-column grid (not vertical list) */
.surfaces-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 20px;
  margin-top: 12px;
}
.surfaces-grid .surface-item {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--steel);
}
@media (max-width: 640px) {
  .surfaces-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Connectors: ↓ flow between nodes, low emphasis so nodes stand out */
.diagram-connector {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 10px 0;
  color: var(--steel);
  opacity: 0.35;
}
.diagram-schematic .diagram-connector {
  opacity: 0.35;
}

/* Section headers: red/orange caps = visual anchors (military-spec) */
.diagram-schematic .architecture-node-title {
  color: #e67e22;
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-bottom: 8px;
}
.diagram-schematic .highlight {
  color: inherit;
  font-weight: 600;
}
.diagram-schematic .architecture-node:first-child { margin-top: 0; }
.diagram-schematic .architecture-node:last-child { margin-bottom: 0; }

.lifecycle-flow .architecture-node { margin: 1rem 0; }
.lifecycle-flow .architecture-node:first-child { margin-top: 0; }
.lifecycle-flow .architecture-node:last-child { margin-bottom: 0; }
.lifecycle-detail {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--steel);
  margin-top: 4px;
}

/* Technical FAQ — SLA-style, indexed document feel */
.technical-faq {
  padding-top: 48px;
  padding-bottom: 48px;
}
.technical-faq-intro {
  font-size: 0.9rem;
  color: var(--steel);
  margin-bottom: 32px;
  max-width: 560px;
}
.technical-faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.technical-faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
}
.technical-faq-item:last-child { border-bottom: none; }
.technical-faq-q {
  font-family: 'JetBrains Mono', var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
  margin: 0 0 10px 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.technical-faq-ref {
  color: #00E58A;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.technical-faq-a {
  margin: 0 0 0 calc(3ch + 12px);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--steel);
  opacity: 0.7;
}
.technical-faq-a strong { color: rgba(224, 224, 224, 0.95); }
.technical-faq-a code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 2px;
}
@media (max-width: 640px) {
  .technical-faq-a { margin-left: 0; }
}

/* Architecture page — technical spec download CTA (ghost + emerald border) */
.arch-cta-spec {
  text-align: center;
  padding-top: 48px;
  padding-bottom: 24px;
}

.arch-spec-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: transparent;
  border: 1px solid rgba(0, 229, 138, 0.4);
  color: var(--tech-green);
  font-family: 'JetBrains Mono', var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.arch-spec-download:hover {
  background: rgba(0, 229, 138, 0.08);
  border-color: rgba(0, 229, 138, 0.6);
}

.arch-spec-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--tech-green);
}

.arch-spec-pdf-label {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  opacity: 0.9;
}

.diagram-highlight {
  stroke: #00e5ff;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.4));
}

/* =========================================================
   SURGICAL STATUS BAR — single-line telemetry strip
   STATE // TRACE // UTC; ≤32px; dim emerald separator
   ========================================================= */
/* Status bar: pulse dot (production-ready dashboard feel) */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #00E58A;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: #00E58A;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: none;
}
/* SYSTEM_STATUS_BAR: IDE-style live status (left: env, right: TRC + UTC) */
.system-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #00E58A;
  opacity: 0.8;
}
.system-bar-left .status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00E58A;
  flex-shrink: 0;
  box-shadow: none;
}
.system-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
  margin-left: auto;
}
.system-bar-right .system-bar-trc::after {
  content: " // ";
  margin-left: 4px;
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.25);
}

.integrity-footer.system-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--foundation) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 2px solid #00E58A;
  box-shadow: 0 -1px 12px rgba(0, 229, 138, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  font-family: 'JetBrains Mono', var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  z-index: 10000;
  pointer-events: none;
}

.system-bar .bar-segment {
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.system-bar .bar-segment:not(:last-child)::after {
  content: " // ";
  margin-left: 8px;
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.system-bar .bar-segment.bar-clock {
  display: block;
  margin-left: auto;
}

.system-bar .emerald {
  color: #00E58A;
  text-shadow: 0 0 8px rgba(0, 229, 138, 0.4);
}

@media (max-width: 768px) {
  .integrity-footer.system-bar {
    height: auto;
    min-height: 32px;
    padding: 8px 12px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    font-size: 9px;
    letter-spacing: 0.08em;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    row-gap: 6px;
    column-gap: 10px;
  }
  .system-bar-left,
  .system-bar-right {
    font-size: 9px;
    letter-spacing: 0.06em;
    min-width: 0;
  }
  .system-bar-left {
    flex: 1 1 auto;
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .system-bar-right {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 10px;
    padding-top: 4px;
    border-top: 1px solid rgba(0, 229, 138, 0.12);
  }
  .system-bar-env {
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
  }
  .system-bar-right .system-bar-trc::after {
    content: none;
  }
  .system-bar-clock {
    white-space: nowrap;
  }
}

/* Space for fixed status bar (taller on narrow viewports when telemetry stacks) */
body.has-integrity-footer {
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
  body.has-integrity-footer {
    /* Two-row telemetry bar + home indicator; was 64px and clipped content above Safari chrome */
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }
}

/* =========================================================
   CUSTOM SCROLLBAR (brand-aligned)
   ========================================================= */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: #1a1a1a;
}
*::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}
*::-webkit-scrollbar-thumb:hover {
  background: #00E58A;
}

/* =========================================================
   BENTO GRID (glassmorphism, mobile-first)
   ========================================================= */
.bento-section {
  padding: var(--section-padding-y) 0;
  background: var(--foundation);
  border-top: 1px solid var(--line);
}

.bento-section-title {
  margin-bottom: 32px;
}

.bento-grid {
  display: grid;
  gap: 1.5rem;
  padding: 20px 0;
  max-width: 1200px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
  }
  .bento-item.wide {
    grid-column: span 2;
    grid-row: span 2;
  }
  .bento-item.medium {
    grid-column: span 1;
    grid-row: span 2;
  }
}

/* Protocol Primitives: responsive grid — single column on mobile, 4-col desktop */
.bento-grid-primitives {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px 0;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 769px) {
  .bento-grid-primitives {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bento-grid-primitives {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.bento-grid-primitives .bento-item {
  min-height: 180px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 229, 138, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box;
}

.bento-grid-primitives .bento-item h3 {
  font-family: var(--mono);
  font-size: 14px;
  color: #00E58A;
  margin: 10px 0;
  font-weight: 600;
}

.bento-grid-primitives .bento-item p {
  font-size: 11px;
  line-height: 1.6;
  color: #888;
  margin: 0;
}

.bento-grid {
  display: grid;
  gap: 1.5rem;
  padding: 20px 0;
  max-width: 1200px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

.bento-item {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-sizing: border-box;
}

.bento-item:hover {
  border-color: var(--tech-green);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.bento-tag,
.bento-item .tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--tech-green);
  margin-bottom: auto;
  letter-spacing: 1px;
}

.bento-item h3 {
  font-size: 1.4rem;
  margin: 10px 0;
  color: var(--white);
  font-family: var(--mono);
  font-weight: 600;
}

.bento-item p {
  font-size: 0.9rem;
  color: #888;
  line-height: 1.5;
  margin: 0;
}

.mini-terminal {
  background: var(--foundation);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.7rem;
  margin-top: 15px;
  color: var(--tech-green);
}

@media (prefers-reduced-motion: reduce) {
  .bento-item:hover {
    transform: none;
  }
}

/* =========================================================
   MOBILE MENU (glitch overlay)
   ========================================================= */
.menu-trigger {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  border: 1px solid rgba(0, 229, 138, 0.3);
}

.menu-trigger .hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  margin: 4px 0;
  transition: 0.3s;
}

@media (max-width: 900px) {
  /* Hamburger + notch: header offset + safe area (subset widths inherit via cascade) */
  body {
    padding-top: calc(var(--tg-header-height) + env(safe-area-inset-top, 0px));
  }
  .nav-links {
    display: none !important;
    visibility: hidden !important;
  }
  .header .nav-auth {
    display: none !important;
    visibility: hidden !important;
  }
  .menu-trigger {
    display: flex;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: var(--tg-z-menu-trigger);
    /* Same look on every page (including home) */
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid rgba(0, 229, 138, 0.4);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
  }

  /* When scroll lock removes the scrollbar, keep fixed chrome aligned with the viewport */
  html.tg-doc-scroll-lock .menu-trigger {
    right: calc(max(12px, env(safe-area-inset-right, 0px)) + var(--tg-scrollbar-width, 0px));
  }

  html.tg-doc-scroll-lock .header {
    padding-right: var(--tg-scrollbar-width, 0px);
  }

  /* Header: same colour as page, no overlap with menu */
  .header {
    background: var(--foundation) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .header .container {
    flex-wrap: nowrap;
    padding-right: 72px; /* reserve space for MENU button so logo + TRIGGUARD don't overlap */
  }
  .logo-meta {
    display: flex !important;
    letter-spacing: 0.2em;
  }
  .logo-name {
    display: inline-block !important;
    letter-spacing: 0.2em;
  }
  /* Non-home: show only logo + page label (e.g. PRICING); hide "TRIGGUARD" so user sees current page */
  body:not(.page-home) .header .logo-name,
  body:not(.page-home) .header .logo-divider {
    display: none !important;
  }
  body:not(.page-home) .header .logo-rev {
    color: rgba(224, 224, 224, 0.9);
    font-weight: 500;
    letter-spacing: 0.14em;
  }
  .logo-container {
    min-width: 0;
  }
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  max-height: 100vh;
  max-height: 100dvh;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: var(--tg-z-mobile-overlay);
  overflow: hidden;
  overscroll-behavior: none;
  pointer-events: none;
  isolation: isolate;
  transition: height 0.35s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-overlay.active {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  pointer-events: auto;
  overscroll-behavior: contain;
}

/* Solid base under blur so readability never depends on backdrop-filter alone */
.mobile-overlay.active::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--foundation);
  opacity: 0.92;
  z-index: 0;
  pointer-events: none;
}

.mobile-overlay.active > * {
  position: relative;
  z-index: 1;
}

/*
 * When the mobile menu is open, block background hit-testing (Stripe-style).
 * html.tg-mobile-menu-open is synced from #mobile-overlay.active in mobile-nav.js
 */
html.tg-mobile-menu-open body * {
  pointer-events: none !important;
}

html.tg-mobile-menu-open #mobile-overlay.active,
html.tg-mobile-menu-open #mobile-overlay.active *,
html.tg-mobile-menu-open #menu-trigger,
html.tg-mobile-menu-open #tg-consent-banner,
html.tg-mobile-menu-open #tg-consent-banner *,
html.tg-mobile-menu-open .modal.open,
html.tg-mobile-menu-open .modal.open *,
html.tg-mobile-menu-open dialog.modal[open],
html.tg-mobile-menu-open dialog.modal[open] * {
  pointer-events: auto !important;
}

.overlay-nav {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}

.mobile-overlay .glitch-link {
  font-size: 1.5rem;
  font-family: var(--mono);
  color: #e0e0e0;
  text-decoration: none;
  position: relative;
}

.mobile-overlay .glitch-link:hover {
  color: var(--accent);
  animation: menu-glitch 0.2s infinite;
}

.mobile-overlay .glitch-link.active {
  color: var(--accent);
}

@keyframes menu-glitch {
  0% { transform: translate(0); text-shadow: -2px 0 red, 2px 0 blue; }
  25% { transform: translate(-2px, 2px); }
  50% { transform: translate(2px, -2px); text-shadow: 2px 0 red, -2px 0 blue; }
  75% { transform: translate(-2px, -2px); }
  100% { transform: translate(0); }
}

.overlay-footer {
  position: absolute;
  bottom: 40px;
  font-family: var(--mono);
  font-size: 10px;
  color: #444;
  text-align: center;
}

.overlay-footer .text-accent {
  color: var(--accent);
}

/* Mobile: code block scaling + scroll hint */
@media (max-width: 768px) {
  .hero-snippet-glass .hero-bridge,
  .code-example code,
  .spec-pre {
    font-size: 12px;
  }
  .code-example,
  .code-wrap {
    position: relative;
  }
  .code-example::after {
    content: "scroll →";
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-family: var(--mono);
    font-size: 10px;
    color: rgba(0, 229, 138, 0.6);
    pointer-events: none;
  }
}

/* =========================================================
   TG-FOOTER (high-end infra footer)
   ========================================================= */

.tg-footer {
  background: var(--foundation) !important;
  padding: var(--section-padding-y) var(--gutter) 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.tg-footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.tg-footer-brand h3 {
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  color: var(--white);
  text-transform: none;
}

.tg-footer-brand p {
  font-size: 0.875rem;
  color: var(--steel);
  opacity: 0.85;
  max-width: 280px;
  margin: 0;
}

.tg-footer-col h4 {
  font-size: 14px;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: #888888;
  text-transform: uppercase;
  font-family: var(--mono);
}

.tg-footer-col a {
  display: block;
  margin-bottom: 10px;
  color: #888888;
  text-decoration: none;
  opacity: 0.9;
  font-size: 0.875rem;
}

.tg-footer-col a:hover {
  opacity: 1;
  color: var(--signal-green);
}

.tg-footer-social a:hover {
  opacity: 1;
  color: var(--signal-green) !important;
}

.tg-footer-bottom {
  margin-top: 48px;
  text-align: center;
  opacity: 0.6;
  font-size: var(--text-sm);
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tg-footer-bottom p {
  margin: 0;
  max-width: none;
}

@media (max-width: 900px) {
  .tg-footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .tg-footer {
    padding: 64px var(--gutter) 32px;
  }
  .tg-footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Homepage: failure report — full-bleed system alert (not a floating card) */
.tg-failure-report {
  position: relative;
  width: 100%;
  margin: clamp(64px, 12vw, 120px) 0 0 0;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  box-sizing: border-box;
  border-top: 1px solid rgba(255, 120, 72, 0.35);
  border-bottom: 1px solid rgba(255, 120, 72, 0.22);
  background:
    linear-gradient(180deg, rgba(48, 14, 8, 0.55) 0%, rgba(8, 6, 6, 0.92) 45%, rgba(12, 8, 10, 0.88) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 200, 160, 0.06),
    0 0 80px rgba(200, 60, 30, 0.07),
    0 24px 64px rgba(0, 0, 0, 0.45);
}

.tg-failure-report__scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 3px
  );
  mix-blend-mode: multiply;
}

.tg-failure-report__inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.tg-failure-report__header {
  position: relative;
  z-index: 2;
  margin-bottom: clamp(32px, 5vw, 48px);
  overflow: visible;
  min-width: 0;
}

.tg-failure-report__kicker {
  font-family: var(--mono), monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 160, 120, 0.85);
  margin: 0 0 14px 0;
  text-shadow: 0 0 24px rgba(255, 120, 80, 0.25);
}

.tg-failure-report__title {
  font-family: var(--mono), monospace;
  font-size: clamp(1.125rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: var(--white);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  white-space: normal;
  overflow: visible;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tg-failure-report__sub {
  font-family: var(--mono), monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: rgba(160, 160, 160, 0.9);
  margin: 0;
  max-width: min(72ch, 100%);
  line-height: 1.55;
  white-space: normal;
  overflow: visible;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.tg-failure-report__rows {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.tg-failure-row {
  margin: 0;
  padding: clamp(18px, 2.5vw, 24px) clamp(20px, 3vw, 28px);
  border-left: 3px solid rgba(255, 140, 80, 0.65);
  background: rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 0 0 1px rgba(255, 100, 60, 0.12),
    0 0 40px rgba(255, 80, 40, 0.04);
}

.tg-failure-row__primary {
  font-family: var(--mono), monospace;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--white);
  margin: 0 0 10px 0;
  line-height: 1.45;
}

.tg-failure-row__consequence {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0;
  font-family: var(--mono), monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: rgba(140, 140, 140, 0.95);
}

.tg-failure-row__arrow {
  flex-shrink: 0;
  color: rgba(255, 140, 90, 0.75);
  font-weight: 600;
}

.tg-failure-report__footer {
  margin: clamp(36px, 5vw, 48px) 0 0 0;
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--mono), monospace;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  line-height: 1.65;
  color: rgba(200, 200, 200, 0.92);
}

.tg-failure-report__footer-label {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  color: rgba(255, 160, 120, 0.7);
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .tg-failure-row__consequence {
    padding-left: 0.25rem;
  }
}
.tg-hard-line {
  margin-top: 12px;
  margin-bottom: 16px;
  font-weight: bold;
  color: #00ffff;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.tg-consequence-list {
  margin: 20px 0 0 0;
  padding-left: 1.25rem;
  color: var(--steel);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 56ch;
}
.tg-consequence-list li {
  margin-bottom: 6px;
}
.tg-consequence-list strong {
  color: var(--white);
  font-family: var(--mono), monospace;
}

/* TrigGuard architecture spine — centered vertical flow (#how-trigguard-works) */
.page-home #how-trigguard-works .tg-architecture-flow ,
.page-architecture .tg-architecture-flow {
  max-width: 760px;
  margin: 80px auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 70px;
}

.page-home #how-trigguard-works .tg-architecture-flow::before ,

.page-architecture .tg-architecture-flow::before {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 255, 150, 0.15),
    rgba(0, 255, 150, 0.35),
    rgba(0, 255, 150, 0.15)
  );
}

.page-home #how-trigguard-works .tg-architecture-flow .tg-block ,

.page-architecture .tg-architecture-flow .tg-block {
  width: 100%;
  max-width: 520px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-home #how-trigguard-works .tg-architecture-flow .tg-label ,

.page-architecture .tg-architecture-flow .tg-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: -52px;
  margin-bottom: -26px;
  color: var(--tg-label-sky);
  text-shadow: none;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.page-home #how-trigguard-works .tg-arch-timeline-section ,

.page-architecture .tg-arch-timeline-section {
  max-width: 760px;
  margin: 80px auto 0;
  text-align: center;
}

.page-home #how-trigguard-works .tg-arch-timeline-section .tg-arch-subtitle ,

.page-architecture .tg-arch-timeline-section .tg-arch-subtitle {
  margin-top: 0;
}

.page-home #how-trigguard-works .tg-arch-timeline-section .tg-arch-subcopy ,

.page-architecture .tg-arch-timeline-section .tg-arch-subcopy {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 48ch;
}

.page-home #how-trigguard-works .tg-arch-timeline-section .tg-arch-timeline ,

.page-architecture .tg-arch-timeline-section .tg-arch-timeline {
  text-align: left;
}

.page-home #how-trigguard-works .tg-arch-bullets ,

.page-architecture .tg-arch-bullets {
  margin-top: 80px;
}

/* Homepage — request flow (SDK → API → verification → receipt) */
.page-home #request-flow.section.tg-section {
  margin-top: 48px;
  padding-top: var(--section-padding-s);
  padding-bottom: var(--section-padding-s);
}

.page-home #request-flow .tg-request-flow-lead {
  margin-top: 0.75rem;
}

.page-home #request-flow .tg-request-flow {
  margin: 2rem auto 0;
  max-width: 1100px;
}

.page-home #request-flow .tg-request-flow__row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.35rem 0.45rem;
}

.page-home #request-flow .tg-request-flow__step {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 200px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 10, 10, 0.92);
  padding: 0.85rem 0.75rem;
  text-align: center;
  border-radius: 2px;
}

.page-home #request-flow .tg-request-flow__step--accent {
  border-color: rgba(0, 229, 138, 0.4);
  box-shadow: 0 0 0 1px rgba(0, 229, 138, 0.06);
}

.page-home #request-flow .tg-request-flow__step--gate {
  border-color: rgba(0, 229, 138, 0.45);
}

.page-home #request-flow .tg-request-flow__kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--tg-mid-gray);
  margin-bottom: 0.35rem;
}

.page-home #request-flow .tg-request-flow__title {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-bright);
  font-weight: 500;
  line-height: 1.35;
}

.page-home #request-flow .tg-request-flow__meta {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.65rem;
  color: var(--steel);
  line-height: 1.4;
}

.page-home #request-flow .tg-request-flow__chev {
  align-self: center;
  color: var(--accent-dim);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.1rem;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .page-home #request-flow .tg-request-flow__row {
    flex-direction: column;
    align-items: center;
  }

  .page-home #request-flow .tg-request-flow__step {
    max-width: 320px;
    width: 100%;
  }

  .page-home #request-flow .tg-request-flow__chev {
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }
}

.page-home #request-flow .flow-caption {
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
  margin-top: 16px;
  letter-spacing: 0.05em;
}

/* =========================================================
   MEGA NAV (desktop ≥901px — Stripe / Cloudflare style)
   Panels hidden on mobile; .nav-links is display:none ≤900px
   ========================================================= */
@media (min-width: 901px) {
  .nav-links.nav-links--mega {
    overflow: visible;
    overflow-x: visible;
  }

  .nav-mega-list {
    display: flex;
    align-items: stretch;
    gap: clamp(10px, 1.2vw, 18px);
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .nav-dropdown {
    position: relative;
    list-style: none;
  }

  /* Hover bridge: no gap between trigger and panel */
  .nav-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
    z-index: 1001;
  }

  .nav-links--mega .nav-link--top {
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    white-space: nowrap;
  }

  .nav-links--mega .nav-link--top::before {
    display: none;
  }

  .nav-links--mega .nav-link--top:hover {
    animation: none;
  }

  .dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: min(820px, calc(100vw - 48px));
    max-width: 900px;
    z-index: 1002;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
  }

  .dropdown-panel--wide {
    width: min(880px, calc(100vw - 48px));
  }

  .dropdown-panel--narrow {
    width: min(420px, calc(100vw - 48px));
  }

  .nav-dropdown:hover .dropdown-panel,
  .nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-dropdown:hover {
    z-index: var(--tg-z-dropdown-panel);
  }

  .dropdown-panel-inner {
    background: var(--foundation);
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  }

  .dropdown-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 40px;
    padding: 24px 28px 16px;
  }

  .dropdown-panel-grid--single {
    grid-template-columns: 1fr;
  }

  .dropdown-panel--narrow .dropdown-panel-grid {
    padding: 20px 24px 12px;
    gap: 20px 24px;
  }

  .dropdown-heading {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 14px;
    padding-right: 8px;
  }

  .dropdown-link {
    display: block;
    text-decoration: none;
    padding: 12px 16px;
    margin: 0 -16px 4px;
    border-radius: 6px;
    transition: background 0.12s ease;
  }

  .dropdown-link:hover {
    background: #0f0f0f;
  }

  .dropdown-link-title {
    display: block;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e0e0e0;
    margin-bottom: 4px;
  }

  .dropdown-link-desc {
    display: block;
    font-family: var(--sans);
    font-size: 0.75rem;
    line-height: 1.35;
    color: rgba(160, 160, 170, 0.95);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: none;
  }

  .dropdown-panel-row {
    padding: 0 28px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
  }

  .dropdown-panel-row .dropdown-heading {
    margin-top: 16px;
    margin-bottom: 10px;
  }

  .dropdown-panel-row-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
  }

  .dropdown-link--inline {
    margin: 0;
  }

  .dropdown-panel-footer {
    padding: 12px 28px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .dropdown-panel-cta {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
  }

  .dropdown-panel-cta:hover {
    color: #fff;
  }
}

@media (max-width: 1280px) {
  .header .container {
    gap: 8px;
    padding: 0 20px;
  }

  .nav-links {
    gap: 12px;
    margin-left: 10px;
    margin-right: 10px;
  }

  .nav-links a,
  .nav-links .nav-link {
    font-size: 0.69rem;
    letter-spacing: 0.18em;
  }

  .header .nav-auth {
    gap: 8px;
    padding-left: 12px;
  }
}

@media (max-width: 900px) {
  .mobile-overlay.active .overlay-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    max-height: min(100dvh, 100vh);
    min-height: 0;
    box-sizing: border-box;
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px)) 16px;
    overflow: hidden;
    pointer-events: auto;
  }

  .overlay-nav--mega {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-height: min(70vh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 120px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-inline: 8px;
    touch-action: pan-y;
  }

  .overlay-mega-block {
    width: 100%;
    max-width: 360px;
    padding: 0 0 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
  }

  .overlay-mega-block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
  }

  .overlay-mega-block--row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: center;
  }

  .overlay-mega-label {
    display: block;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 10px;
  }

  .overlay-nav--mega .glitch-link {
    display: block;
    margin: 6px 0;
  }

  .overlay-nav--mega .overlay-auth {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* Cookie consent banner (see src/js/cookie-consent.js) */
#tg-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--tg-z-consent-banner);
  background: rgba(5, 5, 5, 0.97);
  border-top: 1px solid var(--line);
  padding: 16px 20px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

.tg-consent-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tg-consent-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--steel);
  line-height: 1.55;
  max-width: 62ch;
}

.tg-consent-text a {
  color: var(--signal);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.tg-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tg-consent-btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 0;
}

.tg-consent-btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--steel);
}

.tg-consent-btn--ghost:hover {
  border-color: var(--steel);
  color: var(--white);
}

.tg-consent-btn--primary {
  background: rgba(0, 229, 138, 0.12);
  border: 1px solid rgba(0, 229, 138, 0.55);
  color: #00E58A;
}

.tg-consent-btn--primary:hover {
  background: rgba(0, 229, 138, 0.2);
  border-color: #00E58A;
}

@media (max-width: 600px) {
  .tg-consent-inner {
    flex-direction: column;
    align-items: stretch;
  }
}