/* ═══════════════════════════════════════════════
   EquityLens — Refined Modern Design System
   ═══════════════════════════════════════════════ */

:root {
  --surface:        #fdfcfa;
  --surface-alt:    #f7f4ec;
  --surface-deep:   #0c1a3a;
  --ink:            #0f172a;
  --ink-soft:       #334155;
  --ink-muted:      #64748b;
  --ink-faint:      #94a3b8;
  --accent:         #1e3a8a;
  --accent-soft:    #93c5fd;
  --rule:           #e5e1d8;
  --rule-strong:    #d6d3cf;
  --success:        #15803d;
  --danger:         #b91c1c;

  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, Menlo, monospace;

  --radius-sm: 3px;
  --radius:    6px;

  --shadow-soft: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-card: 0 1px 2px rgba(15,23,42,0.04), 0 6px 16px -6px rgba(15,23,42,0.08);
  --inset-hl:    inset 0 1px 0 rgba(255,255,255,0.8);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--ink-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); font-weight: 400; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
h2 { font-size: 24px; line-height: 1.25; }
h3 { font-size: 18px; line-height: 1.3; }
h4 { font-size: 14px; font-weight: 600; }
p  { color: var(--ink-soft); }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
em { font-style: italic; color: var(--accent); }

/* ── Primitives ──────────────────────────── */

.eyebrow-rule {
  display: inline-block;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  margin-bottom: 14px;
}

.report-card {
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--inset-hl), var(--shadow-soft);
  padding: 24px;
}

.numeric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}

.pull-quote {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink);
  margin: 16px 0;
}

.section-roman {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--accent);
  display: block;
  margin-bottom: 2px;
}

.data-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12px; }
.data-table th {
  background: var(--surface-alt);
  border-bottom: 2px solid var(--accent);
  padding: 8px 10px; text-align: left;
  font-family: var(--font-sans); font-weight: 600; font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.data-table tr:hover td { background: var(--surface-alt); }

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 9px 18px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  transition: background 0.15s ease;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #1e40af; text-decoration: none; }
.btn-secondary { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--surface-alt); text-decoration: none; }

/* ── Shared Chrome ───────────────────────── */

.nav-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.nav-row .nav-brand {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink);
}
.nav-row .nav-links { display: flex; gap: 22px; align-items: center; font-size: 13px; }
.nav-row .nav-links a { color: var(--ink-muted); }
.nav-row .nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-row .nav-links a.active { color: var(--accent); font-weight: 600; }

.trial-banner {
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  padding: 10px 28px;
  font-size: 12px; color: var(--ink-soft);
  display: flex; justify-content: space-between; align-items: center;
}
.trial-banner strong { font-family: var(--font-mono); color: var(--accent); }
.trial-banner a { font-weight: 600; }

