/* ==========================================================================
   AviSniper Production Stylesheet
   3-Tier Organic Elevation OKLCH Financial-Terminal System (Dark + Light)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens: Dark (Default) & Light (Warm Alabaster Paper)
   -------------------------------------------------------------------------- */

:root,
[data-theme="dark"] {
  color-scheme: dark;

  /* 3-Tier Surface Architecture (Warm Neutral Charcoal, chroma <= 0.008) */
  --bg-ground: oklch(0.168 0.006 240);
  --bg-band: oklch(0.190 0.006 240);
  --bg-surface: oklch(0.220 0.007 240);
  --bg-elevated: oklch(0.258 0.008 240);
  --bg-control: oklch(0.258 0.008 240);
  --bg-recessed: oklch(0.184 0.006 240);
  --bg-stepper: oklch(0.184 0.006 240);
  --bg-hover: oklch(0.296 0.009 240);
  --bg-row-hover: oklch(0.955 0.005 240 / 0.035);

  /* Organic Alpha Hairlines (Dark: 0.07 to 0.14 max on resting UI) */
  --border-hairline: oklch(0.955 0.005 240 / 0.07);
  --border-subtle: oklch(0.955 0.005 240 / 0.10);
  --border-control: oklch(0.955 0.005 240 / 0.13);
  --border-dashed: oklch(0.955 0.005 240 / 0.18);
  --border-hover: oklch(0.955 0.005 240 / 0.22);

  /* Text Hierarchy (WCAG AA/AAA verified against --bg-surface & --bg-elevated) */
  --text-primary: oklch(0.955 0.005 85);
  --text-secondary: oklch(0.818 0.007 240);
  --text-muted: oklch(0.712 0.008 240);

  /* Primary Action & Active Accent (Champagne Gold) */
  --cta-bg: oklch(0.885 0.072 82);
  --cta-hover: oklch(0.922 0.064 82);
  --cta-ink: oklch(0.170 0.008 240);
  --accent-text: oklch(0.885 0.072 82);
  --accent-soft: oklch(0.885 0.072 82 / 0.12);
  --accent-border: oklch(0.885 0.072 82 / 0.28);
  --focus-ring: oklch(0.922 0.064 82);

  /* Financial Semantics (Soft Tints + Low-Noise Borders) */
  --positive: oklch(0.790 0.114 162);
  --positive-soft: oklch(0.790 0.114 162 / 0.12);
  --positive-tint: oklch(0.790 0.114 162 / 0.05);
  --positive-border: oklch(0.790 0.114 162 / 0.24);
  --positive-track: oklch(0.790 0.114 162 / 0.26);

  --negative: oklch(0.758 0.122 24);
  --negative-soft: oklch(0.758 0.122 24 / 0.12);
  --negative-tint: oklch(0.758 0.122 24 / 0.045);
  --negative-border: oklch(0.758 0.122 24 / 0.24);

  --warn: oklch(0.818 0.105 75);
  --warn-soft: oklch(0.818 0.105 75 / 0.13);
  --warn-border: oklch(0.818 0.105 75 / 0.26);
  --bar-muted: oklch(0.720 0.010 240 / 0.36);
  --switch-off: oklch(0.580 0.008 240 / 0.38);

  /* Backdrop & Multi-Layer Ambient Elevation (with subtle top specular rim) */
  --header-bg: oklch(0.168 0.006 240 / 0.84);
  --shadow-xs: 0 1px 2px oklch(0.06 0.005 240 / 0.28),
               inset 0 1px 0 oklch(0.96 0.005 240 / 0.04);
  --shadow-sm: 0 2px 5px oklch(0.06 0.005 240 / 0.28),
               0 6px 16px -4px oklch(0.06 0.005 240 / 0.26),
               inset 0 1px 0 oklch(0.96 0.005 240 / 0.05);
  --shadow-md: 0 2px 6px oklch(0.06 0.005 240 / 0.32),
               0 12px 28px -8px oklch(0.06 0.005 240 / 0.38),
               inset 0 1px 0 oklch(0.96 0.005 240 / 0.05);
  --shadow-card: 0 2px 4px oklch(0.06 0.005 240 / 0.30),
                 0 12px 26px -6px oklch(0.06 0.005 240 / 0.42),
                 0 24px 48px -16px oklch(0.06 0.005 240 / 0.40),
                 inset 0 1px 0 oklch(0.96 0.005 240 / 0.06);
  --shadow-cta: 0 1px 2px oklch(0.06 0.005 240 / 0.35),
                0 8px 20px -6px oklch(0.885 0.072 82 / 0.20);
  --shadow-lift: 0 12px 28px -12px oklch(0.04 0.005 240 / 0.62);
  --shadow-sticky: 0 -8px 28px oklch(0.06 0.005 240 / 0.48);
}

