/* ==========================================================================
   FolioSquad Main Landing Page Stylesheet (v2026.10 Final)
   ========================================================================== */
:root {
  /* LAYER 1: Pure White Page Canvas */
  --page-white: #ffffff;
  --page-subtle: #f6f7fb;
  --page-border: #e5e7f0;

  /* LAYER 2: Dark Sector Card (Deep Obsidian + Subtle Top-Left Purple Radial Glow) */
  --sector-bg: #08090d;
  --sector-text: #ffffff;
  --sector-sub: #a0a5b8;

  /* LAYER 3: Crisp White Bottom-Docked Inner Stage */
  --stage-white: #ffffff;
  --stage-subtle: #f7f8fc;
  --stage-border: #e4e7f0;
  --ink-black: #101114;
  --ink-slate: #4e5368;
  --ink-muted: #7f859c;

  /* Brand & Semantic Accents */
  --purple-main: #7132f5;
  --purple-dark: #5741d8;
  --purple-tint: rgba(113, 50, 245, 0.09);
  --emerald-main: #0d9488;
  --emerald-bright: #10b981;
  --rose-main: #e11d48;

  --radius-btn: 12px;
  --radius-sector: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--page-white);
  color: var(--ink-black);
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Top Scroll Progress Bar */
.scroll-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(16, 17, 20, 0.05);
  z-index: 10001;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--purple-main);
}

/* ==========================================================================
   [TOP NAVBAR ON PURE WHITE BACKGROUND]
   Matches Kraken top nav in reference screenshot
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 240, 0.7);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 36px;
  justify-self: start;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--purple-main);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand span {
  color: var(--ink-black);
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--purple-main);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-black);
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.18s;
}

.nav-links a:hover {
  color: var(--purple-main);
}

.header-ctas {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons (12px radius strict) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-btn);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 14.5px; }

.btn-purple {
  background: var(--purple-main);
  color: #ffffff;
}

.btn-purple:hover {
  background: var(--purple-dark);
  transform: translateY(-1px);
}

.btn-purple-soft {
  background: var(--purple-tint);
  color: var(--purple-main);
}

.btn-purple-soft:hover {
  background: rgba(113, 50, 245, 0.15);
}

.btn-black {
  background: var(--ink-black);
  color: #ffffff;
}

.btn-black:hover {
  background: #252836;
}

.btn-white {
  background: #ffffff;
  color: var(--ink-black);
}

.btn-white:hover {
  background: #f0f2f8;
}

/* ==========================================================================
   [TOP WHITE HERO SECTION]
   Matches "Own the power of your money" white top section in reference photo
   ========================================================================== */
.top-white-hero {
  background: var(--page-white);
  padding: 72px 24px 64px;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.top-hero-title {
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--ink-black);
  margin-bottom: 18px;
}

/* Status Box directly under FolioSquad title */
.top-hero-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.top-hero-status-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  background: #ffffff;
  border: 1.5px solid #c4b5fd;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-slate);
  box-shadow: 0 4px 16px rgba(113, 50, 245, 0.06);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 8px var(--emerald-bright);
}

.top-hero-quick-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.quick-circle-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 99px;
  border: 1px solid var(--page-border);
  background: #ffffff;
  color: var(--ink-slate);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s;
}

.quick-circle-link:hover {
  border-color: var(--purple-main);
  color: var(--purple-main);
  background: var(--purple-tint);
}

/* 3 Minimal Proof Stats on White Background (Matches Since 2011 | $2T+ | Forbes) */
.top-hero-proof-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 580px;
  margin: 0 auto;
  gap: 24px;
}

.proof-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.proof-item strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-black);
}

.proof-item span {
  font-size: 12px;
  color: var(--ink-muted);
}

/* ==========================================================================
   [FULL-BLEED SECTOR CARDS — 6 DISTINCT COLORS & ARCHITECTURAL PATTERNS]
   - Always fills viewport width leaving only 12px left/right margin (24px total)
   - Exact same total height (700px) & bottom-docked white stage height (400px)
     across all 6 sectors, matching Sector 1!
   ========================================================================== */
.sector-dark-card {
  width: calc(100% - 24px);
  max-width: none;
  height: 700px;
  margin: 0 auto 28px;
  color: var(--sector-text);
  border-radius: var(--radius-sector);
  padding: 56px 24px 0; /* padding-bottom: 0 so inner stage touches bottom edge! */
  position: relative;
  overflow: hidden;
  box-shadow: 0 22px 54px rgba(10, 11, 16, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sector-dark-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* SECTOR 1 THEME: Kraken Royal Violet-Obsidian + Micro Dot Matrix Pattern */
.sector-theme-violet {
  background: radial-gradient(ellipse at 22% 0%, rgba(113, 50, 245, 0.46) 0%, rgba(26, 14, 54, 0.96) 48%, #08080e 85%);
}
.sector-theme-violet::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.15) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.15) 100%);
}