/* ── Landing (index.html) ─────────────────── */

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  padding: 64px 8vw 80px;
  align-items: start;
}
.landing-hero .lead h1 {
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.landing-hero .lead h1 em { font-style: italic; color: var(--accent); }
.landing-hero .lead p.sub {
  font-size: 16px; color: var(--ink-soft); max-width: 520px;
  margin: 18px 0 24px;
}
.landing-hero .lead p.sub:first-of-type { margin-bottom: 12px; }
.landing-hero .lead .cta-row { display: flex; gap: 14px; align-items: center; }
.landing-hero .lead .trial-note {
  font-family: var(--font-serif);
  font-style: italic; font-size: 13px; color: var(--ink-muted);
}
.landing-hero .sample-wrap .report-card { border-top: 3px solid var(--accent); }
.landing-hero .sample-wrap {
  background: var(--surface-alt);
  padding: 28px;
  background-image: repeating-linear-gradient(180deg, transparent 0 23px, rgba(15,23,42,0.04) 23px 24px);
  border: 1px solid var(--rule-strong);
}
.landing-features {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px; padding: 48px 8vw 80px;
  border-top: 1px solid var(--rule);
}
.landing-features .feature h3 { margin-bottom: 8px; }
.landing-features .feature p { font-size: 14px; }

@media (max-width: 1024px) {
  .landing-hero { grid-template-columns: 1fr; }
  .landing-features { grid-template-columns: 1fr; }
}

/* ── Landing — extended (home-only blocks) ── */

.landing-section { padding: 64px 8vw; border-top: 1px solid var(--rule); }
.landing-section .section-eyebrow { text-align: center; margin-bottom: 8px; display: block; }
.landing-section h2 { text-align: center; max-width: 720px; margin: 0 auto 18px; }
.landing-section .section-sub {
  text-align: center; max-width: 640px; margin: 0 auto 40px;
  color: var(--ink-soft); font-size: 15px;
}

/* How it works */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.how-step {
  background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm); padding: 26px;
  box-shadow: var(--inset-hl), var(--shadow-soft);
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.how-step:hover { transform: translateY(-3px); box-shadow: var(--inset-hl), var(--shadow-card); }
.how-step .step-num {
  position: absolute; top: -14px; left: 22px;
  background: var(--accent); color: #fff;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
}
.how-step h3 { font-size: 17px; margin: 8px 0 8px; }
.how-step p { font-size: 13px; line-height: 1.6; }

/* All-13-sections grid */
.sections-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0; max-width: 880px; margin: 0 auto;
  border: 1px solid var(--rule-strong); background: var(--surface);
}
.sec-row {
  display: grid; grid-template-columns: 42px 1fr;
  padding: 14px 18px;
  border-bottom: 1px dotted var(--rule);
  border-right: 1px dotted var(--rule);
  gap: 12px;
}
.sec-row .roman {
  font-family: var(--font-serif); font-style: italic; font-size: 13px;
  color: var(--accent); padding-top: 2px;
}
.sec-row .title { font-family: var(--font-serif); font-size: 15px; color: var(--ink); margin-bottom: 2px; }
.sec-row .desc { font-size: 11px; color: var(--ink-muted); line-height: 1.5; }
.sec-row:nth-child(2n) { border-right: 0; }
.sec-row:nth-last-child(-n+2) { border-bottom: 0; }

/* Quant analysis preview row (charts strip) */
.charts-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  margin-top: 28px;
}
.chart-card {
  background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm); padding: 18px;
  box-shadow: var(--inset-hl), var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.chart-card:hover { transform: translateY(-3px); box-shadow: var(--inset-hl), var(--shadow-card); }
.chart-card .chart-label {
  font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 4px;
}
.chart-card .chart-title { font-family: var(--font-serif); font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.chart-card svg { width: 100%; height: auto; display: block; }
.charts-strip .chart-card svg rect { rx: 2px; }
.chart-card .chart-caption { font-size: 11px; color: var(--ink-muted); margin-top: 8px; line-height: 1.5; }
.chart-legend {
  display: flex; gap: 16px; margin-bottom: 10px;
  font-size: 10px; color: var(--ink-muted); letter-spacing: 0.02em;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* Two-col text section */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; max-width: 1000px; margin: 0 auto; }
.two-col h3 { font-size: 19px; margin-bottom: 10px; }
.two-col p { font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
.two-col ul { list-style: none; margin-top: 8px; }
.two-col ul li {
  font-size: 13px; padding: 6px 0 6px 22px; position: relative;
  border-bottom: 1px dotted var(--rule);
}
.two-col ul li::before {
  content: '◆'; position: absolute; left: 0; top: 6px;
  color: var(--accent); font-size: 9px;
}

/* Who it's for */
.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 980px; margin: 0 auto; }
.audience-card {
  border: 1px solid var(--rule-strong); padding: 22px; background: var(--surface);
  border-top: 3px solid var(--accent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.audience-card:hover { transform: translateY(-3px); box-shadow: var(--inset-hl), var(--shadow-card); }
.audience-card h4 { font-family: var(--font-serif); font-size: 16px; font-weight: 400; margin-bottom: 8px; }
.audience-card p { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }

/* Final CTA strip */
.cta-strip {
  background: linear-gradient(135deg, #0c1a3a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 56px 8vw; text-align: center;
  position: relative; overflow: hidden;
}
.cta-strip::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(255,255,255,0.03) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255,255,255,0.03) 23px 24px);
  mask-image: radial-gradient(ellipse at center, black, transparent 70%);
}
.cta-strip > * { position: relative; z-index: 1; }
.cta-strip h2 { color: #fff; margin-bottom: 12px; }
.cta-strip .cta-sub { color: rgba(255,255,255,0.78); font-size: 15px; margin-bottom: 22px; }
.cta-strip .btn-on-dark {
  display: inline-block; background: #fff; color: var(--accent);
  padding: 11px 22px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--radius-sm); text-decoration: none;
}
.cta-strip .cta-meta {
  font-family: var(--font-serif); font-style: italic; font-size: 12px;
  color: rgba(255,255,255,0.6); margin-top: 12px;
}

@media (max-width: 1024px) {
  .how-grid { grid-template-columns: 1fr; }
  .sections-grid { grid-template-columns: 1fr; }
  .sec-row { border-right: 0; }
  .sec-row:nth-last-child(-n+2) { border-bottom: 1px dotted var(--rule); }
  .sec-row:last-child { border-bottom: 0; }
  .charts-strip { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .audience-grid { grid-template-columns: 1fr; }
}

/* ── Auth (auth.html) ─────────────────────── */

.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--inset-hl), var(--shadow-card);
  border-radius: var(--radius-sm);
  padding: 32px;
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo h1 { font-size: 26px; color: var(--ink); }
.auth-logo p { font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--ink-muted); margin-top: 4px; }
.auth-tabs {
  display: flex; border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1; padding: 10px 0;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-muted);
}
.auth-tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); margin-bottom: -1px; }
.auth-form input {
  width: 100%;
  padding: 10px 12px; margin-bottom: 12px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 14px;
}
.auth-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.auth-form button[type=submit] {
  width: 100%; padding: 11px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-weight: 600;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
}
.trial-note {
  text-align: center; margin-top: 12px;
  font-family: var(--font-serif); font-style: italic;
  font-size: 12px; color: var(--ink-muted);
}
.auth-error { color: var(--danger); font-size: 12px; min-height: 1.2em; margin-top: 8px; text-align: center; }

