/* ==========================================================================
   SFEL DESIGN SYSTEM — Obsidian Minimal × Liquid Glass Nav × Docs
   Connected Ecosystem: simulationforeverylab.com <-> assersameh.com <-> harkadigital.com
   ========================================================================== */

:root {
  --bg-void: #060707;
  --bg-surface: #0b0d0c;
  --bg-elevated: #111513;
  --bg-liquid: linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0%, rgba(12, 18, 15, 0.34) 48%, rgba(24, 226, 153, 0.06) 100%);
  --bg-liquid-scrolled: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(10, 15, 13, 0.44) 55%, rgba(24, 226, 153, 0.08) 100%);

  --border-hairline: rgba(255, 255, 255, 0.085);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.2);
  --border-glass: rgba(255, 255, 255, 0.22);

  --txt-primary: #f4f5f3;
  --txt-secondary: #9da49f;
  --txt-muted: #626964;

  --accent-mint: #18e299;
  --accent-lime: #7ae563;
  --accent-crimson: #e0523a;
  --accent-gold: #e2b866;

  --font-sans: 'Inter', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;
  --font-arabic-display: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-arabic-serif: 'Amiri', 'Cairo', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --container-max: 1160px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background-color: var(--bg-void);
  color: var(--txt-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-void);
  color: var(--txt-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

[dir="rtl"] {
  font-family: var(--font-arabic);
  letter-spacing: normal;
}

[dir="rtl"] body {
  line-height: 1.8;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 {
  font-family: var(--font-arabic-display);
  letter-spacing: normal !important;
}

[dir="rtl"] .doc-eyebrow,
[dir="rtl"] .sec-eyebrow,
[dir="rtl"] .lab-hud-kicker {
  font-family: var(--font-arabic);
  letter-spacing: normal !important;
  font-weight: 600;
}

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

.skip-link {
  position: absolute;
  top: -120px;
  inset-inline-start: 20px;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--txt-primary);
  color: var(--bg-void);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

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

@media (max-width: 600px) {
  .container {
    padding: 0 18px;
  }
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.hero-mix-en {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  letter-spacing: -0.02em;
}

.hero-mix-ar {
  font-family: var(--font-arabic-serif);
  font-style: italic;
  font-weight: 700;
  font-size: 1.08em;
}

.eco-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 10px rgba(24, 226, 153, 0.85);
  flex-shrink: 0;
}

/* ==========================================================================
   iOS / iPHONE FLOATING LIQUID GLASS CAPSULE NAVBAR
   Scroll-driven shrinking header (modern-web-guidance: shrinking-header-on-scroll)
   ========================================================================== */
.liquid-nav-shell {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 0 18px;
  pointer-events: none;
}

.site-header {
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  width: 100%;
  max-width: 1100px;
  border-radius: 999px;
  background: var(--bg-liquid);
  backdrop-filter: blur(32px) saturate(210%) contrast(1.08);
  -webkit-backdrop-filter: blur(32px) saturate(210%) contrast(1.08);
  border: 1px solid var(--border-glass);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(24, 226, 153, 0.12),
    0 18px 44px -10px rgba(0, 0, 0, 0.68);
  transition:
    max-width 0.42s var(--ease-out),
    background 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s var(--ease-out);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  border-radius: 999px 999px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.site-header.is-scrolled {
  max-width: 780px;
  background: var(--bg-liquid-scrolled);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(24, 226, 153, 0.2),
    0 20px 50px -10px rgba(0, 0, 0, 0.8);
}

@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes liquidHeaderCondense {
      from {
        max-width: 1100px;
        transform: translateY(0px);
      }
      to {
        max-width: 780px;
        transform: translateY(-2px);
      }
    }
    .site-header {
      animation: liquidHeaderCondense linear both;
      animation-timeline: scroll(block root);
      animation-range: 0px 180px;
    }
  }
}

.nav-wrap {
  height: 54px;
  padding: 0 10px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

[dir="rtl"] .nav-wrap {
  padding: 0 18px 0 10px;
}

.brand-id {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--txt-primary);
  flex-shrink: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--txt-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.16s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--txt-primary);
}

.nav-links a.nav-highlight {
  color: var(--txt-primary);
}

.nav-links a.nav-highlight:hover {
  color: var(--accent-mint);
}