[data-theme="light"] {
  color-scheme: light;

  /* 3-Tier Surface Architecture (Warm Alabaster Paper, chroma <= 0.006) */
  --bg-ground: oklch(0.976 0.004 95);
  --bg-band: oklch(0.956 0.005 95);
  --bg-surface: oklch(1.000 0.000 0);
  --bg-elevated: oklch(0.964 0.004 95);
  --bg-control: oklch(1.000 0.000 0);
  --bg-recessed: oklch(0.946 0.005 95);
  --bg-stepper: oklch(1.000 0.000 0);
  --bg-hover: oklch(0.934 0.006 95);
  --bg-row-hover: oklch(0.185 0.008 240 / 0.025);

  /* Organic Alpha Hairlines (Light: 0.06 to 0.12 max on resting UI) */
  --border-hairline: oklch(0.185 0.008 240 / 0.06);
  --border-subtle: oklch(0.185 0.008 240 / 0.085);
  --border-control: oklch(0.185 0.008 240 / 0.115);
  --border-dashed: oklch(0.185 0.008 240 / 0.17);
  --border-hover: oklch(0.185 0.008 240 / 0.19);

  /* Text Hierarchy (WCAG AA/AAA verified >= 5.0:1 muted, >= 7.5:1 secondary, >= 14:1 primary) */
  --text-primary: oklch(0.185 0.008 240);
  --text-secondary: oklch(0.385 0.010 240);
  --text-muted: oklch(0.492 0.009 240);

  /* Primary Action (Obsidian Ink) + Active Accent (Burnished Ochre) */
  --cta-bg: oklch(0.195 0.008 240);
  --cta-hover: oklch(0.268 0.010 240);
  --cta-ink: oklch(0.972 0.012 88);
  --accent-text: oklch(0.475 0.112 72);
  --accent-soft: oklch(0.860 0.075 82 / 0.22);
  --accent-border: oklch(0.610 0.098 74 / 0.30);
  --focus-ring: oklch(0.475 0.112 72);

  /* Financial Semantics (WCAG AA >= 5.2:1, soft organic tints) */
  --positive: oklch(0.435 0.105 162);
  --positive-soft: oklch(0.946 0.028 162);
  --positive-tint: oklch(0.435 0.105 162 / 0.038);
  --positive-border: oklch(0.435 0.105 162 / 0.22);
  --positive-track: oklch(0.435 0.105 162 / 0.20);

  --negative: oklch(0.490 0.165 25);
  --negative-soft: oklch(0.956 0.024 25);
  --negative-tint: oklch(0.490 0.165 25 / 0.032);
  --negative-border: oklch(0.490 0.165 25 / 0.22);

  --warn: oklch(0.480 0.115 68);
  --warn-soft: oklch(0.958 0.032 80);
  --warn-border: oklch(0.480 0.115 68 / 0.24);
  --bar-muted: oklch(0.680 0.010 240 / 0.42);
  --switch-off: oklch(0.580 0.008 240 / 0.34);

  /* Backdrop & Multi-Layer Ambient Elevation */
  --header-bg: oklch(0.976 0.004 95 / 0.86);
  --shadow-xs: 0 1px 2px oklch(0.185 0.008 240 / 0.045),
               0 0 0 1px oklch(0.185 0.008 240 / 0.03);
  --shadow-sm: 0 1px 2px oklch(0.185 0.008 240 / 0.045),
               0 4px 12px -3px oklch(0.185 0.008 240 / 0.055);
  --shadow-md: 0 1px 3px oklch(0.185 0.008 240 / 0.045),
               0 8px 24px -6px oklch(0.185 0.008 240 / 0.068);
  --shadow-card: 0 1px 2px oklch(0.185 0.008 240 / 0.04),
                 0 6px 16px -4px oklch(0.185 0.008 240 / 0.055),
                 0 20px 40px -14px oklch(0.185 0.008 240 / 0.075);
  --shadow-cta: 0 1px 2px oklch(0.185 0.008 240 / 0.16),
                0 6px 16px -4px oklch(0.185 0.008 240 / 0.20);
  --shadow-lift: 0 12px 26px -12px oklch(0.20 0.008 240 / 0.14);
  --shadow-sticky: 0 -8px 28px oklch(0.185 0.008 240 / 0.09);
}

/* No-JS OS light preference fallback (1:1 mirror of [data-theme="light"]) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg-ground: oklch(0.976 0.004 95);
    --bg-band: oklch(0.956 0.005 95);
    --bg-surface: oklch(1.000 0.000 0);
    --bg-elevated: oklch(0.964 0.004 95);
    --bg-control: oklch(1.000 0.000 0);
    --bg-recessed: oklch(0.946 0.005 95);
    --bg-stepper: oklch(1.000 0.000 0);
    --bg-hover: oklch(0.934 0.006 95);
    --bg-row-hover: oklch(0.185 0.008 240 / 0.025);

    --border-hairline: oklch(0.185 0.008 240 / 0.06);
    --border-subtle: oklch(0.185 0.008 240 / 0.085);
    --border-control: oklch(0.185 0.008 240 / 0.115);
    --border-dashed: oklch(0.185 0.008 240 / 0.17);
    --border-hover: oklch(0.185 0.008 240 / 0.19);

    --text-primary: oklch(0.185 0.008 240);
    --text-secondary: oklch(0.385 0.010 240);
    --text-muted: oklch(0.492 0.009 240);

    --cta-bg: oklch(0.195 0.008 240);
    --cta-hover: oklch(0.268 0.010 240);
    --cta-ink: oklch(0.972 0.012 88);
    --accent-text: oklch(0.475 0.112 72);
    --accent-soft: oklch(0.860 0.075 82 / 0.22);
    --accent-border: oklch(0.610 0.098 74 / 0.30);
    --focus-ring: oklch(0.475 0.112 72);

    --positive: oklch(0.435 0.105 162);
    --positive-soft: oklch(0.946 0.028 162);
    --positive-tint: oklch(0.435 0.105 162 / 0.038);
    --positive-border: oklch(0.435 0.105 162 / 0.22);
    --positive-track: oklch(0.435 0.105 162 / 0.20);

    --negative: oklch(0.490 0.165 25);
    --negative-soft: oklch(0.956 0.024 25);
    --negative-tint: oklch(0.490 0.165 25 / 0.032);
    --negative-border: oklch(0.490 0.165 25 / 0.22);

    --warn: oklch(0.480 0.115 68);
    --warn-soft: oklch(0.958 0.032 80);
    --warn-border: oklch(0.480 0.115 68 / 0.24);
    --bar-muted: oklch(0.680 0.010 240 / 0.42);
    --switch-off: oklch(0.580 0.008 240 / 0.34);

    --header-bg: oklch(0.976 0.004 95 / 0.86);
    --shadow-xs: 0 1px 2px oklch(0.185 0.008 240 / 0.045),
                 0 0 0 1px oklch(0.185 0.008 240 / 0.03);
    --shadow-sm: 0 1px 2px oklch(0.185 0.008 240 / 0.045),
                 0 4px 12px -3px oklch(0.185 0.008 240 / 0.055);
    --shadow-md: 0 1px 3px oklch(0.185 0.008 240 / 0.045),
                 0 8px 24px -6px oklch(0.185 0.008 240 / 0.068);
    --shadow-card: 0 1px 2px oklch(0.185 0.008 240 / 0.04),
                   0 6px 16px -4px oklch(0.185 0.008 240 / 0.055),
                   0 20px 40px -14px oklch(0.185 0.008 240 / 0.075);
    --shadow-cta: 0 1px 2px oklch(0.185 0.008 240 / 0.16),
                  0 6px 16px -4px oklch(0.185 0.008 240 / 0.20);
    --shadow-lift: 0 12px 26px -12px oklch(0.20 0.008 240 / 0.14);
    --shadow-sticky: 0 -8px 28px oklch(0.185 0.008 240 / 0.09);
  }
}

/* Shared Structural, Concentric Radius & Motion Tokens */
:root {
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container-max: 1200px;
  --gutter-mobile: 16px;
  --gutter-tablet: 24px;
  --gutter-desktop: 40px;

  /* Concentric Precision Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --header-h-mobile: 57px;
  --header-h-desktop: 68px;

  /* Motion Choreography Curves & Durations */
  --ease-out-fast: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);

  --dur-micro: 120ms;
  --dur-fast: 160ms;
  --dur-med: 280ms;
  --dur-slow: 460ms;
  --dur-bar: 900ms;

  --z-base: 1;
  --z-header: 40;
  --z-sticky-cta: 50;
  --z-skip: 100;
}

/* --------------------------------------------------------------------------
   2. GPU-Only Motion Keyframes (Transform & Opacity Only, Zero LCP Penalty)
   -------------------------------------------------------------------------- */