/* SECTOR 2 THEME: Deep Sapphire Blueprint Navy + Orthogonal Grid Pattern */
.sector-theme-sapphire {
  background: radial-gradient(ellipse at 78% 0%, rgba(37, 99, 235, 0.48) 0%, #0a1936 50%, #050b16 90%);
}
.sector-theme-sapphire::before {
  background-image:
    linear-gradient(to right, rgba(147, 197, 253, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(147, 197, 253, 0.08) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* SECTOR 3 THEME: Quant Emerald Forest + 45-Deg Diagonal Technical Hatch Pattern */
.sector-theme-emerald {
  background: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.42) 0%, #062923 50%, #040e0d 90%);
}
.sector-theme-emerald::before {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(52, 211, 153, 0.06) 0px,
    rgba(52, 211, 153, 0.06) 1px,
    transparent 1px,
    transparent 18px
  );
}

/* SECTOR 4 THEME: Quant Amber-Bronze Obsidian + Crosshair Quant Matrix Pattern */
.sector-theme-amber {
  background: radial-gradient(ellipse at 30% 0%, rgba(245, 158, 11, 0.38) 0%, #2b1806 50%, #0d0804 90%);
}
.sector-theme-amber::before {
  background-image:
    radial-gradient(rgba(251, 191, 36, 0.16) 1.5px, transparent 1.5px),
    linear-gradient(to right, rgba(251, 191, 36, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(251, 191, 36, 0.05) 1px, transparent 1px);
  background-size: 36px 36px, 36px 36px, 36px 36px;
}

/* SECTOR 5 THEME: Cyber Teal-Indigo Slate + Horizontal Signal Pulse Grid Pattern */
.sector-theme-cyan {
  background: radial-gradient(ellipse at 70% 0%, rgba(6, 182, 212, 0.42) 0%, #082338 50%, #040c14 90%);
}
.sector-theme-cyan::before {
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(34, 211, 238, 0.07) 0px,
      rgba(34, 211, 238, 0.07) 1px,
      transparent 1px,
      transparent 22px
    ),
    linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
  background-size: 100% 22px, 88px 100%;
}

/* SECTOR 6 THEME: Institutional Crimson-Burgundy Vault + Concentric Radar Shield Rings */
.sector-theme-vault {
  background: radial-gradient(ellipse at 25% 0%, rgba(225, 29, 72, 0.42) 0%, #2c0b19 50%, #0b060a 90%);
}
.sector-theme-vault::before {
  background-image: repeating-radial-gradient(
    circle at 50% 0%,
    rgba(251, 113, 133, 0.09) 0px,
    rgba(251, 113, 133, 0.09) 1px,
    transparent 1px,
    transparent 64px
  );
}

.btn-sapphire {
  background: #2563eb;
  color: #ffffff;
}
.btn-sapphire:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-emerald {
  background: #0d9488;
  color: #ffffff;
}
.btn-emerald:hover {
  background: #0f766e;
  transform: translateY(-1px);
}

.btn-amber {
  background: #d97706;
  color: #ffffff;
}
.btn-amber:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.btn-cyan {
  background: #0891b2;
  color: #ffffff;
}
.btn-cyan:hover {
  background: #0e7490;
  transform: translateY(-1px);
}

.btn-vault {
  background: #e11d48;
  color: #ffffff;
}
.btn-vault:hover {
  background: #be123c;
  transform: translateY(-1px);
}

/* Centered Sector Header inside Dark Card */
.sector-header-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.pro-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.sector-title {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 10px;
}

.sector-sub {
  font-size: 15px;
  color: var(--sector-sub);
  line-height: 1.5;
  margin-bottom: 18px;
}

/* Bottom-Docked Bezel + Crisp White Inner Content Stage (UNIFIED 400PX HEIGHT) */
.bottom-docked-bezel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  height: 410px;
  margin: 0 auto;
  padding: 10px 10px 0; /* 0 bottom padding -> flush with bottom edge */
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
  transform-origin: center bottom;
  will-change: transform;
  flex-shrink: 0;
}

.inner-white-stage {
  background: var(--stage-white);
  color: var(--ink-black);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  height: 400px;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   [SECTOR 01 DOCKED CONTENT: LIVE WHITE CHART WORKSTATION]
   ========================================================================== */
.ws-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 22px;
  background: var(--stage-subtle);
  border-bottom: 1px solid var(--stage-border);
  flex-shrink: 0;
  gap: 12px;
}

.ws-pair-tabs {
  display: flex;
  gap: 6px;
}

.ws-pair-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--stage-border);
  background: #ffffff;
  color: var(--ink-slate);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.ws-pair-btn.active {
  background: var(--ink-black);
  color: #ffffff;
  border-color: var(--ink-black);
}

.ws-metrics-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
}

.ws-metrics-bar span.lbl {
  font-family: 'Pretendard', sans-serif;
  font-size: 11px;
  color: var(--ink-muted);
  margin-right: 5px;
}

.ws-engine-switch {
  display: flex;
  background: #e9ecf5;
  padding: 3px;
  border-radius: 8px;
}

.ws-eng-btn {
  padding: 4px 11px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-slate);
  cursor: pointer;
}

.ws-eng-btn.active {
  background: #ffffff;
  color: var(--purple-main);
  box-shadow: 0 2px 6px rgba(16, 17, 20, 0.08);
}

.ws-grid {
  display: grid;
  grid-template-columns: 240px 1fr 230px;
  flex: 1;
  min-height: 0;
}

.ws-col-left {
  padding: 18px 20px;
  border-right: 1px solid var(--stage-border);
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ws-kv-box {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ws-kv-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--stage-border);
}

.ws-kv-line span { color: var(--ink-muted); }
.ws-kv-line strong { font-family: 'JetBrains Mono', monospace; color: var(--ink-black); }

.ws-col-center {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  min-height: 0;
}

.ws-chart-head {
  padding: 8px 18px;
  border-bottom: 1px solid var(--stage-border);
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.ws-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}

#heroChartCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.ws-col-right {
  padding: 16px 18px;
  border-left: 1px solid var(--stage-border);
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ob-row {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 4.5px 8px;
  border-radius: 5px;
  margin-bottom: 3px;
}

.ob-row.ask { background: rgba(225, 29, 72, 0.06); color: var(--rose-main); }
.ob-row.bid { background: rgba(13, 148, 136, 0.07); color: var(--emerald-main); }

/* ==========================================================================
   [SECTOR 02 DOCKED CONTENT: 5-AGENT PIPELINE STAGE (400px UNIFIED)]
   ========================================================================== */
/* ==========================================================================
   [SECTOR 06: 100% LEFT-RIGHT SYMMETRICAL 5-AGENT CONSENSUS STAGE]
   Outer full-bleed Sapphire card + 160px footer spacing + Center-Axis Stage
   ========================================================================== */
#sector-agents {
  margin-bottom: 28px;
}