.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.btn-lang:hover {
  border-color: var(--border-strong);
  color: var(--txt-primary);
}

.btn-nav-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--txt-primary);
  color: var(--bg-void);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.btn-nav-primary:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt-primary);
  cursor: pointer;
}

.mobile-liquid-drawer {
  display: none;
  position: fixed;
  top: 78px;
  left: 18px;
  right: 18px;
  z-index: 999;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(11, 15, 13, 0.48) 100%);
  backdrop-filter: blur(32px) saturate(210%);
  -webkit-backdrop-filter: blur(32px) saturate(210%);
  border: 1px solid var(--border-glass);
  padding: 16px;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 24px 50px rgba(0, 0, 0, 0.78);
}

.mobile-liquid-drawer.open {
  display: flex;
}

.mobile-liquid-drawer a {
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--txt-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.16s ease;
}

.mobile-liquid-drawer a:hover {
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .nav-wrap {
    padding: 0 8px 0 14px;
  }
  [dir="rtl"] .nav-wrap {
    padding: 0 14px 0 8px;
  }
}

/* Structural Guide Rails */
.rail-frame {
  position: relative;
}

.rail-frame::before,
.rail-frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-subtle);
  pointer-events: none;
  z-index: 1;
}

.rail-frame::before { inset-inline-start: 0; }
.rail-frame::after { inset-inline-end: 0; }

/* ==========================================================================
   HERO STAGE WITH INTERTWINING BRAIDED THREADS + PEAK-SEEKING 3D VIEWPORT
   ========================================================================== */
.hero-stage {
  position: relative;
  padding: 126px 0 84px;
  border-bottom: 1px solid var(--border-hairline);
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero-stage {
    padding: 102px 0 58px;
  }
}

.hero-threads-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--txt-secondary);
  padding: 5px 13px;
  border: 1px solid var(--border-hairline);
  border-radius: 999px;
  background: rgba(11, 13, 12, 0.72);
  backdrop-filter: blur(12px);
  margin-bottom: 22px;
}

[dir="rtl"] .hero-eyebrow {
  font-family: var(--font-arabic);
  letter-spacing: normal;
  font-size: 12px;
}

.hero-h1 {
  font-size: clamp(2.65rem, 5.4vw, 4.35rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--txt-primary);
  margin-bottom: 20px;
}

[dir="rtl"] .hero-h1 {
  line-height: 1.18;
  font-weight: 800;
}

.hero-h1 .accent-mint {
  color: var(--accent-mint);
}

.hero-lead {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--txt-secondary);
  max-width: 490px;
  margin-bottom: 30px;
}

.hero-lead strong {
  color: var(--txt-primary);
  font-weight: 600;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--txt-primary);
  color: var(--bg-void);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.btn-primary:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(11, 13, 12, 0.65);
  backdrop-filter: blur(12px);
  color: var(--txt-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.btn-secondary:hover {
  border-color: var(--accent-mint);
  background: var(--bg-elevated);
}

/* Smoother Rounded Live Peak-Seeking 3D Viewport */
.lab-viewport {
  position: relative;
  background: rgba(11, 14, 13, 0.85);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 60px -20px rgba(0, 0, 0, 0.85);
}

.lab-viewport-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--txt-secondary);
}

.lab-viewport-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--txt-primary);
}

.lab-canvas-wrap {
  position: relative;
  height: 356px;
  background:
    radial-gradient(circle at 50% 45%, rgba(24, 226, 153, 0.06) 0%, transparent 66%),
    #060807;
}

@media (max-width: 600px) {
  .lab-viewport-head {
    padding: 10px 14px;
    font-size: 10px;
    flex-wrap: wrap;
  }
  .lab-canvas-wrap {
    height: 280px;
  }
}

.hero-canvas-3d {
  width: 100%;
  height: 100%;
  display: block;
}

.reticle-corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  color: var(--txt-muted);
  pointer-events: none;
  user-select: none;
}

.reticle-tl { top: 10px; left: 12px; }
.reticle-tr { top: 10px; right: 12px; }

.lab-hud-readout {
  position: absolute;
  bottom: 14px;
  inset-inline-start: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  font-family: var(--font-mono);
}

.lab-hud-kicker {
  font-size: 10px;
  color: var(--accent-mint);
  letter-spacing: 0.06em;
}