@keyframes heroTitleSettle {
  from {
    opacity: 0.25;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes cardSettle {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0) scale(0.968);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes livePulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  70% {
    transform: scale(3);
    opacity: 0;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

@keyframes copyPop {
  0% {
    transform: scale(0.94);
  }
  45% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes rowReveal {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes badgePop {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  65% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes faqOpen {
  from {
    opacity: 0;
    transform: translate3d(0, -10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* --------------------------------------------------------------------------
   3. Base Reset, Typography & Accessibility Utilities
   -------------------------------------------------------------------------- */

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h-mobile) + 16px);
  overflow-x: clip;
  background-color: var(--bg-ground);
  color: var(--text-primary);
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  background-color: var(--bg-ground);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] {
  display: none !important;
}

main:focus {
  outline: none;
}

h1,
h2,
h3,
h4,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

svg {
  display: block;
  flex-shrink: 0;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Typography utilities */
.num {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums lining-nums;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--cta-bg);
  color: var(--cta-ink);
  font-size: 0.875rem;
  font-weight: 700;
  transform: translate3d(0, -160%, 0);
  transition: transform var(--dur-fast) var(--ease-out-fast);
}

.skip-link:focus {
  transform: translate3d(0, 0, 0);
}

/* --------------------------------------------------------------------------
   4. Layout Skeleton & 3-Tier Alternating Surfaces (Zero Page-Edge Rails)
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter-mobile);
}

.section {
  position: relative;
  border-bottom: 1px solid var(--border-hairline);
  padding-block: 36px;
}

.section-hero,
.section-modes,
.section-categories,
.section-trial,
.site-footer {
  background-color: var(--bg-ground);
}

.section-compare,
.section-pulse,
.section-calculator,
.section-faq {
  background-color: var(--bg-band);
}

.section-head {
  margin-bottom: 20px;
  max-width: 48rem;
}

.section-head h2,
.pulse-left h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  text-wrap: balance;
  min-width: 0;
}

.section-lead {
  margin-top: 10px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 60ch;
  text-wrap: pretty;
}

.console-shell {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   5. Shared Buttons, Composited Elevation & Soft Badges
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform var(--dur-med) var(--ease-spring),
              background-color var(--dur-fast) var(--ease-out-fast),
              border-color var(--dur-fast) var(--ease-out-fast),
              color var(--dur-fast) var(--ease-out-fast);
}

.btn-primary {
  background-color: var(--cta-bg);
  color: var(--cta-ink);
  border-color: transparent;
  box-shadow: var(--shadow-cta);
}

.btn-secondary,
.btn-ghost {
  background-color: var(--bg-control);
  color: var(--text-primary);
  border-color: var(--border-control);
  box-shadow: var(--shadow-xs);
}

.btn-block {
  width: 100%;
}

.btn-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out-fast);
}

/* Composited Shadow Bloom Layer (Zero Direct box-shadow Transitions) */
.deal-card,
.pulse-card,
.trial-stage,
.faq-cta-card {
  position: relative;
  transition: transform var(--dur-med) var(--ease-spring),
              border-color var(--dur-fast) var(--ease-out-fast),
              background-color var(--dur-fast) var(--ease-out-fast),
              color var(--dur-fast) var(--ease-out-fast);
}

.btn-primary::after,
.btn-secondary::after,
.btn-ghost::after,
.deal-card::after,
.pulse-card::after,
.trial-stage::after,
.faq-cta-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-med) var(--ease-spring);
}

.btn-secondary::after,
.btn-ghost::after {
  box-shadow: var(--shadow-sm);
}

/* Refined Low-Noise Badges */
.score-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.queue-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.roi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.roi-badge-positive {
  background-color: var(--positive-soft);
  border-color: var(--positive-border);
  color: var(--positive);
}

/* --------------------------------------------------------------------------
   6. Sticky Header & Theme Switcher
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h-mobile);
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-hairline);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background-color: var(--accent-text);
  transform-origin: left center;
  transform: scaleX(var(--scroll-progress, 0));
  pointer-events: none;
  will-change: transform;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding-right: 4px;
  color: var(--text-primary);
}

.brand-icon {
  width: 24px;
  height: 24px;
}

.brand-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-out-fast),
              background-color var(--dur-fast) var(--ease-out-fast);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-control);
  border: 1px solid var(--border-control);
  box-shadow: var(--shadow-xs);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: transform var(--dur-fast) var(--ease-out-fast),
              background-color var(--dur-fast) var(--ease-out-fast),
              border-color var(--dur-fast) var(--ease-out-fast);
}

.theme-toggle-label {
  display: none;
}

[data-theme="dark"] .icon-sun,
[data-theme="light"] .icon-moon {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .icon-moon {
    display: none;
  }
  :root:not([data-theme]) .icon-sun {
    display: block;
  }
}

.btn-header {
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   7. Section 1: Hero & Live Deal Card (Compact Mobile Fold + Zero LCP Delay)
   -------------------------------------------------------------------------- */

.section-hero {
  padding-block: 12px 18px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.hero-title {
  font-size: clamp(1.75rem, 6.8vw, 3.375rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  text-wrap: balance;
  min-width: 0;
  animation: heroTitleSettle 600ms var(--ease-spring) 0ms both;
}

.hero-title-accent {
  color: var(--accent-text);
}

.hero-lead {
  font-size: 0.875rem;
  line-height: 1.44;
  color: var(--text-secondary);
  max-width: 54ch;
  text-wrap: pretty;
  animation: heroFadeUp 620ms var(--ease-spring) 100ms both;
}

.hero-ctas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding-top: 2px;
  animation: heroFadeUp 620ms var(--ease-spring) 190ms both;
}

.hero-ctas .btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 10px;
  font-size: 0.8125rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 8px;
  padding-top: 2px;
  animation: heroFadeUp 600ms var(--ease-spring) 270ms both;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-secondary);
  white-space: nowrap;
}

.hero-fact-icon {
  width: 13px;
  height: 13px;
  color: var(--accent-text);
  flex-shrink: 0;
}

/* Live Deal Card */
.deal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  min-width: 0;
  animation: cardSettle 740ms var(--ease-spring) 160ms both;
}

.deal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
}

.deal-bot-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bot-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.deal-bot-meta > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bot-handle-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--positive);
  flex-shrink: 0;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: var(--positive);
  pointer-events: none;
  animation: livePulse 2.2s ease-out infinite;
}

.bot-handle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-subline {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.deal-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.deal-card-head {
  padding: 9px 12px 8px;
  border-bottom: 1px solid var(--border-hairline);
}

.deal-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.deal-title {
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.1875rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  text-wrap: balance;
}

.deal-meta {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.deal-spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--border-hairline);
}

