/* =========================================================================
   Stock Sight Marketing — design tokens, shared shell, and home-only cinematic styles
   -------------------------------------------------------------------------
   Token system and shared header/footer/button styles align with the product
   UI so marketing feels like the same brand. Home-only sections live under
   .home-* selectors and the body class .is-home.
   ========================================================================= */

:root,
[data-theme="dark"] {
  --background: #191919;
  --background-elevated: #12141e;
  --foreground: #f0f2f5;
  --card-background: #080a11;
  --card-hover: #0f1219;
  --card-border: #1a1d28;
  --border-color: #1a1d28;
  --text-primary: #f0f2f5;
  --text-secondary: #7c8494;
  --text-muted: #555d70;
  --primary-color: #3b6ef6;
  --primary-hover: #5a88f8;
  --primary-muted: rgba(59, 110, 246, 0.12);
  --secondary-color: #1d4ed8;
  --accent-color: #6d9cfc;
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;

  --page-bg: var(--background);
  --section-bg-1: #191919;
  --section-bg-2: #12141e;
  --section-bg-3: #0f1219;
  --section-bg-4: #191919;
  --section-bg-5: #12141e;
  --section-bg-6: #191919;

  /* Discovery-highlights slide gradients (features.html carousel).
     Token-driven per AGENTS.md rule 2: derived from brand palette via
     color-mix so dark/light parity holds automatically. */
  --discovery-slide-bg-1: linear-gradient(135deg,
    color-mix(in srgb, var(--primary-color) 65%, var(--background-elevated)) 0%,
    color-mix(in srgb, var(--accent-color)  55%, var(--background-elevated)) 100%);
  --discovery-slide-bg-2: linear-gradient(135deg,
    color-mix(in srgb, var(--secondary-color) 70%, var(--background-elevated)) 0%,
    color-mix(in srgb, var(--primary-color)   45%, var(--background-elevated)) 100%);
  --discovery-slide-bg-3: linear-gradient(135deg,
    color-mix(in srgb, var(--warning) 60%, var(--background-elevated)) 0%,
    color-mix(in srgb, var(--error)   45%, var(--background-elevated)) 100%);
  --discovery-slide-bg-4: linear-gradient(135deg,
    color-mix(in srgb, var(--success)        60%, var(--background-elevated)) 0%,
    color-mix(in srgb, var(--secondary-color) 45%, var(--background-elevated)) 100%);

  /* Portfolio rail card tints (features.html "03 Portfolio" carousel).
     Each slide's media area gets a subtle, brand-derived gradient that
     re-skins automatically across themes via color-mix on token sources. */
  --portfolio-slide-bg-1: linear-gradient(135deg,
    color-mix(in srgb, var(--primary-color)   28%, var(--card-background)) 0%,
    color-mix(in srgb, var(--secondary-color) 18%, var(--card-background)) 100%);
  --portfolio-slide-bg-2: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-color)    24%, var(--card-background)) 0%,
    color-mix(in srgb, var(--primary-color)   16%, var(--card-background)) 100%);
  --portfolio-slide-bg-3: linear-gradient(135deg,
    color-mix(in srgb, var(--success)         24%, var(--card-background)) 0%,
    color-mix(in srgb, var(--primary-color)   14%, var(--card-background)) 100%);
  --portfolio-slide-bg-4: linear-gradient(135deg,
    color-mix(in srgb, var(--warning)         24%, var(--card-background)) 0%,
    color-mix(in srgb, var(--error)           18%, var(--card-background)) 100%);
}

[data-theme="light"] {
  --background: #e8ecf9;
  --background-elevated: #ffffff;
  --foreground: #1a1d26;
  --card-background: #ffffff;
  --card-hover: #f5f7fa;
  --card-border: #e8eaf0;
  --border-color: #e8eaf0;
  --text-primary: #1a1d26;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --primary-color: #3b6ef6;
  --primary-hover: #2d5be0;
  --primary-muted: rgba(59, 110, 246, 0.08);
  --secondary-color: #1d4ed8;
  --accent-color: #3b6ef6;
  --success: #16a34a;
  --warning: #ca8a04;
  --error: #dc2626;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);

  --page-bg: var(--background);
  --section-bg-1: #e8ecf9;
  --section-bg-2: #dde3f3;
  --section-bg-3: #f5f7fa;
  --section-bg-4: #e8ecf9;
  --section-bg-5: #dde3f3;
  --section-bg-6: #e8ecf9;

  /* Discovery-highlights slide gradients (light theme) — same recipe as
     the dark block; color-mix flips automatically because the source
     tokens themselves are theme-aware. */
  --discovery-slide-bg-1: linear-gradient(135deg,
    color-mix(in srgb, var(--primary-color) 35%, var(--background-elevated)) 0%,
    color-mix(in srgb, var(--accent-color)  25%, var(--background-elevated)) 100%);
  --discovery-slide-bg-2: linear-gradient(135deg,
    color-mix(in srgb, var(--secondary-color) 38%, var(--background-elevated)) 0%,
    color-mix(in srgb, var(--primary-color)   22%, var(--background-elevated)) 100%);
  --discovery-slide-bg-3: linear-gradient(135deg,
    color-mix(in srgb, var(--warning) 32%, var(--background-elevated)) 0%,
    color-mix(in srgb, var(--error)   22%, var(--background-elevated)) 100%);
  --discovery-slide-bg-4: linear-gradient(135deg,
    color-mix(in srgb, var(--success)         32%, var(--background-elevated)) 0%,
    color-mix(in srgb, var(--secondary-color) 25%, var(--background-elevated)) 100%);

  /* Portfolio rail card tints (light theme) — same recipe as the dark
     block; the source tokens themselves are theme-aware. */
  --portfolio-slide-bg-1: linear-gradient(135deg,
    color-mix(in srgb, var(--primary-color)   14%, var(--card-background)) 0%,
    color-mix(in srgb, var(--secondary-color) 10%, var(--card-background)) 100%);
  --portfolio-slide-bg-2: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-color)    12%, var(--card-background)) 0%,
    color-mix(in srgb, var(--primary-color)    8%, var(--card-background)) 100%);
  --portfolio-slide-bg-3: linear-gradient(135deg,
    color-mix(in srgb, var(--success)         12%, var(--card-background)) 0%,
    color-mix(in srgb, var(--primary-color)    8%, var(--card-background)) 100%);
  --portfolio-slide-bg-4: linear-gradient(135deg,
    color-mix(in srgb, var(--warning)         14%, var(--card-background)) 0%,
    color-mix(in srgb, var(--error)           10%, var(--card-background)) 100%);
}

:root {
  --color-white: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--foreground);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  transition: background-color 0.6s ease;
}

body { text-rendering: optimizeLegibility; }

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

img, svg { max-width: 100%; height: auto; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.container--wide {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

.muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-075 { margin-top: 0.75rem; }
.mt-2 { margin-top: 2rem; }

/* When Lenis is active it adds .lenis to <html>; opt out of native smooth scroll */
html.lenis { scroll-behavior: auto; }
html.lenis.lenis-smooth { scroll-behavior: auto; }
html.lenis.lenis-stopped { overflow: clip; }
html.lenis.lenis-smooth iframe { pointer-events: none; }

/* ── Header (shared brand shell) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--page-bg) 85%, transparent);
  border-bottom: 1px solid var(--border-color);
}

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  background: var(--primary-color);
  color: #ffffff;
  flex-shrink: 0;
}

.brand__word {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand:hover { color: var(--primary-color); }
.brand:hover .brand__word { color: var(--primary-color); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.93rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--card-hover);
}

.nav-links > .btn-primary { min-width: 10rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--card-background);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--card-hover);
}

.theme-toggle__sun,
.theme-toggle__moon { display: none; }
[data-theme="dark"]  .theme-toggle__sun  { display: block; }
[data-theme="light"] .theme-toggle__moon { display: block; }

/* ── Buttons ── */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, var(--secondary-color), var(--primary-hover));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  color: var(--primary-color);
  background: transparent;
}

.btn-secondary:hover { background: var(--primary-muted); }

/* ── Footer (shared brand shell) ── */
.footer {
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
  padding: 2.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--page-bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.footer-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--primary-color);
  color: #ffffff;
  flex-shrink: 0;
}

.footer-brand__word {
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 30ch;
}

.footer-col h4 {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 0.2rem 0;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-legal a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-legal a:hover { color: var(--primary-color); }
.footer-legal a + a { margin-left: 1.5rem; }

/* ── Back to top ── */
.top-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--background-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 60;
}

.top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Generic IO reveal (used outside cinematic scroll) ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile menu (shared) ── */
.mobile-menu-btn { display: none; }

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    right: 1rem;
    left: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--background-elevated);
    padding: 0.8rem;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.open { display: flex; }

  .mobile-menu-btn {
    display: inline-flex;
    border: 1px solid var(--border-color);
    background: var(--card-background);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    cursor: pointer;
  }

  .theme-toggle { width: 100%; min-width: unset; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* =========================================================================
   SHARED PAGE PRIMITIVES — used by every non-home page
   -------------------------------------------------------------------------
   Token-driven shell so features / pricing / read / faq / contact /
   privacy all inherit the same v2 visual language as the cinematic home.
   Page-specific styles live below this block; .home-* lives further down.
   ========================================================================= */

/* Optional per-section background stops. Opt in by setting data-bg-stop on
   a <section> in any non-home page. Scoped away from .is-home so the
   cinematic engine continues to drive the home body-bg uninterrupted. */
body:not(.is-home) section[data-bg-stop="1"] { background: var(--section-bg-1); }
body:not(.is-home) section[data-bg-stop="2"] { background: var(--section-bg-2); }
body:not(.is-home) section[data-bg-stop="3"] { background: var(--section-bg-3); }
body:not(.is-home) section[data-bg-stop="4"] { background: var(--section-bg-4); }
body:not(.is-home) section[data-bg-stop="5"] { background: var(--section-bg-5); }
body:not(.is-home) section[data-bg-stop="6"] { background: var(--section-bg-6); }

.page-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

/* ── Page hero (eyebrow + H1 + sub) ── */
.page-hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--primary-color) 22%, transparent), transparent 50%),
    radial-gradient(circle at 88% 100%, color-mix(in srgb, var(--secondary-color) 18%, transparent), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.page-hero > .container { position: relative; z-index: 1; }

.page-hero__eyebrow {
  display: inline-flex;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--card-background) 72%, transparent);
  color: var(--accent-color);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
}

.page-hero__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  background: linear-gradient(180deg, var(--text-primary) 0%, color-mix(in srgb, var(--text-primary) 70%, var(--primary-color)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.12em;
  max-width: 22ch;
}

.page-hero__title--wide { max-width: 32ch; }

.page-hero__subtitle {
  margin-top: 1.2rem;
  max-width: 60ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

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

/* ── Section head (eyebrow + H2 + sub) ── */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.section-head--center { text-align: center; align-items: center; }

.section-head__eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

/* Chapter number prefix used by features.html section heads (01/02/03/04).
   Token-driven mono-spaced numeric block that gives the page a chaptered,
   premium rhythm without affecting other pages. */
.section-head__chapter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  padding: 0.18rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--primary-muted);
  color: var(--primary-color);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
}

.section-head__title {
  margin: 0;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}

.section-head__sub {
  margin: 0;
  color: var(--text-secondary);
  max-width: 60ch;
  font-size: 1rem;
}

/* ── Section head display modifier (cinematic two-line marketing headline)
      Used by Apple-style sections that lead with an oversized H2 broken across
      two lines via .section-head__title-line-2 (a block-level span). Inherits
      tokens; pure size/weight/tracking shift. ─────────────────────────────── */
.section-head--display { gap: 0.85rem; }

.section-head--display .section-head__sub {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  max-width: 64ch;
}

.section-head__title--display {
  font-size: clamp(2.1rem, 5.4vw, 3.8rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-weight: 700;
}

.section-head__title-line-2 {
  display: block;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── Card — base visual primitive ── */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-background);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.card--hover { cursor: pointer; }

.card--hover:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary-color) 40%, var(--card-border));
  box-shadow: var(--shadow-md);
  background: var(--card-hover);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-muted);
  color: var(--primary-color);
  flex-shrink: 0;
}

.card__icon svg { width: 22px; height: 22px; }

.card__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card__body {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card__list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--primary-color);
}

/* ── Pro badge (token-driven pill) ── */
.badge-pro {
  display: inline-flex;
  align-items: center;
  background: var(--primary-muted);
  color: var(--primary-color);
  border: 1px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

/* ── Tag chip (longer-label persona / category pill) ── */
.tag-chip {
  display: inline-block;
  background: var(--primary-muted);
  color: var(--primary-color);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
}

/* ── CTA panel (generalised home-cta) ── */
.cta-panel {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--primary-color) 24%, transparent), transparent 50%),
    radial-gradient(circle at 80% 100%, color-mix(in srgb, var(--secondary-color) 24%, transparent), transparent 55%),
    linear-gradient(160deg, var(--card-background) 0%, var(--background-elevated) 100%);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cta-panel__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 600;
}

