/* ==============================================================================
   Stock Research AI - Institutional Web Application Stylesheet
   Modern, WCAG 2.2 AA compliant, dark/light theme, high-clarity financial UI
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-focus: rgba(14, 165, 233, 0.5);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #0ea5e9;
  --accent-cyan-glow: rgba(14, 165, 233, 0.25);
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 1280px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  background-image: 
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.glyph {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.18em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==============================================================================
   Layout & Container
   ============================================================================== */

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

/* ==============================================================================
   Header Navigation
   ============================================================================== */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 15, 29, 0.92);
  border-bottom: 1px solid var(--border-subtle);
  min-height: 68px;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 12px;
  position: relative;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 0 20px var(--accent-cyan-glow);
  flex-shrink: 0;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  display: block;
  white-space: nowrap;
}

/* Navigation & Dropdown Architecture */
nav.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 1;
  min-width: 0;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav-link:hover,
.nav-link.active,
.nav-item.dropdown:hover > .nav-link,
.nav-item.dropdown.active-parent > .nav-link,
.nav-item.dropdown.open > .nav-link {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-item.dropdown.active-parent > .nav-link {
  color: var(--accent-cyan);
}

.nav-item.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-item.dropdown:hover .dropdown-chevron,
.nav-item.dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

/* Glassmorphic Floating Sub-Tab Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 310px;
  max-width: 360px;
  background: rgba(13, 20, 36, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top left;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  pointer-events: none;
}

/* Invisible Bridge to prevent hover gap jitter */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.dropdown-menu-right {
  left: auto;
  right: 0;
  transform-origin: top right;
}

.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown:focus-within .dropdown-menu,
.nav-item.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Sub-Tab Items */
.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
  text-decoration: none;
}

.dropdown-item.active {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.3);
}

.dropdown-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.dropdown-icon .glyph {
  width: 18px;
  height: 18px;
  stroke: var(--accent-cyan);
}

.dropdown-item:hover .dropdown-icon {
  transform: scale(1.08);
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 165, 233, 0.4);
}

.dropdown-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dropdown-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: normal;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 4px 6px;
}

.nav-pill-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.18);
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.dropdown-item.disabled-preview {
  opacity: 0.6;
  cursor: default;
}
.dropdown-item.disabled-preview:hover {
  background: transparent;
  transform: none;
}

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

.mobile-menu-btn {
  display: none;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: rgba(148, 163, 184, 0.3);
}

.mobile-menu-btn .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.2s ease;
  border-radius: 2px;
}

.mobile-menu-btn.active .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-btn.active .bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Buttons & Interactive Affordance */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-cyan-glow);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  opacity: 0.96;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
  text-decoration: none;
  color: #ffffff;
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}

/* Standout Hero Action for Forensic Intelligence Desk */
.btn-hero-ai {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22) 0%, rgba(99, 102, 241, 0.28) 100%);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.22);
  font-weight: 700;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.btn-hero-ai:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.38) 0%, rgba(99, 102, 241, 0.48) 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* ==============================================================================
   Hero Section
   ============================================================================== */

section.hero {
  padding: 72px 0 54px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 24px;
}

h1.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-title span.gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 36px;
}

/* Live Search Bar */
.search-container {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 8px 6px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.search-input-wrap:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px var(--accent-cyan-glow);
}