.spread-cell {
  padding: 7px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spread-cell:first-child {
  border-right: 1px solid var(--border-hairline);
}

.spread-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.spread-val {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.deal-ledger {
  padding: 5px 12px;
  border-bottom: 1px solid var(--border-hairline);
}

.deal-ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.8125rem;
}

.deal-ledger-row + .deal-ledger-row {
  border-top: 1px solid var(--border-hairline);
}

.ledger-key {
  color: var(--text-secondary);
}

.ledger-val {
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.deal-profit-box {
  padding: 9px 12px;
  background-color: var(--positive-tint);
  border-bottom: 1px solid var(--border-hairline);
}

.deal-profit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deal-profit-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profit-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.profit-val {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.deal-bargain-meta {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Bargain Script Drawer (Smooth GPU Grid Accordion + Icon Swap) */
.bargain-drawer {
  background-color: var(--bg-surface);
  border-bottom-left-radius: calc(var(--radius-lg) - 1px);
  border-bottom-right-radius: calc(var(--radius-lg) - 1px);
  overflow: hidden;
}

.bargain-toggle {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-text);
  transition: background-color var(--dur-fast) var(--ease-out-fast);
}

.chevron-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--dur-med) var(--ease-spring);
}

.bargain-toggle.is-open .chevron-icon,
.bargain-toggle[aria-expanded="true"] .chevron-icon,
.tariff-details[open] .chevron-icon {
  transform: rotate(180deg);
}

.bargain-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  border-top: 1px solid transparent;
  transition: grid-template-rows var(--dur-med) var(--ease-spring),
              opacity 200ms var(--ease-out-fast),
              border-color var(--dur-fast) var(--ease-out-fast);
}

.bargain-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  border-top-color: var(--border-hairline);
}

.bargain-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.bargain-panel-content {
  padding: 0 14px 14px;
}

.bargain-script {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-primary);
  text-wrap: pretty;
}

.bargain-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-btn {
  min-height: 44px;
  padding: 9px 14px;
  font-size: 0.8125rem;
}

.copy-icon-wrap {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.copy-icon {
  width: 16px;
  height: 16px;
}

.copy-icon-default,
.copy-icon-check {
  position: absolute;
  inset: 0;
  transition: opacity var(--dur-fast) var(--ease-out-fast),
              transform 180ms var(--ease-snap);
}

.copy-icon-check {
  opacity: 0;
  transform: scale(0.6);
}

.copy-btn.is-copied {
  background-color: var(--positive-soft);
  border-color: var(--positive-border);
  color: var(--positive);
  animation: copyPop 260ms var(--ease-spring);
}

.copy-btn.is-copied .copy-icon-default {
  opacity: 0;
  transform: scale(0.6);
}

.copy-btn.is-copied .copy-icon-check {
  opacity: 1;
  transform: scale(1);
}

.copy-btn.is-error {
  background-color: var(--negative-soft);
  border-color: var(--negative-border);
  color: var(--negative);
}

/* --------------------------------------------------------------------------
   8. Section 2: Comparison Ledger (Floating Surface + Positive Column Tint)
   -------------------------------------------------------------------------- */

.compare-ledger {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.compare-header {
  display: none;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--border-hairline);
}

.compare-row:first-of-type {
  border-top: 0;
}

.compare-topic {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px 11px;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
}

.compare-idx {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-text);
  flex-shrink: 0;
}

.compare-topic h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  text-wrap: balance;
}

.compare-cell {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-cell-old {
  border-bottom: 1px solid var(--border-hairline);
}

.compare-cell-new {
  background-color: var(--positive-tint);
}

.compare-cell p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.compare-cell-new p {
  color: var(--text-primary);
}

.compare-pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
}

.compare-pill-old {
  background-color: var(--negative-soft);
  border: 1px solid var(--negative-border);
  color: var(--negative);
}

.compare-pill-new {
  background-color: var(--positive-soft);
  border: 1px solid var(--positive-border);
  color: var(--positive);
}

/* --------------------------------------------------------------------------
   9. Section 3: 3 Buyout Modes Console (GPU Sliding Indicator + Equal Heights)
   -------------------------------------------------------------------------- */

.modes-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
}

.mode-tab {
  position: relative;
  z-index: 2;
  min-height: 46px;
  padding: 10px 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out-fast);
}

.mode-tab.is-active,
.mode-tab[aria-selected="true"] {
  color: var(--text-primary);
}

.modes-tab-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: var(--ind-h, 100%);
  z-index: 1;
  background-color: var(--bg-surface);
  box-shadow: inset 0 -2px 0 var(--accent-text), var(--shadow-xs);
  transform-origin: left top;
  transform: translate3d(var(--ind-x, 0px), var(--ind-y, 0px), 0) scaleX(var(--ind-sx, 1));
  pointer-events: none;
  will-change: transform;
}

.modes-tabs.is-indicator-ready .modes-tab-indicator {
  transition: transform 340ms var(--ease-spring);
}

/* No-JS fallback before .has-indicator is set */
.modes-tabs:not(.has-indicator) .modes-tab-indicator {
  width: calc(100% / 3);
  transform: translate3d(calc(var(--active-index, 0) * 100%), 0, 0);
}

.mode-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: stretch;
}

.mode-panel:focus {
  outline: none;
}

.mode-panel.is-entering,
.mode-panel.panel-in {
  animation: panelIn 360ms var(--ease-spring) both;
}

.mode-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  height: 100%;
}

.mode-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.mode-head h3 {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
}

.mode-audience {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-text);
}

.mode-desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.mode-rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: auto;
  align-items: stretch;
}

.mode-rule-box {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.mode-rule-allow {
  background-color: var(--positive-tint);
}

.mode-rule-block {
  background-color: var(--negative-tint);
}

.rule-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rule-list li {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
  padding-left: 12px;
  position: relative;
}

.rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.56em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--text-muted);
  opacity: 0.65;
}

.mode-example {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  height: 100%;
  min-width: 0;
}

.mode-example-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 700;
}

.mode-device {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-wrap: balance;
}

.mode-device-note {
  margin-top: 3px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.mode-ledger {
  margin-top: 12px;
  padding-block: 6px;
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
}

.mode-ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 0.8125rem;
}

.mode-ledger-row + .mode-ledger-row {
  border-top: 1px solid var(--border-hairline);
}