.cta-panel__badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
}

.cta-panel__title {
  margin: 0.6rem auto 0.8rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 24ch;
}

.cta-panel__copy {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: 1rem;
}

.cta-panel__actions {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Token-driven responsive grids ── */
.grid-2,
.grid-3 {
  display: grid;
  gap: 1.25rem;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

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

/* =========================================================================
   MOTION VOCABULARY — shared, opt-in via data-attributes
   -------------------------------------------------------------------------
   `assets/cinematic.js` toggles `.is-revealed` on every element with
   `data-reveal` once it crosses 85% from the top of the viewport. The
   classes below are the *initial* state; the cinematic engine handles
   the transition. Variants:

     data-reveal              fade + slide up (default)
     data-reveal="fade-up"    same as default, explicit
     data-reveal="scale-up"   fade + scale from 0.96 -> 1
     data-reveal="clip-down"  clip-path inset(0 0 100% 0) -> inset(0)

   Pinned chapter heads use `.is-pin-head`. Sticky positioning is
   declarative; the cinematic engine handles ScrollTrigger ranges.
   ========================================================================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    clip-path 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

[data-reveal="scale-up"] {
  opacity: 0;
  transform: translateY(20px) scale(0.96);
}

[data-reveal="clip-down"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0% 0);
}

/* Sticky chapter / section head used by features, pricing, read, privacy.
   Background is fully opaque so content scrolling underneath is cleanly
   masked instead of bleeding through. A subtle drop-shadow appears only
   while .is-pinned-active is on (toggled by read.js / features.js
   ScrollTrigger), giving visual separation between the pinned head and
   the content scrolling behind. In the GSAP / cinematic-engine bail-out
   path .is-pinned-active is never set, so the shadow is absent -- but
   the head is still cleanly opaque (no bleed). */
.is-pin-head {
  position: sticky;
  top: 80px;
  z-index: 2;
  background: var(--page-bg);
  padding-top: 1rem;
  padding-bottom: 1rem;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.is-pin-head.is-pinned-active {
  box-shadow: 0 14px 24px -18px color-mix(in srgb, var(--text-primary) 22%, transparent);
}

.is-pin-head.is-pinned-active .section-head__eyebrow {
  color: var(--primary-color);
  text-shadow: 0 0 16px color-mix(in srgb, var(--primary-color) 28%, transparent);
}

/* Step circle entry pulse — used by read.js when each workflow step
   enters its reveal. Tiny scale-pop driven by GSAP, not CSS keyframes. */
.step-circle--pulse {
  animation: stepPulse 0.6s cubic-bezier(0.22, 1, 0.36, 1) 1;
}

@keyframes stepPulse {
  0%   { transform: scale(0.85); box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-color) 50%, transparent); }
  60%  { transform: scale(1.08); box-shadow: 0 0 0 10px color-mix(in srgb, var(--primary-color) 0%, transparent); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 transparent; }
}

/* CTA panel: cinematic engine clips it down from top->bottom on enter.
   This is the initial state when JS is available; .is-revealed (set by
   the engine even in the bail-out path) snaps it to clipless. */
.cta-panel.is-revealed { clip-path: inset(0 0 0% 0 round 18px); }

/* =========================================================================
   APP MOCK (shared) — token-driven "screenshot" primitives
   -------------------------------------------------------------------------
   Used by per-page cinematic scenes to render miniature product UIs as
   pure CSS + inline SVG. Mirrors the live product chrome at
   stock-sight-v2/src/components/ui/Card.tsx (rounded card, top toolbar)
   so the marketing scenes feel like the actual app. No raster imagery.
   ========================================================================= */

.app-mock {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-background);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-mock__toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--card-background) 88%, var(--background-elevated));
}

.app-mock__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--card-hover);
  display: inline-block;
}

.app-mock__dot--red { background: var(--error); opacity: 0.85; }
.app-mock__dot--amber { background: var(--warning); opacity: 0.85; }
.app-mock__dot--green { background: var(--success); opacity: 0.85; }

.app-mock__title {
  margin-left: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.app-mock__body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
}

.app-mock__row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--card-background) 92%, var(--card-hover));
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.app-mock__row.is-active {
  border-color: color-mix(in srgb, var(--primary-color) 35%, var(--card-border));
  background: color-mix(in srgb, var(--primary-color) 6%, var(--card-background));
}

.app-mock__row.is-leader {
  border-color: color-mix(in srgb, var(--success) 45%, var(--card-border));
}

.app-mock__badge {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-white);
  background: var(--primary-color);
}

.app-mock__badge--alt-1 { background: var(--secondary-color); }
.app-mock__badge--alt-2 { background: var(--success); }
.app-mock__badge--alt-3 { background: var(--warning); color: var(--background); }
.app-mock__badge--alt-4 { background: var(--accent-color); }
.app-mock__badge--alt-5 { background: color-mix(in srgb, var(--primary-color) 70%, var(--secondary-color)); }

.app-mock__row-stack {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.app-mock__row-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-mock__row-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.app-mock__row-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.app-mock__row-meta--up { color: var(--success); }
.app-mock__row-meta--down { color: var(--error); }

/* Pill row (tab / filter chips). Used by F1 (Today/7D/All), F2 (analysis tabs). */
.app-mock__pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-bottom: 0.2rem;
}

.app-mock__pill {
  appearance: none;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.app-mock__pill.is-active {
  background: var(--primary-muted);
  color: var(--primary-color);
  border-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
}

/* Tab strip with sliding underline. Used by F2 (analysis tabs). */
.app-mock__tab-strip {
  position: relative;
  display: flex;
  gap: 1.4rem;
  padding: 0 0.2rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--card-border);
}

.app-mock__tab {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 0.1rem;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.app-mock__tab.is-active { color: var(--primary-color); }

.app-mock__tab-underline {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1), width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Verdict pill with status colour variants. Used by F2, R1 analysis mock. */
.app-mock__verdict {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  background: color-mix(in srgb, var(--success) 18%, transparent);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
}

.app-mock__verdict--buy {
  background: color-mix(in srgb, var(--success) 18%, transparent);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
}

.app-mock__verdict--hold {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 35%, transparent);
}

.app-mock__verdict--watch {
  background: color-mix(in srgb, var(--text-secondary) 18%, transparent);
  color: var(--text-secondary);
  border-color: color-mix(in srgb, var(--text-secondary) 35%, transparent);
}

/* Markdown-like body lines (the AI result text). */
.app-mock__line {
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--text-muted) 60%, transparent);
}

.app-mock__line--strong {
  background: color-mix(in srgb, var(--text-primary) 60%, transparent);
  height: 8px;
}

.app-mock__line--accent {
  background: color-mix(in srgb, var(--primary-color) 65%, transparent);
}

.app-mock__lines {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Streaming cursor (the "AI is typing" effect). */
.app-mock__cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--primary-color);
  vertical-align: middle;
  margin-left: 4px;
  border-radius: 1px;
  animation: app-mock-cursor-blink 0.9s steps(2, end) infinite;
}

@keyframes app-mock-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Generic header row inside the mock body (eyebrow + meta). */
.app-mock__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.2rem;
}

.app-mock__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 700;
}

.app-mock__meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Soft secondary action pill ("Regenerate" style). */
.app-mock__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--primary-muted);
  color: var(--primary-color);
  border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
  font-size: 0.72rem;
  font-weight: 600;
}

/* Clean toolbar variant — drops the macOS 3-dot wireframe gimmick in favour
   of a small product brand-mark + surface title + optional context tag.
   Reads as the real product chrome rather than a generic mock window. */
.app-mock__toolbar--clean {
  padding: 0.55rem 0.85rem;
  gap: 0.55rem;
}

.app-mock__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg,
    var(--primary-color) 0%,
    color-mix(in srgb, var(--primary-color) 70%, var(--secondary-color)) 100%);
  color: var(--color-white);
  flex-shrink: 0;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--primary-color) 40%, transparent) inset;
}

.app-mock__toolbar-tag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--card-background) 50%, var(--background-elevated));
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .app-mock__body { padding: 0.85rem 0.85rem 1rem; }
  .app-mock__row { padding: 0.5rem; }
  .app-mock__row-title { font-size: 0.8rem; }
  .app-mock__row-sub { font-size: 0.68rem; }
  .app-mock__toolbar-tag { display: none; }
}

/* =========================================================================
   PAGE-SPECIFIC NAMESPACES (features / pricing / read / faq / contact /
   privacy). Each namespace builds on top of .card / .cta-panel / .grid-*
   so the v2 visual language stays identical across pages.
   ========================================================================= */

/* ── Features ── */

/* Strengthened highlight card: visible primary-tinted top accent stripe +
   stronger gradient + softer glow on hover. Distinguishes the "spotlight"
   feature card in each section from the regular grid. */
.features-card--highlight {
  position: relative;
  border-color: color-mix(in srgb, var(--primary-color) 45%, var(--card-border));
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--primary-color) 4%, var(--card-background)) 0%,
    color-mix(in srgb, var(--primary-color) 12%, var(--card-background)) 100%);
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.features-card--highlight::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%);
  pointer-events: none;
}

/* Top-right plan tag on every feature card. Decoupled from .badge-pro
   (which can still appear inline in card titles/list items). */
.features-card__tag {
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  z-index: 1;
}

.features-card__tag--free {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
}

.features-card__tag--pro {
  background: color-mix(in srgb, var(--primary-color) 14%, transparent);
  color: var(--primary-color);
  border-color: color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.features-card__tag--both {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--success) 12%, transparent) 0%,
    color-mix(in srgb, var(--primary-color) 12%, transparent) 100%);
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--primary-color) 25%, var(--card-border));
}

/* Ensure the icon doesn't crowd the corner tag at narrow widths. */
.card:has(.features-card__tag) .card__title { padding-right: 4.5rem; }

@media (max-width: 720px) {
  .features-card__tag {
    top: 0.7rem;
    right: 0.7rem;
    font-size: 0.6rem;
    padding: 0.18rem 0.5rem;
  }
  .card:has(.features-card__tag) .card__title { padding-right: 3.8rem; }
}

/* =========================================================================
   FEATURES HERO — split copy / visual collage layout. Sits on top of the
   shared .page-hero primitive and only activates the 2-col grid at
   >=960px. Below that, the copy stack renders full-width and the visual
   collage drops to a single mock or is hidden depending on viewport.
   ========================================================================= */
.features-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.features-hero__copy {
  max-width: 36ch;
}

.features-hero__title-accent {
  display: block;
  color: color-mix(in srgb, var(--text-primary) 78%, var(--primary-color));
  -webkit-text-fill-color: initial;
  background: none;
}

.features-hero__stats {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  max-width: 32rem;
}

.features-hero__stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-background) 72%, transparent);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(6px);
}