.lab-hud-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--txt-primary);
}

.lab-viewport-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  flex-wrap: wrap;
}

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

.vp-tab {
  background: transparent;
  border: 1px solid var(--border-hairline);
  color: var(--txt-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.vp-tab:hover {
  color: var(--txt-primary);
  border-color: var(--border-strong);
}

.vp-tab.active {
  background: rgba(24, 226, 153, 0.12);
  border-color: var(--accent-mint);
  color: var(--accent-mint);
}

.vp-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--txt-muted);
}

/* ==========================================================================
   MINIMAL VALUE STRIP (6 YEARS -> 6 HOURS)
   ========================================================================== */
.authority-strip {
  border-bottom: 1px solid var(--border-hairline);
  background: var(--bg-void);
}

.authority-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--border-hairline);
  gap: 1px;
}

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

.authority-cell {
  background: var(--bg-void);
  padding: 24px 22px;
}

.authority-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--txt-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

[dir="rtl"] .authority-num {
  font-family: var(--font-arabic-display);
}

.authority-num span {
  color: var(--accent-mint);
}

.authority-label {
  font-size: 13px;
  color: var(--txt-secondary);
}

/* ==========================================================================
   PAIN POINT & GLOBAL RESEARCH GAP STORYTELLING SECTION (#global-gap)
   ========================================================================== */
.gap-split {
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  gap: 24px;
  align-items: stretch;
}

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

.gap-panel {
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-lg);
  background: var(--bg-surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.5s ease, box-shadow 0.7s ease;
}

.gap-panel.is-ember-focus {
  border-color: rgba(224, 82, 58, 0.52);
  box-shadow:
    0 0 48px rgba(224, 82, 58, 0.16),
    inset 0 0 26px rgba(224, 82, 58, 0.06);
}

.gap-panel.is-truth-glow {
  border-color: rgba(24, 226, 153, 0.56);
  box-shadow:
    0 0 64px rgba(24, 226, 153, 0.22),
    inset 0 0 32px rgba(24, 226, 153, 0.08),
    inset 0 1px 0 rgba(24, 226, 153, 0.28);
}

@media (max-width: 600px) {
  .gap-panel {
    padding: 20px;
  }
}

.gap-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gap-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--txt-secondary);
  letter-spacing: 0.05em;
}

[dir="rtl"] .gap-tag {
  font-family: var(--font-arabic);
  letter-spacing: normal;
}

.gap-badge-crimson {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.035);
  color: var(--txt-secondary);
}

[dir="rtl"] .gap-badge-crimson {
  font-family: var(--font-arabic);
  font-size: 11.5px;
}

.gap-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-mint);
  background: rgba(24, 226, 153, 0.08);
  border: 1px solid rgba(24, 226, 153, 0.24);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gap-replay-btn:hover {
  background: rgba(24, 226, 153, 0.16);
  border-color: rgba(24, 226, 153, 0.45);
}

[dir="rtl"] .gap-replay-btn {
  font-family: var(--font-arabic);
  font-size: 11.5px;
}

.fao-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fao-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fao-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13.5px;
}

.fao-row-name {
  color: var(--txt-primary);
  font-weight: 500;
}

.fao-row-val {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.fao-row-val.mint { color: var(--accent-mint); }
.fao-row-val.lime { color: var(--accent-lime); }
.fao-row-val.crimson { color: #d97766; }

.fao-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
}

.fao-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 0.85s var(--ease-out);
}

.fao-fill.mint {
  background: linear-gradient(90deg, rgba(24, 226, 153, 0.55), var(--accent-mint));
  box-shadow: 0 0 16px rgba(24, 226, 153, 0.3);
}

.fao-fill.lime {
  background: linear-gradient(90deg, rgba(122, 229, 99, 0.45), var(--accent-lime));
}

.fao-fill.crimson {
  background: #d97766;
  box-shadow: 0 0 10px rgba(217, 119, 102, 0.4);
}

.fao-zero-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d97766;
  margin-inline-end: 7px;
  vertical-align: middle;
}

.gap-crimson-verdict {
  padding: 15px 17px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  border-inline-start: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.5s ease, background 0.5s ease, box-shadow 0.65s ease;
}