.mode-example-foot {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.mode-example-foot strong {
  font-size: 1.0625rem;
  font-weight: 800;
}

.mode-roi-inline {
  font-size: 0.8125rem;
  font-weight: 700;
  opacity: 0.9;
}

/* --------------------------------------------------------------------------
   10. Section 4: Evening Pulse 21:00 (GPU ScaleX Funnel Bars + Floating Card)
   -------------------------------------------------------------------------- */

.pulse-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.pulse-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pulse-funnel {
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.pulse-funnel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.pulse-bar {
  display: flex;
  gap: 3px;
  height: 10px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background-color: var(--bg-recessed);
}

.pulse-bar-price {
  background-color: var(--bar-muted);
  border-radius: var(--radius-pill);
  transform-origin: left center;
}

.pulse-bar-defect {
  background-color: var(--negative);
  border-radius: var(--radius-pill);
  transform-origin: left center;
}

.js-ready .pulse-funnel:not(.is-bars-visible):not(.is-animated) .pulse-bar-price,
.js-ready .pulse-funnel:not(.is-bars-visible):not(.is-animated) .pulse-bar-defect {
  transform: scaleX(0);
}

.js-ready .pulse-funnel.is-bars-visible .pulse-bar-price,
.js-ready .pulse-funnel.is-animated .pulse-bar-price {
  transform: scaleX(1);
  transition: transform var(--dur-bar) var(--ease-spring);
}

.js-ready .pulse-funnel.is-bars-visible .pulse-bar-defect,
.js-ready .pulse-funnel.is-animated .pulse-bar-defect {
  transform: scaleX(1);
  transition: transform 620ms var(--ease-spring) 320ms;
}

.pulse-metrics {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.pulse-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.pulse-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.pulse-card-head > :first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse-card-head > :last-child {
  white-space: nowrap;
  flex-shrink: 0;
}

.pulse-quote {
  padding: 18px 20px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-hairline);
  text-wrap: pretty;
}

.pulse-explain {
  padding: 14px 20px 18px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  border-bottom-left-radius: calc(var(--radius-lg) - 1px);
  border-bottom-right-radius: calc(var(--radius-lg) - 1px);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   11. Section 5: 12 Categories Ledger (GPU Sliding Filter Pill + Row Motion)
   -------------------------------------------------------------------------- */

.cat-filters-wrap {
  position: relative;
  margin-bottom: 16px;
}

.cat-filters-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 4px;
  width: 28px;
  background: linear-gradient(to right, transparent, var(--bg-ground));
  pointer-events: none;
}

.cat-filters {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-right: 24px;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cat-filters::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-control);
  border: 1px solid var(--border-control);
  box-shadow: var(--shadow-xs);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color var(--dur-fast) var(--ease-out-fast),
              border-color var(--dur-fast) var(--ease-out-fast),
              color var(--dur-fast) var(--ease-out-fast),
              transform var(--dur-fast) var(--ease-out-fast);
}

.filter-pill.is-active,
.filter-pill[aria-pressed="true"] {
  background-color: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-text);
  box-shadow: none;
}

/* When JS sliding pill is active, active pill reveals the gliding GPU fill */
.cat-filters.has-indicator .filter-pill.is-active,
.cat-filters.has-indicator .filter-pill[aria-pressed="true"] {
  background-color: transparent;
  border-color: var(--accent-border);
  color: var(--accent-text);
  box-shadow: none;
}

.cat-filter-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: var(--ind-h, 44px);
  z-index: 1;
  border-radius: var(--radius-pill);
  background-color: var(--accent-soft);
  transform-origin: left top;
  transform: translate3d(var(--ind-x, 0px), var(--ind-y, 0px), 0) scaleX(var(--ind-sx, 1));
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

.cat-filters.has-indicator .cat-filter-indicator {
  opacity: 1;
}

.cat-filters.is-indicator-ready .cat-filter-indicator {
  transition: transform 340ms var(--ease-spring),
              opacity var(--dur-fast) var(--ease-out-fast);
}

.filter-count {
  font-size: 0.75rem;
  opacity: 0.85;
}

.cat-ledger {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.cat-ledger-head {
  display: none;
}

.cat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "model margin margin"
    "group sample roi"
    "limit median median";
  gap: 3px 8px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--border-hairline);
  transition: background-color var(--dur-fast) var(--ease-out-fast);
}

.cat-row:first-of-type {
  border-top: 0;
}

.cat-row.is-filtered-out {
  display: none;
}

.cat-row.is-filtering-in,
.cat-row.row-reveal {
  animation: rowReveal 340ms var(--ease-spring) both;
  animation-delay: calc(var(--row-i, 0) * 45ms);
}

.cat-model {
  grid-area: model;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  min-width: 0;
}

.cat-group-label {
  grid-area: group;
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-margin {
  grid-area: margin;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.cat-roi {
  grid-area: roi;
  justify-self: end;
}

.cat-limit,
.cat-median {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.cat-limit {
  grid-area: limit;
  justify-self: start;
}

.cat-median {
  grid-area: median;
  justify-self: end;
  text-align: right;
}

.cat-sample {
  grid-area: sample;
  justify-self: end;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.cat-sample-warn {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background-color: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: var(--warn);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}

.cat-mobile-key {
  color: var(--text-muted);
}

.cat-footnote {
  margin-top: 12px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   12. Section 6: Calculator & Tariff Console (Organic Tonal Controls)
   -------------------------------------------------------------------------- */

.pnl-presets-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-hairline);
}

.pnl-presets-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.pnl-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background-color: var(--bg-recessed);
}

.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  background-color: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  text-align: center;
  transition: background-color var(--dur-fast) var(--ease-out-fast),
              border-color var(--dur-fast) var(--ease-out-fast),
              transform var(--dur-fast) var(--ease-out-fast);
}

.preset-btn.is-active,
.preset-btn[aria-pressed="true"] {
  background-color: var(--bg-control);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-xs);
}

.preset-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.preset-btn.is-active .preset-title,
.preset-btn[aria-pressed="true"] .preset-title {
  color: var(--accent-text);
}

.preset-sub {
  display: none;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Mobile live summary bar */
.pnl-mobile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-hairline);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.pnl-mobile-summary strong {
  margin-left: 4px;
  font-weight: 800;
  color: var(--text-primary);
}

.pnl-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.pnl-controls {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-bottom: 1px solid var(--border-hairline);
}

.pnl-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pnl-step-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.step-idx {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-text);
}

.pnl-step-head h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  text-wrap: balance;
}

/* Stepper + All 19 (Stacked < 370px to guarantee 44x44px buttons) */
.cat-stepper-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.cat-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-sm);
  background-color: var(--bg-stepper);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.stepper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  background-color: var(--bg-elevated);
  transition: background-color var(--dur-fast) var(--ease-out-fast),
              transform var(--dur-fast) var(--ease-out-fast);
}

.stepper-btn:first-child {
  border-right: 1px solid var(--border-hairline);
}

.stepper-btn:last-child {
  border-left: 1px solid var(--border-hairline);
}

.stepper-value {
  display: block;
  text-align: center;
  padding: 0 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.all-cats-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out-fast),
              border-color var(--dur-fast) var(--ease-out-fast),
              color var(--dur-fast) var(--ease-out-fast),
              transform var(--dur-fast) var(--ease-out-fast);
}