/* ── Pricing (pricing.html) ───────────────── */

.pricing-wrap { padding: 80px 8vw; }
.pricing-card {
  max-width: 480px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--inset-hl), var(--shadow-card);
  border-radius: var(--radius-sm);
  padding: 36px;
  text-align: center;
}
.pricing-card .price {
  font-family: var(--font-mono);
  font-size: 44px; color: var(--ink); font-weight: 700;
  margin: 16px 0 4px;
}
.pricing-card .per { font-size: 12px; color: var(--ink-muted); margin-bottom: 24px; display: block; }
.pricing-card ol.features {
  list-style: none; counter-reset: roman;
  text-align: left; margin: 24px 0;
}
.pricing-card ol.features li {
  counter-increment: roman;
  padding: 10px 0 10px 36px;
  border-bottom: 1px dotted var(--rule);
  position: relative;
  font-size: 14px;
}
.pricing-card ol.features li::before {
  content: counter(roman, upper-roman) ".";
  position: absolute; left: 0; top: 10px;
  font-family: var(--font-serif); font-style: italic;
  color: var(--accent); font-size: 13px; width: 28px; text-align: right;
}

/* ── Dashboard (dashboard.html) ───────────── */

.dashboard-main { max-width: 1100px; margin: 0 auto; padding: 36px 28px; }
.dashboard-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 22px;
}
.reports-table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--rule-strong);
}
.reports-table th {
  background: var(--surface-alt);
  border-bottom: 2px solid var(--accent);
  padding: 12px 16px; text-align: left;
  font-family: var(--font-sans); font-weight: 600; font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.reports-table td {
  padding: 12px 16px;
  border-bottom: 1px dotted var(--rule);
  font-size: 13px; color: var(--ink-soft);
}
.reports-table td.col-date    { font-family: var(--font-mono); color: var(--ink-muted); width: 140px; }
.reports-table td.col-ticker  { font-family: var(--font-mono); color: var(--accent); width: 140px; }
.reports-table td.col-mode    { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); width: 120px; }
.reports-table td.col-open    { width: 40px; color: var(--ink-muted); text-align: right; }
.reports-table tbody tr { cursor: pointer; }
.reports-table tbody tr:hover td { background: var(--surface-alt); color: var(--ink); }
.reports-empty {
  text-align: center; padding: 60px 20px;
  font-family: var(--font-serif); font-style: italic;
  color: var(--ink-muted);
}

/* ── App (app.html — generator + reader) ──── */