.gap-panel.is-ember-focus .gap-crimson-verdict {
  border-color: rgba(224, 82, 58, 0.42);
  border-inline-start-color: #e0523a;
  background: rgba(224, 82, 58, 0.09);
  box-shadow: 0 0 28px rgba(224, 82, 58, 0.12);
}

.gap-panel.is-truth-glow .gap-crimson-verdict {
  border-color: rgba(24, 226, 153, 0.5);
  border-inline-start-color: var(--accent-mint);
  background: linear-gradient(145deg, rgba(24, 226, 153, 0.12) 0%, rgba(11, 15, 13, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 38px rgba(24, 226, 153, 0.2);
}

.gap-crimson-verdict strong {
  display: block;
  color: var(--txt-primary);
  font-size: 14.5px;
  margin-bottom: 4px;
  transition: color 0.5s ease;
}

.gap-panel.is-ember-focus .gap-crimson-verdict strong {
  color: #f28b79;
}

.gap-panel.is-truth-glow .gap-crimson-verdict strong {
  color: var(--accent-mint);
}

.gap-crimson-verdict span {
  font-size: 12.8px;
  color: var(--txt-secondary);
  line-height: 1.55;
}

.gap-title-accent {
  color: var(--accent-mint);
  transition: color 0.7s ease, text-shadow 0.7s ease;
}

#global-gap.is-ember-phase .gap-title-accent {
  color: #f07662;
  text-shadow: 0 0 26px rgba(224, 82, 58, 0.38);
}

#global-gap.is-truth-phase .gap-title-accent {
  color: var(--accent-mint);
  text-shadow: 0 0 28px rgba(24, 226, 153, 0.32);
}

.gap-canvas-box {
  position: relative;
  height: 345px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at 75% 20%, rgba(24, 226, 153, 0.065) 0%, transparent 58%),
    #060807;
  overflow: hidden;
}

@media (max-width: 560px) {
  .gap-canvas-box {
    height: 288px;
  }
}

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

.gap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 12px;
  color: var(--txt-secondary);
}

.gap-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.gap-refs-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 11.5px;
  color: var(--txt-muted);
}

.gap-refs-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--txt-muted);
  margin-inline-end: 2px;
}

[dir="rtl"] .gap-refs-label {
  font-family: var(--font-arabic);
  letter-spacing: normal;
  font-size: 11.5px;
}

.gap-ref-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--txt-secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 1px;
  font-size: 11.5px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.gap-ref-link:hover {
  color: var(--accent-mint);
  border-bottom-color: var(--accent-mint);
}

.gap-ref-sep {
  color: var(--txt-muted);
  opacity: 0.45;
  user-select: none;
}

.gap-bridge-cta {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.gap-bridge-headline {
  font-size: clamp(1.32rem, 2.5vw, 1.88rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--txt-primary);
  max-width: 680px;
}

[dir="rtl"] .gap-bridge-headline {
  font-family: var(--font-arabic-display);
  letter-spacing: normal;
  line-height: 1.45;
}

.gap-bridge-headline .accent-mint {
  color: var(--accent-mint);
}

.studio-privacy-alert {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(226, 184, 102, 0.34);
  background: rgba(226, 184, 102, 0.06);
  font-size: 12.8px;
  color: #f3e4c3;
  line-height: 1.6;
}

.studio-privacy-alert strong {
  color: #e2b866;
}

/* ==========================================================================
   SECTIONS & MINIMAL DOCUMENTATION HUB (MINTLIFY STYLE)
   ========================================================================== */
.sec-pad {
  padding: 88px 0;
  border-bottom: 1px solid var(--border-hairline);
  position: relative;
}

@media (max-width: 768px) {
  .sec-pad {
    padding: 62px 0;
  }
}

.sec-head {
  max-width: 620px;
  margin-bottom: 40px;
}

.sec-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent-mint);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.sec-h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.14;
  color: var(--txt-primary);
  margin-bottom: 12px;
}

[dir="rtl"] .sec-h2 {
  line-height: 1.28;
}