.all-cats-btn.is-active,
.all-cats-btn[aria-pressed="true"] {
  background-color: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-text);
  box-shadow: none;
}

/* Tier stops */
.tier-stops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tier-stop {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  transition: background-color var(--dur-fast) var(--ease-out-fast),
              border-color var(--dur-fast) var(--ease-out-fast),
              transform var(--dur-fast) var(--ease-out-fast);
}

.tier-stop.is-active,
.tier-stop[aria-pressed="true"] {
  background-color: var(--accent-soft);
  border-color: var(--accent-border);
  box-shadow: none;
}

.tier-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tier-stop.is-active .tier-name,
.tier-stop[aria-pressed="true"] .tier-name {
  color: var(--accent-text);
}

.tier-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Discount Switch */
.discount-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  text-align: left;
  transition: border-color var(--dur-fast) var(--ease-out-fast),
              background-color var(--dur-fast) var(--ease-out-fast);
}

.discount-toggle.is-active,
.discount-toggle[aria-checked="true"] {
  border-color: var(--positive-border);
  background-color: var(--positive-soft);
}

.switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: var(--radius-pill);
  background-color: var(--switch-off);
  flex-shrink: 0;
  transition: background-color var(--dur-fast) var(--ease-out-fast);
}

.discount-toggle.is-active .switch-track,
.discount-toggle[aria-checked="true"] .switch-track {
  background-color: var(--positive);
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: oklch(1 0 0);
  box-shadow: 0 1px 3px oklch(0.15 0.008 240 / 0.28);
  transform: translate3d(0, 0, 0);
  transition: transform 180ms var(--ease-snap);
}

.discount-toggle.is-active .switch-thumb,
.discount-toggle[aria-checked="true"] .switch-thumb {
  transform: translate3d(16px, 0, 0);
}

.discount-copy {
  flex: 1 1 auto;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.discount-sub {
  color: var(--text-muted);
  font-weight: 500;
}

.discount-state {
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background-color: var(--positive-soft);
  border: 1px solid var(--positive-border);
  color: var(--positive);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.discount-state.is-off {
  background-color: var(--bg-surface);
  border-color: var(--border-hairline);
  color: var(--text-muted);
}

/* Segmented Controls */
.control-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.control-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.seg-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.seg-btn {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out-fast),
              border-color var(--dur-fast) var(--ease-out-fast),
              color var(--dur-fast) var(--ease-out-fast),
              transform var(--dur-fast) var(--ease-out-fast);
}

.seg-btn.is-active,
.seg-btn[aria-pressed="true"] {
  background-color: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-text);
  box-shadow: none;
}

/* Readout Column */
.pnl-readout {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--bg-surface);
}

.readout-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
}

.readout-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.readout-price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price-old {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.price-final {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.price-period {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.economy-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background-color: var(--positive-soft);
  border: 1px solid var(--positive-border);
  color: var(--positive);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.economy-badge.is-pop {
  animation: badgePop 200ms var(--ease-spring) both;
}

.readout-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.scale-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.zero-today-line {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-elevated);
  border: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.readout-profit {
  padding: 16px;
  border-radius: var(--radius-md);
  background-color: var(--positive-tint);
  border: 1px solid var(--positive-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.readout-profit:has(.net-profit-value.val-negative) {
  background-color: var(--negative-tint);
  border-color: var(--negative-border);
}

.readout-profit-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.net-profit-value {
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.pnl-share-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background-color: var(--positive-track);
  border: 0;
  overflow: hidden;
}

.pnl-share-fill {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
  background-color: var(--accent-text);
  transform-origin: left center;
  transform: scaleX(var(--share-scale, 0.124));
  transition: transform 460ms var(--ease-spring),
              background-color var(--dur-fast) var(--ease-out-fast);
}

.pnl-share-fill.is-negative {
  background-color: var(--negative);
}

.pnl-share-caption {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.pnl-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.pnl-metrics > div {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pnl-metrics dt {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pnl-metrics dd {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-primary);
}

.readout-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

/* Collapsible Base Tariff Grid */
.tariff-details {
  margin-top: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tariff-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  transition: background-color var(--dur-fast) var(--ease-out-fast);
}

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

.tariff-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--border-hairline);
}

.tariff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.tariff-table th,
.tariff-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-hairline);
  white-space: nowrap;
}

.tariff-table th {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background-color: var(--bg-elevated);
}

.tariff-table tbody tr:last-child td {
  border-bottom: 0;
}

.tariff-table td:last-child,
.tariff-table th:last-child {
  text-align: right;
}

/* --------------------------------------------------------------------------
   13. Section 7: 4-Day Trial Rail & Section 7b: FAQ + Final CTA
   -------------------------------------------------------------------------- */

.trial-rail {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.trial-stage {
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.trial-stage-solid {
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.trial-stage-dashed {
  border: 1px dashed var(--border-dashed);
  box-shadow: var(--shadow-sm);
}

.trial-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-text);
}

.trial-stage h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  text-wrap: balance;
}

.trial-stage p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.trial-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  color: var(--accent-text);
  transform: rotate(90deg);
}

/* FAQ Layout */
.faq-layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.faq-list {
  order: 1;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.faq-item {
  border-top: 1px solid var(--border-hairline);
}

.faq-item:first-child {
  border-top: 0;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  transition: background-color var(--dur-fast) var(--ease-out-fast);
}

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

.faq-plus-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform var(--dur-med) var(--ease-spring),
              color var(--dur-fast) var(--ease-out-fast);
}

.faq-item[open] .faq-plus-icon {
  transform: rotate(45deg);
  color: var(--accent-text);
}

.faq-answer {
  padding: 0 16px 16px;
}

.faq-answer p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* Progressive Smooth Native <details> Accordions (FAQ + Tariff Table) */
.faq-item[open] .faq-answer,
.tariff-details[open] .tariff-table-wrap {
  animation: faqOpen 240ms var(--ease-spring);
}

@supports (interpolate-size: allow-keywords) {
  .faq-item,
  .tariff-details {
    interpolate-size: allow-keywords;
  }

  .faq-item::details-content,
  .tariff-details::details-content {
    block-size: 0;
    overflow: clip;
    opacity: 0;
    transition: block-size var(--dur-med) var(--ease-spring),
                opacity 200ms var(--ease-out-fast),
                content-visibility var(--dur-med) allow-discrete;
  }

  .faq-item[open]::details-content,
  .tariff-details[open]::details-content {
    block-size: auto;
    opacity: 1;
  }

  .faq-item[open] .faq-answer,
  .tariff-details[open] .tariff-table-wrap {
    animation: none;
  }
}

.faq-cta-card {
  order: 2;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-cta-card h3 {
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  text-wrap: balance;
}

.faq-cta-card > p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.faq-terms {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
}

.faq-terms li {
  position: relative;
  padding-left: 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

.faq-terms li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--positive);
}

.faq-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   14. Section 8: Footer & Mobile Sticky CTA
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border-hairline);
  padding-top: 28px;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-handle {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-out-fast);
}