.features-hero__stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.features-hero__stat-label {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.features-hero__visual {
  position: relative;
  width: 100%;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3-tile offset collage. Decorative; aria-hidden in markup. */
.features-hero-collage {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 5 / 4;
}

.features-hero-tile {
  position: absolute;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-background);
  padding: 0.95rem 1.05rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.features-hero-tile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.features-hero-tile__eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.features-hero-tile__chip {
  display: inline-flex;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--primary-muted);
  color: var(--primary-color);
  border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.features-hero-tile__title {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}

.features-hero-tile__spark {
  width: 100%;
  height: 44px;
  display: block;
}

.features-hero-tile__lines {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.features-hero-tile__line {
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--text-muted) 50%, transparent);
}

.features-hero-tile__line--strong {
  background: color-mix(in srgb, var(--text-primary) 55%, transparent);
  height: 7px;
}

.features-hero-tile__line--accent {
  background: color-mix(in srgb, var(--primary-color) 65%, transparent);
}

.features-hero-tile__donut-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.features-hero-tile__donut {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.features-hero-tile__donut-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.features-hero-tile__donut-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1;
}

.features-hero-tile__donut-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Positions — back, middle, front. Subtle skew gives the "stack" feel
   without going overboard. */
.features-hero-tile--snapshot {
  top: 0;
  left: 0;
  width: 64%;
  transform: rotate(-2deg);
  z-index: 1;
}

.features-hero-tile--verdict {
  top: 28%;
  right: 0;
  width: 60%;
  transform: rotate(1.5deg);
  z-index: 3;
}

.features-hero-tile--portfolio {
  bottom: 0;
  left: 12%;
  width: 58%;
  transform: rotate(-1deg);
  z-index: 2;
}

@media (max-width: 1024px) {
  .features-hero__inner { gap: 2rem; }
  .features-hero__visual { min-height: 300px; }
}

@media (max-width: 880px) {
  .features-hero__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .features-hero__copy { max-width: none; }
  .features-hero__stats { grid-template-columns: 1fr; max-width: none; }
  .features-hero__visual { min-height: 280px; }
  .features-hero-collage { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 480px) {
  .features-hero__stats { gap: 0.6rem; }
  .features-hero__stat { padding: 0.7rem 0.85rem; }
  .features-hero__stat-value { font-size: 1.2rem; }
  /* Simplify collage on tiny screens — show only the centre verdict tile. */
  .features-hero-tile--snapshot,
  .features-hero-tile--portfolio { display: none; }
  .features-hero-tile--verdict {
    position: relative;
    top: 0;
    right: 0;
    width: 100%;
    transform: none;
  }
  .features-hero-collage { aspect-ratio: auto; }
}

/* =========================================================================
   FEATURES (cinematic) — three signature scenes layered above the existing
   card grids. Mirrors product surfaces: My Summaries, AI Stock Analysis,
   Holdings + Insights. Activated only at min-width: 960px; below that
   each scene collapses to a static long-form view.
   ========================================================================= */

/* ── F1: Live Feed scene (Discovery stage) ─────────────────────────── */
.features-feed {
  margin: 0 auto 3rem;
  position: relative;
  max-width: 1080px;
}

.features-feed__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.2rem;
  align-items: start;
}

.features-feed__snapshot,
.features-feed__feed {
  min-height: 360px;
}

.features-feed__digest-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.features-feed__count {
  margin-left: auto;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-muted);
  color: var(--primary-color);
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.features-feed__row-stack {
  display: grid;
  position: relative;
}

.features-feed__rows {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 1;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* Once JS marks the stack .is-locked, it controls visibility per state. */
.features-feed__row-stack.is-locked > .features-feed__rows {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.features-feed__row-stack.is-locked > .features-feed__rows.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 880px) {
  .features-feed__inner { grid-template-columns: 1fr; }
  .features-feed__snapshot,
  .features-feed__feed { min-height: 0; }
  /* Below the cinematic activation breakpoint, only show state 0 to keep
     the page short and readable. */
  .features-feed__rows[data-feed-state="1"],
  .features-feed__rows[data-feed-state="2"] { display: none; }
}

/* =========================================================================
   FEATURES — Discovery highlights carousel ("Get the highlights")
   -------------------------------------------------------------------------
   Apple-style horizontal rail of 4 full-bleed gradient slides. Pure scroll-
   snap carousel: page keeps scrolling normally past it. Each slide carries
   an `.app-mock` as its centred visual. JS (assets/features.js) layers in
   arrow / dot / play-pause / keyboard / touch handling plus 5s autoplay.
   Works without GSAP/Lenis (rail.scrollTo fallback) and under reduced
   motion (autoplay disabled, no smooth scroll, no entry tween).
   ========================================================================= */

.features-discovery .section-head { margin-bottom: 0.9rem; }

.features-discovery__stage {
  position: relative;
  outline: none;
  padding-block: 0.25rem 1.4rem;
}

.features-discovery__stage:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

.features-discovery__rail {
  display: flex;
  gap: clamp(12px, 1.6vw, 24px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding-inline: clamp(16px, 4vw, 56px);
  padding-block: 0.4rem 0.8rem;
  /* Hide native scrollbar; navigation comes from the control bar. */
}

.features-discovery__rail::-webkit-scrollbar { display: none; }

.features-discovery__slide {
  flex: 0 0 min(86vw, 1080px);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.7rem;
  padding: clamp(0.9rem, 2.2vw, 1.6rem) clamp(1.1rem, 2.6vw, 2rem);
  border-radius: var(--radius-xl);
  background: var(--discovery-slide-bg-1);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
  /* Sized so "01 Discovery" header + slide + control bar all fit on a
     ~800px-tall viewport without scrolling. */
  min-height: clamp(320px, 46vh, 480px);
  max-height: 62vh;
  transition: transform 0.5s ease, opacity 0.5s ease;
  will-change: transform;
}

.features-discovery__slide[data-slide-tone="1"] { background: var(--discovery-slide-bg-1); }
.features-discovery__slide[data-slide-tone="2"] { background: var(--discovery-slide-bg-2); }
.features-discovery__slide[data-slide-tone="3"] { background: var(--discovery-slide-bg-3); }
.features-discovery__slide[data-slide-tone="4"] { background: var(--discovery-slide-bg-4); }

/* Adjacent (non-centred) slides dim slightly for an Apple-like focus pop.
   JS toggles .is-active on the centred slide. */
.features-discovery__slide:not(.is-active) {
  opacity: 0.62;
  transform: scale(0.97);
}

.features-discovery__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  max-width: 620px;
  margin-inline: auto;
}

.features-discovery__head .features-card__tag {
  position: static;
  margin-bottom: 0.05rem;
}

.features-discovery__title {
  margin: 0;
  font-size: clamp(1.1rem, 1.9vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.features-discovery__copy {
  margin: 0;
  font-size: clamp(0.82rem, 1.05vw, 0.94rem);
  line-height: 1.5;
  color: var(--text-primary);
}

.features-discovery__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding-block: 0.2rem;
  overflow: hidden;
}

.features-discovery__visual .app-mock {
  width: 100%;
  max-width: 460px;
  max-height: 100%;
  overflow: hidden;
  background: color-mix(in srgb, var(--card-background) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 14px 36px color-mix(in srgb, #000 45%, transparent);
}

.features-discovery__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features-discovery__chips li {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--card-hover) 70%, transparent);
  border: 1px solid var(--card-border);
}

/* ── Slide 3 (Screener) extras — sortable-table header row ───────────── */
.features-discovery__screener-head {
  display: grid;
  grid-template-columns: 2fr 1fr 0.7fr 0.9fr;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--card-border);
}

.features-discovery__screener-sort {
  color: var(--primary-color);
  font-weight: 600;
}

.features-discovery__screener-row {
  display: grid;
  grid-template-columns: auto 2fr 1fr 0.7fr 0.9fr;
  align-items: center;
  gap: 0.5rem;
}

.features-discovery__screener-cell {
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  text-align: right;
}

/* ── Slide 4 (Minervini) extras — MA pill badges + Pass/Watch verdict ── */
.features-discovery__minervini-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
}

.features-discovery__minervini-pills {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.18rem;
  flex-wrap: wrap;
}

.features-discovery__minervini-ma {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-secondary) 14%, transparent);
  color: var(--text-secondary);
  border: 1px solid color-mix(in srgb, var(--text-secondary) 26%, transparent);
}

.features-discovery__minervini-ma.is-up {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
  border-color: color-mix(in srgb, var(--success) 38%, transparent);
}

.features-discovery__minervini-ma.is-flat {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 14%, transparent);
  border-color: color-mix(in srgb, var(--warning) 38%, transparent);
}

/* ── Control bar (prev / dots / play-pause / next) ───────────────────── */
.features-discovery__control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 0.6rem;
}

.features-discovery__nav,
.features-discovery__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-background);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.features-discovery__nav:hover,
.features-discovery__play:hover {
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--primary-color) 35%, var(--card-border));
  transform: translateY(-1px);
}

.features-discovery__nav:disabled { /* reserved if loop ever turned off */
  opacity: 0.5;
  cursor: not-allowed;
}

.features-discovery__dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.35rem 0.7rem;
  list-style: none;
  border-radius: 999px;
  background: var(--card-background);
  border: 1px solid var(--card-border);
}

.features-discovery__dots button {
  appearance: none;
  border: none;
  background: color-mix(in srgb, var(--text-secondary) 50%, transparent);
  cursor: pointer;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  padding: 0;
  transition: width 0.25s ease, background 0.25s ease;
}

.features-discovery__dots button[aria-current="true"] {
  background: var(--text-primary);
  width: 24px;
}

/* Play/pause SVG swap driven by [aria-pressed]: pressed=playing (show pause). */
.features-discovery__play .features-discovery__play-pause { display: none; }
.features-discovery__play .features-discovery__play-play  { display: inline-block; }
.features-discovery__play[aria-pressed="true"] .features-discovery__play-pause { display: inline-block; }
.features-discovery__play[aria-pressed="true"] .features-discovery__play-play  { display: none; }

/* ── Responsive: tighten visuals at narrow viewports ─────────────────── */
@media (max-width: 768px) {
  .features-discovery__rail {
    padding-inline: 16px;
    gap: 12px;
  }
  .features-discovery__slide {
    flex: 0 0 calc(100% - 16px);
    min-height: clamp(360px, 56vh, 480px);
    max-height: 70vh;
    padding: 0.95rem;
  }
  .features-discovery__visual .app-mock { max-width: 100%; }
  .features-discovery__screener-head { font-size: 0.6rem; }
}

@media (max-width: 480px) {
  .features-discovery__control { gap: 0.5rem; }
  .features-discovery__nav,
  .features-discovery__play { width: 34px; height: 34px; }
  .features-discovery__chips li { font-size: 0.68rem; padding: 0.26rem 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .features-discovery__rail { scroll-behavior: auto; }
  .features-discovery__slide,
  .features-discovery__nav,
  .features-discovery__play,
  .features-discovery__dots button { transition: none; }
  .features-discovery__slide:not(.is-active) { opacity: 1; transform: none; }
}

/* ── Discovery mock animations ───────────────────────────────────────────
   Looping demo animations inside each carousel slide's visual mock.
   ─────────────────────────────────────────────────────────────────────── */

/* ── Slide 1: My Summaries — inline row expand ── */
.app-mock__row[data-feed-expandable] {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 0fr;
  transition: background 0.35s ease;
}
.app-mock__row[data-feed-expandable].is-expanded {
  background: var(--card-hover);
  border-radius: var(--radius-sm, 6px);
  grid-template-rows: auto 1fr;
}

.features-feed__detail {
  grid-column: 1 / -1;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s ease;
  padding: 0 0.5rem;
}
.app-mock__row[data-feed-expandable].is-expanded .features-feed__detail {
  opacity: 1;
}
.features-feed__detail-verdict {
  display: inline-block;
  margin: 0.4rem 0 0.25rem;
  font-size: 0.68rem;
}
.features-feed__detail-lines {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-bottom: 0.45rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* ── Slide 2: Market Snapshot — regenerate pulse ── */
.app-mock__chip.is-pulsing {
  transform: scale(1.18);
  background: var(--primary-color);
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.features-feed__snapshot .features-feed__digest-title,
.features-feed__snapshot .read-mock__digest-title,
.features-feed__snapshot .app-mock__lines {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.features-feed__snapshot.is-regenerating .features-feed__digest-title,
.features-feed__snapshot.is-regenerating .read-mock__digest-title,
.features-feed__snapshot.is-regenerating .app-mock__lines {
  opacity: 0;
  transform: translateY(6px);
}

/* ── Slide 3 & 4: Screener & Minervini — crossfade row stacks ── */
.features-discovery__screener-row-stack,
.features-discovery__minervini-row-stack {
  display: grid;
}
.features-discovery__screener-rows,
.features-discovery__minervini-rows {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.features-discovery__screener-rows.is-active,
.features-discovery__minervini-rows.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .app-mock__row[data-feed-expandable],
  .features-feed__detail,
  .app-mock__chip.is-pulsing,
  .features-feed__snapshot .features-feed__digest-title,
  .features-feed__snapshot .read-mock__digest-title,
  .features-feed__snapshot .app-mock__lines,
  .features-discovery__screener-rows,
  .features-discovery__minervini-rows { transition: none; }
}

/* =========================================================================
   FEATURES — Analysis tab switcher (Apple "Mac + iPhone"-style)
   -------------------------------------------------------------------------
   One shared visual stage on top, a centred row of Apple-style pill tabs
   below it (dark-fill active), and a per-tab copy block underneath. Click
   a pill (or press ArrowLeft / ArrowRight while focused) to crossfade the
   visual and copy in place. No vertical-scroll pin; works without GSAP.
   ========================================================================= */

.features-analysis .section-head { margin-bottom: 1rem; }

.features-analysis__wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ── Visual stage (shared frame, subtle gradient backdrop) ───────────── */
.features-analysis__stage {
  position: relative;
  border-radius: var(--radius-xl);
  padding: clamp(0.9rem, 2.2vw, 1.8rem);
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--primary-color) 22%, transparent), transparent 55%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--secondary-color) 18%, transparent), transparent 60%),
    var(--background-elevated);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  min-height: clamp(300px, 44vh, 460px);
}

.features-analysis__visual-stack {
  display: grid;
  grid-template-areas: "stack";
  place-items: center;
  width: 100%;
  min-height: inherit;
}

.features-analysis__visual {
  grid-area: stack;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.features-analysis__visual.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Each per-tab app-mock sits at a comfortable max-width inside the stage. */
.features-analysis__visual .app-mock {
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
  background: color-mix(in srgb, var(--card-background) 95%, transparent);
  box-shadow: 0 14px 36px color-mix(in srgb, #000 35%, transparent);
}

/* The reused F2 mock previously had its own bottom margin and max-width.
   Inside the analysis stage we want it to fill the visual cell instead. */
.features-analysis__visual .features-aitabs {
  margin: 0;
  max-width: 100%;
}

/* ── Pill rail (Apple dark-fill active state) ────────────────────────── */
.features-analysis__rail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin: 0.5rem auto 0;
  padding: 0.32rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-hover) 60%, transparent);
  border: 1px solid var(--card-border);
  max-width: max-content;
}

