/* =========================================================================
   NovaReps "Premium" theme — infrastructure-platform look
   Opt in per page with frontmatter `theme: premium` (see templates/layouts/layout.php).
   Full rationale, the token table and the override map: docs/design-system/premium-theme.md

   HOW THIS FILE WORKS (read before editing — this is the non-obvious part)
   • Loaded AFTER themes/main.css, and everything is scoped under `.theme-premium`, so pages
     without `theme: premium` are byte-for-byte unaffected. main.css stays the token authority
     for the default theme; this file only re-points tokens and re-skins components.
   • Tailwind v4 emits its utilities inside `@layer utilities`. Unlayered CSS (this file, main.css,
     custom.css) always beats layered CSS regardless of specificity or source order, so a plain
     `.theme-premium .rounded-3xl { … }` reliably overrides the Tailwind class — no !important
     needed. That is what lets us re-skin the hand-rolled-Tailwind sections without editing them.
   • Design rules: near-black ink + white + neutral grays; ONE accent (the existing NovaReps
     brown, kept for CTAs / links / highlights); 1px borders instead of shadows; radii 6–12px;
     no glows, blobs, glass or gradients; editorial grids (`.ed-grid`) instead of card soup.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Tokens — re-point the same variables main.css defines
   ------------------------------------------------------------------------- */
.theme-premium {
    /* Brand: existing NovaReps amber-brown, taken from its deeper end (amber-700/800).
       #B45309 is 5.0:1 on white, so it is safe for text links as well as CTA fills. */
    --primary: #B45309;
    --primary-hover: #92400E;
    --accent: #FAF3EC;

    /* Flatten every gold gradient token wherever it is still read */
    /* Brand gradient (headline accent text, featured badges). The button/CTA fills stay flat. */
    --gradient-hero-from: #92400E;
    --gradient-hero-via: #D97706;
    --gradient-hero-to: #E8893B;
    --glow-color-1: transparent;
    --glow-color-2: transparent;

    /* Neutral ramp (pure neutrals — no blue-tinted slate) */
    --bg-body: #ffffff;
    --bg-alternate: #fafafa;
    --bg-surface: #ffffff;
    --bg-quote: #fafafa;
    --text-main: #0a0a0a;
    --text-muted: #525252;
    --text-light: #737373;
    --border-color: #e5e5e5;

    /* !! Tailwind mirror tokens. Tailwind v4 compiles `--color-body: var(--bg-body)` etc. onto
       :root, and a custom property that references another one resolves at the element that
       declares it — i.e. at <html>, BEFORE this .theme-premium class exists. Without re-declaring
       the mirrors here, every Tailwind colour class (bg-body, text-main, text-primary, border-theme…)
       silently keeps the default theme's colours while plain `var(--primary)` rules change.
       (main.css's .theme-dark block does the same for the same reason.) Keep this list in sync
       with @theme in public/assets/css/input.css. */
    --color-primary: var(--primary);
    --color-primary-hover: var(--primary-hover);
    --color-accent: var(--accent);
    --color-gradient-from: var(--gradient-hero-from);
    --color-gradient-via: var(--gradient-hero-via);
    --color-gradient-to: var(--gradient-hero-to);
    --color-glow-1: var(--glow-color-1);
    --color-glow-2: var(--glow-color-2);
    --color-body: var(--bg-body);
    --color-alternate: var(--bg-alternate);
    --color-surface: var(--bg-surface);
    --color-main: var(--text-main);
    --color-muted: var(--text-muted);
    --color-light: var(--text-light);
    --color-theme: var(--border-color);

    /* Component tokens read by main.css / custom.css / section <style> blocks */
    --btn-radius: 6px;
    --card-radius: 10px;
    --card-padding: 1.5rem;
    --card-padding-lg: 2rem;
    --section-badge-radius: 0;
    --transition-std: all 0.15s ease;
    --transition-fast: all 0.15s ease;

    /* Semantic-layer tokens (see main.css §5h) */
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 10px;
    --r-xl: 12px;
    --bg-subtle: #f5f5f5;
    --c-success: var(--text-main);
    --c-danger: #dc2626;
    --c-danger-solid: #dc2626;
    --c-danger-soft: rgba(220, 38, 38, 0.12);
    --c-loss: var(--text-muted);
    --c-star: var(--primary);
    --c-highlight: var(--primary);
    --shadow-frame: var(--prem-shadow-frame);

    /* Premium-only tokens */
    --prem-line: #e5e5e5;
    --prem-line-strong: #d4d4d4;
    --prem-ink: #0a0a0a;
    --prem-ink-soft: #171717;
    --prem-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    --prem-radius-sm: 6px;
    --prem-radius-md: 8px;
    --prem-radius-lg: 10px;
    --prem-radius-xl: 12px;
    --prem-shadow-frame: 0 1px 2px rgba(10, 10, 10, 0.06), 0 24px 48px -28px rgba(10, 10, 10, 0.35);
}

/* -------------------------------------------------------------------------
   2. Base type
   ------------------------------------------------------------------------- */
.theme-premium {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.theme-premium main h1,
.theme-premium main h2,
.theme-premium main h3,
.theme-premium main h4 {
    letter-spacing: -0.03em;
    text-wrap: balance;
}
/* footer column titles are <h4> too — restore small-caps tracking that the rule above would squash */
.theme-premium footer h4 {
    font-family: var(--prem-mono) !important;
    font-weight: 500 !important;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--text-light);
}
.theme-premium ::selection {
    background: var(--primary);
    color: #ffffff;
}
.theme-premium a:focus-visible,
.theme-premium button:focus-visible,
.theme-premium summary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}