.sec-p {
  color: var(--txt-secondary);
  font-size: 15.5px;
  line-height: 1.65;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.docs-rail {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  overflow: hidden;
}

@media (max-width: 860px) {
  .docs-rail {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: thin;
  }
}

.doc-tab-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: start;
  padding: 13px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  border-inline-start: 2px solid transparent;
  color: var(--txt-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.doc-tab-btn:last-child {
  border-bottom: none;
}

.doc-tab-btn:hover {
  color: var(--txt-primary);
  background: rgba(255, 255, 255, 0.02);
}

.doc-tab-btn.active {
  color: var(--txt-primary);
  background: var(--bg-elevated);
  border-inline-start-color: var(--accent-mint);
  font-weight: 600;
}

@media (max-width: 860px) {
  .doc-tab-btn {
    width: auto;
    border-bottom: none;
    border-inline-end: 1px solid var(--border-subtle);
    border-inline-start: none;
    border-bottom: 2px solid transparent;
    padding: 11px 14px;
  }
  .doc-tab-btn.active {
    border-inline-start-color: transparent;
    border-bottom-color: var(--accent-mint);
  }
}

.doc-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--txt-muted);
}

.doc-tab-btn.active .doc-code {
  color: var(--accent-mint);
}

.docs-stage {
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-lg);
  background: var(--bg-surface);
  padding: 32px;
}

@media (max-width: 600px) {
  .docs-stage {
    padding: 22px;
  }
}

.doc-panel {
  display: none;
}

.doc-panel.is-active {
  display: block;
}

.doc-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-mint);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.doc-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--txt-primary);
}

.doc-body {
  font-size: 15px;
  color: var(--txt-secondary);
  line-height: 1.72;
  margin-bottom: 24px;
  max-width: 640px;
}

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

@media (max-width: 640px) {
  .doc-steps {
    grid-template-columns: 1fr;
  }
}

.doc-step-card {
  padding: 16px 18px;
  background: var(--bg-void);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
}

.doc-step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-mint);
  margin-bottom: 5px;
}

.doc-step-card strong {
  display: block;
  font-size: 14px;
  color: var(--txt-primary);
  margin-bottom: 4px;
}

.doc-step-card p {
  font-size: 13px;
  color: var(--txt-secondary);
  line-height: 1.55;
}

.doc-step-card a {
  color: var(--accent-mint);
  text-decoration: none;
}

.doc-step-card a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   PRE-REGISTRATION WISHING LIST
   Includes validate-input-after-interaction (:user-invalid / :user-valid)
   ========================================================================== */
.waitlist-shell {
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-lg);
  background: var(--bg-surface);
  padding: 40px;
  display: grid;
  grid-template-columns: 0.92fr 1.12fr;
  gap: 44px;
  position: relative;
}

@media (max-width: 900px) {
  .waitlist-shell {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 28px;
  }
}

.wl-counter-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  background: var(--bg-void);
  margin: 20px 0;
}

.wl-counter-num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent-mint);
  line-height: 1;
}

.wl-counter-txt {
  font-size: 13px;
  color: var(--txt-secondary);
  line-height: 1.5;
}

.wl-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(24, 226, 153, 0.28);
  background: rgba(24, 226, 153, 0.06);
  font-size: 12.5px;
  color: var(--txt-primary);
  margin-bottom: 18px;
}

.wl-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 580px) {
  .wl-form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.fg {
  margin-bottom: 14px;
}

.fg label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--txt-secondary);
  margin-bottom: 5px;
}

.field-hint {
  display: block;
  font-size: 11.5px;
  color: var(--txt-muted);
  margin-bottom: 5px;
}

.fg input,
.fg select,
.fg textarea {
  width: 100%;
  background: var(--bg-void);
  color: var(--txt-primary);
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 13.8px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  outline: none;
  border-color: var(--accent-mint);
}

.field-error-msg {
  display: none;
  color: var(--accent-crimson);
  font-size: 12px;
  margin-top: 5px;
}

.fg :is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--accent-crimson);
  background: rgba(224, 82, 58, 0.06);
}

.fg :is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) + .field-error-msg {
  display: block;
}

.fg :is(input, select, textarea):is(:user-valid, .user-valid-fallback) {
  border-color: rgba(24, 226, 153, 0.48);
}

.btn-wl-submit {
  width: 100%;
  background: var(--txt-primary);
  color: var(--bg-void);
  border: none;
  padding: 13px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.btn-wl-submit:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.wl-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-hairline);
  background: var(--bg-void);
  font-size: 13px;
  font-weight: 500;
}