.features-analysis__pill {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.features-analysis__pill:hover {
  background: color-mix(in srgb, var(--text-primary) 7%, transparent);
  color: var(--text-primary);
}

.features-analysis__pill.is-active {
  background: var(--text-primary);
  color: var(--background);
  box-shadow: var(--shadow-sm);
}

.features-analysis__pill.is-active:hover {
  background: var(--text-primary);
  color: var(--background);
}

/* ── Per-tab copy stack (5 panels share one grid cell) ───────────────── */
.features-analysis__copy-stack {
  display: grid;
  grid-template-areas: "stack";
  width: 100%;
  max-width: 640px;
  margin: 1.2rem auto 0.5rem;
  text-align: center;
}

.features-analysis__copy {
  grid-area: stack;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.features-analysis__copy.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* hidden attribute is removed by JS for the active panel; pre-paint the
   active one as visible so it shows before JS executes. */
.features-analysis__copy[hidden] { display: none; }

.features-analysis__copy .features-card__tag {
  position: static;
  margin: 0;
}

.features-analysis__copy-title {
  margin: 0.35rem 0 0.2rem;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.features-analysis__copy-body {
  margin: 0;
  font-size: clamp(0.84rem, 1.05vw, 0.95rem);
  line-height: 1.55;
  color: var(--text-secondary);
}

.features-analysis__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.features-analysis__chips li {
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--card-hover) 70%, transparent);
  border: 1px solid var(--card-border);
}

/* Compact tab explanation (features 02 Analysis + read Workflow 3) */
.features-analysis__copy-stack--compact {
  max-width: min(100%, 52rem);
}

.features-analysis__copy-stack--compact .features-analysis__copy {
  gap: 0.25rem;
}

.features-analysis__copy-stack--compact .features-analysis__copy-title {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.features-analysis__copy-stack--compact .features-analysis__copy-body {
  line-height: 1.4;
  max-width: 48rem;
  margin-inline: auto;
  text-wrap: balance;
}

.features-analysis__copy-stack--compact .features-analysis__chips {
  margin-top: 0.35rem;
}

.features-analysis__copy-stack--compact .features-analysis__chips li {
  font-size: 0.65rem;
  padding: 0.18rem 0.5rem;
}

@media (min-width: 960px) {
  .features-analysis__copy-stack--compact .features-card__tag {
    display: none;
  }

  .features-analysis__copy-stack--compact .features-analysis__chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: center;
  }

  .features-analysis__copy-stack--compact .features-analysis__chips::-webkit-scrollbar {
    display: none;
  }

  .features-analysis__copy-stack--compact .features-analysis__chips li {
    flex: 0 0 auto;
  }
}

/* ── Visual 1: Compare Stocks mock ───────────────────────────────────── */
.features-analysis__compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.features-analysis__compare-col {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-background) 92%, var(--card-hover));
  border: 1px solid var(--card-border);
}

.features-analysis__compare-col-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.features-analysis__compare-col-title {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.features-analysis__compare-col-head .app-mock__verdict { margin-left: auto; }

.features-analysis__compare-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.features-analysis__compare-stats li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.features-analysis__compare-stats strong {
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  font-weight: 600;
}

.features-analysis__compare-up   { color: var(--success); }
.features-analysis__compare-down { color: var(--error);   }

.features-analysis__compare-pick {
  margin-top: 0.7rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary-color) 10%, var(--card-background));
  border: 1px solid color-mix(in srgb, var(--primary-color) 35%, transparent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.features-analysis__compare-pick-eyebrow {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.features-analysis__compare-pick strong {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.features-analysis__compare-pick-note {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-left: auto;
}

/* ── Visual 2: Prompt Analyse mock ─────────────────────────────────────── */
.features-analysis__ask-prompt {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-hover) 65%, transparent);
  border: 1px solid var(--card-border);
}

.features-analysis__ask-prompt-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.features-analysis__ask-prompt-q {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  line-height: 1.4;
}

.features-analysis__ask-answer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary-color) 5%, var(--card-background));
  border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
}

.features-analysis__ask-answer-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.features-analysis__ask-answer-head .app-mock__chip { margin-left: auto; }

/* ── Visual 3: Zippy chat mock ───────────────────────────────────────── */
.features-analysis__zippy { max-width: 520px; }

.features-analysis__zippy .app-mock__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.features-analysis__zippy-msg {
  display: flex;
}

.features-analysis__zippy-msg--user { justify-content: flex-end; }
.features-analysis__zippy-msg--ai   { justify-content: flex-start; }

.features-analysis__zippy-bubble {
  max-width: 82%;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.features-analysis__zippy-msg--user .features-analysis__zippy-bubble {
  background: var(--primary-color);
  color: var(--color-white);
  border-bottom-right-radius: 4px;
}

.features-analysis__zippy-msg--ai .features-analysis__zippy-bubble {
  background: color-mix(in srgb, var(--card-hover) 80%, transparent);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  border-bottom-left-radius: 4px;
}

.features-analysis__zippy-line { font-weight: 500; }

.features-analysis__zippy-bubble--typing {
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem;
}

.features-analysis__zippy-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-secondary);
  opacity: 0.7;
  animation: zippy-dot-blink 1.2s ease-in-out infinite;
}

.features-analysis__zippy-dot:nth-child(2) { animation-delay: 0.18s; }
.features-analysis__zippy-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes zippy-dot-blink {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1;   }
}

/* ── Visual 4: AI Sector Analysis mock ───────────────────────────────── */
.features-analysis__sectors-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.features-analysis__sectors-bar {
  display: grid;
  grid-template-columns: 110px 1fr 58px;
  align-items: center;
  gap: 0.55rem;
}

.features-analysis__sectors-bar-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}

.features-analysis__sectors-bar-track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-hover) 70%, transparent);
  overflow: hidden;
}

.features-analysis__sectors-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,
    var(--primary-color) 0%,
    color-mix(in srgb, var(--primary-color) 70%, var(--secondary-color)) 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.features-analysis__sectors-bar-fill--down {
  background: linear-gradient(90deg,
    var(--error) 0%,
    color-mix(in srgb, var(--error) 65%, var(--warning)) 100%);
}

.features-analysis__sectors-bar-pct {
  text-align: right;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--success);
}

.features-analysis__sectors-bar-pct--down { color: var(--error); }

/* ── Analysis mock animation states ──────────────────────────────────── */
.is-anim-hidden {
  opacity: 0 !important;
  transform: translateY(8px) !important;
  pointer-events: none !important;
  transition: opacity 0.35s ease, transform 0.35s ease !important;
}

.is-anim-revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  transition: opacity 0.35s ease, transform 0.35s ease !important;
}

@keyframes anim-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 30%, transparent); }
  100% { transform: scale(1); }
}

.is-anim-pulse {
  animation: anim-pulse 0.5s ease;
}

/* Compare selector (Visual 1 pre-state) */
.features-analysis__compare-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-background) 92%, var(--card-hover));
  margin-bottom: 0.6rem;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.features-analysis__compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--primary-color) 12%, var(--card-background));
  border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.features-analysis__compare-chip svg {
  color: var(--success);
  flex-shrink: 0;
}

.features-analysis__compare-btn {
  margin-left: auto;
  align-self: center;
  background: var(--primary-color);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: default;
}

.features-analysis__compare-result {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Prompt Analyse button (Visual 2) */
.features-analysis__ask-btn {
  margin-left: auto;
  background: var(--primary-color);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.4rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: default;
}

/* Sectors pre-state (Visual 4) */
.features-analysis__sectors-pre {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.features-analysis__sectors-btn {
  background: var(--primary-color);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: default;
}

.features-analysis__sectors-result {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .features-analysis__stage {
    padding: 0.8rem;
    min-height: clamp(260px, 50vh, 420px);
  }
  .features-analysis__rail {
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.3rem 0.4rem;
    justify-content: flex-start;
    border-radius: var(--radius-lg);
  }
  .features-analysis__rail::-webkit-scrollbar { display: none; }
  .features-analysis__pill { flex: 0 0 auto; padding: 0.45rem 0.85rem; font-size: 0.8rem; }
  .features-analysis__compare-grid { grid-template-columns: 1fr; }
  .features-analysis__compare-pick-note { margin-left: 0; }
  .features-analysis__sectors-bar { grid-template-columns: 80px 1fr 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .features-analysis__visual,
  .features-analysis__copy,
  .features-analysis__pill { transition: none; }
  .features-analysis__visual { transform: none; }
  .features-analysis__copy   { transform: none; }
  .is-anim-hidden,
  .is-anim-revealed { transition: none !important; }
  .is-anim-pulse { animation: none; }
}

/* ── F2: AI Tabs Crossfade scene (Analysis stage) ──────────────────── */
.features-aitabs {
  margin: 0 auto 3rem;
  position: relative;
  max-width: 980px;
}

.features-aitabs__filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-background) 92%, var(--card-hover));
}

.features-aitabs__filter {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.features-aitabs__filter strong {
  font-size: 0.84rem;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.005em;
}

.features-aitabs__run {
  margin-left: auto;
  align-self: center;
  background: var(--primary-color);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
}

.features-aitabs__result-stack {
  display: grid;
  position: relative;
  min-height: 220px;
}

.features-aitabs__result {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  opacity: 1;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.features-aitabs__result-stack.is-locked > .features-aitabs__result {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.features-aitabs__result-stack.is-locked > .features-aitabs__result.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.features-aitabs__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.features-aitabs__head-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}

.features-aitabs__chart {
  display: flex;
  align-items: end;
  gap: 0.5rem;
  height: 96px;
  padding: 0.4rem 0.2rem 0;
}

.features-aitabs__bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  height: 100%;
  justify-content: end;
}

.features-aitabs__bar {
  width: 100%;
  background: var(--primary-color);
  border-radius: 4px 4px 0 0;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 6px;
}

.features-aitabs__bar-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.features-aitabs__prompt {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--primary-color) 4%, var(--card-background));
}

.features-aitabs__prompt-q {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
  font-style: italic;
}

@media (max-width: 880px) {
  .features-aitabs__result-stack { min-height: 180px; }
  .features-aitabs__filters { gap: 0.4rem; padding: 0.5rem 0.55rem; }
  .features-aitabs__run { padding: 0.4rem 0.7rem; font-size: 0.72rem; }
  /* Static fallback: only show first result. */
  .features-aitabs__result[data-aitabs-state="1"],
  .features-aitabs__result[data-aitabs-state="2"],
  .features-aitabs__result[data-aitabs-state="3"] { display: none; }
}

/* =========================================================================
   FEATURES — Portfolio rail (Apple macOS-style image-on-top card carousel)
   -------------------------------------------------------------------------
   Replaces the former F3 pinned dual-pane scrub. 4 slides
   (Portfolio Management with the holdings + sector donut visuals folded in,
   Portfolio Timeline, Watchlists, Sector Rotation). 2-up viewport at
   >=960px, arrows-only nav, no dots, no autoplay. Native CSS scroll-snap
   keeps the rail functional with no JS / no GSAP / reduced-motion.
   ========================================================================= */

.features-portfolio {
  position: relative;
  margin: 0 auto 3rem;
  max-width: 1180px;
  padding-block: 1rem;
}

.features-portfolio:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 6px;
  border-radius: var(--radius-lg);
}

.features-portfolio__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 88%;
  gap: 1.1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0.5rem 1.25rem 1.25rem;
  margin-inline: -1.25rem;
}

.features-portfolio__track::-webkit-scrollbar { display: none; }

.features-portfolio__slide {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--card-background);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.features-portfolio__slide:hover {
  border-color: color-mix(in srgb, var(--primary-color) 25%, var(--card-border));
  box-shadow: var(--shadow-md);
}

.features-portfolio__media {
  position: relative;
  aspect-ratio: 5 / 4;
  padding: 1.4rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--portfolio-slide-bg-1);
}

.features-portfolio__slide[data-portfolio-slide="0"] .features-portfolio__media,
.features-portfolio__media[data-portfolio-tone="1"] { background: var(--portfolio-slide-bg-1); }
.features-portfolio__slide[data-portfolio-slide="1"] .features-portfolio__media,
.features-portfolio__media[data-portfolio-tone="2"] { background: var(--portfolio-slide-bg-2); }
.features-portfolio__slide[data-portfolio-slide="2"] .features-portfolio__media,
.features-portfolio__media[data-portfolio-tone="3"] { background: var(--portfolio-slide-bg-3); }
.features-portfolio__slide[data-portfolio-slide="3"] .features-portfolio__media,
.features-portfolio__media[data-portfolio-tone="4"] { background: var(--portfolio-slide-bg-4); }