.app-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 100vh;
}
.app-sidebar {
  background: var(--surface-alt);
  border-right: 1px solid var(--rule);
  padding: 22px 18px;
  position: sticky; top: 0; align-self: start;
  max-height: 100vh; overflow-y: auto;
}
.sidebar-dashboard-link {
  display: block; font-size: 11px; font-weight: 500;
  color: var(--ink-muted); text-decoration: none;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.sidebar-dashboard-link:hover { color: var(--accent); }
.app-sidebar .toc-label {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 12px;
}
.app-sidebar .toc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 12px;
  color: var(--ink-muted);
  border-bottom: 1px dotted var(--rule);
  cursor: pointer;
}
.app-sidebar .toc-item .roman {
  font-family: var(--font-serif); font-style: italic;
  width: 28px; color: var(--ink-faint); font-size: 11px;
}
.app-sidebar .toc-item .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-faint); flex-shrink: 0;
}
.app-sidebar .toc-item.done    { color: var(--ink); }
.app-sidebar .toc-item.done .dot    { background: var(--success); }
.app-sidebar .toc-item.done .roman  { color: var(--ink); }
.app-sidebar .toc-item.active  { color: var(--accent); font-weight: 600; }
.app-sidebar .toc-item.active .dot  { background: var(--accent); box-shadow: 0 0 0 3px rgba(30,58,138,0.2); animation: dotPulse 1.4s ease-in-out infinite; }
.app-sidebar .toc-item.active .roman{ color: var(--accent); }
.app-sidebar .toc-item:hover { color: var(--accent); }

@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.app-main { padding: 32px 40px 80px; max-width: 880px; }
.app-breadcrumb {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted);
  margin-bottom: 16px;
}