.pipeline-sym-body {
  flex: 1;
  padding: 18px 26px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  background: #ffffff;
}

/* Upper Center-Axis Spotlight Card (100% Left-Right Symmetrical) */
.agent-sym-spotlight {
  background: #f8f9fd;
  border: 1.5px solid var(--stage-border);
  border-radius: 16px;
  padding: 16px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.agent-sym-top-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.agent-summary-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
}

.agent-summary-metric {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--emerald-main);
  background: #ffffff;
  border: 1px solid var(--stage-border);
  padding: 5px 12px;
  border-radius: 8px;
}

.agent-summary-text {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-black);
  line-height: 1.45;
  max-width: 720px;
}

/* Lower 5 Equal Symmetrical Square Cards (2 Left - 1 Center - 2 Right) */
.agent-nodes-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  flex: 1;
}

.agent-node-btn {
  background: #f8f9fd;
  border: 1.5px solid var(--stage-border);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.agent-node-btn:hover {
  border-color: #2563eb;
  background: #ffffff;
}

.agent-node-btn.active {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.14);
  transform: translateY(-3px);
}

.agent-node-step {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.agent-node-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.agent-node-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink-black);
}

.agent-node-role {
  font-size: 12px;
  color: var(--ink-slate);
}

.agent-node-meter {
  width: 100%;
  padding-top: 9px;
  border-top: 1px dashed var(--stage-border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald-main);
  text-align: center;
}

/* ==========================================================================
   [2-COLUMN SIDE-BY-SIDE SECTOR ROW: DUAL ENGINE + GUARDRAIL (3D OBJECTS)]
   Matches Kraken reference photo (2 side-by-side cards with tactile 3D icon)
   ========================================================================== */