.features-portfolio__caption {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Re-anchor the .features-card__tag chip inside the caption so it reads
   as a small inline badge above the title rather than floating. */
.features-portfolio__caption .features-card__tag {
  position: static;
  align-self: flex-start;
  margin-bottom: 0.15rem;
}

.features-portfolio__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
}

.features-portfolio__body {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* ── Nav (prev / next arrows, bottom-right) ──────────────────────────── */
.features-portfolio__nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-inline: 0.25rem;
  margin-top: 1rem;
}

.features-portfolio__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-background);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.features-portfolio__nav-btn:hover:not(:disabled) {
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--primary-color) 35%, var(--card-border));
  transform: translateY(-1px);
}

.features-portfolio__nav-btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.features-portfolio__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Slide-specific mock primitives ──────────────────────────────────── */

/* All in-card mocks share a translucent product-surface look so they sit
   nicely on the tinted media gradient regardless of theme. */
.features-portfolio__mock {
  width: 100%;
  background: color-mix(in srgb, var(--card-background) 92%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid color-mix(in srgb, var(--card-border) 70%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.features-portfolio__mock-rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Slide 1: dual-pane (holdings + donut) inside the media area. */
.features-portfolio__split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0.9rem;
  width: 100%;
  align-items: stretch;
}

.features-portfolio__mock--holdings .app-mock__body {
  padding-block: 0.6rem 0.8rem;
}

.features-portfolio__mock--holdings .app-mock__row {
  padding: 0.45rem 0.65rem;
}

.features-portfolio__mock--holdings .app-mock__row-sub {
  font-size: 0.7rem;
}

/* Donut sub-mock — reuses the legacy donut SVG and tokens. */
.features-portfolio__mock--donut {
  display: flex;
  flex-direction: column;
}

.features-portfolio__donut-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.6rem 0.9rem;
  min-height: 0;
}

.features-portfolio__donut {
  width: min(170px, 100%);
  height: auto;
  display: block;
}

.features-portfolio__donut-track {
  fill: none;
  stroke: color-mix(in srgb, var(--text-secondary) 18%, transparent);
  stroke-width: 18;
}

.features-portfolio__donut-seg {
  fill: none;
  stroke-width: 18;
  stroke-linecap: butt;
}

.features-portfolio__donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.features-portfolio__donut-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.features-portfolio__donut-label {
  margin-top: 0.2rem;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* Slide 2: timeline list. */
.features-portfolio__timeline {
  list-style: none;
  margin: 0;
  padding: 0.8rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
}

.features-portfolio__timeline::before {
  content: "";
  position: absolute;
  left: 1.35rem;
  top: 1.1rem;
  bottom: 1.2rem;
  width: 1px;
  background: color-mix(in srgb, var(--text-secondary) 28%, transparent);
  border-radius: 1px;
}

.features-portfolio__timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.4rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-hover) 60%, transparent);
}

.features-portfolio__timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-left: 2px;
  box-shadow: 0 0 0 3px var(--card-background);
}

.features-portfolio__timeline-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.features-portfolio__timeline-meta {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.features-portfolio__timeline-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slide 3 + 4 share the pill-row spacing. */
.features-portfolio__pill-row {
  padding: 0.6rem 0.85rem 0.2rem;
}

.features-portfolio__mock--watchlist .app-mock__body {
  padding: 0.5rem 0.85rem 0.9rem;
}

/* Slide 4: rotation bars. */
.features-portfolio__rotation {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.features-portfolio__rotation-row {
  display: grid;
  grid-template-columns: 64px 1fr 48px;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
}

.features-portfolio__rotation-name {
  color: var(--text-primary);
  font-weight: 600;
}

.features-portfolio__rotation-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-secondary) 14%, transparent);
  overflow: hidden;
}

.features-portfolio__rotation-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar-pct, 0%);
  border-radius: 999px;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

/* 2-up viewport at desktop sizes with the next card peeking. */
@media (min-width: 960px) {
  .features-portfolio__track {
    grid-auto-columns: calc(50% - 0.55rem);
    gap: 1.1rem;
  }
}

@media (min-width: 1280px) {
  .features-portfolio__track {
    grid-auto-columns: calc(48% - 0.55rem);
  }
}

/* Tighten internals on small phones; collapse Slide 1's dual-pane to a
   single column so the holdings stay legible at 320px. */
@media (max-width: 640px) {
  .features-portfolio__split {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .features-portfolio__media { aspect-ratio: auto; min-height: 360px; }
  .features-portfolio__mock--donut .features-portfolio__donut-wrap { padding: 0.4rem; }
  .features-portfolio__donut { width: min(140px, 60%); }
  .features-portfolio__rotation-row { grid-template-columns: 56px 1fr 44px; font-size: 0.72rem; }
  .features-portfolio__timeline-title { font-size: 0.74rem; }
}

@media (max-width: 480px) {
  .features-portfolio__nav-btn { width: 40px; height: 40px; }
  .features-portfolio__caption { padding: 1rem 1.1rem 1.2rem; }
  .features-portfolio__title { font-size: 1.05rem; }
  .features-portfolio__body { font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  .features-portfolio__track { scroll-behavior: auto; }
  .features-portfolio__slide,
  .features-portfolio__nav-btn { transition: none; }
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  background: var(--card-background);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pricing-card--pro {
  --pro-glow: 0;
  border-color: color-mix(in srgb, var(--primary-color) 50%, var(--card-border));
  background: linear-gradient(160deg,
    var(--card-background) 0%,
    color-mix(in srgb, var(--primary-color) 8%, var(--card-background)) 100%);
  box-shadow:
    var(--shadow-md),
    0 0 calc(60px * var(--pro-glow)) color-mix(in srgb, var(--primary-color) calc(50% * var(--pro-glow)), transparent);
  transform-origin: center center;
  will-change: transform, box-shadow;
}

.pricing-badge {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--primary-color);
  color: var(--color-white);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-plan-name {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
}

.pricing-price {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  min-height: 1.2em; /* prevent layout shift while a hidden price span is swapped in */
}

.pricing-price__amount {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

.pricing-price__unit {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.pricing-alt {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pricing-savings {
  color: var(--success);
  font-weight: 600;
}

.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.pricing-features li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18rem;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background-color: var(--primary-muted);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b6ef6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 11px 11px;
  background-repeat: no-repeat;
  background-position: center;
}

.pricing-feature-blocked {
  color: var(--text-muted);
}

.pricing-feature-blocked::before {
  background-color: color-mix(in srgb, var(--error) 18%, transparent) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='6' y1='18' x2='18' y2='6'/%3E%3C/svg%3E") !important;
  background-size: 9px 9px !important;
}

.pricing-cta {
  width: 100%;
  margin-top: auto;
  text-align: center;
}

.pricing-comparison-wrap {
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  background: var(--card-background);
  box-shadow: var(--shadow-md);
  max-width: 980px;
  margin: 2rem auto 0;
}

@media (max-width: 720px) {
  .pricing-comparison-wrap { overflow-x: auto; }
}

.pricing-comparison {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.94rem;
  min-width: 560px;
  table-layout: fixed;
}

.pricing-comparison thead th {
  padding: 1.2rem 1.3rem 1.1rem;
  background: color-mix(in srgb, var(--card-hover) 80%, var(--card-background));
  border-bottom: 1px solid var(--card-border);
  vertical-align: bottom;
  font-weight: 600;
  color: var(--text-secondary);
  position: sticky;
  top: 72px;
  z-index: 2;
}

/* Column widths: feature label gets 44%, each plan gets 28%. */
.pricing-comparison thead th:first-child { width: 44%; border-top-left-radius: var(--radius-xl); }
.pricing-comparison thead th:nth-child(2),
.pricing-comparison thead th:nth-child(3) { width: 28%; }
.pricing-comparison thead th:last-child { border-top-right-radius: var(--radius-xl); }

.pricing-comparison tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-xl); }
.pricing-comparison tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-xl); }

/* The "Feature" label keeps the small uppercase eyebrow style. */
.pricing-comparison__feature-head {
  text-align: left;
}

.pricing-comparison__feature-head > span {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  padding-bottom: 0.25rem;
}

/* Plan headers (Free / Pro) get the bigger plan-card-style treatment. */
.pricing-comparison__plan-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-transform: none;
  letter-spacing: 0;
}

.pricing-comparison__plan-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1;
}

.pricing-comparison__plan-price {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.pricing-comparison__plan-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--primary-color);
  color: var(--color-white);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 28%, transparent);
}

/* Pro column header gets a tinted background that extends through every
   td in the column below; the left border draws the column edge. */
.pricing-comparison thead th.pricing-comparison__plan-th--pro {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--primary-color) 10%, var(--card-hover)) 0%,
    color-mix(in srgb, var(--primary-color) 6%, var(--card-background)) 100%);
  border-left: 1px solid color-mix(in srgb, var(--primary-color) 22%, var(--card-border));
}

.pricing-comparison tbody td {
  padding: 0.95rem 1.3rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-secondary);
  vertical-align: middle;
  text-align: center;
}

.pricing-comparison tbody tr:last-child td { border-bottom: none; }

.pricing-comparison tbody td:first-child {
  text-align: left;
  color: var(--text-primary);
  font-weight: 500;
}

/* Pro column tint extends to every body cell. */
.pricing-comparison tbody td:nth-child(3) {
  background: color-mix(in srgb, var(--primary-color) 4%, var(--card-background));
  border-left: 1px solid color-mix(in srgb, var(--primary-color) 14%, var(--card-border));
  color: var(--text-primary);
}

.pricing-comparison tbody tr:hover td {
  background: color-mix(in srgb, var(--card-hover) 55%, transparent);
}

/* Keep the hover tint on the Pro column slightly bluer so the column
   identity is preserved on hover. */
.pricing-comparison tbody tr:hover td:nth-child(3) {
  background: color-mix(in srgb, var(--primary-color) 8%, var(--card-hover));
}

@media (max-width: 720px) {
  .pricing-comparison { min-width: 480px; font-size: 0.88rem; }
  .pricing-comparison thead th { padding: 1rem 0.9rem; top: 64px; }
  .pricing-comparison__plan-name { font-size: 1.1rem; }
  .pricing-comparison__plan-price { font-size: 0.72rem; }
  .pricing-comparison tbody td { padding: 0.8rem 0.9rem; }
}

.check-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-color);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.check-mark::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233b6ef6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.limit-text {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.limit-text--blocked {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 14%, transparent);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Feature tooltip (info icon + hover popover) ── */

.feature-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 0.4rem;
  vertical-align: middle;
  cursor: help;
  position: relative;
  color: var(--text-muted);
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.feature-tip svg {
  width: 14px;
  height: 14px;
  display: block;
}

.feature-tip:hover,
.feature-tip:focus-visible {
  color: var(--primary-color);
}

.pricing-comparison tbody td:first-child {
  position: relative;
}

.pricing-comparison tbody tr:has(.feature-tip:hover),
.pricing-comparison tbody tr:has(.feature-tip:focus-visible) {
  position: relative;
  z-index: 10;
}

.feature-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--background);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.8rem;
  line-height: 1.5;
  font-weight: 400;
  white-space: normal;
  text-align: left;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-50%) translateY(4px);
}

.feature-tip:hover::after,
.feature-tip:focus-visible::after {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* First two rows: flip tooltip below (no room above inside the card) */
.pricing-comparison tbody tr:nth-child(-n+2) .feature-tip::after {
  bottom: auto;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(-4px);
}
.pricing-comparison tbody tr:nth-child(-n+2) .feature-tip:hover::after,
.pricing-comparison tbody tr:nth-child(-n+2) .feature-tip:focus-visible::after {
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 720px) {
  .feature-tip::after {
    width: 200px;
    left: 0;
    transform: translateX(0) translateY(4px);
  }
  .feature-tip:hover::after,
  .feature-tip:focus-visible::after {
    transform: translateX(0) translateY(0);
  }
}

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

/* =========================================================================
   PRICING (revamp) — trust strip, billing toggle, why-strip, save badge,
                      pricing FAQ. Token-driven; 320 px floor; reduced-
                      motion + no-GSAP + JS-disabled paths covered.
   ========================================================================= */

/* ── Trust strip under the hero ────────────────────────────────────── */
.pricing-trust-strip {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.7rem;
}

.pricing-trust-strip__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--card-background) 75%, transparent);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.pricing-trust-strip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.pricing-trust-strip__icon svg {
  width: 14px;
  height: 14px;
}

/* ── Plan section spacing + price-span visibility ──────────────────── */
.pricing-plans-section {
  scroll-margin-top: 80px; /* CTA "Start free" #plans anchor lands cleanly */
}

/* Show only the price spans that match the current billing state. The
   wrapper carries [data-pricing-billing="monthly"|"yearly"]. */
[data-pricing-plans][data-pricing-billing="monthly"] [data-price="yearly"],
[data-pricing-plans][data-pricing-billing="yearly"] [data-price="monthly"] {
  display: none;
}

