/* ===== RED · WHITE · BLUE PALETTE ===== */
  :root {
    --background: 0 0% 100%;          /* white */
    --foreground: 222 47% 16%;        /* near-black with navy hint */
    --card: 0 0% 100%;
    --card-foreground: 222 47% 16%;

    --primary: 0 72% 45%;             /* deep red */
    --primary-foreground: 0 0% 100%;
    --primary-hover: 0 72% 38%;

    --accent: 222 70% 35%;            /* deep blue */
    --accent-foreground: 0 0% 100%;
    --accent-soft: 222 80% 96%;       /* very pale blue */

    --secondary: 222 30% 96%;
    --secondary-foreground: 222 47% 16%;
    --muted: 220 14% 96%;
    --muted-foreground: 222 14% 40%;
    --border: 222 20% 88%;

    --radius: 0.75rem;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    --gradient-rwb: linear-gradient(135deg, hsl(0 72% 45%), hsl(222 70% 35%));
    --shadow-soft: 0 4px 20px -4px hsl(0 72% 45% / 0.18);
    --shadow-card: 0 1px 3px hsl(222 47% 16% / 0.06), 0 8px 24px hsl(222 47% 16% / 0.05);
    --shadow-card-hover: 0 4px 12px hsl(222 47% 16% / 0.1), 0 16px 40px hsl(222 47% 16% / 0.08);
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
  }

  /* ===== FAINT STAR BACKGROUND ===== */
  /* A fixed-position layer behind everything. SVG stars sit at low opacity
     so they read as a watermark, not a decoration in the foreground. */
  .star-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
  }
  .star-bg svg {
    position: absolute;
    fill: hsl(0 72% 45% / 0.06);          /* faint red star */
    transform-origin: center;
  }
  .star-bg svg.blue {
    fill: hsl(222 70% 35% / 0.06);        /* faint blue star */
  }
  /* Subtle twinkle — very slow, very small opacity shift, so it's never distracting */
  @keyframes twinkle {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
  }
  .star-bg svg { animation: twinkle 12s ease-in-out infinite; }

  /* All actual content above the stars */
  nav, section, footer { position: relative; z-index: 1; }

  h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; margin: 0; line-height: 1.15; }
  p { margin: 0; }
  a { color: inherit; text-decoration: none; }
  img { display: block; max-width: 100%; }
  button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

  .container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

  /* ===== NAVBAR ===== */
  .navbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 50;
    background: hsl(var(--background) / 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
  }
  .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
  .brand { display: flex; align-items: center; gap: 0.625rem; }
  .brand-mark {
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--gradient-rwb);
    display: grid; place-items: center;
    color: hsl(var(--primary-foreground));
    font-family: var(--font-heading);
    font-weight: 700; font-size: 1.1rem;
    box-shadow: var(--shadow-soft);
  }
  .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
  .brand-name { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; }
  .brand-tagline { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: hsl(var(--muted-foreground)); }
  @media (max-width: 640px) { .brand-tagline { display: none; } }

  .nav-links { display: none; gap: 2rem; }
  @media (min-width: 768px) { .nav-links { display: flex; } }
  .nav-links a { font-size: 0.875rem; color: hsl(var(--muted-foreground)); transition: color 0.2s; }
  .nav-links a:hover { color: hsl(var(--primary)); }

  .nav-cta { display: flex; align-items: center; gap: 0.5rem; }
  @media (min-width: 640px) { .nav-cta { gap: 0.75rem; } }

  /* ===== BUTTONS ===== */
  .btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem;
    height: 40px; padding: 0 1rem;
    border-radius: var(--radius);
    font-weight: 500; font-size: 0.875rem;
    transition: all 0.2s ease;
    white-space: nowrap;
  }
  .btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
  .btn-primary:hover { background: hsl(var(--primary-hover)); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
  .btn-accent { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
  .btn-accent:hover { background: hsl(222 70% 28%); transform: translateY(-1px); box-shadow: 0 4px 20px -4px hsl(222 70% 35% / 0.25); }
  .btn-outline {
    background: transparent;
    border: 1px solid hsl(var(--accent));
    color: hsl(var(--accent));
  }
  .btn-outline:hover { background: hsl(var(--accent)); color: white; }
  .btn-ghost { background: transparent; color: hsl(var(--foreground)); }
  .btn-ghost:hover { background: hsl(var(--secondary)); }
  .btn-sm { height: 36px; padding: 0 0.875rem; font-size: 0.875rem; }
  .btn-lg { height: 56px; padding: 0 2rem; font-size: 1.0625rem; }

  .hide-sm { display: none; }
  @media (min-width: 640px) { .hide-sm { display: inline-flex; } }

  /* ===== HERO with SLIDESHOW ===== */
  .hero {
    position: relative;
    min-height: 90vh;
    display: flex; align-items: center;
    padding-top: 64px;
    overflow: hidden;
  }
  .hero-bg { position: absolute; inset: 0; z-index: 0; }
  .slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
    background-size: cover;
    background-position: center;
    will-change: opacity;
  }
  .slide.active { opacity: 1; }
  /* White-leaning overlay; lighter on the right so the illustration shows through */
  .hero-bg::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to right,
      hsl(0 0% 100% / 0.92),
      hsl(0 0% 100% / 0.72),
      hsl(0 0% 100% / 0.25));
  }

  .medium-tag {
    position: absolute;
    bottom: 2rem; right: 2rem;
    z-index: 2;
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.5rem 1rem;
    background: hsl(var(--background) / 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    box-shadow: var(--shadow-card);
  }
  .medium-tag .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: hsl(var(--primary));
    box-shadow: 0 0 0 4px hsl(var(--primary) / 0.18);
  }
  @media (max-width: 640px) {
    .medium-tag { bottom: 1rem; right: 1rem; padding: 0.4rem 0.75rem; font-size: 0.75rem; }
  }

  .hero-content { position: relative; z-index: 2; max-width: 640px; animation: fadeUp 0.8s ease-out both; }
  .eyebrow {
    font-size: 0.8125rem; font-weight: 600;
    color: hsl(var(--primary));
    letter-spacing: 0.15em; text-transform: uppercase;
    margin-bottom: 1rem;
  }
  .hero h1 {
    font-size: clamp(2.25rem, 5.5vw, 4.5rem);
    margin-bottom: 1.5rem;
  }
  .text-gradient {
    background: var(--gradient-rwb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .hero-sub {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: hsl(var(--muted-foreground));
    margin-bottom: 2rem;
    max-width: 32rem;
  }
  .hero-actions { display: flex; flex-direction: column; gap: 1rem; }
  @media (min-width: 640px) { .hero-actions { flex-direction: row; } }

  .slide-dots {
    position: absolute; bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex; gap: 0.5rem;
  }
  .slide-dots button {
    width: 24px; height: 4px; border-radius: 2px;
    background: hsl(var(--foreground) / 0.2);
    transition: background 0.3s;
    padding: 0;
  }
  .slide-dots button.active { background: hsl(var(--primary)); }
  @media (max-width: 640px) { .slide-dots { bottom: 4.5rem; } }

  /* ===== SECTIONS ===== */
  section.block { padding: 6rem 0; }
  .section-heading { text-align: center; max-width: 720px; margin: 0 auto 4rem; }
  .section-heading h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0.75rem 0 1rem;
  }
  .section-heading p { font-size: 1.0625rem; color: hsl(var(--muted-foreground)); }

  /* Soft alternating background: very pale blue tint */
  .bg-soft { background: hsl(var(--accent-soft)); }

  /* ===== GALLERY STRIP ===== */
  .gallery-intro { text-align: center; max-width: 620px; margin: 0 auto 3rem; }
  .gallery-intro p { color: hsl(var(--muted-foreground)); font-size: 1rem; }
  .art-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  @media (min-width: 640px) { .art-strip { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }
  @media (min-width: 1024px) { .art-strip { grid-template-columns: repeat(7, 1fr); } }

  .art-tile {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: hsl(var(--muted));
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }
  .art-tile:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-card-hover); }
  .art-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
  .art-tile:hover img { transform: scale(1.08); }
  /* Inline SVG illustration fills the tile like an image would */
  .art-tile .illustration {
    width: 100%; height: 100%;
    display: block;
    transition: transform 0.6s ease;
  }
  .art-tile:hover .illustration { transform: scale(1.06); }
  /* When the hero uses an inline SVG instead of a background-image */
  .slide .illustration {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
  }
  .art-tile-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, hsl(222 47% 10% / 0.85) 0%, hsl(222 47% 10% / 0.25) 50%, transparent 100%);
    display: flex; align-items: flex-end;
    padding: 0.875rem;
  }
  .art-tile-label {
    color: white;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 4px hsl(222 47% 10% / 0.6);
  }
  @media (max-width: 1023px) { .art-tile-label { font-size: 0.9375rem; } }

  /* ===== FEATURES GRID ===== */
  .features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
  }
  @media (min-width: 700px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

  .card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: hsl(var(--accent) / 0.3); }
  .feature-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    display: grid; place-items: center;
    margin-bottom: 1rem;
    transition: background 0.2s, color 0.2s;
  }
  /* Alternate icon color: every even card gets blue, for red-white-blue rhythm */
  .features-grid .card:nth-child(even) .feature-icon {
    background: hsl(var(--accent) / 0.1);
    color: hsl(var(--accent));
  }
  .card:hover .feature-icon { background: hsl(var(--primary) / 0.2); }
  .features-grid .card:nth-child(even):hover .feature-icon { background: hsl(var(--accent) / 0.2); }
  .feature-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
  .feature-desc { color: hsl(var(--muted-foreground)); line-height: 1.6; }

  /* ===== PRICING ===== */
  .billing-toggle { display: flex; justify-content: center; margin-bottom: 2.5rem; }
  .toggle-wrap {
    display: inline-flex;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    padding: 4px;
  }
  .toggle-wrap button {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    transition: all 0.2s;
  }
  .toggle-wrap button.active {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: 0 1px 2px hsl(222 47% 16% / 0.08);
  }
  .save-pill { color: hsl(var(--primary)); margin-left: 0.25rem; font-weight: 600; }

  .pricing-grid {
    display: grid; gap: 2rem;
    grid-template-columns: 1fr;
    max-width: 1000px; margin: 0 auto;
  }
  @media (min-width: 800px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }

  .plan {
    position: relative;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
  .plan.featured {
    box-shadow: var(--shadow-soft);
    outline: 2px solid hsl(var(--primary));
    outline-offset: -2px;
  }
  .plan-badge {
    position: absolute;
    top: -14px; left: 50%; transform: translateX(-50%);
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-size: 0.75rem; font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
  }
  .plan-name { font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: hsl(var(--muted-foreground)); }
  .plan-price { display: flex; align-items: baseline; gap: 0.25rem; margin-top: 0.5rem; }
  .plan-price .amount { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700; }
  .plan-price .period { color: hsl(var(--muted-foreground)); }
  .plan-desc { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-top: 0.5rem; margin-bottom: 1.5rem; }
  .plan-features { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
  .plan-features li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.9375rem; }
  .plan-features svg { color: hsl(var(--accent)); flex-shrink: 0; margin-top: 2px; }
  .plan .btn { width: 100%; }

  /* ===== CTA + FOOTER ===== */
  .cta-block { text-align: center; }
  .cta-block h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
  .cta-block p { color: hsl(var(--muted-foreground)); font-size: 1.0625rem; max-width: 36rem; margin: 0 auto 2rem; }

  footer.site-footer {
    border-top: 1px solid hsl(var(--border));
    padding: 2rem 0;
    background: hsl(var(--accent-soft));
  }
  .footer-inner {
    display: flex; flex-direction: column;
    align-items: center; gap: 1rem;
    text-align: center;
  }
  @media (min-width: 768px) {
    .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
  }
  .footer-brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-heading); font-weight: 600; }
  .footer-brand .brand-mark { width: 24px; height: 24px; font-size: 0.75rem; border-radius: 6px; }
  .footer-tagline { font-size: 0.875rem; color: hsl(var(--muted-foreground)); font-style: italic; }
  .footer-copy { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @media (prefers-reduced-motion: reduce) {
    .slide { transition: none; }
    .art-tile, .art-tile img { transition: none; }
    .hero-content { animation: none; }
    .star-bg svg { animation: none; }
  }

  /* ===================================================================
     CONTENT PAGE STYLES — for long-form pages (why-analytics, about, etc)
     =================================================================== */

  /* Page hero (smaller than landing hero, for inner pages) */
  .page-hero {
    position: relative;
    padding: 9rem 0 4rem;
    text-align: center;
    background: linear-gradient(180deg, hsl(var(--accent-soft)) 0%, hsl(var(--background)) 100%);
    overflow: hidden;
  }
  .page-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    margin: 0.75rem auto 1rem;
    max-width: 900px;
  }
  .page-hero p.lede {
    font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
    color: hsl(var(--muted-foreground));
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.65;
  }
  .page-hero .eyebrow { display: inline-block; }

  /* Article / long-form prose container */
  .prose {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: hsl(var(--foreground));
  }
  .prose h2 {
    font-size: clamp(1.625rem, 2.6vw, 2.125rem);
    margin: 3.5rem 0 1rem;
    color: hsl(var(--foreground));
  }
  .prose h2:first-child { margin-top: 0; }
  .prose h3 {
    font-size: 1.375rem;
    margin: 2.5rem 0 0.75rem;
    color: hsl(var(--accent));
    font-family: var(--font-heading);
  }
  .prose p { margin: 0 0 1.25rem; }
  .prose p + p { margin-top: 0; }
  .prose ul, .prose ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
  }
  .prose li { margin-bottom: 0.5rem; }
  .prose strong { color: hsl(var(--primary)); font-weight: 600; }
  .prose blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid hsl(var(--primary));
    background: hsl(var(--accent-soft));
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.125rem;
    color: hsl(var(--foreground));
    border-radius: 0 var(--radius) var(--radius) 0;
  }
  .prose blockquote p:last-child { margin-bottom: 0; }
  .prose hr {
    border: 0;
    height: 1px;
    background: hsl(var(--border));
    margin: 3rem auto;
    max-width: 200px;
  }

  /* Drop cap on first paragraph of an article */
  .prose .lead-para::first-letter {
    font-family: var(--font-heading);
    float: left;
    font-size: 4rem;
    line-height: 0.9;
    padding: 0.25rem 0.75rem 0.25rem 0;
    color: hsl(var(--primary));
    font-weight: 700;
  }

  /* Stat callout strip used in long-form articles */
  .stat-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 3rem 0;
    padding: 2rem;
    background: hsl(var(--accent-soft));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
  }
  @media (min-width: 700px) { .stat-strip { grid-template-columns: repeat(4, 1fr); } }
  .stat-strip .stat { text-align: center; }
  .stat-strip .stat-num {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: hsl(var(--primary));
    line-height: 1;
    display: block;
  }
  .stat-strip .stat-label {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
    line-height: 1.4;
    display: block;
  }

  /* Pull-quote / aside box for the article */
  .pullquote {
    margin: 2.5rem 0;
    padding: 2rem;
    background: hsl(var(--background));
    border: 2px solid hsl(var(--primary));
    border-radius: var(--radius);
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.375rem;
    line-height: 1.4;
    color: hsl(var(--foreground));
    box-shadow: var(--shadow-soft);
  }
  .pullquote::before {
    content: "\201C";
    display: block;
    font-size: 4rem;
    line-height: 0.5;
    color: hsl(var(--primary));
    margin-bottom: 0.5rem;
  }

  /* Two-column grid for "compared with / without" sections */
  .compare-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2.5rem 0;
  }
  @media (min-width: 700px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
  .compare-card {
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
  }
  .compare-card.without {
    border-color: hsl(var(--primary) / 0.3);
    background: hsl(0 72% 97%);
  }
  .compare-card.with {
    border-color: hsl(var(--accent) / 0.3);
    background: hsl(var(--accent-soft));
  }
  .compare-card h4 {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
  }
  .compare-card.without h4 { color: hsl(var(--primary)); }
  .compare-card.with h4 { color: hsl(var(--accent)); }
  .compare-card ul { margin: 0; padding-left: 1.25rem; }
  .compare-card li { margin-bottom: 0.5rem; font-size: 0.95rem; }

  /* Table of contents box (sticky on desktop) */
  .toc {
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 0 0 3rem;
  }
  .toc h4 {
    margin: 0 0 0.75rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: hsl(var(--muted-foreground));
    font-weight: 600;
  }
  .toc ol {
    margin: 0;
    padding-left: 1.25rem;
    counter-reset: toc;
    list-style: none;
  }
  .toc li {
    counter-increment: toc;
    margin-bottom: 0.5rem;
    position: relative;
  }
  .toc li::before {
    content: counter(toc, decimal-leading-zero);
    position: absolute;
    left: -1.5rem;
    font-family: var(--font-heading);
    color: hsl(var(--primary));
    font-weight: 600;
    font-size: 0.75rem;
  }
  .toc a {
    color: hsl(var(--foreground));
    border-bottom: 1px dotted hsl(var(--border));
    transition: color 0.2s, border-color 0.2s;
    font-size: 0.95rem;
  }
  .toc a:hover {
    color: hsl(var(--primary));
    border-bottom-color: hsl(var(--primary));
  }

  /* Module/feature deep-dive card (used on features.html) */
  .module-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 3rem 0;
    padding: 2.5rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
  }
  @media (min-width: 800px) {
    .module-card { grid-template-columns: 320px 1fr; align-items: start; }
    .module-card.reverse { grid-template-columns: 1fr 320px; }
    .module-card.reverse .module-visual { order: 2; }
  }
  .module-visual {
    background: hsl(var(--accent-soft));
    border-radius: calc(var(--radius) - 2px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
  }
  .module-visual svg { width: 100%; height: 100%; }
  .module-card h3 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
  }
  .module-card .module-tagline {
    color: hsl(var(--primary));
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 1rem;
  }
  .module-card p { margin-bottom: 1rem; color: hsl(var(--muted-foreground)); line-height: 1.65; }
  .module-card ul { padding-left: 1.25rem; color: hsl(var(--muted-foreground)); }
  .module-card li { margin-bottom: 0.5rem; }
  .module-card li strong { color: hsl(var(--foreground)); }

  /* CTA banner (used at end of content pages) */
  .cta-banner {
    margin: 5rem 0 0;
    padding: 4rem 2rem;
    background: var(--gradient-rwb);
    color: white;
    text-align: center;
    border-radius: var(--radius);
  }
  .cta-banner h2 {
    color: white;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 0 1rem;
  }
  .cta-banner p {
    color: hsl(0 0% 100% / 0.92);
    max-width: 540px;
    margin: 0 auto 2rem;
    font-size: 1.0625rem;
  }
  .cta-banner .btn {
    background: white;
    color: hsl(var(--primary));
  }
  .cta-banner .btn:hover {
    background: hsl(0 0% 95%);
    transform: translateY(-1px);
  }

  /* ===================================================================
     INLINE FIGURES, CHARTS, AND SCENE ILLUSTRATIONS
     Used to break up text-heavy content pages.
     =================================================================== */

  /* Full-width figure (chart or scene illustration) embedded in prose */
  figure.inline-fig {
    margin: 3rem -2rem;
    padding: 1.5rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    text-align: center;
  }
  @media (max-width: 800px) { figure.inline-fig { margin-left: 0; margin-right: 0; } }
  figure.inline-fig svg { width: 100%; height: auto; max-width: 100%; display: block; margin: 0 auto; }
  figure.inline-fig figcaption {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    font-style: italic;
    line-height: 1.5;
    padding: 0 1rem;
  }

  /* Side-by-side dual chart layout */
  figure.dual-fig {
    margin: 3rem -2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  @media (min-width: 700px) { figure.dual-fig { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 800px) { figure.dual-fig { margin-left: 0; margin-right: 0; } }
  figure.dual-fig > div {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
  }
  figure.dual-fig svg { width: 100%; height: auto; }
  figure.dual-fig h5 {
    margin: 0 0 0.75rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: hsl(var(--muted-foreground));
    font-weight: 600;
    text-align: center;
  }

  /* Hero scene at the top of content pages */
  .scene-hero {
    margin: 0 auto 2rem;
    max-width: 720px;
    aspect-ratio: 16/7;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
  }
  .scene-hero svg { width: 100%; height: 100%; display: block; }

  /* Section divider: a subtle decorative element between major sections */
  .section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4rem 0 3rem;
    gap: 1rem;
    color: hsl(var(--primary));
    opacity: 0.5;
  }
  .section-divider::before, .section-divider::after {
    content: "";
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: currentColor;
  }
  .section-divider svg { width: 24px; height: 24px; }

  /* Mini-stat card embedded inline in prose */
  .inline-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.25rem 0.625rem;
    background: hsl(var(--accent-soft));
    border-radius: 999px;
    font-family: var(--font-heading);
    color: hsl(var(--primary));
    font-weight: 700;
    font-size: 0.95em;
  }

  /* Floating side illustration in prose */
  .float-illustration {
    float: right;
    width: 220px;
    margin: 0 0 1rem 2rem;
    padding: 1rem;
    background: hsl(var(--accent-soft));
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
  }
  .float-illustration svg { width: 100%; height: auto; display: block; }
  .float-illustration figcaption {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-align: center;
    font-style: italic;
  }
  @media (max-width: 800px) {
    .float-illustration { float: none; width: auto; margin: 1.5rem 0; }
  }