.sector-split-row {
  width: calc(100% - 24px);
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sector-split-row .sector-dark-card {
  width: 100%;
  margin: 0;
  padding: 56px 24px 0;
}

.sector-3d-object-stage {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 18px;
  transform-origin: center center;
  will-change: transform;
}

.sector-3d-object-img {
  width: 100%;
  max-width: 390px;
  max-height: 330px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 28px 46px rgba(0, 0, 0, 0.58));
  animation: float3dSwitch 5.5s ease-in-out infinite;
}

@keyframes float3dSwitch {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-9px) scale(1.015); }
}

.dual-canvas-header {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 6px;
  flex-shrink: 0;
}

/* ==========================================================================
   [SECTOR 02 DOCKED CONTENT: 2,000+ BACKTEST STUDIO (400px UNIFIED)]
   ========================================================================== */
.bt-white-inner {
  display: grid;
  grid-template-columns: 360px 1fr;
  flex: 1;
  min-height: 0;
}

.bt-leader-col {
  padding: 16px 20px;
  background: #fbfcfe;
  border-right: 1px solid var(--stage-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bt-rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bt-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--stage-border);
  cursor: pointer;
  transition: all 0.15s;
}

.bt-rank-item.active {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.05);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.08);
}

.bt-rank-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bt-rank-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--ink-black);
  color: #ffffff;
}

.bt-rank-item.active .bt-rank-num {
  background: #d97706;
}

.bt-rank-pair {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-black);
}

.bt-rank-sub {
  font-size: 11px;
  color: var(--ink-muted);
}

.bt-rank-sharpe {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #d97706;
}

.bt-matrix-col {
  padding: 16px 22px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bt-canvas-holder {
  flex: 1;
  min-height: 0;
  position: relative;
}

#backtestMatrixCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   [SECTOR 04 DOCKED CONTENT: TELEGRAM CHATOPS & APPROVAL (400px UNIFIED)]
   ========================================================================== */
.tg-white-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  flex: 1;
  min-height: 0;
}

.tg-dispatch-col {
  padding: 20px 24px;
  background: #ffffff;
  border-right: 1px solid var(--stage-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tg-msg-card {
  background: var(--stage-subtle);
  border: 1.5px solid var(--stage-border);
  border-radius: 14px;
  padding: 18px 20px;
}

.tg-msg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--stage-border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #0891b2;
}

.tg-msg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.tg-msg-box {
  background: #ffffff;
  border: 1px solid var(--stage-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.tg-msg-box span {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 3px;
}

.tg-msg-box strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-black);
}

.tg-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tg-inline-btn {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--stage-border);
  background: #ffffff;
  color: var(--ink-black);
  transition: all 0.15s;
  font-family: 'Pretendard', sans-serif;
}

.tg-inline-btn.approve {
  background: #0891b2;
  color: #ffffff;
  border-color: #0891b2;
}

.tg-inline-btn.approve:hover {
  background: #0e7490;
}

.tg-log-col {
  padding: 20px 24px;
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tg-log-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tg-log-item {
  background: #ffffff;
  border: 1px solid var(--stage-border);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}

.tg-log-item strong {
  font-weight: 700;
  color: var(--ink-black);
}

.tg-log-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #0891b2;
  background: rgba(8, 145, 178, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
}

/* ==========================================================================
   [OUTRO SECTION ON PURE WHITE CANVAS — BOOKEND WITH TOP HERO]
   100% Left-Right Symmetrical Closing Section between 5-Agent & Footer
   ========================================================================== */
.outro-section {
  max-width: 960px;
  margin: 110px auto 110px;
  padding: 64px 36px;
  text-align: center;
  background: #ffffff;
  border: 1.5px solid var(--page-border);
  border-radius: 28px;
  box-shadow: 0 20px 56px rgba(16, 17, 20, 0.05);
  position: relative;
  overflow: hidden;
}

.outro-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--purple-tint);
  border: 1px solid rgba(113, 50, 245, 0.18);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--purple-main);
  margin-bottom: 18px;
}

.outro-title {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink-black);
  margin-bottom: 12px;
}

.outro-sub {
  font-size: 16px;
  color: var(--ink-slate);
  line-height: 1.55;
  max-width: 600px;
  margin: 0 auto 30px;
}

.outro-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.outro-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--page-border);
}

.outro-status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.outro-status-item strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-black);
}

.outro-status-item span {
  font-size: 12px;
  color: var(--ink-muted);
}

/* [FOOTER ON WHITE PAGE] */
.site-footer {
  max-width: 1280px;
  margin: 0 auto 80px;
  padding: 24px;
  border-top: 1px solid var(--page-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-muted);
}