/* The save badge on the Pro card only makes sense on Yearly. */
[data-pricing-plans][data-pricing-billing="monthly"] [data-pricing-save-badge] {
  display: none;
}

/* ── Monthly / Yearly billing toggle ───────────────────────────────── */
.pricing-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.8rem;
}

.pricing-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: color-mix(in srgb, var(--card-background) 80%, transparent);
  box-shadow: var(--shadow-sm);
  gap: 0;
}

/* The animated sliding pill sits behind the active option. Because the
   wrapper is `inline-grid` with two equal `1fr` columns, the two option
   buttons are guaranteed to be the same width regardless of their inner
   content (the "Save 17%" save tag would otherwise push the Yearly
   button wider than Monthly, and the pill geometry would drift). */
.pricing-toggle__pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: var(--primary-color);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 32%, transparent);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}

[data-pricing-plans][data-pricing-billing="yearly"] .pricing-toggle__pill {
  transform: translateX(100%);
}

.pricing-toggle__option {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 7.5rem;
  justify-content: center;
  padding: 0.6rem 1rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.pricing-toggle__option:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.pricing-toggle__option.is-active {
  color: var(--color-white);
}

.pricing-toggle__save-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 22%, transparent);
  color: var(--success);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}

/* When the Yearly option is active, the save tag sits over the blue
   pill, so flip its colours for contrast. */
.pricing-toggle__option.is-active .pricing-toggle__save-tag {
  background: color-mix(in srgb, var(--color-white) 22%, transparent);
  color: var(--color-white);
}

@media (max-width: 420px) {
  .pricing-toggle__option { min-width: 5.5rem; padding: 0.55rem 0.7rem; font-size: 0.86rem; }
  .pricing-toggle__save-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-toggle__pill { transition: none; }
}

/* ── Pro card "Save ₹500 / yr" badge ──────────────────────────────── */
.pricing-card__save-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 32%, transparent);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-top: -0.25rem;
}

.pricing-card__save-badge-strong {
  font-weight: 700;
}

/* ── "Why upgrade?" 3-stat strip ───────────────────────────────────── */
.pricing-why {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.pricing-why__tile {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.6rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  background: var(--card-background);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pricing-why__tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--primary-color) 28%, var(--card-border));
}

.pricing-why__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary-muted);
  color: var(--primary-color);
  flex-shrink: 0;
}

.pricing-why__icon svg {
  width: 20px;
  height: 20px;
}

.pricing-why__num {
  font-size: clamp(2rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pricing-why__caption {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (max-width: 880px) {
  .pricing-why { grid-template-columns: 1fr; }
}

/* ── Pricing FAQ link card (full questions live on faq.html) ──────── */
.pricing-faq-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  background: linear-gradient(160deg,
    var(--card-background) 0%,
    color-mix(in srgb, var(--primary-color) 6%, var(--card-background)) 100%);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  max-width: 860px;
  margin: 0 auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pricing-faq-link:hover,
.pricing-faq-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--primary-color) 32%, var(--card-border));
  text-decoration: none;
}

.pricing-faq-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.pricing-faq-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--primary-muted);
  color: var(--primary-color);
  flex-shrink: 0;
}

.pricing-faq-link__icon svg {
  width: 22px;
  height: 22px;
}

.pricing-faq-link__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.pricing-faq-link__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.pricing-faq-link__title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.45;
}

.pricing-faq-link__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--primary-color);
  color: var(--color-white);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.pricing-faq-link:hover .pricing-faq-link__cta,
.pricing-faq-link:focus-visible .pricing-faq-link__cta {
  background: var(--primary-hover);
}

.pricing-faq-link__arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 0.25s ease;
}

.pricing-faq-link__arrow svg {
  width: 12px;
  height: 12px;
}

.pricing-faq-link:hover .pricing-faq-link__arrow,
.pricing-faq-link:focus-visible .pricing-faq-link__arrow {
  transform: translateX(3px);
}

@media (max-width: 640px) {
  .pricing-faq-link {
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
  }
  .pricing-faq-link__cta {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-faq-link,
  .pricing-faq-link__arrow {
    transition: none;
  }
}

/* ── Read (Learn) ── */
.read-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.read-step-card .card__icon {
  background: var(--primary-color);
  color: var(--color-white);
  font-weight: 800;
  font-size: 1.05rem;
  font-family: var(--font-primary);
}

/* =========================================================================
   READ (cinematic) — Sticky App Mock per Workflow + persona sparklines
   -------------------------------------------------------------------------
   Each restructured Workflow uses a 2-column layout:
     - left: vertical step list (.read-workflow__steps with .read-step-card)
     - right: sticky app-mock card (.read-workflow__sticky) with 4-5
              .read-mock variants stacked in one grid cell. Active step
              swap is handled by read.js toggling .is-active on the
              matching .read-mock and .read-step-card.
   At < 880px the sticky right column hides and steps stack vertically
   (mobile already has the existing read-step-grid card behaviour).
   ========================================================================= */

.read-workflow-pin {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: start;
  margin-top: 1rem;
}

.read-workflow__steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.read-workflow__steps .read-step-card {
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
  opacity: 0.55;
  scroll-margin-top: 35vh;
}

.read-workflow__steps .read-step-card.is-active {
  opacity: 1;
  border-color: color-mix(in srgb, var(--primary-color) 45%, var(--card-border));
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

.read-workflow__steps .read-step-card--interactive {
  cursor: pointer;
}

.read-workflow__steps .read-step-card--interactive:hover {
  border-color: color-mix(in srgb, var(--primary-color) 30%, var(--card-border));
}

.read-workflow__steps .read-step-card--interactive:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.read-workflow__sticky {
  /* Workflow 2 and 3 chapter heads no longer carry .is-pin-head, so the
     right-column app-mock can pin just below the global navbar. */
  position: sticky;
  top: 96px;
  align-self: start;
  height: fit-content;
}

.read-mock-stack {
  display: grid;
  position: relative;
  min-height: 440px;
}

.read-mock {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.read-mock.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Initial render before JS runs: the first mock in each stack is visible
   (declared with .is-active in markup) so the page is correct without JS. */

/* ── Workflow 1: Morning Market Scan ── */
.read-mock__digest-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  line-height: 1.35;
}

/* ── Workflow 2: Stock Details compact mock ── */
.read-stock-detail {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}

.read-stock-detail__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.read-stock-detail__headline {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.read-stock-detail__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.read-stock-detail__code {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--card-hover) 80%, transparent);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-variant-numeric: tabular-nums;
}

.read-stock-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.read-stock-detail__tag {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--primary-color) 12%, var(--card-background));
  border: 1px solid color-mix(in srgb, var(--primary-color) 25%, var(--card-border));
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.read-stock-detail__tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}

.read-stock-detail__tabs::-webkit-scrollbar { display: none; }

.read-stock-detail__tab {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.2rem 0.15rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.35rem;
  cursor: default;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.read-stock-detail__tab.is-active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 600;
}

.read-stock-detail__panels {
  display: grid;
  position: relative;
  min-height: 200px;
}

.read-stock-detail__panel {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.read-stock-detail__panel.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.read-stock-detail__chart-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.read-stock-detail__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.read-stock-detail__chg {
  font-size: 0.78rem;
  font-weight: 600;
}

.read-stock-detail__chart-area {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-background) 88%, var(--card-hover));
  padding: 0.45rem 0.5rem 0.35rem;
  min-height: 100px;
}

.read-stock-detail__spark {
  width: 100%;
  height: 100px;
  display: block;
}

.read-stock-detail__spark-fill {
  fill: url(#read-w2-chart-fill);
}

.read-stock-detail__spark-line {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.read-stock-detail__desc {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.read-stock-detail__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.65rem;
  margin-bottom: 0.5rem;
}

.read-stock-detail__table th,
.read-stock-detail__table td {
  padding: 0.28rem 0.35rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.read-stock-detail__table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.read-stock-detail__table td {
  color: var(--text-primary);
}

.read-stock-detail__lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.read-stock-detail__list-title {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.read-stock-detail__list {
  margin: 0;
  padding-left: 0.9rem;
  font-size: 0.65rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.read-stock-detail__list li + li {
  margin-top: 0.15rem;
}

/* Screener / ask / compare nested inside read-mock */
.read-mock .features-discovery__screener,
.read-mock .features-analysis__ask,
.read-mock .features-analysis__compare {
  border: none;
  box-shadow: none;
  background: transparent;
}

.read-mock [data-compare-result] {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.read-mock [data-compare-result].is-anim-revealed {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Workflow 2: Compare side-by-side mini cards (legacy) ── */
.read-mock__compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.read-mock__compare-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-background) 92%, var(--card-hover));
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.read-mock__compare-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}

/* ── Workflow 3: Summary (index home-portfolio, compact in visual stage) ── */
.read-w3-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem 1.25rem;
  align-items: center;
  padding: 0.25rem 0.1rem;
}

.read-w3-summary__donut-wrap {
  width: min(100%, 200px);
  margin: 0 auto;
}

.read-w3-summary__donut-wrap .home-portfolio__donut-seg {
  stroke-width: 22;
}

.read-w3-summary__center-value {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Override the larger home-page donut value sizing (defined later). */
.features-analysis__visual .read-w3-summary .home-portfolio__donut-center-value {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.read-w3-summary__counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: 0;
}

.read-w3-summary__counters .home-counter {
  padding: 0.5rem 0.55rem;
}

.read-w3-summary__counters .home-counter__label {
  font-size: 0.62rem;
}

.read-w3-summary__counters .home-counter__value {
  font-size: 0.95rem;
}

.read-w3-summary__legend {
  margin-top: 0.75rem;
  gap: 0.35rem 0.65rem;
}

.read-w3-summary__legend .home-portfolio__legend-item {
  font-size: 0.72rem;
}

.read-w3-summary__legend .home-portfolio__legend-swatch {
  width: 9px;
  height: 9px;
}

/* ── Workflow 3: Timeline (features portfolio list + reveal states) ── */
.features-analysis__visual .features-portfolio__mock--timeline {
  max-width: 100%;
  margin: 0;
}

.read-w3-timeline-item {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.25s ease;
}

.read-w3-timeline-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.read-w3-timeline-item.is-w3-timeline-active {
  background: color-mix(in srgb, var(--primary-color) 14%, var(--card-hover));
}

/* ── Workflow 3: Sector rotation (index home-rotation, compact) ── */
.read-w3-rotation {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.read-w3-rotation__bars {
  gap: 0.45rem;
}

.read-w3-rotation__bars .home-rotation__bar {
  grid-template-columns: 52px 1fr 52px;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
}

.read-w3-rotation__bars .home-rotation__bar-name {
  font-size: 0.78rem;
}

.read-w3-rotation__bars .home-rotation__bar-pct {
  font-size: 0.76rem;
}

.read-w3-rotation__bars .home-rotation__bar-track {
  height: 8px;
}

.read-w3-rotation__timeframe {
  margin-top: 0;
  justify-content: center;
}

.read-w3-rotation__timeframe .home-rotation__tf {
  font-size: 0.72rem;
  padding: 0.28rem 0.55rem;
}

@media (max-width: 520px) {
  .read-w3-summary {
    grid-template-columns: 1fr;
  }
  .read-w3-summary__counters {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .read-w3-timeline-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .read-w3-rotation__bars .home-rotation__bar,
  .read-w3-rotation__bars .home-rotation__bar-fill {
    transition: none;
  }
}

/* ── Workflow 3 mock 4: Broker sync logos ── */
.read-mock__brokers {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 1rem 0.4rem;
}

.read-mock__broker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.read-mock__broker-disc {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-white);
}

.read-mock__broker-disc--zerodha { background: var(--secondary-color); }
.read-mock__broker-disc--angel { background: var(--success); }

.read-mock__broker-name {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.read-mock__broker-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--primary-muted);
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px dashed color-mix(in srgb, var(--primary-color) 50%, transparent);
}

/* ── Workflow 1 mock 5: Stock snapshot mini chart ── */
.read-mock__stockhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.read-mock__stockhead-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.read-mock__stockhead-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

.read-mock__sparkbox {
  width: 100%;
  height: 80px;
}

.read-mock__sparkbox path {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Persona sparkline (small SVG inside .home-profile-style cards) ── */
.read-persona-spark {
  width: 100%;
  height: 32px;
  margin-top: 0.6rem;
  display: block;
}

.read-persona-spark__path {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.read-persona-spark.is-drawn .read-persona-spark__path {
  stroke-dashoffset: 0;
}

@media (max-width: 880px) {
  .read-workflow-pin { grid-template-columns: 1fr; }
  /* Hide the sticky right column on mobile — text steps tell the full story. */
  .read-workflow__sticky { display: none; }
  .read-workflow__steps .read-step-card { opacity: 1; }
}

.read-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.read-feature-list li {
  position: relative;
  padding-left: 1.8rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.55;
}

.read-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background-color: color-mix(in srgb, var(--success) 22%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 11px 11px;
  background-position: center;
}

.read-list {
  display: grid;
  gap: 0.8rem;
}

.read-list a {
  display: block;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-background);
  color: var(--text-primary);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.read-list a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary-color) 40%, var(--card-border));
  box-shadow: var(--shadow-md);
  background: var(--card-hover);
}

.read-list strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.read-list span { color: var(--text-secondary); font-size: 0.92rem; }

/* -----------------------------------------------------------------------
   Workflow 1 — Apple "Take a closer look."-style accordion.
   Click-driven only: 5 collapsible <details name=w1-look> pills on the
   left + a sticky visual stage on the right that crossfades through 5
   .app-mock variants. The smooth pill expand uses the FAQ grid-rows
   trick (mirrors faq.js); read.js mirrors `open` state into the visual
   stage on the native `toggle` event. No pin, no scrub. JS-disabled
   browsers still get native <details name> mutex behaviour.
   ----------------------------------------------------------------------- */
.read-w1-look-section {
  padding: clamp(4.5rem, 10vw, 8rem) 0;
}

.read-w1-look-section .section-head {
  text-align: center;
  align-items: center;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.read-w1-look {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  max-width: 1180px;
  margin: 0 auto;
}

@media (min-width: 960px) {
  .read-w1-look {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
    align-items: start;
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
}

/* ── Pill column ─────────────────────────────────────────────── */
.read-w1-look__pills {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.read-w1-look__pill {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card-background);
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
  /* Opt into auto-height interpolation where supported; non-supporting
     browsers still get the smoother grid-rows interpolation below. */
  interpolate-size: allow-keywords;
}

.read-w1-look__pill[open] {
  border-color: color-mix(in srgb, var(--primary-color) 35%, var(--card-border));
  background: color-mix(in srgb, var(--primary-color) 5%, var(--card-background));
  box-shadow: var(--shadow-md);
}

.read-w1-look__pill-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(0.85rem, 1.6vw, 1.1rem);
  padding: clamp(1rem, 1.8vw, 1.25rem) clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-primary);
}

.read-w1-look__pill-summary::-webkit-details-marker { display: none; }
.read-w1-look__pill-summary::marker { display: none; content: ""; }

.read-w1-look__pill-marker {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary-color) 30%, var(--card-border));
  transition: background 0.25s ease, border-color 0.25s ease;
}

.read-w1-look__pill-marker::before,
.read-w1-look__pill-marker::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--primary-color);
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.read-w1-look__pill-marker::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.read-w1-look__pill[open] .read-w1-look__pill-marker {
  background: color-mix(in srgb, var(--primary-color) 22%, transparent);
  border-color: color-mix(in srgb, var(--primary-color) 55%, var(--card-border));
}