/* ==========================================================================
   MASTER PROMPT STUDIO (Prefix + User Input + Verification Suffix)
   ========================================================================== */
.studio-shell {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 26px;
  align-items: start;
}

@media (max-width: 960px) {
  .studio-shell {
    grid-template-columns: 1fr;
  }
}

.studio-card {
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-lg);
  background: var(--bg-surface);
  padding: 26px;
}

.studio-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-hairline);
}

.studio-flow-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (max-width: 780px) {
  .studio-flow-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.studio-flow-step {
  border: 1px solid var(--border-hairline);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--txt-secondary);
}

.studio-flow-step strong {
  display: block;
  color: var(--accent-mint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  margin-bottom: 4px;
}

[dir="rtl"] .studio-flow-step strong {
  font-family: var(--font-arabic);
  font-size: 11.5px;
}

.studio-sector-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 560px) {
  .studio-sector-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .studio-presets {
    grid-template-columns: 1fr;
  }
}

.preset-pill {
  background: var(--bg-void);
  border: 1px solid var(--border-hairline);
  color: var(--txt-secondary);
  padding: 10px 13px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: all 0.16s ease;
}

.preset-pill:hover {
  color: var(--txt-primary);
  border-color: var(--border-strong);
}

.preset-pill.active {
  background: rgba(24, 226, 153, 0.1);
  border-color: var(--accent-mint);
  color: var(--accent-mint);
}

.prompt-layer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-mint);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.prompt-lock-preview {
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--txt-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.prompt-lock-preview summary {
  cursor: pointer;
  color: var(--txt-secondary);
  font-weight: 600;
  font-size: 12px;
}

.prompt-lock-preview pre {
  margin-top: 10px;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--txt-secondary);
}

[dir="rtl"] .prompt-lock-preview pre {
  font-family: var(--font-arabic);
  font-size: 12px;
}

.terminal-box {
  position: sticky;
  top: 86px;
  background: #040505;
  border: 1px solid var(--border-glass);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-head {
  background: var(--bg-surface);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.terminal-filename {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--txt-secondary);
}

.terminal-actions {
  display: flex;
  gap: 8px;
}

.btn-copy-prompt {
  background: var(--txt-primary);
  color: var(--bg-void);
  border: none;
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.btn-copy-prompt:hover {
  background: var(--accent-mint);
}

.btn-dl-prompt {
  background: transparent;
  color: var(--txt-secondary);
  border: 1px solid var(--border-hairline);
  padding: 6px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  cursor: pointer;
}

.btn-dl-prompt:hover {
  color: var(--txt-primary);
  border-color: var(--border-strong);
}

.terminal-pre {
  padding: 22px;
  font-family: var(--font-mono);
  font-size: 12.3px;
  color: #cfd8d3;
  white-space: pre-wrap;
  line-height: 1.72;
  max-height: 560px;
  overflow-y: auto;
}

[dir="rtl"] .terminal-pre {
  font-family: var(--font-arabic);
  font-size: 13px;
}

[dir="rtl"] .terminal-box[dir="ltr"] .terminal-pre {
  font-family: var(--font-mono);
  font-size: 12.2px;
}

/* ==========================================================================
   ARCHITECTURAL FOOTER
   ========================================================================== */
.site-footer {
  background: #040505;
  padding: 58px 0 38px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-hairline);
}

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

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

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--txt-muted);
  text-transform: uppercase;
  margin-bottom: 13px;
}

[dir="rtl"] .footer-col-title {
  font-family: var(--font-arabic);
  letter-spacing: normal;
  font-size: 12px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--txt-secondary);
  text-decoration: none;
  transition: color 0.16s ease;
}

.footer-links a:hover {
  color: var(--accent-mint);
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--txt-muted);
}

.admin-toggle-btn {
  background: transparent;
  border: none;
  color: var(--txt-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}

.admin-toggle-btn:hover {
  color: var(--txt-secondary);
}

.admin-drawer {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.admin-drawer.open {
  display: flex;
  flex-wrap: wrap;
}

.admin-input {
  background: var(--bg-surface);
  color: var(--txt-primary);
  border: 1px solid var(--border-hairline);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  width: 140px;
}

.admin-btn {
  background: var(--bg-elevated);
  color: var(--accent-mint);
  border: 1px solid var(--border-hairline);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