/* Input state */
.request-form { max-width: 560px; }
.request-form label {
  display: block; margin-bottom: 4px;
  font-family: var(--font-sans); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-muted); font-weight: 600;
}
.request-form input {
  width: 100%; padding: 10px 12px; margin-bottom: 16px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 14px;
}
.request-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.mode-toggle {
  display: inline-flex; border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm); margin-bottom: 24px; overflow: hidden;
}
.mode-toggle button {
  background: var(--surface); color: var(--ink-muted);
  border: none; padding: 8px 16px;
  font-family: var(--font-sans); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  cursor: pointer;
}
.mode-toggle button.active { background: var(--accent); color: #fff; }

/* Cover (rendered above sections in B / C states) */
.report-cover {
  border-bottom: 1px solid var(--rule); padding-bottom: 22px; margin-bottom: 28px;
}
.report-cover .crest {
  font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.report-cover h1 { margin: 8px 0 4px; }
.report-cover .ticker { font-family: var(--font-mono); font-size: 13px; color: var(--ink-muted); }
.report-cover .meta-row { display: flex; gap: 32px; margin-top: 18px; }
.report-cover .meta-cell .l { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }
.report-cover .meta-cell .v { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.report-cover .meta-cell .v.accent { color: var(--accent); }

/* Section block */
.report-section { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.report-section:last-child { border-bottom: 0; }
.report-section h3 { margin-bottom: 12px; }
.report-section .section-body { font-size: 14px; color: var(--ink-soft); line-height: 1.7; }
.report-section .section-body h3,
.report-section .section-body h4 { margin: 16px 0 6px; }
.report-section .section-body p { margin-bottom: 10px; }
.report-section .section-body ul, .report-section .section-body ol { margin: 10px 0 10px 20px; }
.report-section .section-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12px; }
.report-section .section-body th {
  background: var(--surface-alt);
  border-bottom: 2px solid var(--accent);
  padding: 6px 8px; text-align: left;
  font-family: var(--font-sans); font-weight: 600; font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.report-section .section-body td {
  padding: 6px 8px; border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
}

/* Skeleton lines + writing cursor (loading state) */
.skeleton {
  height: 10px; border-radius: 2px; margin: 6px 0;
  background: linear-gradient(90deg, #f1ede2 0%, #faf8f3 50%, #f1ede2 100%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}
.skeleton.w90 { width: 90%; } .skeleton.w70 { width: 70%; } .skeleton.w50 { width: 50%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.writing-cursor {
  display: inline-block; width: 4px; height: 13px;
  background: var(--accent); vertical-align: -2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Analysis status bar (sticky during generation) ── */

.status-bar {
  position: sticky;
  top: 0; z-index: 10;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: var(--inset-hl), var(--shadow-soft);
  animation: statusSlideIn 0.35s ease-out;
}
@keyframes statusSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.status-bar.complete {
  border-color: var(--success);
  background: linear-gradient(180deg, #f0fdf4 0%, var(--surface) 100%);
}
.status-bar .status-row {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px;
  margin-bottom: 8px;
}
.status-bar .status-label {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.status-bar.complete .status-label { color: var(--success); }
.status-bar .status-message {
  flex: 1; color: var(--ink-soft);
  font-family: var(--font-serif); font-style: italic;
  font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-bar .status-meta {
  display: flex; gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.status-bar .status-meta strong {
  color: var(--accent); font-weight: 700;
}
.status-bar.complete .status-meta strong { color: var(--success); }

.status-bar .progress-track {
  position: relative;
  height: 4px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.status-bar .progress-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.status-bar .progress-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  background-size: 200% 100%;
  animation: progressSheen 1.6s linear infinite;
}
.status-bar.complete .progress-fill { background: var(--success); }
.status-bar.complete .progress-fill::after { animation: none; }
@keyframes progressSheen {
  from { background-position: -100% 0; }
  to   { background-position:  200% 0; }
}

/* Fade-in for filled section bodies */
@keyframes sectionReveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.report-section .section-body:not([data-skel]) {
  animation: sectionReveal 0.45s ease-out;
}

/* Errors / status */
.error-banner {
  background: #fef2f2; border: 1px solid #fecaca; color: var(--danger);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin: 12px 0;
}

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: relative; max-height: none; }
}

/* ── SEBI disclaimer strip (site-wide, above nav) ── */

.sebi-strip {
  background: var(--surface-deep);
  color: rgba(255,255,255,0.82);
  padding: 7px 28px;
  font-size: 11px; letter-spacing: 0.04em;
  text-align: center;
  border-bottom: 1px solid #1e3a8a;
}
.sebi-strip strong { color: #fff; font-weight: 600; letter-spacing: 0.08em; }
.sebi-strip .dot { color: var(--accent-soft); margin: 0 8px; }

/* Disclaimer block on report cover */
.report-disclaimer {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ── Export button row (PDF / Excel / CSV) ── */

.export-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.export-row .export-label {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600;
  display: flex; align-items: center; margin-right: 8px;
}

/* ── Example query chips (app.html input page) ── */

.example-chips {
  margin: 14px 0 28px;
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center;
}
.example-chips .chips-label {
  font-size: 11px; color: var(--ink-muted);
  font-family: var(--font-sans);
  margin-right: 4px;
}
.example-chips .chip {
  background: var(--surface-alt);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.12s;
}
.example-chips .chip:hover {
  background: #e8e2d2;
  border-color: var(--accent);
}

/* ── "What you'll get" mini-card on input page ── */

.what-you-get {
  margin-top: 36px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  max-width: 560px;
}
.what-you-get h4 {
  font-family: var(--font-serif); font-size: 14px; color: var(--ink);
  font-weight: 600; margin-bottom: 4px;
}
.what-you-get .wyg-sub {
  font-size: 12px; color: var(--ink-muted); margin-bottom: 14px;
}
.what-you-get .wyg-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 4px 16px;
}
.what-you-get .wyg-grid .wyg-item {
  font-size: 11px; color: var(--ink-soft);
  padding: 3px 0;
  display: flex; align-items: baseline; gap: 8px;
}
.what-you-get .wyg-grid .wyg-item .roman {
  font-family: var(--font-serif); font-style: italic;
  color: var(--accent); width: 30px; font-size: 11px;
  text-align: right;
}
.what-you-get .wyg-footer {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dotted var(--rule);
  font-family: var(--font-serif); font-style: italic; font-size: 11px;
  color: var(--ink-muted);
}

/* ── Dashboard stats row ── */

.dashboard-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--inset-hl), var(--shadow-soft);
}
.stat-card .stat-label {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600;
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-card .stat-value.accent { color: var(--accent); }
.stat-card .stat-meta {
  font-size: 11px; color: var(--ink-muted); margin-top: 2px;
  font-family: var(--font-serif); font-style: italic;
}

/* Monthly grouping label inside reports table */
.month-divider {
  background: var(--surface-alt);
}
.month-divider td {
  padding: 8px 16px !important;
  font-family: var(--font-serif); font-style: italic;
  font-size: 11px; color: var(--accent);
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--accent) !important;
  border-top: 1px solid var(--rule) !important;
}

@media (max-width: 1024px) {
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .what-you-get .wyg-grid { grid-template-columns: 1fr; }
}

/* ── Report charts ── */
.report-section .section-body canvas {
  border-radius: var(--radius);
}
.report-section .section-body > div[style*="position:relative"] {
  background: var(--surface-alt);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 16px 8px;
}

/* ── Print styles (Save as PDF from browser print dialog) ── */

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .nav-row, .sebi-strip, .app-sidebar,
  #input-state, .mode-toggle, .app-breadcrumb,
  .export-row, #report-actions,
  .trial-banner, footer { display: none !important; }

  .app-shell { display: block; }
  .app-main { padding: 0; max-width: 100%; }
  .report-section { page-break-inside: avoid; padding: 12pt 0; }
  .report-cover { page-break-after: always; padding: 0 0 24pt; }
  .report-cover .crest { color: #1e3a8a; }
  .report-disclaimer {
    background: #f7f4ec; border-left: 3px solid #1e3a8a;
    color: #334155;
  }
  h1, h2, h3, h4 { color: #000; page-break-after: avoid; }
  table { page-break-inside: avoid; }
  a { color: #1e3a8a; text-decoration: none; }
  .skeleton, .writing-cursor { display: none !important; }
  .report-section .section-body > div[style*="position:relative"] { display: none !important; }
}

/* ═══════════════════════════════════════════════
   Landing redesign — trust-first hero, sample showcase,
   stats band, trust pillars, inline pricing (2026-07-06)
   ═══════════════════════════════════════════════ */

/* Calm, demoted SEBI disclaimer (landing only) */
.disclaimer-slim {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 7px 28px;
  font-size: 11px; color: var(--ink-faint);
  text-align: center; letter-spacing: 0.01em;
}
.disclaimer-slim strong { color: var(--ink-muted); font-weight: 600; }
.disclaimer-slim .dot { margin: 0 8px; color: var(--rule-strong); }

/* Outcome-first hero */
.hero2 { max-width: 1280px; margin: 0 auto; padding: 76px 4vw 48px; text-align: center; }
.hero2 h1 {
  font-size: clamp(44px, 6.6vw, 82px); line-height: 1.02;
  letter-spacing: -0.03em; max-width: 22ch; margin: 16px auto 0;
}
.hero2 h1 em { font-style: italic; color: var(--accent); }
.hero2 .hero-sub {
  font-size: clamp(18px, 2vw, 22px); color: var(--ink-soft); max-width: 72ch;
  margin: 26px auto 0; line-height: 1.55;
}
.hero2 .cta-row { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero2 .btn-primary, .hero2 .btn-secondary { padding: 13px 26px; font-size: 12px; }
.hero2 .trust-line {
  margin-top: 16px; font-family: var(--font-serif); font-style: italic;
  font-size: 13px; color: var(--ink-muted);
}
.hero2 .trust-line b { color: var(--success); font-style: normal; font-family: var(--font-sans); font-weight: 600; }

/* Dark institutional stats band */
.stats-wrap { padding: 8px 8vw; margin-top: -8px; }
.stats-band {
  background: var(--surface-deep); color: #fff;
  display: grid; grid-template-columns: repeat(5, 1fr);
  max-width: 1120px; margin: 0 auto; border-radius: 8px;
  padding: 30px 20px; box-shadow: var(--shadow-card);
}
.stats-band .stat { text-align: center; border-right: 1px solid rgba(255,255,255,0.12); padding: 0 10px; }
.stats-band .stat:last-child { border-right: none; }
.stats-band .sv { font-family: var(--font-serif); font-size: 34px; line-height: 1; color: #fff; letter-spacing: -0.02em; }
.stats-band .sv em { font-style: normal; color: var(--accent-soft); }
.stats-band .sl { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-top: 8px; }

/* Sample showcase — the trust engine */
.showcase-wrap { background: var(--surface-alt); padding: 8px 0 64px; }
.browser-frame {
  max-width: 940px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: 8px;
  box-shadow: 0 12px 40px -12px rgba(15,23,42,0.22); overflow: hidden;
}
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface-alt); border-bottom: 1px solid var(--rule); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule-strong); display: inline-block; }
.browser-bar .url {
  margin-left: 10px; font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-muted); background: var(--surface); padding: 4px 12px;
  border-radius: 20px; border: 1px solid var(--rule); flex: 1; max-width: 420px;
}
.showcase-body { padding: 30px 34px; position: relative; }
.showcase-body::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--surface)); }
.showcase-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; border-bottom: 2px solid var(--accent); padding-bottom: 12px; margin-bottom: 20px; }
.showcase-head h3 { font-size: 24px; margin: 0; }
.showcase-head .tick { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.showcase-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.showcase-metrics .m .k { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 3px; }
.showcase-metrics .m .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 18px; color: var(--ink); }
.showcase-metrics .m .v.accent { color: var(--accent); }
.showcase-charts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: end; }
.showcase-open { text-align: center; margin-top: -46px; position: relative; z-index: 2; }

/* Trust pillars */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: 1000px; margin: 8px auto 0; }
.trust-pillar { text-align: left; }
.trust-pillar .tnum { font-family: var(--font-serif); font-style: italic; font-size: 30px; color: var(--accent); line-height: 1; margin-bottom: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.trust-pillar h3 { font-size: 17px; margin-bottom: 8px; }
.trust-pillar p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* Worked formulas */
.formula-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 1000px; margin: 32px auto 0; }
.formula { background: var(--surface-alt); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 16px; }
.formula .fk { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.formula .fx { font-family: var(--font-mono); font-size: 12px; color: var(--ink); line-height: 1.5; }

/* Built-on data sources */
.powered-by { max-width: 900px; margin: 40px auto 0; text-align: center; border-top: 1px solid var(--rule); padding-top: 22px; }
.powered-by .pl { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }
.powered-by .ps { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; }
.powered-by .ps span { font-family: var(--font-serif); font-size: 14px; color: var(--ink-soft); }
.powered-by .ps span::before { content: '◆'; color: var(--accent-soft); font-size: 8px; vertical-align: middle; margin-right: 9px; }

/* Inline pricing */
.pricing-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 920px; margin: 8px auto 0; }
.price-card { background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); padding: 26px 24px; text-align: center; box-shadow: var(--inset-hl), var(--shadow-soft); position: relative; }
.price-card.popular { border-color: var(--accent); border-width: 2px; box-shadow: var(--shadow-card); }
.price-card .pop-tag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; padding: 3px 12px; border-radius: 20px; }
.price-card .pname { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.price-card .pprice { font-family: var(--font-serif); font-size: 40px; color: var(--ink); line-height: 1; }
.price-card .pprice sup { font-size: 20px; top: -0.6em; }
.price-card .pper { font-size: 12px; color: var(--ink-muted); margin-bottom: 14px; }
.price-card .preports { font-size: 14px; color: var(--ink-soft); margin-bottom: 18px; }
.price-card .preports b { font-family: var(--font-mono); color: var(--ink); }
.price-card .ppa { font-size: 11px; color: var(--ink-faint); margin-top: 12px; }

/* Also built for */
.also-for { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 820px; margin: 8px auto 0; }
.also-for .af { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; }
.also-for .af h4 { font-family: var(--font-serif); font-weight: 400; font-size: 16px; margin-bottom: 5px; }
.also-for .af p { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 820px) {
  .showcase-metrics, .trust-grid, .pricing-strip, .also-for, .showcase-charts, .formula-row { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .stats-band .stat:nth-child(2) { border-right: none; }
}

/* Cover-page trend sparklines (report viewer) */
.spark-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 8px; }
.spark-tile { border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
.spark-label { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.spark-delta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink); }
@media (max-width: 720px) { .spark-row { grid-template-columns: 1fr; } }

/* Freemium locked-section panel */
.locked-panel { position: relative; min-height: 190px; border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; }
.locked-blur { padding: 20px; filter: blur(5px); opacity: 0.5; user-select: none; pointer-events: none; }
.locked-blur .lb-line { height: 12px; background: var(--rule-strong); border-radius: 3px; margin: 12px 0; }
.locked-blur .w60 { width: 60%; } .locked-blur .w70 { width: 70%; } .locked-blur .w75 { width: 75%; } .locked-blur .w80 { width: 80%; } .locked-blur .w90 { width: 90%; }
.locked-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; background: linear-gradient(transparent, var(--surface) 55%); padding: 20px; }
.locked-overlay .lock-glyph { font-size: 22px; }
.locked-overlay .lock-title { font-family: var(--font-serif); font-size: 17px; color: var(--ink); }
.locked-overlay .lock-sub { font-size: 12px; color: var(--ink-muted); margin-bottom: 8px; }