/* -------------------------------------------------------------------------
   3. Tailwind palette collapse — many sections hard-code colours as utilities.
      Fold every stray hue back into ink / neutral / the single brand accent.
   ------------------------------------------------------------------------- */
/* slate → neutral (product-frame chrome & muted text) */
.theme-premium .text-slate-300,
.theme-premium .text-slate-400 { color: #a3a3a3; }
.theme-premium .text-slate-500 { color: #737373; }
.theme-premium .bg-slate-950 { background-color: #0a0a0a; }
.theme-premium .bg-slate-900\/95,
.theme-premium .bg-slate-900 { background-color: #111111; }
.theme-premium .border-slate-800\/90,
.theme-premium .border-slate-800 { border-color: #262626; }



/* decorative blobs / glass */
.theme-premium [class*="blur-\["],
.theme-premium .blur-3xl,
.theme-premium .blur-2xl,
.theme-premium .hero-glow { display: none; }
.theme-premium [class*="backdrop-blur"]:not(nav) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* -------------------------------------------------------------------------
   4. Buttons — flat, 6px, no lift, no glow
   ------------------------------------------------------------------------- */
.theme-premium .btn {
    font-weight: 600;
    letter-spacing: -0.005em;
    padding: 0.8125rem 1.375rem;
    font-size: 0.9375rem;
    line-height: 1.25;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.theme-premium .btn-sm { padding: 0.5rem 0.875rem; font-size: 0.8125rem; }
.theme-premium .btn-lg { padding: 0.9375rem 1.625rem; font-size: 1rem; }

.theme-premium .btn-primary,
.theme-premium .btn-solid {
    background: var(--primary);
    color: #ffffff;
    box-shadow: none;
    border: 1px solid var(--primary);
}
.theme-premium .btn-primary:hover,
.theme-premium .btn-solid:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: none;
    transform: none;
    color: #ffffff;
}
.theme-premium .btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--prem-line-strong);
    box-shadow: none;
}
.theme-premium .btn-outline:hover {
    background: transparent;
    border-color: var(--text-main);
    color: var(--text-main);
}
.theme-premium .btn-ghost {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.theme-premium .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Segmented "active" tabs (platform showcase, pricing scale, product tour) → ink fill */
.theme-premium .showcase-tab-btn.is-active,
.theme-premium .cost-scale-btn.is-active,
.theme-premium .tour-pill-btn.is-active {
    background: var(--prem-ink) !important;
    color: #ffffff !important;
    border-color: var(--prem-ink) !important;
    box-shadow: none !important;
}
.theme-premium .showcase-tab-btn.is-active svg { color: #ffffff !important; }
.theme-premium .showcase-tab-btn svg { color: var(--text-light); }
.theme-premium .tour-pill-btn { font-weight: 600; background: transparent; }
.theme-premium .tour-pill-btn:hover { border-color: var(--text-main); background: transparent; }
.theme-premium .tour-pill-btn svg { color: currentColor; }
.theme-premium .tour-action-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--prem-line-strong);
    font-weight: 600;
}
.theme-premium .tour-action-btn:hover {
    background: var(--prem-ink);
    border-color: var(--prem-ink);
    color: #ffffff;
    box-shadow: none;
}
.theme-premium .tour-seg-fill { background: var(--primary); }
.theme-premium .tour-seg-track { height: 2px; border-radius: 0; }

/* -------------------------------------------------------------------------
   5. Section structure — editorial: left-aligned, mono eyebrow, quiet heading
   ------------------------------------------------------------------------- */
.theme-premium .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    color: var(--text-light);
    font-family: var(--prem-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
/* the one brand tick that ties every section together */
.theme-premium .section-badge::before {
    content: "";
    width: 1.25rem;
    height: 1px;
    background: var(--primary);
    flex-shrink: 0;
}
.theme-premium .section-badge-dot { display: none; }
.theme-premium .section-badge-dark { color: #a3a3a3; background: transparent; border: 0; }

.theme-premium .section-heading {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.08;
    color: var(--text-main);
    margin-bottom: 1rem;
    max-width: 46rem;
}
@media (min-width: 768px) { .theme-premium .section-heading { font-size: 2.5rem; } }
@media (min-width: 1024px) { .theme-premium .section-heading { font-size: 2.875rem; } }

.theme-premium .section-subheading {
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 38rem;
}
.theme-premium .section-subheading.centered { margin-left: 0; margin-right: 0; }

.theme-premium .section-header {
    text-align: left;
    margin-bottom: 3.5rem;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}
.theme-premium .section-header.left { text-align: left; }

/* section rhythm: hairlines, not tinted bands */
.theme-premium section { border-color: var(--prem-line); }

/* -------------------------------------------------------------------------
   6. Cards — flat 1px surfaces; `.ed-grid` turns a card grid into one editorial table
   ------------------------------------------------------------------------- */
.theme-premium .card {
    background: var(--bg-surface);
    border: 1px solid var(--prem-line);
    border-radius: var(--prem-radius-lg);
    box-shadow: none;
}
.theme-premium .card-hover:hover {
    border-color: var(--prem-line-strong);
    box-shadow: none;
    transform: none;
}
.theme-premium .card-watermark { display: none; }

.theme-premium .card-feature-icon {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: var(--text-main);
    justify-content: flex-start;
    margin-bottom: 1.5rem;
}
.theme-premium .card-hover:hover .card-feature-icon { transform: none; }
.theme-premium .card-feature-icon svg { width: 22px; height: 22px; stroke-width: 1.5; }
.theme-premium .card-feature-title {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 0.5rem;
}
.theme-premium .card-feature-body { font-size: 0.9375rem; line-height: 1.6; }

.theme-premium .card-stat { text-align: left; }
.theme-premium .card-stat-value {
    font-family: 'Epilogue', sans-serif;
    font-size: 2.75rem;
    font-weight: 600;
    letter-spacing: -0.045em;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    margin-bottom: 1rem;
}
.theme-premium .card-stat-label {
    font-family: var(--prem-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}
.theme-premium .card-stat-desc { font-size: 0.9375rem; color: var(--text-muted); }

/* Pricing plan cards — flat ink/brand, 1px borders instead of shadows */
.theme-premium { --divider-subtle: var(--prem-line); }
.theme-premium .plan-table { border-color: var(--prem-line-strong); border-radius: var(--prem-radius-sm); }
.theme-premium .plan-col { border-left-color: var(--prem-line-strong); }
@media (max-width: 767px) { .theme-premium .plan-col { border-top-color: var(--prem-line-strong); } }
/* .plan-col-featured needs no premium override — its ink border (var(--text-main)) is already
   this theme's own near-black, so the shared main.css rule just works unchanged. */
.theme-premium .pricing-switch {
    background: transparent;
    border: 1px solid var(--prem-line-strong);
    padding: 0.2rem;
}
.theme-premium .pricing-switch-btn.is-active {
    background: var(--prem-ink);
    color: #ffffff;
    box-shadow: none;
}
.theme-premium .plan-compare-table thead th {
    background: var(--bg-body);
}
.theme-premium .plan-compare-icon-yes {
    color: var(--primary);
}

/* loss / gain pair (pricing-model-comparison): neutral vs brand-outlined, no tints */
.theme-premium .card-accent-rose { background: var(--bg-surface); border-color: var(--prem-line); }
.theme-premium .card-accent-primary {
    background: var(--bg-surface);
    border-color: var(--text-main);
}

/* Editorial grid: children share 1px hairlines instead of floating as separate cards */
.theme-premium .ed-grid {
    gap: 1px;
    background: var(--prem-line);
    border: 1px solid var(--prem-line);
    border-radius: var(--prem-radius-lg);
    overflow: hidden;
}
.theme-premium .ed-grid > * {
    background: var(--bg-surface);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
}
.theme-premium .ed-grid > .card-hover:hover { transform: none; box-shadow: none; background: #fafafa; }
.theme-premium .ed-grid > * h3 { letter-spacing: -0.015em; }

/* -------------------------------------------------------------------------
   7. Hero (markup lives in content/pages/home.md — see `.hero-premium`)
   ------------------------------------------------------------------------- */
.theme-premium .hero-premium { background: var(--bg-body); }
.theme-premium .hero-premium h1 { letter-spacing: -0.045em; line-height: 1.04; }
.theme-premium .hero-check { color: var(--text-main); }

/* Animated white-label dashboard (sections/hero-brand-dashboard) — product UI is the hero:
   straighten it, drop the aura, and swap floating soft cards for hairline panels. */
.theme-premium .hl-aura { display: none; }
.theme-premium .hl-window {
    border-radius: var(--prem-radius-lg);
    box-shadow: var(--prem-shadow-frame);
}
.theme-premium .hl-bar { background: #111111; }
.theme-premium .hl-url svg { color: #a3a3a3; }
.theme-premium .hl-card {
    border-radius: var(--prem-radius-md);
    box-shadow: var(--prem-shadow-frame);
    border: 1px solid #e5e5e5;
}
.theme-premium .hl-a-mrr,
.theme-premium .hl-a-p { color: #0a0a0a; }
.theme-premium .hl-s-v em { background: #f5f5f5; color: #525252; border-radius: 4px; }
.theme-premium .hl-av { background: #f5f5f5; color: #525252; }
.theme-premium .hl-pips button { border-radius: 0; height: 3px; }
.theme-premium .hl-foot-t { color: var(--text-light); }

/* -------------------------------------------------------------------------
   8. Product frames — the real UI screenshots are the visual proof
   ------------------------------------------------------------------------- */
.theme-premium #product-tour .rounded-2xl.overflow-hidden,
.theme-premium #interactive-wizard-tour .rounded-2xl.overflow-hidden {
    border-radius: var(--prem-radius-lg);
    border: 1px solid #262626;
    box-shadow: var(--prem-shadow-frame);
}
/* the tour used to be a card wrapped around a framed screenshot — card-in-card. Flatten it. */
.theme-premium #interactive-wizard-tour {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}
.theme-premium #interactive-wizard-tour > .text-center { text-align: left; margin-left: 0; margin-right: 0; max-width: none; }
.theme-premium #interactive-wizard-tour > .text-center p { margin-left: 0; }

/* -------------------------------------------------------------------------
   9. Cost model (pricing-model-comparison): loss = neutral, gain = ink/brand
   ------------------------------------------------------------------------- */
.theme-premium .cost-bar-track {
    height: 6px;
    border-radius: 0;
    background: #f0f0f0;
    border: 0;
}
.theme-premium .cost-bar-danger,
.theme-premium .cost-bar-primary,
.theme-premium .cost-bar-success,
.theme-premium .cost-bar-muted { border-radius: 0; }
.theme-premium .cost-bar-danger { background: #a3a3a3 !important; }
.theme-premium .cost-bar-muted { background: #d4d4d4 !important; }
.theme-premium .cost-bar-primary { background: var(--primary) !important; }
.theme-premium .cost-bar-success { background: var(--prem-ink) !important; }
.theme-premium .cost-scale-btn { font-weight: 600; }

/* -------------------------------------------------------------------------
   10. Comparison table — square, hairline, brand only on our column header
   ------------------------------------------------------------------------- */
.theme-premium .comparison-shell {
    border-radius: var(--prem-radius-lg);
    box-shadow: none;
    border: 1px solid var(--prem-line);
}
.theme-premium .comparison-shell thead tr { background: #fafafa; }
.theme-premium .comparison-shell th.text-primary,
.theme-premium .comparison-shell td.bg-primary\/5,
.theme-premium .comparison-shell th.bg-primary\/5 { background-color: #fafafa; }
.theme-premium .comparison-shell th.text-primary {
    color: var(--text-main);
    box-shadow: inset 0 2px 0 var(--primary);
}
.theme-premium .comparison-shell tbody tr:hover { background: transparent; }

/* -------------------------------------------------------------------------
   11. FAQ — a hairline list, not a stack of rounded cards
   ------------------------------------------------------------------------- */
.theme-premium details.faq-item {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--prem-line);
    border-radius: 0;
    padding: 0;
}
.theme-premium details.faq-item:first-child { border-top: 1px solid var(--prem-line); }
.theme-premium details.faq-item:hover { border-color: var(--prem-line); }
.theme-premium details.faq-item > summary {
    font-weight: 500;
    font-size: 1.0625rem;
    padding: 1.375rem 0;
}
.theme-premium details.faq-item > div { padding: 0 0 1.5rem; }
.theme-premium details.faq-item > div > div { border-top: 0; padding-top: 0; max-width: 42rem; }

/* -------------------------------------------------------------------------
   12. Integrations marquee — flat outlined chips
   ------------------------------------------------------------------------- */
.theme-premium .animate-marquee-right > .group {
    background: transparent;
    border: 1px solid var(--prem-line);
    border-radius: var(--prem-radius-md);
    box-shadow: none;
    padding: 0.875rem 1.25rem;
}
.theme-premium .animate-marquee-right > .group:hover {
    background: transparent;
    border-color: var(--text-main);
    box-shadow: none;
}
.theme-premium .animate-marquee-right > .group span { color: var(--text-main); }

/* -------------------------------------------------------------------------
   13. Closing CTA band — solid ink, no glow
   ------------------------------------------------------------------------- */
.theme-premium .bg-premium-dark-section {
    background-color: var(--prem-ink) !important;
    border: 1px solid #262626 !important;
    border-radius: var(--prem-radius-xl);
}
.theme-premium .bg-premium-dark-section::before { display: none; }
.theme-premium .bg-premium-dark-section h2 { letter-spacing: -0.04em; }
.theme-premium .bg-premium-box-gradient {
    background: var(--prem-ink) !important;
    border: 1px solid #262626 !important;
}
.theme-premium .bg-premium-box-gradient::before,
.theme-premium .bg-premium-box-gradient::after { display: none; }

/* -------------------------------------------------------------------------
   14. Forms & misc
   ------------------------------------------------------------------------- */
.theme-premium .form-input { border-radius: var(--prem-radius-sm); }
.theme-premium .form-input:focus { box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.14); }
.theme-premium input[type=range]::-webkit-slider-thumb { box-shadow: none; }
.theme-premium input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 0; background: #e5e5e5; }
.theme-premium code { font-family: var(--prem-mono); font-size: 0.875em; }

/* industry-features grid: bare icon instead of a tinted bubble (hook class `feature-icon`) */
.theme-premium .feature-icon {
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    justify-content: flex-start;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}
.theme-premium .group:hover .feature-icon { transform: none; color: var(--text-main); }
.theme-premium .pillar-kicker {
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-family: var(--prem-mono);
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-light);
}
.theme-premium .group:hover .pillar-kicker { background: transparent; color: var(--text-light); }
.theme-premium .pillar-kicker > span { display: none; }

/* -------------------------------------------------------------------------
   15. Alignment system — everything hangs off ONE left edge (72rem / max-w-6xl)
   ------------------------------------------------------------------------- */
/* Sections mix max-w-5xl/6xl containers. Centered they looked intentional; left-aligned the
   different left edges read as a bug, so collapse the 5xl and FAQ 4xl widths to 6xl. */
.theme-premium .max-w-5xl { max-width: 72rem; }
.theme-premium section.max-w-4xl { max-width: 75rem; } /* 72rem content + 1.5rem gutters */
.theme-premium .max-w-lg.mx-auto,
.theme-premium .max-w-3xl.mx-auto { margin-left: 0; margin-right: 0; }
.theme-premium .max-w-lg.mx-auto .text-center { text-align: left; }
/* tab rows / CTA rows that were centered under a centered header */
.theme-premium #showcase-tabs,
.theme-premium #tour-tabs-container { justify-content: flex-start; }
.theme-premium .cta-block { text-align: left; }
.theme-premium .cta-block .justify-center { justify-content: flex-start; }
.theme-premium .cta-block .mx-auto { margin-left: 0; margin-right: 0; }
.theme-premium .tour-seg-container { margin-left: 0; padding-left: 0; }

/* Small uppercase status pills (cost model, step meta): tags, not capsules */
.theme-premium .border-primary\/25,
.theme-premium .border-primary\/20 { border-color: var(--prem-line-strong); }

/* Icon tiles & step numerals inside editorial grids: drop the tinted brand squares */
.theme-premium .ed-grid .bg-primary\/10 {
    background: transparent;
    color: var(--text-main);
    width: auto;
    height: auto;
    justify-content: flex-start;
}
.theme-premium .ed-grid .bg-primary\/10.font-black {
    font-family: var(--prem-mono);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    border: 1px solid var(--prem-line-strong);
    border-radius: var(--prem-radius-sm);
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
}
.theme-premium .ed-grid .bg-primary.text-white {
    font-family: var(--prem-mono);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    border-radius: var(--prem-radius-sm);
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
}
.theme-premium .tour-chips { text-align: left; filter: grayscale(1); }
.theme-premium .tour-chips > * { border: 0; border-radius: 0; background: var(--bg-surface); }

/* =========================================================================
   16. Round 2 — rhythm, dark anchors, and the leftover "template" tells
   ========================================================================= */

/* ---- 16a. Dark anchor sections -----------------------------------------
   Light page, dark where the product / the close lives (Vercel/Stripe rhythm). Add class
   `prem-dark` to a <section>. The footer joins the closing CTA as one dark block.
   Tokens AND the Tailwind --color-* mirrors are re-declared (see §1 note) so every
   text-main / text-muted / bg-surface / border-theme utility inside flips automatically. */
.theme-premium .prem-dark,
.theme-premium footer,
.theme-premium nav.fixed[data-tone="dark"] {
    --bg-body: #0a0a0a;
    --bg-alternate: #0a0a0a;
    --bg-surface: #111111;
    --text-main: #fafafa;
    --text-muted: #a3a3a3;
    --text-light: #737373;
    --border-color: #262626;
    --prem-line: #262626;
    --prem-line-strong: #3f3f46;
    --prem-hover: #141414;
    --color-body: var(--bg-body);
    --color-alternate: var(--bg-alternate);
    --color-surface: var(--bg-surface);
    --color-main: var(--text-main);
    --color-muted: var(--text-muted);
    --color-light: var(--text-light);
    --color-theme: var(--border-color);
    --prem-brand-text: #E8893B; /* brand lightened for text on near-black (#B45309 is only ~4:1 there) */
    --bg-subtle: rgba(255, 255, 255, 0.06);
    /* tokens that alias other tokens must be re-declared per tone (same resolve-at-declaration trap as the --color-* mirrors) */
    --c-success: var(--text-main);
    --c-loss: var(--text-muted);
    --c-danger: #f87171;
    --c-danger-soft: rgba(248, 113, 113, 0.16);
    --c-highlight: #E8893B;
    --gradient-hero-from: #C2570C;
    --gradient-hero-via: #F0A04B;
    --gradient-hero-to: #F7B267;
    --color-gradient-from: var(--gradient-hero-from);
    --color-gradient-via: var(--gradient-hero-via);
    --color-gradient-to: var(--gradient-hero-to);
}
.theme-premium .prem-dark,
.theme-premium footer {
    background-color: #0a0a0a;
    color: #a3a3a3;
    border-color: #262626;
}
.theme-premium { --prem-hover: #fafafa; --prem-brand-text: #B45309; }
.theme-premium .prem-dark .text-primary,
.theme-premium .prem-dark a.text-primary { color: var(--prem-brand-text); }

/* dark-context component tweaks */
.theme-premium .prem-dark .btn-outline { color: var(--text-main); border-color: var(--prem-line-strong); }
.theme-premium .prem-dark .btn-outline:hover { border-color: #fafafa; }
.theme-premium .prem-dark .btn-primary { color: #ffffff; }
.theme-premium .prem-dark .showcase-tab-btn.is-active,
.theme-premium .prem-dark .tour-pill-btn.is-active {
    background: #fafafa !important;
    color: #0a0a0a !important;
    border-color: #fafafa !important;
}
.theme-premium .prem-dark .showcase-tab-btn.is-active svg { color: #0a0a0a !important; }
.theme-premium .prem-dark .showcase-tab-btn svg { color: var(--text-light); }
.theme-premium .prem-dark #product-tour-frame,
.theme-premium #product-tour .rounded-2xl.overflow-hidden {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}
.theme-premium .prem-dark .ed-grid > .card-hover:hover,
.theme-premium .ed-grid > *:hover { background: var(--prem-hover); }
.theme-premium .prem-dark .ed-grid > * { background: var(--bg-surface); }

/* footer: one continuous dark close with the CTA band (footer has its own border-t) */
.theme-premium footer a { color: var(--text-muted); }
.theme-premium footer a:hover { color: var(--text-main); }
.theme-premium footer .border-theme { border-color: #262626; }

/* ---- 16b. Closing CTA: full-bleed band, editorial split, no card ---------- */
.theme-premium .cta-band {
    text-align: left;
    padding-top: 6rem;
    padding-bottom: 6rem;
    border-top: 1px solid #262626;
}
.theme-premium .cta-band .bg-premium-dark-section {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    padding: 0;
    max-width: 72rem;
    box-shadow: none;
}
.theme-premium .cta-inner { display: grid; gap: 1.75rem; }
.theme-premium .cta-h {
    font-size: 2.25rem;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin: 0;
    text-align: left;
    color: #fafafa;
}
.theme-premium .cta-p {
    margin: 0;
    max-width: 30rem;
    text-align: left;
    color: #a3a3a3;
    font-weight: 400;
    font-size: 1.0625rem;
}
.theme-premium .cta-actions {
    margin: 0;
    max-width: none;
    justify-content: flex-start;
    align-items: stretch;
}
@media (min-width: 640px) {
    .theme-premium .cta-actions { align-items: center; }
}
@media (min-width: 1024px) {
    .theme-premium .cta-inner {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
        column-gap: 4rem;
        row-gap: 1.75rem;
        align-items: start;
    }
    .theme-premium .cta-h { grid-row: 1 / span 2; font-size: 3rem; }
    .theme-premium .cta-p { grid-column: 2; align-self: end; }
    .theme-premium .cta-actions { grid-column: 2; }
}

/* ---- 16c. Hero refinements ------------------------------------------------- */
.theme-premium .hero-premium .section-badge { color: var(--primary); font-weight: 600; }
.theme-premium .hl-card { box-shadow: 0 1px 2px rgba(10, 10, 10, 0.06), 0 12px 24px -12px rgba(10, 10, 10, 0.28); }

/* ---- 16d. Editorial section header: big heading left, small summary right (≥1024px) ----
   Ratio + sizes chosen so the summary reads as a caption to the heading, not a competing paragraph:
   heading 2.75rem / summary 1rem in a ~24rem column, both bottom-aligned. */
@media (min-width: 1024px) {
    .theme-premium .section-header:has(> .section-subheading) {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        column-gap: 5rem;
        align-items: end;
    }
    .theme-premium .section-header:has(> .section-subheading) > .section-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }
    .theme-premium .section-header:has(> .section-subheading) > .section-heading {
        grid-column: 1;
        margin-bottom: 0;
        max-width: none;
        font-size: 2.75rem;
        line-height: 1.06;
    }
    .theme-premium .section-header:has(> .section-subheading) > .section-subheading {
        grid-column: 2;
        margin: 0 0 0.35rem;
        max-width: 24rem;
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* ---- 16e. Hover: no transforms on cells (they'd break the hairlines) —
        background tint + icon takes the accent. ---------------------------------- */
.theme-premium .feature-icon,
.theme-premium .card-feature-icon,
.theme-premium .pillar-icon { transition: color 0.15s ease; }
.theme-premium .ed-grid > *:hover .feature-icon,
.theme-premium .ed-grid > *:hover .card-feature-icon,
.theme-premium .ed-grid > *:hover .pillar-icon,
.theme-premium .group:hover .feature-icon { color: var(--primary); }
.theme-premium .ed-grid > * { transition: background-color 0.15s ease; }

/* ---- 16f. Pillars: bare icon (no box-in-box) ------------------------------------ */
.theme-premium .pillar-icon {
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    border-radius: 0;
    color: var(--text-main);
}
.theme-premium .group:hover .pillar-icon { background: transparent; border-color: transparent; color: var(--primary); }
.theme-premium .ed-grid > .group ul { border-top-color: var(--prem-line); }

/* ---- 16g. FAQ: equal rows — kill the margin the list's space-y adds between hairlines ---- */
.theme-premium details.faq-item { margin: 0; }
.theme-premium details.faq-item > summary { min-height: 4.25rem; padding-top: 0; padding-bottom: 0; }
.theme-premium details.faq-item[open] > summary { min-height: 4.25rem; }
.theme-premium details.faq-item > summary:hover { color: var(--text-main); }
.theme-premium details.faq-item > summary svg { stroke-width: 2; color: var(--text-light); }

/* ---- 16h. Emoji glyphs are multi-colour decoration — drop them ---------------------- */
.theme-premium .emoji { display: none; }

/* ---- 16i. Cost architecture: one editorial two-column comparison, not two floating cards ---- */
.theme-premium .cost-compare { gap: 1px; align-items: stretch; }
.theme-premium .cost-compare > .card { padding: 2rem; }
.theme-premium .cost-compare > .cost-gain { box-shadow: inset 0 2px 0 var(--primary); background: #fafafa; }
.theme-premium .cost-figure {
    border: 0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 2rem;
}
.theme-premium .cost-figure .font-mono {
    font-family: 'Epilogue', sans-serif;
    font-weight: 600;
    font-size: 2.75rem;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
}
.theme-premium .cost-compare > .card:first-child .cost-figure .font-mono { color: var(--text-light); }
.theme-premium .cost-compare .font-mono { font-variant-numeric: tabular-nums; }
.theme-premium .cost-compare .text-primary { color: var(--text-main); }
.theme-premium .cost-compare .cost-delta,
.theme-premium .cost-compare .cost-delta * { color: var(--primary); }
.theme-premium .cost-compare .tag.uppercase {
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 0;
    font-family: var(--prem-mono);
    font-weight: 500;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    color: var(--text-light);
}
.theme-premium .cost-compare .text-\[11px\].uppercase { font-family: var(--prem-mono); font-weight: 500; letter-spacing: 0.1em; }
.theme-premium .cost-compare h3 { font-size: 1.25rem; }
.theme-premium .cost-compare .cost-bar-track { height: 4px; }
.theme-premium #cost-scale-selector {
    border-radius: var(--prem-radius-md);
    padding: 4px;
    gap: 4px;
    background: transparent;
}
.theme-premium #cost-scale-selector .cost-scale-btn { border-radius: var(--prem-radius-sm); }
.theme-premium .cost-scale-btn.is-active span { color: #ffffff !important; }

/* ---- 16j. One left edge: header + footer containers (max-w-7xl + px-6) → 72rem content ---- */
.theme-premium nav.fixed > div,
.theme-premium footer > .max-w-7xl { max-width: 75rem; }

/* CTA band: buttons must never clip in the half-width column */
.theme-premium .cta-band .bg-premium-dark-section { overflow: visible; }
.theme-premium .cta-actions { flex-wrap: wrap; }

/* status pills on dark product chrome: outline, not light fill */

.theme-premium .hero-premium .gap-x-5 { column-gap: 1rem; }

.theme-premium .cta-band { padding-left: 1.5rem; padding-right: 1.5rem; }

/* =========================================================================
   17. Round 3 — dark hero, tone-aware glass header, whitespace, tour header
   ========================================================================= */

/* ---- 17a. Header: transparent over a dark hero → frosted glass that follows the section beneath.
   State comes from data-top / data-tone (initial from `header_tone` frontmatter, kept current by
   templates/layouts/premium-header.php). No data attrs (no JS) = the solid white bar from main.css. ---- */
.theme-premium nav.fixed {
    transition: background-color 0.25s ease, border-color 0.25s ease;
}
.theme-premium nav.fixed[data-tone="light"][data-top="0"] {
    background-color: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    backdrop-filter: saturate(1.6) blur(16px);
    border-bottom-color: rgba(10, 10, 10, 0.08);
}
.theme-premium nav.fixed[data-tone="dark"] {
    background-color: rgba(10, 10, 10, 0.6);
    -webkit-backdrop-filter: saturate(1.4) blur(16px);
    backdrop-filter: saturate(1.4) blur(16px);
    border-bottom-color: rgba(255, 255, 255, 0.09);
}
.theme-premium nav.fixed[data-tone="dark"][data-top="1"] {
    background-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom-color: transparent;
}
.theme-premium nav.fixed[data-tone="dark"] .nav-dropdown-btn:hover,
.theme-premium nav.fixed[data-tone="dark"] .nav-dropdown:hover .nav-dropdown-btn,
.theme-premium nav.fixed[data-tone="dark"] .nav-top-link:hover { background-color: rgba(255, 255, 255, 0.08); }
/* mega-menu cards: hairline panel, small radius, no bubble icons (they are token-driven, so they flip with tone) */
.theme-premium .nav-dropdown-card {
    border-radius: var(--prem-radius-lg);
    box-shadow: 0 24px 48px -24px rgba(10, 10, 10, 0.35);
    padding: 0.5rem;
}
.theme-premium nav.fixed[data-tone="dark"] .nav-dropdown-card { background-color: #111111; border-color: #262626; }
.theme-premium .nav-sub-link { border-radius: var(--prem-radius-md); }
.theme-premium .nav-sub-icon { border-radius: var(--prem-radius-sm); }

/* ---- 17b. Dark hero ---- */
.theme-premium .hero-premium.prem-dark { border-bottom: 1px solid #1f1f1f; }
.theme-premium .hero-premium .hl {
    --hl-bg: #0f1014;
    --hl-panel: #15161c;
    --hl-line: rgba(255, 255, 255, 0.08);
}
.theme-premium .hero-premium .hl-window {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.theme-premium .hero-premium .hl-bar { background: #15161c; }
.theme-premium .hero-premium .hl-pips button { background: rgba(255, 255, 255, 0.22); }
.theme-premium .hero-premium .hl-pips button.is-on { background: var(--primary); }
.theme-premium .hero-premium .hl-foot-t { color: #737373; }
.theme-premium .hero-premium .section-badge { color: var(--prem-brand-text); }
.theme-premium .hero-premium.prem-dark .btn-primary:hover { background: var(--primary-hover); }

/* ---- 17c. Whitespace: generous, scaled section rhythm (was py-20/24 ≈ 80–96px) ---- */
.theme-premium main section:not(.hero-premium):not(.cta-band) {
    padding-top: clamp(5rem, 9vw, 8.25rem);
    padding-bottom: clamp(5rem, 9vw, 8.25rem);
}
.theme-premium .hero-premium { padding-bottom: clamp(5rem, 8vw, 7.5rem); }
.theme-premium .cta-band { padding-top: clamp(5rem, 9vw, 8rem); padding-bottom: clamp(5rem, 9vw, 8rem); }
.theme-premium .section-header { margin-bottom: clamp(2.75rem, 5vw, 4.5rem); }
.theme-premium .ed-grid > * { padding: 1.75rem 1.5rem; }
@media (min-width: 768px) { .theme-premium .ed-grid > * { padding: 2.25rem 2rem; } }
.theme-premium .ed-grid.tour-chips > * { padding: 1.125rem 1.25rem; }
.theme-premium .cost-compare > .card { padding: 2.25rem; }
.theme-premium footer > .max-w-7xl { padding-top: 5rem; padding-bottom: 5rem; }
.theme-premium .hero-premium h1 { margin-bottom: 1.75rem; }
.theme-premium .hero-premium .btn { margin-top: 0; }
/* more air between stacked blocks inside a section (tabs → frame → chips → CTA) */
.theme-premium #showcase-tabs { margin-bottom: 2.5rem; }
.theme-premium #product-tour .ed-grid { margin-top: 4rem; }
.theme-premium #how-it-works .ed-grid:first-of-type { margin-bottom: 0; }
.theme-premium .cta-block .flex + p,
.theme-premium .cta-block p { margin-top: 1.25rem; }

/* ---- 17d. Tour header: section-level heading + a small per-step caption ---- */
.theme-premium #interactive-wizard-tour > .tour-head { margin-bottom: 3rem; }
.theme-premium #interactive-wizard-tour > .tour-head,
.theme-premium #interactive-wizard-tour > .tour-caption { text-align: left; max-width: none; margin-left: 0; margin-right: 0; }
.theme-premium .tour-caption {
    margin-bottom: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--prem-line);
}
.theme-premium .tour-caption h3 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.02em; }
.theme-premium .tour-caption p { font-size: 0.9375rem; margin-top: 0.375rem; margin-left: 0; max-width: 40rem; }
.theme-premium .hero-premium { padding-left: 1.5rem; padding-right: 1.5rem; }

/* =========================================================================
   18. Site-wide rollout — systemic "template" tells found by scripts/… lint across all pages
   ========================================================================= */
/* pill CTAs / tags with horizontal padding → 6px; pure circles (icon buttons, avatars) untouched */
.theme-premium .ship-note { border-radius: var(--prem-radius-sm); box-shadow: none; background: transparent; border-color: var(--prem-line-strong); }
.theme-premium .ship-note .animate-ping { display: none; }
/* main.css blog / editorial components */
.theme-premium .blog-filter-tab { border-radius: var(--prem-radius-sm); box-shadow: none; }
.theme-premium .blog-filter-tab.active { background: var(--prem-ink); border-color: var(--prem-ink); box-shadow: none; }
.theme-premium .blog-featured-card,
.theme-premium .article-cta-box {
    background: var(--bg-surface);
    border: 1px solid var(--prem-line);
    border-radius: var(--prem-radius-lg);
    box-shadow: none;
}
.theme-premium .blog-featured-card:hover,
.theme-premium .article-cta-box:hover { border-color: var(--prem-line-strong); box-shadow: none; transform: none; }
.theme-premium .article-callout { background: #fafafa; border: 1px solid var(--prem-line); border-radius: var(--prem-radius-md); }
.theme-premium .article-callout-title { color: var(--text-main); }
.theme-premium .article-body-content blockquote { border-left-color: var(--text-main); border-radius: 0; box-shadow: none; background: transparent; }
.theme-premium .article-body-content ul li::before { background: var(--text-main); box-shadow: none; }
.theme-premium .article-body-content ol li::before { background: transparent; border: 1px solid var(--prem-line-strong); color: var(--text-main); }
.theme-premium .article-body-content a { border-bottom-color: rgba(180, 83, 9, 0.35); }
.theme-premium .reading-progress-bar { background: var(--primary); box-shadow: none; height: 2px; }
.theme-premium .dock-btn { box-shadow: none; }
.theme-premium .dock-btn:hover { transform: none; background: transparent; border-color: var(--text-main); color: var(--text-main); }
.theme-premium .toc-link.active { transform: none; color: var(--text-main); }


/* ---- 18c. Hero band (sections/hero.php, used by ~16 pages): full-bleed dark, no floating rounded card ---- */
.theme-premium .hero-shell { padding: 0; }
.theme-premium .hero-dark {
    border-radius: 0;
    box-shadow: none;
    background: #0a0a0a !important;
    border: 0 !important;
    border-bottom: 1px solid #1f1f1f !important;
    padding-top: clamp(7.5rem, 12vw, 9.5rem);
    padding-bottom: clamp(4.5rem, 8vw, 7rem);
}
.theme-premium .hero-dark::before { display: none; }
.theme-premium .hero-dark > .max-w-7xl { max-width: 72rem; }
.theme-premium .hero-dark h2 { letter-spacing: -0.04em; line-height: 1.04; }

/* editorial-grid cells that were centered cards (use-case tiles) → left-aligned like the rest */
.theme-premium .ed-grid > .text-center { text-align: left; }
.theme-premium .ed-grid > .text-center .mx-auto { margin-left: 0; margin-right: 0; }
.theme-premium .ed-grid > .text-center .justify-center { justify-content: flex-start; }

/* stat numerals in editorial grids stay ink (brand is reserved for actions/highlights) */
.theme-premium .ed-grid .text-primary.font-black { color: var(--text-main); font-weight: 600; letter-spacing: -0.045em; }
/* mint/emerald emphasis on dark bands → brand text colour */
/* brand-tinted washes (calculator result boxes, callouts) → neutral surface; brand stays on actions/numbers */
.theme-premium .bg-primary\/5,
.theme-premium .bg-primary\/10,
.theme-premium .bg-amber-50,
.theme-premium .bg-amber-100 { background-color: #fafafa; }
.theme-premium .border-primary\/20,
.theme-premium .border-primary\/30,
.theme-premium .border-amber-200 { border-color: var(--prem-line-strong); }

/* ---- 18d. Alignment for hand-rolled sections rolled out site-wide ----
   Narrow centred blocks (max-w-md…4xl + mx-auto) hang off the shared left edge instead of floating mid-page;
   wide (6xl/7xl) containers are never shifted, only their text alignment is normalised. */
.theme-premium main .max-w-7xl { max-width: 72rem; }
/* margin-left = half of (parent width − 72rem): puts the block on the shared left edge whether its parent is a
   full-width section, a 72rem container (→ 0) or the page wrapper. */
.theme-premium main :is(div, form, p, header, article):is(.max-w-md, .max-w-lg, .max-w-xl, .max-w-2xl, .max-w-3xl, .max-w-4xl).mx-auto {
    margin-left: max(0px, calc((100% - 72rem) / 2));
    margin-right: auto;
}
.theme-premium main div.max-w-4xl { max-width: 72rem; }
.theme-premium main .text-center[class*="max-w-"],
.theme-premium main section.text-center { text-align: left; }
.theme-premium main section.text-center {
    padding-left: max(1.5rem, calc((100% - 72rem) / 2));
    padding-right: max(1.5rem, calc((100% - 72rem) / 2));
}
.theme-premium main .text-center[class*="max-w-"] :is(p, h1, h2).mx-auto:not(.max-w-6xl) { margin-left: 0; margin-right: 0; }
/* social-proof strip was authored for a dark hero; make it token-driven so it reads on either tone */
.theme-premium .proof-check { color: var(--text-muted); }
.theme-premium .proof-check svg { color: var(--text-main); }

/* ---- 19. Round 5 fixes ---- */
/* Pricing pages lead with the plan headline — give it real weight */
.theme-premium #pricing .section-header > .section-heading { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.04; }
@media (min-width: 1024px) {
    .theme-premium #pricing .section-header:has(> .section-subheading) > .section-heading { font-size: 3.5rem; }
}


/* semantic product frame: dark screenshot window on either tone */
.theme-premium .product-frame { background: #0a0a0a; border: 1px solid #262626; border-radius: var(--r-lg); box-shadow: var(--prem-shadow-frame); }
.theme-premium .prem-dark .product-frame { border-color: rgba(255, 255, 255, 0.14); box-shadow: none; }