/* ==========================================================================
   [RESPONSIVE BREAKPOINTS: DESKTOP (>1024px) / TABLET (768~1024px) / MOBILE (<=767px)]
   ========================================================================== */

/* 1. TABLET & COMPACT LAPTOP (<= 1024px) */
@media (max-width: 1024px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 12px 18px;
  }
  .nav-links {
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
    max-width: 100%;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    font-size: 12.5px;
  }
  .sector-split-row {
    grid-template-columns: 1fr;
  }
  .sector-dark-card,
  .bottom-docked-bezel,
  .inner-white-stage {
    height: auto;
    min-height: 0;
  }
  .ws-topbar {
    height: auto;
    min-height: 48px;
    padding: 10px 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .ws-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ws-col-center {
    grid-column: 1 / -1;
    order: -1;
    border-bottom: 1px solid var(--stage-border);
  }
  .ws-canvas-wrap {
    height: 240px;
    min-height: 240px;
  }
  .ws-col-left {
    border-right: 1px solid var(--stage-border);
  }
  .ws-col-right {
    border-left: none;
  }
  .agent-nodes-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .bt-white-inner,
  .tg-white-inner {
    grid-template-columns: 1fr;
  }
  .bt-leader-col,
  .tg-dispatch-col {
    border-right: none;
    border-bottom: 1px solid var(--stage-border);
  }
  .bt-canvas-holder {
    height: 240px;
    min-height: 240px;
  }
  .top-hero-proof-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

/* 2. MOBILE SMARTPHONE (<= 767px) */
@media (max-width: 767px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 10px 14px;
  }
  .brand-left {
    grid-column: 1;
    grid-row: 1;
  }
  .brand {
    font-size: 17px;
  }
  .header-ctas {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
  }
  .header-ctas .btn-sm {
    padding: 7px 11px;
    font-size: 12px;
  }
  .nav-links {
    display: flex !important;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: flex-start;
    gap: 14px;
    padding: 8px 2px 2px;
    border-top: 1px solid var(--page-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links a {
    font-size: 12px;
    flex-shrink: 0;
  }

  .top-white-hero {
    padding: 40px 16px 32px;
  }
  .top-hero-title {
    font-size: clamp(36px, 11vw, 52px);
  }
  .top-hero-quick-links {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    gap: 8px;
  }
  .quick-circle-link {
    width: 100%;
    justify-content: center;
  }
  .top-hero-proof-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .sector-dark-card,
  .sector-split-row {
    width: calc(100% - 20px);
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px;
  }
  .sector-split-row .sector-dark-card {
    width: 100%;
  }
  .sector-header-center {
    padding: 32px 16px 22px;
  }
  .sector-title {
    font-size: clamp(22px, 6.5vw, 30px);
  }
  .sector-sub {
    font-size: 13.5px;
  }
  .bottom-docked-bezel {
    padding: 6px 6px 0;
    border-radius: 16px 16px 0 0;
  }
  .inner-white-stage {
    border-radius: 12px 12px 0 0;
  }

  .ws-topbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .ws-metrics-bar {
    gap: 12px;
    font-size: 11.5px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .ws-grid {
    grid-template-columns: 1fr;
  }
  .ws-canvas-wrap {
    height: 210px;
    min-height: 210px;
  }
  .ws-chart-head {
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    padding: 8px 12px;
  }
  .ws-col-left,
  .ws-col-right {
    border-right: none;
    border-left: none;
    border-top: 1px solid var(--stage-border);
    padding: 14px;
    gap: 10px;
  }

  .pipeline-sym-body {
    padding: 14px 12px 16px;
  }
  .agent-sym-spotlight {
    padding: 14px 14px;
  }
  .agent-sym-top-row {
    flex-direction: column;
    gap: 6px;
  }
  .agent-summary-text {
    font-size: 13px;
  }
  .agent-nodes-bar {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .agent-nodes-bar .agent-node-btn:last-child {
    grid-column: 1 / -1;
  }

  .sector-3d-object-stage {
    height: 220px;
  }
  .tg-msg-grid {
    grid-template-columns: 1fr;
  }
  .tg-action-row {
    flex-direction: column;
  }
  .tg-log-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .outro-section {
    margin: 48px 12px;
    padding: 36px 18px;
    border-radius: 20px;
  }
  .outro-cta-row {
    flex-direction: column;
  }
  .outro-cta-row .btn {
    width: 100%;
    justify-content: center;
  }
  .outro-status-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .site-footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    margin-bottom: 40px;
  }
}