.footer-disclaimer {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 78ch;
  text-wrap: pretty;
}

/* Mobile Sticky CTA Bar */
.mobile-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sticky-cta);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background-color: var(--header-bg);
  border-top: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sticky);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translate3d(0, 105%, 0);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--dur-med) var(--ease-spring),
              opacity var(--dur-med) var(--ease-out-fast);
}

.mobile-sticky-cta.is-visible {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-sticky-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-sticky-meta {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-sticky {
  min-height: 44px;
  padding: 9px 16px;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   15. Explicit Semantic Value Overrides (High Specificity Lock)
   -------------------------------------------------------------------------- */

.val-positive,
.ledger-val.val-positive,
.profit-val.val-positive,
.net-profit-value.val-positive,
.cat-margin.val-positive,
.pnl-mobile-summary strong.val-positive,
.pnl-metrics dd.val-positive {
  color: var(--positive);
}

.val-negative,
.ledger-val.val-negative,
.net-profit-value.val-negative,
.pnl-mobile-summary strong.val-negative,
.pnl-metrics dd.val-negative {
  color: var(--negative);
}

.val-accent,
.ledger-val.val-accent {
  color: var(--accent-text);
}

.val-warn {
  color: var(--warn);
}

/* --------------------------------------------------------------------------
   16. Desktop Hover Physics & Tactile Press States (Touch-Safe)
   -------------------------------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background-color: var(--cta-hover);
    border-color: transparent;
    transform: translate3d(0, -2px, 0);
  }

  .btn-secondary:hover,
  .btn-ghost:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translate3d(0, -2px, 0);
  }

  .btn-primary:hover::after,
  .btn-secondary:hover::after,
  .btn-ghost:hover::after,
  .deal-card:hover::after,
  .pulse-card:hover::after,
  .trial-stage:hover::after,
  .faq-cta-card:hover::after {
    opacity: 1;
  }

  .pulse-card:hover,
  .trial-stage:hover,
  .faq-cta-card:hover {
    transform: translate3d(0, -2px, 0);
    border-color: var(--border-hover);
  }

  .deal-card:hover {
    border-color: var(--border-hover);
  }

  .theme-toggle:hover,
  .filter-pill:not(.is-active):not([aria-pressed="true"]):hover,
  .tier-stop:not(.is-active):not([aria-pressed="true"]):hover,
  .seg-btn:not(.is-active):not([aria-pressed="true"]):hover,
  .all-cats-btn:not(.is-active):not([aria-pressed="true"]):hover,
  .stepper-btn:hover:not(:disabled) {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
  }

  .preset-btn:not(.is-active):not([aria-pressed="true"]):hover {
    background-color: var(--bg-row-hover);
  }

  .bargain-toggle:hover,
  .faq-question:hover,
  .tariff-summary:hover,
  .cat-row:hover,
  .nav-link:hover {
    background-color: var(--bg-row-hover);
  }

  .btn-text-link:hover,
  .nav-link:hover,
  .footer-links a:hover,
  .mode-tab:hover {
    color: var(--text-primary);
  }
}

/* Tactile Press Feedback (Declared AFTER @media hover so press always wins) */
.btn:active,
.theme-toggle:active,
.preset-btn:active,
.tier-stop:active,
.seg-btn:active,
.all-cats-btn:active,
.filter-pill:active {
  transform: scale(0.985);
  transition-duration: var(--dur-micro);
}

.stepper-btn:active:not(:disabled) {
  transform: scale(0.94);
  transition-duration: var(--dur-micro);
}

/* --------------------------------------------------------------------------
   17. Responsive Breakpoints (360px / 370px / 375px / 520px / 640px / 768px / 1024px)
   -------------------------------------------------------------------------- */

@media (min-width: 360px) {
  .preset-title {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .tier-stops {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .tier-stop {
    min-height: 44px;
    padding: 6px 4px;
    align-items: center;
    text-align: center;
  }

  .tier-name {
    white-space: nowrap;
  }

  .tier-unit {
    font-size: 0.6875rem;
    white-space: nowrap;
  }
}

@media (min-width: 370px) {
  .cat-stepper-group {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .stepper-value {
    padding: 0 4px;
    font-size: 0.8125rem;
  }

  .all-cats-btn {
    padding: 8px 10px;
    font-size: 0.75rem;
  }
}

@media (min-width: 375px) {
  .hero-ctas {
    grid-template-columns: minmax(0, 1.09fr) minmax(0, 0.91fr);
    gap: 8px;
  }

  .hero-ctas .btn {
    width: 100%;
    min-width: 0;
    padding: 10px 10px;
    font-size: 0.78125rem;
    min-height: 44px;
  }
}

@media (min-width: 520px) {
  .cat-stepper-group {
    gap: 8px;
  }

  .stepper-value {
    padding: 0 8px;
    font-size: 0.9375rem;
  }

  .all-cats-btn {
    padding: 8px 14px;
    font-size: 0.8125rem;
  }

  .tier-stops {
    gap: 8px;
  }

  .tier-stop {
    min-height: 48px;
    padding: 7px 10px;
    align-items: flex-start;
    text-align: left;
  }

  .tier-unit {
    font-size: 0.75rem;
  }
}

@media (min-width: 640px) {
  .mode-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero-ctas .btn {
    width: auto;
    flex: 0 0 auto;
    padding: 11px 20px;
    font-size: 0.9375rem;
  }

  .hero-facts {
    gap: 8px 14px;
  }

  .hero-facts li {
    gap: 5px;
    font-size: 0.75rem;
  }

  .hero-fact-icon {
    width: 14px;
    height: 14px;
  }

  .preset-btn {
    min-height: 50px;
    padding: 8px 10px;
    align-items: flex-start;
    text-align: left;
  }

  .preset-title {
    font-size: 0.8125rem;
  }

  .preset-sub {
    display: block;
  }
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--gutter-tablet);
  }

  .section {
    padding-block: 56px;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .cat-filters-wrap::after {
    display: none;
  }

  .cat-filters {
    flex-wrap: wrap;
    overflow-x: visible;
    padding-right: 0;
    padding-bottom: 0;
  }

  .trial-rail {
    margin-top: 20px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
  }

  .trial-stage {
    padding: 22px 24px;
    gap: 10px;
  }

  .trial-arrow {
    transform: rotate(0deg);
  }

  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  html {
    scroll-padding-top: calc(var(--header-h-desktop) + 20px);
  }

  .container {
    padding-inline: var(--gutter-desktop);
  }

  .section {
    padding-block: 68px;
  }

  .site-header {
    height: var(--header-h-desktop);
  }

  /* Exact 3-Column Optical Header Centering */
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
  }

  .brand {
    justify-self: start;
  }

  .site-nav {
    display: flex;
    justify-self: center;
    gap: 2px;
  }

  .header-actions {
    justify-self: end;
    gap: 10px;
  }

  .theme-toggle {
    padding: 0 12px;
  }

  .theme-toggle-label {
    display: inline;
  }

  .btn-header {
    min-height: 44px;
    padding: 9px 16px;
    font-size: 0.875rem;
  }

  /* Hero */
  .section-hero {
    padding-block: 44px 52px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 48px;
    align-items: center;
  }

  .hero-copy {
    gap: 18px;
  }

  .hero-lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-ctas {
    gap: 12px;
    padding-top: 4px;
  }

  .hero-ctas .btn {
    min-height: 48px;
    padding: 12px 22px;
    font-size: 0.9375rem;
  }

  .hero-facts {
    justify-content: flex-start;
    gap: 10px 22px;
    padding-top: 4px;
  }

  .hero-facts li {
    gap: 7px;
    font-size: 0.8125rem;
  }

  .hero-fact-icon {
    width: 15px;
    height: 15px;
  }

  .deal-card-top {
    padding: 11px 16px;
  }

  .deal-card-head {
    padding: 14px 16px 12px;
  }

  .spread-cell {
    padding: 10px 16px;
  }

  .deal-ledger {
    padding: 8px 16px;
  }

  .deal-ledger-row {
    padding: 5px 0;
  }

  .deal-profit-box {
    padding: 12px 16px;
  }

  .profit-val {
    font-size: 1.375rem;
  }

  /* Compare 3-column desktop hairline ledger */
  .compare-header {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr) minmax(0, 1fr);
    background-color: var(--bg-elevated);
    border-bottom: 1px solid var(--border-hairline);
  }

  .compare-header > span {
    padding: 13px 22px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    border-right: 1px solid var(--border-hairline);
  }

  .compare-header > span:last-child {
    border-right: 0;
  }

  .compare-header > span.val-negative {
    color: var(--negative);
  }

  .compare-header > span.val-positive {
    color: var(--positive);
  }

  .compare-row {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .compare-topic {
    background-color: transparent;
    border-bottom: 0;
    border-right: 1px solid var(--border-hairline);
    padding: 20px 22px;
    flex-direction: column;
    gap: 6px;
  }

  .compare-cell {
    padding: 20px 22px;
  }

  .compare-cell-old {
    border-bottom: 0;
    border-right: 1px solid var(--border-hairline);
  }

  .compare-pill {
    display: none;
  }

  /* Modes 2-column desktop panel */
  .mode-tab {
    font-size: 0.9375rem;
  }

  .mode-panel {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 28px;
    padding: 28px;
    align-items: stretch;
  }

  .mode-info {
    gap: 14px;
  }

  /* Pulse 2-column desktop band */
  .pulse-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: center;
  }

  /* Categories 7-column desktop ledger */
  .cat-ledger-head {
    display: grid;
    grid-template-columns:
      minmax(190px, 1.45fr)
      minmax(110px, 0.95fr)
      minmax(105px, 0.78fr)
      minmax(110px, 0.85fr)
      minmax(110px, 0.85fr)
      minmax(82px, 0.62fr)
      minmax(115px, 0.9fr);
    gap: 12px;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--bg-elevated);
    border-bottom: 1px solid var(--border-hairline);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
  }

  .cat-ledger-head > span:nth-child(4),
  .cat-ledger-head > span:nth-child(5),
  .cat-ledger-head > span:nth-child(6),
  .cat-ledger-head > span:nth-child(7) {
    text-align: right;
  }

  .cat-row {
    grid-template-columns:
      minmax(190px, 1.45fr)
      minmax(110px, 0.95fr)
      minmax(105px, 0.78fr)
      minmax(110px, 0.85fr)
      minmax(110px, 0.85fr)
      minmax(82px, 0.62fr)
      minmax(115px, 0.9fr);
    grid-template-areas: none;
    gap: 12px;
    padding: 13px 20px;
  }

  .cat-model,
  .cat-group-label,
  .cat-sample,
  .cat-limit,
  .cat-median,
  .cat-roi,
  .cat-margin {
    grid-area: auto;
    grid-column: auto;
    grid-row: auto;
  }

  .cat-sample {
    justify-self: start;
  }

  .cat-limit,
  .cat-median,
  .cat-margin {
    justify-self: end;
    text-align: right;
    font-size: 0.875rem;
  }

  .cat-mobile-key {
    display: none;
  }

  /* Calculator 2-column desktop console */
  .pnl-presets-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
  }

  .pnl-presets {
    width: auto;
    min-width: 468px;
  }

  .pnl-mobile-summary {
    display: none;
  }

  .pnl-body {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    align-items: stretch;
  }

  .pnl-controls {
    padding: 28px;
    gap: 20px;
    border-bottom: 0;
    border-right: 1px solid var(--border-hairline);
  }

  .pnl-readout {
    padding: 28px;
    gap: 14px;
  }

  .readout-profit {
    padding: 18px;
  }

  /* FAQ 2-column desktop layout */
  .faq-layout {
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }

  .faq-cta-card {
    order: 1;
    position: sticky;
    top: calc(var(--header-h-desktop) + 20px);
    padding: 24px;
    gap: 14px;
  }

  .faq-list {
    order: 2;
  }

  .faq-question {
    padding: 16px 20px;
  }

  .faq-answer {
    padding: 0 20px 18px;
  }

  /* Footer & Hide Sticky Bar on Desktop */
  .site-footer {
    padding-block: 36px;
  }

  .mobile-sticky-cta {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   18. Progressive Scroll Reveal (Below-the-Fold Only, Zero CLS)
   -------------------------------------------------------------------------- */

.js-ready .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.985);
  transition: opacity 640ms var(--ease-spring),
              transform 640ms var(--ease-spring);
  transition-delay: calc(var(--stagger, 0) * 95ms);
  will-change: opacity, transform;
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* --------------------------------------------------------------------------
   19. Reduced Motion & Print Fallbacks (Always Last)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .live-dot::after,
  .site-header::after {
    animation: none !important;
    opacity: 0 !important;
  }

  .js-ready .reveal,
  .reveal,
  .js-ready .pulse-funnel:not(.is-bars-visible):not(.is-animated) .pulse-bar-price,
  .js-ready .pulse-funnel:not(.is-bars-visible):not(.is-animated) .pulse-bar-defect,
  .pulse-bar-price,
  .pulse-bar-defect {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header,
  .mobile-sticky-cta,
  .skip-link,
  .theme-toggle {
    display: none !important;
  }

  .js-ready .reveal,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body {
    background-color: oklch(1 0 0);
    color: oklch(0.185 0.008 240);
  }
}