.read-w1-look__pill[open] .read-w1-look__pill-marker::after {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
}

.read-w1-look__pill-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.read-w1-look__pill-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 600;
}

.read-w1-look__pill-label {
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

/* ── Smooth body open/close (grid-rows trick) ─────────────────── */
.read-w1-look__pill-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.read-w1-look__pill[open] .read-w1-look__pill-body {
  grid-template-rows: 1fr;
}

.read-w1-look__pill-body-inner {
  min-height: 0;
  overflow: hidden;
}

.read-w1-look__pill-body-inner p {
  margin: 0;
  padding: 0 clamp(1.1rem, 2vw, 1.4rem) clamp(1rem, 1.8vw, 1.25rem)
    calc(clamp(1.1rem, 2vw, 1.4rem) + 22px + clamp(0.85rem, 1.6vw, 1.1rem));
  color: var(--text-secondary);
  font-size: clamp(0.96rem, 1.05vw, 1.02rem);
  line-height: 1.6;
  max-width: 58ch;
}

/* ── Visual stage (5 overlapping app-mocks, opacity crossfade) ── */
.read-w1-look__stage {
  position: relative;
  display: grid;
  border-radius: var(--radius-xl);
  background: var(--card-background);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  min-height: clamp(360px, 58vh, 540px);
  overflow: hidden;
}

@media (min-width: 960px) {
  .read-w1-look__stage {
    position: sticky;
    top: 96px;
    align-self: start;
  }
}

.read-w1-look__visual {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.read-w1-look__visual.is-active {
  opacity: 1;
  pointer-events: auto;
}

.read-w1-look__visual .app-mock {
  width: 100%;
  max-width: 560px;
  margin: 0;
}

@media (max-width: 720px) {
  .read-w1-look__stage {
    min-height: 280px;
    padding: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .read-w1-look__pill,
  .read-w1-look__pill-body,
  .read-w1-look__pill-marker,
  .read-w1-look__pill-marker::before,
  .read-w1-look__pill-marker::after,
  .read-w1-look__visual {
    transition: none;
  }
}

/* ── Workflow 1 mock animations (looping demos in visual stage) ── */
.read-w1-mock__snap-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.65rem;
  padding-top: 0.35rem;
}

.read-w1-mock__snap-btn {
  background: var(--primary-color);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: default;
}

.read-w1-mock__snap-wrap,
.read-w1-mock__result {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.read-w1-mock__result {
  margin-top: 0.65rem;
}

.read-w1-mock__result .read-mock__digest-title {
  margin-top: 0;
}

[data-w1-portfolio-action].is-anim-hidden,
[data-w1-stock-action].is-anim-hidden {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

[data-w1-portfolio-result].is-anim-revealed,
[data-w1-stock-result].is-anim-revealed {
  margin-top: 0.65rem;
}

[data-w1-portfolio-result].is-anim-hidden,
[data-w1-stock-result].is-anim-hidden {
  margin-top: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

.read-w1-look__visual [data-w1-summary-row] .features-feed__detail-lines {
  padding-top: 0.35rem;
}

.app-mock__row.is-w1-row-active {
  background: var(--card-hover);
  border-radius: var(--radius-sm, 6px);
  outline: 1px solid color-mix(in srgb, var(--primary-color) 28%, var(--card-border));
}

@media (prefers-reduced-motion: reduce) {
  .read-w1-mock__snap-wrap,
  .read-w1-mock__result,
  .app-mock__row.is-w1-row-active {
    transition: none;
  }

  [data-w1-portfolio-action],
  [data-w1-stock-action] {
    display: none;
  }

  [data-w1-portfolio-result].is-anim-hidden,
  [data-w1-stock-result].is-anim-hidden {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
}

/* ── FAQ ── */
.faq-list {
  display: grid;
  gap: 2.5rem;
}

.faq-category {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.faq-category-title {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 600;
}

.faq-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card-background);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
  /* Opt into auto-height interpolation in supporting browsers so the
     accordion opens / closes smoothly. Browsers without
     `interpolate-size` (Safari/Firefox today) simply snap as before. */
  interpolate-size: allow-keywords;
}

.faq-item[open] {
  border-color: color-mix(in srgb, var(--primary-color) 30%, var(--card-border));
  background: color-mix(in srgb, var(--primary-color) 4%, var(--card-background));
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8494' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after { transform: rotate(180deg); }

.faq-item p {
  margin: 0;
  padding: 0 1.3rem 1.2rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.65;
}

.faq-item p a { color: var(--primary-color); }
.faq-item p a:hover { text-decoration: underline; }

/* ── Smooth accordion (grid-template-rows trick, JS injects wrappers) ── */
/* faq.js wraps each <details>'s content in .faq-item__panel > .faq-item__panel-inner.
   We animate the panel from grid-template-rows: 0fr to 1fr; the inner div
   is overflow:hidden so the natural content height is interpolated. */
.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item[open] .faq-item__panel {
  grid-template-rows: 1fr;
}

.faq-item__panel-inner {
  overflow: hidden;
  min-height: 0;
}

/* The wrapped <p> keeps its existing padding for visual continuity. */

/* ── Sticky category chip rail (>=1024px) ── */
.faq-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

.faq-rail {
  display: none;
}

@media (min-width: 1024px) {
  .faq-shell {
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  .faq-rail {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
  }
}

.faq-rail__title {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.faq-rail__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.faq-rail__list a {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.faq-rail__list a:hover {
  background: var(--card-hover);
  color: var(--text-primary);
}

.faq-rail__list a.is-active {
  background: var(--primary-muted);
  color: var(--primary-color);
  border-color: color-mix(in srgb, var(--primary-color) 28%, transparent);
  font-weight: 600;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.contact-card {
  text-align: center;
  align-items: center;
  /* Tilt support — JS sets these custom props on pointermove. Defaults to
     0 so the static / coarse-pointer path snaps flat. */
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  will-change: transform;
}

/* While a tilt session is active the transition is fast (so the card
   feels stuck to the cursor). On leave we fall back to the slow restore. */
.contact-card.is-tilting {
  transition: transform 0.05s linear, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

@media (hover: none) {
  /* Coarse-pointer / touch devices: never tilt. */
  .contact-card { transform: none; transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease; }
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--primary-muted);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  transform: translateZ(20px);
  /* Subtle entry bob — only fires once after the .is-revealed class lands
     (set by the cinematic engine), and only if reduced motion is off. */
}

@media (prefers-reduced-motion: no-preference) {
  .contact-card.is-revealed .contact-icon {
    animation: contact-icon-bob 1.6s ease-in-out 0.2s 1;
  }
}

@keyframes contact-icon-bob {
  0%   { transform: translateY(6px) translateZ(20px); }
  35%  { transform: translateY(-4px) translateZ(20px); }
  60%  { transform: translateY(2px) translateZ(20px); }
  100% { transform: translateY(0) translateZ(20px); }
}

.contact-icon svg { width: 26px; height: 26px; }

.contact-card__email {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

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

.contact-card__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-info-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.55;
}

.contact-info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary-color);
}

.contact-info-list a { color: var(--primary-color); }
.contact-info-list a:hover { text-decoration: underline; }

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

/* ── Privacy (legal) ── */
.legal-content {
  max-width: 76ch;
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  background: var(--card-background);
  color: var(--text-secondary);
  line-height: 1.75;
  box-shadow: var(--shadow-sm);
}

.legal-content h2 {
  margin: 2.4rem 0 0.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--card-border);
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.legal-content > h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Sticky chapter heads: each H2 inside .legal-content--sticky-heads pins
   to the top of the viewport while its siblings scroll past. The next
   H2 pushes the previous one off, giving a clean chapter-by-chapter
   reading rhythm without any JS. */
.legal-content--sticky-heads h2 {
  position: sticky;
  top: 80px;
  z-index: 2;
  background: linear-gradient(180deg, var(--card-background) 84%, color-mix(in srgb, var(--card-background) 0%, transparent) 100%);
  margin-left: calc(-1 * clamp(1.6rem, 4vw, 2.5rem));
  margin-right: calc(-1 * clamp(1.6rem, 4vw, 2.5rem));
  padding-left: clamp(1.6rem, 4vw, 2.5rem);
  padding-right: clamp(1.6rem, 4vw, 2.5rem);
  padding-bottom: 0.6rem;
}

.legal-content p { margin: 0 0 1rem; }

.legal-content p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-content ul {
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-content ul li::marker { color: var(--primary-color); }
.legal-content ul li strong { color: var(--text-primary); font-weight: 600; }

.legal-content code {
  background: var(--card-hover);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.05rem 0.4rem;
  font-size: 0.88rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-primary);
}

.legal-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Legal sticky TOC sidebar (privacy.js auto-builds at >=1024px) ── */
.legal-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}

.legal-toc { display: none; }

@media (min-width: 1024px) {
  .legal-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }
  .legal-toc {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* Keep the TOC unobtrusive — no border, just inset spacing. */
    padding: 0.4rem 0.4rem 1rem;
  }
  /* When the TOC is present, keep the legal-content max-width but allow
     it to take up the column instead of centering. */
  .legal-shell > .legal-content { margin: 0; max-width: none; }
}

.legal-toc__title {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.legal-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.legal-toc__list a {
  display: block;
  padding: 0.4rem 0.7rem;
  border-left: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.legal-toc__list a:hover {
  color: var(--text-primary);
  background: var(--card-hover);
}

.legal-toc__list a.is-active {
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  background: var(--primary-muted);
  font-weight: 600;
}

/* =========================================================================
   HOME (cinematic) — Apple-style scroll page
   ========================================================================= */

.is-home {
  /* Body bg gets overridden by ScrollTrigger as the user scrolls between scenes. */
  background: var(--page-bg);
  overflow-x: hidden;
}

.home-main { display: block; }

/* ── 1. Hero ─────────────────────────────────────────────────────────── */
.home-hero {
  position: relative;
  min-height: 100vh;
  padding: 4rem 0 2rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--primary-color) 28%, transparent), transparent 45%),
    radial-gradient(circle at 88% 90%, color-mix(in srgb, var(--secondary-color) 22%, transparent), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.home-hero__copy { max-width: 36ch; }

.home-eyebrow {
  display: inline-flex;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--card-background) 72%, transparent);
  color: var(--accent-color);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.02em;
}

.home-hero__title {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  background: linear-gradient(180deg, var(--text-primary) 0%, color-mix(in srgb, var(--text-primary) 70%, var(--primary-color)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 0.12em;
}

.home-hero__subtitle {
  margin-top: 1.2rem;
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: 1.08rem;
  line-height: 1.6;
}

.home-hero__actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.home-hero__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Stylized laptop + dashboard SVG ── */
.home-laptop {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.45));
  transform-origin: center;
}

.home-laptop__screen-bg { fill: var(--card-background); }
.home-laptop__bezel { fill: color-mix(in srgb, var(--card-background) 75%, #000); }
.home-laptop__base { fill: color-mix(in srgb, var(--card-background) 60%, #000); }
.home-laptop__notch { fill: color-mix(in srgb, var(--card-background) 40%, #000); }
.home-laptop__grid line { stroke: var(--border-color); stroke-width: 0.4; opacity: 0.5; }

.home-laptop__chart-area {
  fill: color-mix(in srgb, var(--primary-color) 18%, transparent);
}
.home-laptop__chart-line {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-laptop__chart-line--scrub {
  stroke-dasharray: var(--chart-len, 600);
  stroke-dashoffset: var(--chart-len, 600);
}

.home-laptop__candle {
  stroke: var(--text-secondary);
  stroke-width: 0.6;
  stroke-linecap: round;
}
.home-laptop__candle--up { fill: var(--success); }
.home-laptop__candle--down { fill: var(--error); }

.home-laptop__card {
  fill: var(--card-hover);
  stroke: var(--border-color);
  stroke-width: 0.4;
}
.home-laptop__card-label { fill: var(--text-muted); font-size: 2.2px; font-family: var(--font-primary); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.home-laptop__card-value { fill: var(--text-primary); font-size: 4.4px; font-family: var(--font-primary); font-weight: 700; }
.home-laptop__card-delta--up { fill: var(--success); font-size: 2.6px; font-family: var(--font-primary); font-weight: 600; }
.home-laptop__card-delta--down { fill: var(--error); font-size: 2.6px; font-family: var(--font-primary); font-weight: 600; }

.home-laptop__donut-track { fill: none; stroke: var(--border-color); stroke-width: 5; opacity: 0.45; }
.home-laptop__donut-seg {
  fill: none;
  stroke-width: 5;
  stroke-linecap: butt;
  /* Initial dasharray is set inline by initDonutSegments(); JS scrubs it via GSAP. */
}
.home-laptop__donut-label { fill: var(--text-primary); font-size: 5px; font-family: var(--font-primary); font-weight: 700; text-anchor: middle; }
.home-laptop__donut-sub { fill: var(--text-muted); font-size: 2.4px; font-family: var(--font-primary); text-anchor: middle; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── 2. Highlights tile rail ─────────────────────────────────────────── */
.home-highlights {
  padding: 6rem 0 5rem;
  position: relative;
}

.home-highlights__head {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.home-highlights__title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
}

.home-highlights__subtitle {
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0;
}

.home-highlights__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 1.5rem;
}

.home-chip {
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--card-background) 75%, transparent);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}

.home-chip:hover {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
}

.home-chip.is-active {
  color: var(--primary-color);
  background: var(--primary-muted);
  border-color: color-mix(in srgb, var(--primary-color) 50%, var(--border-color));
}

.home-tilerail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(360px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 0.8rem;
  scrollbar-width: thin;
}

.home-tilerail::-webkit-scrollbar { height: 6px; }
.home-tilerail::-webkit-scrollbar-thumb {
  background: var(--card-hover);
  border-radius: 999px;
}

/* Cinematic mode: JS adds .is-locked so the scrub is the only driver.
   Mobile / reduced-motion bail-out never adds this class, so the
   original swipeable rail remains untouched there. */
.home-tilerail.is-locked {
  overflow: hidden;
  scroll-snap-type: none;
  scrollbar-width: none;
  padding-bottom: 0;
}
.home-tilerail.is-locked::-webkit-scrollbar { display: none; }

.home-tile {
  position: relative;
  scroll-snap-align: start;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--card-background) 92%, transparent),
    var(--card-background) 55%,
    color-mix(in srgb, var(--secondary-color) 8%, var(--card-background)) 100%);
  padding: 1.6rem 1.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 460px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.home-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
  box-shadow: var(--shadow-md);
}

.home-tile__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 600;
}

.home-tile__title {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--text-primary);
}

.home-tile__copy {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 38ch;
}

.home-tile__art {
  margin-top: auto;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 200px;
  padding-top: 1rem;
}

.home-tile__art svg { display: block; max-width: 100%; height: auto; }

/* ── 3. Marquee section shell (used by AI / Portfolio / Sector Rotation) */
.home-marquee {
  position: relative;
  padding: 6rem 0;
}

.home-marquee__head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.home-marquee__eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.home-marquee__title {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

/* ── 3a. AI section (pinned crossfade) ── */
.home-ai__pin {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  min-height: 70vh;
}

.home-ai__copy-stack,
.home-ai__art-stack {
  position: relative;
  min-height: 460px;
}

.home-ai__copy-stack > .home-ai__copy,
.home-ai__art-stack > .home-ai__art {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-ai__copy.is-active,
.home-ai__art.is-active {
  opacity: 1;
  transform: translateY(0);
}

/* Initial render (before JS): show state 0 */
.home-ai__copy-stack:not([data-active]) > .home-ai__copy[data-state="0"],
.home-ai__art-stack:not([data-active]) > .home-ai__art[data-state="0"] {
  opacity: 1;
  transform: translateY(0);
}

.home-ai__copy-num {
  font-size: 0.84rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.home-ai__copy-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.home-ai__copy-body {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 42ch;
}

.home-ai__art-frame {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background: var(--card-background);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-ai__art-frame svg { width: 100%; height: 100%; max-height: 380px; }

/* ── AI art tokens ── */
.home-ai__pdf { fill: var(--card-hover); stroke: var(--border-color); stroke-width: 0.6; }
.home-ai__pdf-line { stroke: var(--text-muted); stroke-width: 0.6; opacity: 0.6; }
.home-ai__report-card { fill: var(--card-background); stroke: var(--border-color); stroke-width: 0.8; }
.home-ai__report-line { stroke: var(--text-muted); stroke-width: 0.5; opacity: 0.7; }
.home-ai__report-accent { stroke: var(--primary-color); stroke-width: 0.7; }
.home-ai__report-tag-buy { fill: var(--success); }
.home-ai__report-tag-hold { fill: var(--warning); }
.home-ai__report-tag-watch { fill: var(--primary-color); }
.home-ai__report-text { fill: #fff; font-size: 2.4px; font-family: var(--font-primary); font-weight: 700; text-anchor: middle; letter-spacing: 0.05em; text-transform: uppercase; }
.home-ai__bar { fill: var(--primary-color); }
.home-ai__bar-shadow { fill: var(--primary-muted); }
.home-ai__axis { stroke: var(--border-color); stroke-width: 0.5; }
.home-ai__year-label { fill: var(--text-muted); font-size: 3px; font-family: var(--font-primary); text-anchor: middle; }

/* ── 3b. Portfolio section (donut + counters, pinned) ── */
.home-portfolio__pin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.home-portfolio__donut-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  width: min(100%, 520px);
  margin: 0 auto;
}

.home-portfolio__donut {
  width: 100%;
  height: 100%;
}

.home-portfolio__donut-track {
  fill: none;
  stroke: color-mix(in srgb, var(--border-color) 75%, transparent);
  stroke-width: 28;
}

.home-portfolio__donut-seg {
  fill: none;
  stroke-width: 28;
  stroke-linecap: butt;
  /* Initial dasharray is set inline by initDonutSegments(); JS scrubs it. */
}

.home-portfolio__donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.home-portfolio__donut-center-label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-portfolio__donut-center-value {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-top: 0.2rem;
}

.home-portfolio__legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.2rem;
  margin-top: 1.5rem;
}

.home-portfolio__legend-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.home-portfolio__legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.home-portfolio__copy h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.home-portfolio__copy p {
  margin-top: 1rem;
  color: var(--text-secondary);
  max-width: 42ch;
}

.home-portfolio__counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.home-counter {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--card-background) 88%, transparent);
  padding: 0.9rem 1rem;
}

.home-counter__label {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.home-counter__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ── 3c. Sector rotation (bump chart, pinned) ── */
.home-rotation__pin {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.home-rotation__bars {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
}

.home-rotation__bar {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--card-background) 75%, transparent);
  border: 1px solid var(--border-color);
  /* Smooth FLIP-style position swaps */
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.4s ease,
              border-color 0.4s ease;
}

.home-rotation__bar.is-leader {
  border-color: color-mix(in srgb, var(--primary-color) 50%, var(--border-color));
  background: color-mix(in srgb, var(--primary-color) 12%, var(--card-background));
}

.home-rotation__bar-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.94rem;
}

.home-rotation__bar-track {
  position: relative;
  height: 10px;
  background: color-mix(in srgb, var(--border-color) 60%, transparent);
  border-radius: 999px;
  overflow: hidden;
}

.home-rotation__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-rotation__bar-fill--up { background: linear-gradient(90deg, var(--success), color-mix(in srgb, var(--success) 50%, var(--primary-color))); }
.home-rotation__bar-fill--down { background: linear-gradient(90deg, var(--error), color-mix(in srgb, var(--error) 50%, var(--warning))); }

.home-rotation__bar-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: right;
  color: var(--text-primary);
}
.home-rotation__bar-pct--up { color: var(--success); }
.home-rotation__bar-pct--down { color: var(--error); }

.home-rotation__copy h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.home-rotation__copy p {
  margin-top: 1rem;
  color: var(--text-secondary);
  max-width: 42ch;
}

.home-rotation__timeframe {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.home-rotation__tf {
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--card-background) 80%, transparent);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.home-rotation__tf.is-active {
  color: var(--primary-color);
  background: var(--primary-muted);
  border-color: color-mix(in srgb, var(--primary-color) 50%, var(--border-color));
}

/* ── 4. Profiles rail ────────────────────────────────────────────────── */
.home-profiles {
  padding: 5rem 0;
}

.home-profiles__head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.home-profiles__title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
}

.home-profiles__subtitle {
  color: var(--text-secondary);
  max-width: 56ch;
  margin: 0;
}

.home-profiles__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.8rem;
  scrollbar-width: thin;
}

.home-profile {
  scroll-snap-align: start;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  background: var(--card-background);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 260px;
}

.home-profile::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 25%, transparent), transparent 70%);
  pointer-events: none;
  transform: translate(0, 0);
  transition: transform 0.6s ease;
}