.search-icon {
  font-size: 20px;
  margin-right: 12px;
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

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

/* Quick Tickers Chips */
.quick-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.chip {
  padding: 4px 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  text-decoration: none;
}

/* ==============================================================================
   Key Stats / Trust Metrics
   ============================================================================== */

section.stats-strip {
  padding: 24px 0 48px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  backdrop-filter: blur(8px);
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==============================================================================
   7-Pillar Overview Grid
   ============================================================================== */

section.pillars-section {
  padding: 60px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.pillar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.pillar-icon {
  font-size: 30px;
  margin-bottom: 16px;
}

.pillar-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pillar-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==============================================================================
   Pricing Tiers Section
   ============================================================================== */

section.pricing-section {
  padding: 72px 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.4);
}

.plan-card.popular {
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 30px var(--accent-cyan-glow);
}

.plan-badge {
  position: absolute;
  top: -12px;
  right: 28px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: white;
  padding: 4px 13px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.plan-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 16px 0 6px;
}

.plan-price span.cycle {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.plan-credits {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 20px;
}

.plan-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.plan-features {
  list-style: none;
  margin-bottom: 32px;
  flex: 1;
}

.plan-features li {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.plan-features li::before {
  content: "✓";
  color: var(--accent-cyan);
  font-weight: 800;
}

/* ==============================================================================
   Dossier Report Presentation
   ============================================================================== */

article.dossier-article {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin: 40px 0 60px;
  backdrop-filter: blur(12px);
}

.dossier-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 28px;
  margin-bottom: 32px;
}

.ticker-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.ticker-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ticker-sub {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.dossier-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.dossier-meta-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.dossier-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.dossier-meta-sep {
  color: var(--text-muted);
  font-size: 11px;
  opacity: 0.6;
}

.dossier-provenance-subline {
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* 30-Second Progressive Fill Button Loading State */
.btn-loading-progress {
  position: relative !important;
  overflow: hidden !important;
  pointer-events: none !important;
  user-select: none;
  border-color: rgba(14, 165, 233, 0.5) !important;
  color: #f8fafc !important;
  background-color: #0f172a !important;
}

.btn-loading-progress::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--btn-progress, 0%);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.22) 0%, rgba(14, 165, 233, 0.48) 100%);
  border-right: 2px solid var(--accent-cyan, #0ea5e9);
  transition: width 0.4s ease-out;
  z-index: 1;
}

.btn-loading-progress > * {
  position: relative;
  z-index: 2;
}

.btn-loading-progress .btn-progress-label {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Static Status Pills & Informational Badges (Non-Clickable) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: default;
  user-select: text;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  box-shadow: none !important;
  transform: none !important;
  transition: none;
}

.badge-emerald {
  background: rgba(6, 78, 59, 0.35);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.badge-cyan {
  background: rgba(12, 74, 110, 0.35);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.28);
}

.badge-amber {
  background: rgba(120, 53, 15, 0.35);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.badge-slate {
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Informational State Dots */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot-emerald { background-color: #10b981; box-shadow: 0 0 5px rgba(16, 185, 129, 0.5); }
.status-dot-cyan { background-color: #0ea5e9; box-shadow: 0 0 5px rgba(14, 165, 233, 0.5); }
.status-dot-amber { background-color: #f59e0b; box-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
.status-dot-slate { background-color: #94a3b8; }

/* Metric Cards Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 16px;
  margin: 28px 0 36px;
}

.kpi-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

.kpi-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 4px;
}

/* Prose Styling */
/* Prose Styling & High-Readability Editorial Rhythm */
.dossier-prose {
  font-size: 15px;
  line-height: 1.78;
  color: #cbd5e1;
}

.dossier-prose h2:not(.pillar-summary-title) {
  font-size: 22px;
  font-weight: 800;
  margin: 36px 0 16px;
  color: var(--text-primary);
  border-left: 4px solid var(--accent-cyan);
  padding-left: 14px;
}

.dossier-prose h3:not(.pillar-summary-title) {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 14px;
  color: var(--text-primary);
}

/* Executive Lead Takeaway Paragraph (Rhythm without changing content) */
.pillar-body > p:first-of-type,
.dossier-prose > p:first-of-type {
  font-size: 16.5px;
  line-height: 1.8;
  color: #f1f5f9;
  font-weight: 450;
  border-left: 3px solid var(--accent-cyan);
  padding: 10px 18px;
  margin-bottom: 24px;
  background: rgba(14, 165, 233, 0.04);
  border-radius: 0 8px 8px 0;
}

.dossier-prose p {
  margin-bottom: 20px;
}

.dossier-prose strong {
  color: #ffffff;
  font-weight: 700;
}

.dossier-prose ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 24px 0;
}

.dossier-prose ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  line-height: 1.75;
}

.dossier-prose ul li::before {
  content: "▹";
  position: absolute;
  left: 4px;
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 800;
}

.dossier-prose ol {
  margin: 0 0 24px 24px;
}

.dossier-prose ol li {
  margin-bottom: 10px;
  line-height: 1.75;
}

.dossier-prose blockquote {
  background: rgba(15, 23, 42, 0.6);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 24px 0;
  color: #e2e8f0;
  font-style: italic;
}

.dossier-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.dossier-prose th,
.dossier-prose td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.dossier-prose th {
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-primary);
  font-weight: 700;
}

html {
  scroll-behavior: smooth;
}

/* Citations & Disclosures Box */
.citations-box {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 40px;
}

.citations-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.citations-list {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
}

.citations-list li {
  margin-bottom: 8px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.citations-list li:hover {
  background: rgba(30, 41, 59, 0.7) !important;
}

.citations-list a:hover {
  color: #7dd3fc !important;
  text-decoration: underline !important;
}

/* ==============================================================================
   Policy & Legal Layout
   ============================================================================== */

.policy-wrap {
  max-width: 860px;
  margin: 48px auto 72px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(12px);
}

.policy-head {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.policy-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.policy-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.policy-body {
  font-size: 15px;
  line-height: 1.75;
  color: #cbd5e1;
}

.policy-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
}

.policy-body p {
  margin-bottom: 16px;
}

.policy-body ul {
  margin: 0 0 20px 24px;
}

.policy-body li {
  margin-bottom: 8px;
}

/* ==============================================================================
   Footer (Razorpay Merchant Compliance Links)
   ============================================================================== */

footer.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 15, 29, 0.95);
  padding: 48px 0 32px;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand {
  max-width: 320px;
}

.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-disclaimer-box {
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

/* ==============================================================================
   Modal Dialog Styles
   ============================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-backdrop.active .modal-dialog {
  transform: translateY(0);
}

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

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* ==============================================================================
   7-Pillar Accordion & Mobile Controls
   ============================================================================== */

.pillar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.pillar-toolbar-btns {
  display: flex;
  gap: 8px;
}

.pillar-toolbar-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pillar-toolbar-btn:hover, .pillar-toolbar-btn.active {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(14, 165, 233, 0.4);
}

details.pillar-accordion {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

details.pillar-accordion[open] {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

details.pillar-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  background: rgba(30, 41, 59, 0.4);
  border-bottom: 1px solid transparent;
  transition: background 0.2s ease;
}

details.pillar-accordion summary::-webkit-details-marker {
  display: none;
}

details.pillar-accordion[open] summary {
  border-bottom-color: var(--border-subtle);
  background: rgba(30, 41, 59, 0.65);
}

.pillar-summary-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.pillar-summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pillar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 26px;
  padding: 0 8px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  border-radius: 6px;
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
  flex-shrink: 0;
  box-sizing: border-box;
}

.dossier-prose h3.pillar-summary-title,
.pillar-summary-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 !important;
  padding: 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: block;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.pillar-chevron {
  font-size: 13px;
  color: var(--accent-cyan);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

details.pillar-accordion[open] .pillar-chevron {
  transform: rotate(180deg);
}

.pillar-body {
  padding: 24px;
  font-size: 15px;
  line-height: 1.78;
  color: var(--text-secondary);
}

/* Pillar Grounding Strip (Clean Attributions Inside Body) */
.pillar-citation-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.pillar-citation-link {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

/* --- Floating Hero Dock: Forensic Intelligence Desk --- */
.forensic-desk-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 950;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 9999px;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(14, 165, 233, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.forensic-desk-fab:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: #38bdf8;
  box-shadow: 
    0 14px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(14, 165, 233, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.forensic-desk-fab:active {
  transform: translateY(0px) scale(0.99);
}

.forensic-desk-fab .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: fab-pulse-green 2s infinite;
}

.forensic-desk-fab .fab-shortcut {
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fab-pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hide floating dock when modal is open */
.copilot-backdrop.copilot-open ~ #forensicDeskFloatingDock,
body:has(.copilot-backdrop.copilot-open) #forensicDeskFloatingDock {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.9);
}

/* ==============================================================================
   Mobile Responsiveness & Breakpoints
   ============================================================================== */

@media (max-width: 1160px) {
  .mobile-menu-btn {
    display: flex;
  }

  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 15, 29, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    z-index: 100;
    max-height: 82vh;
    overflow-y: auto;
  }

  nav.main-nav.mobile-open {
    display: flex;
  }

  .nav-link {
    font-size: 15px;
    padding: 10px 8px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    justify-content: flex-start;
  }

  .nav-item.dropdown {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    font-size: 15px;
    padding: 11px 8px;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    padding: 6px 6px 8px 6px;
    margin: 2px 0 8px 0;
    display: none;
    pointer-events: auto;
    max-width: 100%;
  }

  .dropdown-menu::before {
    display: none;
  }

  .nav-item.dropdown.open .dropdown-menu {
    display: flex;
  }

  .dropdown-item {
    padding: 8px 10px;
  }

  .dropdown-desc {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .nav-wrap {
    min-height: 64px;
    padding: 10px 0;
    gap: 10px;
  }

  article.dossier-article {
    padding: 20px 16px;
  }

  .policy-wrap {
    padding: 20px 16px;
  }

  .pillar-body {
    padding: 18px 14px;
  }
}

@media (max-width: 540px) {
  .brand-sub {
    display: none;
  }

  .brand-text {
    font-size: 15px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  #navSignInBtn {
    font-size: 12.5px;
    padding: 6px 10px;
  }

  #navGenerateBtn {
    font-size: 12.5px;
    padding: 6px 10px;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==============================================================================
   Gated Pillar Paywall & Institutional Preview Overlay
   ============================================================================== */

.gated-pillar-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-top: 16px;
  border: 1px solid rgba(14, 165, 233, 0.25);
  background: rgba(15, 23, 42, 0.65);
  min-height: 240px;
}

.gated-blur-content {
  padding: 16px 20px 80px 20px;
  filter: blur(4px);
  -webkit-filter: blur(4px);
  opacity: 0.35;
  user-select: none;
  pointer-events: none;
  max-height: 160px;
  overflow: hidden;
}

.gated-paywall-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 20px;
  background: linear-gradient(180deg, rgba(10, 15, 29, 0.72) 0%, rgba(10, 15, 29, 0.94) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}

.gated-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(14, 165, 233, 0.3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.gated-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.gated-desc {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 0 14px 0;
  line-height: 1.5;
}

.gated-features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 640px;
  margin-bottom: 16px;
}

.gated-feature-chip {
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.gated-action-row {
  margin-bottom: 10px;
}

.gated-action-row .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.35);
  transition: all 0.2s ease;
}

.gated-action-row .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(14, 165, 233, 0.55);
}

.gated-subtext {
  font-size: 11.5px;
  color: var(--text-muted);
}

.gated-subtext a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}