.home-profile:hover::after {
  transform: translate(-15px, -15px);
}

.home-profile__tag {
  display: inline-block;
  background: var(--primary-muted);
  color: var(--primary-color);
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  width: fit-content;
}

.home-profile__title {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.home-profile__copy {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── 5. CTA finale ───────────────────────────────────────────────────── */
.home-cta {
  padding: 4rem 0 6rem;
}

.home-cta__panel {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--primary-color) 30%, transparent), transparent 50%),
    radial-gradient(circle at 80% 100%, color-mix(in srgb, var(--secondary-color) 30%, transparent), transparent 55%),
    linear-gradient(160deg, var(--card-background) 0%, var(--background-elevated) 100%);
  padding: clamp(2rem, 5vw, 4rem);
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  /* Used for clip-path reveal */
  clip-path: inset(0 0 0 0 round var(--radius-xl));
}

.home-cta__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 600;
}

.home-cta__badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
}

.home-cta__title {
  margin: 0.6rem 0 0.8rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.home-cta__copy {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.home-cta__actions {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Responsive: collapse cinematic two-col layouts on small screens ── */
@media (max-width: 960px) {
  .home-hero__inner,
  .home-ai__pin,
  .home-portfolio__pin,
  .home-rotation__pin {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-tilerail,
  .home-profiles__rail {
    grid-auto-columns: minmax(85%, 1fr);
  }

  .home-portfolio__counters { grid-template-columns: 1fr; }
}

/* ── Reduced motion: disable scrubs / transforms / Lenis-related niceties ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Force every motion-vocabulary primitive to its final state so the
     entire page renders correctly even if the cinematic engine never
     wires its reveals (e.g. before DOMContentLoaded on cold load). */
  [data-reveal],
  [data-reveal="scale-up"],
  [data-reveal="clip-down"] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .cta-panel { clip-path: none !important; }

  .is-pin-head { position: static; }

  .home-laptop__chart-line--scrub { stroke-dashoffset: 0; }

  .home-ai__copy-stack > .home-ai__copy,
  .home-ai__art-stack > .home-ai__art {
    position: relative;
    inset: auto;
    opacity: 1;
    transform: none;
    margin-bottom: 1.5rem;
  }
}
