/* ==========================================================================
   V4 "Tona" final rebuild — lp/assets/mockup-v4-final.png
   Layout rules here are THEME-AGNOSTIC (apply to any `.v4-root`, so a
   future `.v4-sma` theme pass can reuse this same file's structural rules
   and only add its own color/typography block below). All Tona-specific
   color/typography/decoration is scoped under `.v4-tona` and consumes
   ONLY tona-tokens.css variables/primitives — no hex/hardcoded color here
   outside that scope. See DESIGN_SYSTEM.md for the DA law this encodes.
   ========================================================================== */

/* ---------------------------------------------------------------------
   Layout (theme-agnostic)
   --------------------------------------------------------------------- */
.v4-root { width: 100%; }
.v4-container { max-width: 1120px; margin: 0 auto; padding: 0 24px 72px; display: flex; flex-direction: column; gap: 28px; }

.v4-header { display: flex; align-items: center; padding: 20px 24px; }
.v4-header-logo { height: 26px; width: auto; display: block; }

.v4-hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: center; }
.v4-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.v4-stat-tile { display: flex; align-items: center; gap: 10px; }
.v4-hero-right { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.v4-gauge-wrap { position: relative; width: 180px; height: 180px; }
.v4-gauge-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.v4-gauge-value { transition: stroke-dashoffset 0.2s linear; }
.v4-gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.v4-factors-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.v4-factor-bar { width: 100%; height: 6px; border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.v4-factor-fill { height: 100%; width: 0; border-radius: 999px; }
.v4-factor-card.mf-inview .v4-factor-fill { width: var(--v4-target-width, 0%); transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: reduce) {
  .v4-factor-fill { width: var(--v4-target-width, 0%) !important; }
}

.v4-hurt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.v4-hurt-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.v4-hurt-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.v4-diff-body { display: flex; flex-direction: column; gap: 16px; }
.v4-diff-img { width: 100%; max-width: 160px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; }
.v4-diff-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v4-diff-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.v4-diff-col { display: flex; flex-direction: column; gap: 6px; }
.v4-diff-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.v4-manual-block { text-align: center; padding: 8px 0; }

.v4-offer-card { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; }
.v4-offer-left { display: flex; flex-direction: column; }
.v4-tiers-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 18px; }
.v4-tier { position: relative; border-radius: 14px; padding: 16px 14px; text-align: center; }
.v4-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.v4-check-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.v4-cta-primary { width: 100%; justify-content: center; font-size: 16px; padding: 16px 24px; margin-top: 4px; }
.v4-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.v4-bump-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; }
.v4-bump-check { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.v4-bump-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.v4-bump-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.v4-bump-feat { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; }

.v4-automation-band { display: flex; align-items: center; gap: 20px; border-radius: var(--radius-card, 24px); padding: 26px 30px; }
.v4-automation-icon { font-size: 26px; flex: none; }
.v4-automation-copy { flex: 1; }
.v4-automation-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }

/* ---------------------------------------------------------------------
   Theme: Tona (DESIGN_SYSTEM.md law — warm palette, mesh, black CTA,
   General Sans + Geist Mono, soft shadows, radius 24, calm/premium).
   Consumes ONLY tona-tokens.css variables/primitives.
   --------------------------------------------------------------------- */
.v4-tona {
  background: var(--bg-soft);
  font-family: var(--font-body);
  color: var(--body);
  /* Local accent for the 3-band "needs improvement" state — DESIGN_SYSTEM
     defines only --positive/--attention (2 functional accents); a third
     warm amber is needed for the mid-band per this rebuild's spec. Kept
     local to this theme file rather than added to tona-tokens.css, since
     it's a Tona-pass-specific addition, not a validated law-file token. */
  --v4-amber: #C97A2E;
}

.v4-tona .v4-header-logo { filter: none; }

.v4-tona .v4-tone-bad,
.v4-tona .v4-tone-critical { color: var(--attention); }
.v4-tona .v4-tone-warn { color: var(--v4-amber); }
.v4-tona .v4-tone-good { color: var(--positive); }

.v4-tona .v4-pill-audit {
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--grad-lavender) 24%, var(--surface));
  color: color-mix(in srgb, var(--grad-lavender) 62%, var(--ink) 38%);
  border-radius: var(--radius-pill); padding: 7px 15px;
  font-size: 12.5px; font-weight: 600; margin-bottom: 18px;
}

.v4-tona .v4-hero-title {
  font-family: var(--font-display); font-weight: 700; font-size: 32px;
  letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); margin: 0 0 12px;
}
.v4-tona .v4-hero-score { font-size: 1em; font-variant-numeric: tabular-nums; }
.v4-tona .v4-hero-scoremax { color: var(--muted); font-weight: 500; font-size: 0.62em; margin-left: 2px; }
.v4-tona .v4-hero-sub { font-size: 15px; line-height: 1.6; color: var(--body); max-width: 46ch; margin: 0; }

.v4-tona .v4-stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; font-size: 15px; flex: none;
  background: color-mix(in srgb, var(--grad-lavender) 22%, var(--surface));
}
.v4-tona .v4-stat-num { font-size: 17px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.v4-tona .v4-stat-label { font-size: 12px; color: var(--muted); margin-top: 1px; }

.v4-tona .v4-gauge-track { fill: none; stroke: var(--bg-soft); }
.v4-tona .v4-gauge-value { fill: none; stroke: currentColor; }
.v4-tona .v4-gauge-num { font-size: 40px; font-weight: 700; color: var(--ink); }
.v4-tona .v4-gauge-max { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.v4-tona .v4-gauge-label { font-size: 13px; color: var(--muted); font-weight: 500; }

.v4-tona .v4-factor-card { padding: 22px 20px; border-top: 3px solid transparent; }
.v4-tona .v4-factor-card.v4-tone-critical { border-top-color: var(--attention); }
.v4-tona .v4-factor-card.v4-tone-warn { border-top-color: var(--v4-amber); }
.v4-tona .v4-factor-card.v4-tone-good { border-top-color: var(--positive); }
.v4-tona .v4-factor-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.v4-tona .v4-factor-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px; font-size: 13px;
  background: color-mix(in srgb, var(--grad-lavender) 20%, var(--surface));
}
.v4-tona .v4-factor-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.v4-tona .v4-factor-scorewrap { font-size: 26px; font-weight: 700; }
.v4-tona .v4-factor-max { font-size: 13px; font-weight: 500; color: var(--muted); }
.v4-tona .v4-factor-bar { background: var(--bg-soft); }
.v4-tona .v4-factor-card.v4-tone-critical .v4-factor-fill { background: var(--attention); }
.v4-tona .v4-factor-card.v4-tone-warn .v4-factor-fill { background: var(--v4-amber); }
.v4-tona .v4-factor-card.v4-tone-good .v4-factor-fill { background: var(--positive); }
.v4-tona .v4-factor-status { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.v4-tona .v4-col-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); margin: 0 0 18px; }
.v4-tona .v4-hurt-x { color: var(--attention); font-weight: 700; margin-top: 1px; }
.v4-tona .v4-tip-box {
  background: color-mix(in srgb, var(--grad-lavender) 16%, var(--surface));
  border-radius: 14px; padding: 14px 16px; font-size: 13.5px; line-height: 1.55; color: var(--body);
}

.v4-tona .v4-diff-label { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 11px; width: fit-content; }
.v4-tona .v4-diff-label-before { background: var(--attention-soft); color: var(--attention); }
.v4-tona .v4-diff-label-after { background: var(--positive-soft); color: var(--positive); }
.v4-tona .v4-diff-title { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--ink); margin-top: 4px; }
.v4-tona .v4-diff-desc { font-size: 13px; color: var(--body); line-height: 1.5; margin: 4px 0 0; }
.v4-tona .v4-diff-nohi { font-size: 12px; color: var(--attention); margin-top: 4px; }
.v4-tona .v4-diff-chip { background: var(--positive-soft); color: var(--positive); border-radius: 999px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; }
.v4-tona .v4-diff-arrow { font-size: 20px; color: var(--muted); align-self: center; }
.v4-tona .v4-diff-fallback { color: var(--muted); font-size: 13.5px; }

.v4-tona .v4-section-heading { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); margin: 0 0 20px; }
.v4-tona .v4-manual-copy { font-size: 14.5px; line-height: 1.65; color: var(--body); max-width: 62ch; margin: 18px auto 0; }

.v4-tona .v4-offer-card { border: 1.5px solid color-mix(in srgb, var(--grad-lavender) 45%, var(--bg-soft)); }
.v4-tona .v4-offer-pill {
  display: inline-block; background: var(--ink); color: #fff; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; padding: 5px 13px; width: fit-content; margin-bottom: 14px;
}
.v4-tona .v4-offer-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); margin: 0 0 8px; }
.v4-tona .v4-offer-sub { font-size: 14px; color: var(--body); line-height: 1.55; margin: 0; max-width: 48ch; }
.v4-tona .v4-tier { border: 1.5px solid var(--bg-soft); background: var(--surface); }
.v4-tona .v4-tier-active { border-color: var(--ink); background: color-mix(in srgb, var(--grad-lavender) 10%, var(--surface)); }
.v4-tona .v4-tier-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--ink); color: #fff; font-size: 10px; font-weight: 600; border-radius: 999px; padding: 3px 10px;
}
.v4-tona .v4-tier-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.v4-tona .v4-tier-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.v4-tona .v4-tier-price { font-size: 20px; font-weight: 700; color: var(--ink); }
.v4-tona .v4-offer-total { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.v4-tona .v4-offer-total span { color: var(--ink); font-weight: 600; }
.v4-tona .v4-offer-micro { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; }
.v4-tona .v4-check-icon { color: var(--positive); font-weight: 700; }
.v4-tona .v4-offer-expired { text-align: center; padding: 40px 30px; }
.v4-tona .v4-offer-expired p { font-size: 14.5px; color: var(--body); margin: 0 0 16px; }

.v4-tona .v4-bump-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.v4-tona .v4-bump-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.v4-tona .v4-bump-feat span { color: var(--positive); font-weight: 700; }

.v4-tona .v4-automation-band { background: var(--grad-mesh); }
.v4-tona .v4-automation-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink); margin: 0 0 4px; }
.v4-tona .v4-automation-sub { font-size: 13.5px; color: var(--body); margin: 0; max-width: 52ch; }
.v4-tona .v4-automation-btn { white-space: nowrap; }
.v4-tona .v4-automation-micro { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------------
   Theme: SMA (ScoreMyAds / Google palette — source: design.md §2 tokens,
   §3 patterns). Same theme-agnostic `.v4-*` markup as Tona above, only
   color/typography/decoration differs. `.tona-btn`/`.tona-card`/
   `.tona-mono` are the shared, theme-agnostic-BY-NAME primitives used
   directly in the v4 markup (see the big architecture comment above
   renderSalesPageV4 in app.js) — their base rules live in tona-tokens.css
   at :root scope, so this theme overrides them here under `.v4-sma` with
   higher selector specificity (2 classes > 1) rather than duplicating the
   markup with sma-*-prefixed classes.

   sma-tokens.css defines its hex/shadow tokens scoped under `.sma-root`
   (the old standalone SMA page's wrapper), which this `.v4-root.v4-sma`
   tree never carries — so those custom properties aren't visible here.
   Rather than re-scope that file (risking the still-linked-but-now-dead
   renderSalesPageSMA() page, kept for parity — see app.js), this block
   mirrors the same hex literals locally as `--v4sma-*` variables, one
   read pointing back to design.md/sma-tokens.css as the source of truth.
   --------------------------------------------------------------------- */
.v4-sma {
  --v4sma-blue: #1a73e8;
  --v4sma-blue-dark: #1557b0;
  --v4sma-red: #ea4335;
  --v4sma-yellow: #fbbc04;
  --v4sma-yellow-ink: #d39900; /* yellow text on white fails contrast — design.md §2.2 */
  --v4sma-green: #34a853;
  --v4sma-fg: #0f172a;
  --v4sma-muted: #64748b;
  --v4sma-border: #e2e8f0;
  --v4sma-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --v4sma-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --v4sma-shadow-primary-25: 0 10px 25px -6px rgba(26, 115, 232, 0.25);
  --v4sma-shadow-primary-30: 0 14px 32px -6px rgba(26, 115, 232, 0.3);
  --v4sma-font-display: 'DM Sans', Inter, -apple-system, sans-serif;
  --v4sma-font-body: 'DM Sans', Inter, -apple-system, sans-serif;
  --v4sma-font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --v4sma-ease: cubic-bezier(0.22, 1, 0.36, 1);

  background: #ffffff;
  font-family: var(--v4sma-font-body);
  color: var(--v4sma-fg);
}

.v4-sma .v4-header-logo { filter: none; }

/* ---- Shared primitives override (tona-tokens.css :root-scoped classes,
   used directly in the v4 markup — see comment above) ---- */
.v4-sma .tona-btn {
  background: var(--v4sma-blue); color: #fff;
  font-family: var(--v4sma-font-body); border-radius: 12px;
  box-shadow: var(--v4sma-shadow-primary-25);
}
.v4-sma .tona-btn:hover { background: var(--v4sma-blue-dark); box-shadow: var(--v4sma-shadow-primary-30); transform: none; }
.v4-sma .tona-btn:focus-visible { outline-color: var(--v4sma-blue); }
.v4-sma .tona-card {
  background: #ffffff; border-radius: 16px; border: 1px solid var(--v4sma-border);
  box-shadow: var(--v4sma-shadow-sm); transition: box-shadow 0.25s var(--v4sma-ease);
}
.v4-sma .tona-card:hover { box-shadow: var(--v4sma-shadow-md); }
.v4-sma .tona-mono { font-family: var(--v4sma-font-mono); }

/* ---- Score-band tones (design.md §2.2: <40 red, <65 yellow, >=65 green
   — v4Band2/v4Band3 in app.js use their own existing thresholds; only the
   COLORS map here, unchanged from the Tona pass's class contract). Applied
   directly on v4-hero-score/v4-gauge-wrap/v4-factor-card by app.js, so
   `color` cascades to any descendant that doesn't set its own (gauge
   number, gauge stroke via currentColor). ---- */
.v4-sma .v4-tone-bad,
.v4-sma .v4-tone-critical { color: var(--v4sma-red); }
.v4-sma .v4-tone-warn { color: var(--v4sma-yellow-ink); }
.v4-sma .v4-tone-good { color: var(--v4sma-green); }

.v4-sma .v4-pill-audit {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(26, 115, 232, 0.08); color: var(--v4sma-blue);
  border: 1px solid rgba(26, 115, 232, 0.16);
  border-radius: 999px; padding: 7px 15px;
  font-size: 12.5px; font-weight: 600; margin-bottom: 18px;
}

.v4-sma .v4-hero-title {
  font-family: var(--v4sma-font-display); font-weight: 700; font-size: 32px;
  letter-spacing: -0.01em; line-height: 1.2; color: var(--v4sma-fg); margin: 0 0 12px;
}
.v4-sma .v4-hero-score { font-size: 1em; font-variant-numeric: tabular-nums; }
.v4-sma .v4-hero-scoremax { color: var(--v4sma-muted); font-weight: 500; font-size: 0.62em; margin-left: 2px; }
.v4-sma .v4-hero-sub { font-size: 15px; line-height: 1.6; color: var(--v4sma-muted); max-width: 46ch; margin: 0; }

.v4-sma .v4-stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; font-size: 15px; flex: none;
  background: rgba(26, 115, 232, 0.08);
}
.v4-sma .v4-stat-num { font-size: 17px; font-weight: 600; color: var(--v4sma-fg); font-variant-numeric: tabular-nums; }
.v4-sma .v4-stat-label { font-size: 12px; color: var(--v4sma-muted); margin-top: 1px; }

.v4-sma .v4-gauge-track { fill: none; stroke: #f1f3f4; }
.v4-sma .v4-gauge-value { fill: none; stroke: currentColor; }
.v4-sma .v4-gauge-num { font-size: 40px; font-weight: 700; }
.v4-sma .v4-gauge-max { font-size: 14px; font-weight: 500; color: var(--v4sma-muted); margin-left: 2px; }
.v4-sma .v4-gauge-label { font-size: 13px; color: var(--v4sma-muted); font-weight: 500; }

/* ---- Factor cards — liseré-top treatment, design.md §3.4 ---- */
.v4-sma .v4-factor-card { padding: 22px 20px; border-top: 4px solid transparent; }
.v4-sma .v4-factor-card.v4-tone-critical { border-top-color: var(--v4sma-red); }
.v4-sma .v4-factor-card.v4-tone-warn { border-top-color: var(--v4sma-yellow); }
.v4-sma .v4-factor-card.v4-tone-good { border-top-color: var(--v4sma-green); }
.v4-sma .v4-factor-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.v4-sma .v4-factor-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px; font-size: 13px;
  background: rgba(26, 115, 232, 0.08);
}
.v4-sma .v4-factor-name { font-size: 13.5px; font-weight: 600; color: var(--v4sma-fg); }
.v4-sma .v4-factor-scorewrap { font-size: 26px; font-weight: 700; color: var(--v4sma-fg); }
.v4-sma .v4-factor-card.v4-tone-critical .v4-factor-scorewrap { color: var(--v4sma-red); }
.v4-sma .v4-factor-card.v4-tone-warn .v4-factor-scorewrap { color: var(--v4sma-yellow-ink); }
.v4-sma .v4-factor-card.v4-tone-good .v4-factor-scorewrap { color: var(--v4sma-green); }
.v4-sma .v4-factor-max { font-size: 13px; font-weight: 500; color: var(--v4sma-muted); }
.v4-sma .v4-factor-bar { background: #f1f5f9; }
.v4-sma .v4-factor-card.v4-tone-critical .v4-factor-fill { background: var(--v4sma-red); }
.v4-sma .v4-factor-card.v4-tone-warn .v4-factor-fill { background: var(--v4sma-yellow); }
.v4-sma .v4-factor-card.v4-tone-good .v4-factor-fill { background: var(--v4sma-green); }
.v4-sma .v4-factor-status { font-size: 12.5px; color: var(--v4sma-muted); font-weight: 500; }

.v4-sma .v4-col-title { font-family: var(--v4sma-font-display); font-weight: 700; font-size: 18px; color: var(--v4sma-fg); margin: 0 0 18px; }
.v4-sma .v4-hurt-x { color: var(--v4sma-red); font-weight: 700; margin-top: 1px; }
.v4-sma .v4-tip-box {
  background: rgba(26, 115, 232, 0.06); border: 1px solid rgba(26, 115, 232, 0.14);
  border-radius: 14px; padding: 14px 16px; font-size: 13.5px; line-height: 1.55; color: var(--v4sma-fg);
}

/* Before/After columns have no distinguishing class beyond DOM order
   (before, arrow span, after) — see v4SectionHurtingVsExample() in app.js.
   :first-of-type/:last-of-type match the two sibling <div class="v4-diff-
   col"> since the arrow between them is a <span>. */
.v4-sma .v4-diff-cols .v4-diff-col:first-of-type { background: rgba(234, 67, 53, 0.05); border: 1px solid rgba(234, 67, 53, 0.14); border-radius: 12px; padding: 12px 14px; }
.v4-sma .v4-diff-cols .v4-diff-col:last-of-type { background: rgba(52, 168, 83, 0.06); border: 1px solid rgba(52, 168, 83, 0.16); border-radius: 12px; padding: 12px 14px; }
.v4-sma .v4-diff-label { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 11px; width: fit-content; }
.v4-sma .v4-diff-label-before { background: rgba(234, 67, 53, 0.1); color: var(--v4sma-red); }
.v4-sma .v4-diff-label-after { background: rgba(52, 168, 83, 0.1); color: var(--v4sma-green); }
.v4-sma .v4-diff-title { font-family: var(--v4sma-font-display); font-weight: 600; font-size: 14.5px; color: var(--v4sma-fg); margin-top: 4px; }
.v4-sma .v4-diff-desc { font-size: 13px; color: var(--v4sma-muted); line-height: 1.5; margin: 4px 0 0; }
.v4-sma .v4-diff-nohi { font-size: 12px; color: var(--v4sma-red); margin-top: 4px; }
.v4-sma .v4-diff-chip { background: rgba(52, 168, 83, 0.1); color: var(--v4sma-green); border-radius: 999px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; }
.v4-sma .v4-diff-arrow { font-size: 20px; color: var(--v4sma-muted); align-self: center; }
.v4-sma .v4-diff-fallback { color: var(--v4sma-muted); font-size: 13.5px; }

.v4-sma .v4-section-heading { font-family: var(--v4sma-font-display); font-weight: 700; font-size: 22px; color: var(--v4sma-fg); margin: 0 0 20px; }
.v4-sma .v4-manual-copy { font-size: 14.5px; line-height: 1.65; color: var(--v4sma-muted); max-width: 62ch; margin: 18px auto 0; }

.v4-sma .v4-offer-card { border: 1.5px solid var(--v4sma-border); }
.v4-sma .v4-offer-pill {
  display: inline-block; background: var(--v4sma-blue); color: #fff; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; padding: 5px 13px; width: fit-content; margin-bottom: 14px;
}
.v4-sma .v4-offer-title { font-family: var(--v4sma-font-display); font-weight: 700; font-size: 22px; color: var(--v4sma-fg); margin: 0 0 8px; }
.v4-sma .v4-offer-sub { font-size: 14px; color: var(--v4sma-muted); line-height: 1.55; margin: 0; max-width: 48ch; }
.v4-sma .v4-tier { border: 1.5px solid var(--v4sma-border); background: #ffffff; }
.v4-sma .v4-tier-active { border-color: var(--v4sma-blue); background: rgba(26, 115, 232, 0.05); }
.v4-sma .v4-tier-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--v4sma-blue); color: #fff; font-size: 10px; font-weight: 600; border-radius: 999px; padding: 3px 10px;
}
.v4-sma .v4-tier-label { font-size: 13px; font-weight: 600; color: var(--v4sma-fg); margin-top: 4px; }
.v4-sma .v4-tier-sub { font-size: 11.5px; color: var(--v4sma-muted); margin-bottom: 6px; }
.v4-sma .v4-tier-price { font-size: 20px; font-weight: 700; color: var(--v4sma-fg); }
.v4-sma .v4-offer-total { font-size: 13px; color: var(--v4sma-muted); margin-bottom: 10px; }
.v4-sma .v4-offer-total span { color: var(--v4sma-fg); font-weight: 600; }
.v4-sma .v4-offer-micro { font-size: 12px; color: var(--v4sma-muted); text-align: center; margin-top: 10px; }
.v4-sma .v4-check-icon { color: var(--v4sma-green); font-weight: 700; }
.v4-sma .v4-offer-expired { text-align: center; padding: 40px 30px; }
.v4-sma .v4-offer-expired p { font-size: 14.5px; color: var(--v4sma-muted); margin: 0 0 16px; }

.v4-sma .v4-bump-title { font-family: var(--v4sma-font-display); font-weight: 600; font-size: 15px; color: var(--v4sma-fg); }
.v4-sma .v4-bump-sub { font-size: 13px; color: var(--v4sma-muted); margin-top: 3px; }
.v4-sma .v4-bump-feat span { color: var(--v4sma-green); font-weight: 700; }
.v4-sma .v4-bump-card:has(#mf-bump1:checked) { border-color: var(--v4sma-blue); box-shadow: 0 0 0 1.5px var(--v4sma-blue); }

.v4-sma .v4-automation-band { background: linear-gradient(120deg, rgba(26, 115, 232, 0.08) 0%, rgba(219, 234, 254, 0.55) 100%); }
.v4-sma .v4-automation-title { font-family: var(--v4sma-font-display); font-weight: 700; font-size: 17px; color: var(--v4sma-fg); margin: 0 0 4px; }
.v4-sma .v4-automation-sub { font-size: 13.5px; color: var(--v4sma-muted); margin: 0; max-width: 52ch; }
.v4-sma .v4-automation-btn { white-space: nowrap; }
.v4-sma .v4-automation-micro { font-size: 11.5px; color: var(--v4sma-muted); }

@media (max-width: 860px) {
  .v4-sma .v4-gauge-num { font-size: 32px; }
}
@media (max-width: 520px) {
  .v4-sma .v4-hero-title { font-size: 26px; }
}

/* ---------------------------------------------------------------------
   Theme: Copilot (CommandBar-AI-page-inspired, ?design=v3). Same
   theme-agnostic `.v4-*` markup as Tona/SMA above, only color/typography/
   decoration differs. Signature DNA: warm cream background, lavender/
   purple brand accent (#7B6EF6), dark near-black PILL CTA (radius 100px)
   with a purple glow on hover (not a purple fill — purple stays an
   accent/glow color, per the CommandBar reference), very-rounded
   (26px) floating white cards with big diffuse purple-tinted shadows,
   a stacked-card "ghost layer" motif behind the hero + offer cards
   (via layered solid-color box-shadow copies — no extra DOM/pseudo-
   elements needed, so ghost-card corners can't get clipped by an
   ancestor `overflow: hidden`), and soft purple radial-gradient orb
   halos behind the score gauge and the offer card (via ::before, the
   only pseudo-element budget spent on this theme since the ghost stack
   above uses box-shadow instead of ::before/::after).
   Reuses the global General Sans / Geist Mono `--font-*` tokens from
   tona-tokens.css (:root-scoped, not Tona-theme-scoped) — no new
   fonts, no new @font-face. Functional score-band colors stay
   conventional (red/amber/green) for legibility, each blended 25%
   toward the brand purple so they still read as "this theme" — purple
   itself is reserved for brand chrome (pills, CTA glow, borders, halos),
   not overloaded onto the pass/fail semantics.
   --------------------------------------------------------------------- */
.v4-copilot {
  --v4cop-cream: #FAF7F2;
  --v4cop-cream-soft: #F6F1EA;
  --v4cop-purple: #7B6EF6;
  --v4cop-purple-light: #A99BF5;
  --v4cop-purple-deep: #6459E0;
  --v4cop-orb-a: #C9B8F0;
  --v4cop-orb-b: #F7A9C4;
  --v4cop-ink: #17151F;
  --v4cop-body: #4E4A5C;
  --v4cop-muted: #918C9E;
  --v4cop-surface: #FFFFFF;
  --v4cop-border: #ECE6FA;
  --v4cop-good: color-mix(in srgb, #1FA971 75%, var(--v4cop-purple) 25%);
  --v4cop-warn: color-mix(in srgb, #E2A23D 80%, var(--v4cop-purple) 20%);
  --v4cop-bad: color-mix(in srgb, #E1574F 80%, var(--v4cop-purple) 20%);
  --v4cop-shadow-card: 0 20px 45px -22px rgba(90, 70, 170, .20);
  --v4cop-shadow-float: 0 30px 70px -25px rgba(60, 50, 120, .18);
  --v4cop-shadow-ghost-1: 14px 16px 0 0 rgba(255, 255, 255, .9);
  --v4cop-shadow-ghost-2: 28px 30px 0 0 rgba(255, 255, 255, .62);

  background: var(--v4cop-cream);
  font-family: var(--font-body);
  color: var(--v4cop-body);
}

.v4-copilot .v4-header-logo { filter: none; }

/* ---- Rounded floating white cards (shared primitive override) ---- */
.v4-copilot .tona-card {
  background: var(--v4cop-surface);
  border-radius: 26px;
  box-shadow: var(--v4cop-shadow-card);
  border: 1px solid var(--v4cop-border);
  transition: box-shadow .25s var(--ease-tona), transform .25s var(--ease-tona);
}
.v4-copilot .tona-card:hover { box-shadow: var(--v4cop-shadow-float); }
.v4-copilot .tona-mono { font-family: var(--font-mono); }

/* ---- Dark pill CTA — purple is a glow/accent, never the fill ---- */
.v4-copilot .tona-btn {
  background: var(--v4cop-ink); color: #fff;
  font-family: var(--font-body); border-radius: 100px;
  box-shadow: 0 14px 30px -10px rgba(23, 21, 31, .35);
}
.v4-copilot .tona-btn:hover {
  box-shadow: 0 16px 34px -8px rgba(123, 110, 246, .45), 0 0 0 4px rgba(123, 110, 246, .16);
}
.v4-copilot .tona-btn:focus-visible { outline: 3px solid var(--v4cop-purple-light); outline-offset: 3px; }

/* ---- Score-band tones (functional colors, purple-blended 25%) ---- */
.v4-copilot .v4-tone-bad,
.v4-copilot .v4-tone-critical { color: var(--v4cop-bad); }
.v4-copilot .v4-tone-warn { color: var(--v4cop-warn); }
.v4-copilot .v4-tone-good { color: var(--v4cop-good); }

.v4-copilot .v4-pill-audit {
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--v4cop-purple) 12%, #fff);
  color: var(--v4cop-purple-deep);
  border: 1px solid color-mix(in srgb, var(--v4cop-purple) 22%, #fff);
  border-radius: var(--radius-pill); padding: 7px 15px;
  font-size: 12.5px; font-weight: 600; margin-bottom: 18px;
}

.v4-copilot .v4-hero-title {
  font-family: var(--font-display); font-weight: 700; font-size: 33px;
  letter-spacing: -0.02em; line-height: 1.18; color: var(--v4cop-ink); margin: 0 0 12px;
}
.v4-copilot .v4-hero-score { font-size: 1em; font-variant-numeric: tabular-nums; }
.v4-copilot .v4-hero-scoremax { color: var(--v4cop-muted); font-weight: 500; font-size: 0.62em; margin-left: 2px; }
.v4-copilot .v4-hero-sub { font-size: 15px; line-height: 1.6; color: var(--v4cop-body); max-width: 46ch; margin: 0; }

/* ---- Stacked-card ghost motif — hero + offer cards read as a
   floating stack of 3 (see comment above). ---- */
.v4-copilot .v4-hero-card,
.v4-copilot .v4-offer-card.tona-card {
  box-shadow: var(--v4cop-shadow-ghost-1), var(--v4cop-shadow-ghost-2), var(--v4cop-shadow-card);
}
.v4-copilot .v4-hero-card:hover,
.v4-copilot .v4-offer-card.tona-card:hover {
  box-shadow: var(--v4cop-shadow-ghost-1), var(--v4cop-shadow-ghost-2), var(--v4cop-shadow-float);
}

/* ---- Purple orb halos — score gauge + offer card ---- */
.v4-copilot .v4-gauge-wrap { position: relative; z-index: 1; }
.v4-copilot .v4-gauge-wrap::before {
  content: ''; position: absolute; z-index: -1;
  inset: -46px;
  background:
    radial-gradient(60% 60% at 32% 28%, color-mix(in srgb, var(--v4cop-orb-a) 85%, transparent) 0%, transparent 68%),
    radial-gradient(58% 58% at 72% 74%, color-mix(in srgb, var(--v4cop-orb-b) 78%, transparent) 0%, transparent 70%);
  filter: blur(6px);
  opacity: .85;
}
.v4-copilot .v4-offer-card.tona-card { position: relative; z-index: 1; }
.v4-copilot .v4-offer-card.tona-card::before {
  content: ''; position: absolute; z-index: -1;
  inset: -60px -40px -40px -60px;
  background: radial-gradient(50% 50% at 18% 30%, color-mix(in srgb, var(--v4cop-orb-a) 55%, transparent) 0%, transparent 72%);
  filter: blur(10px);
  opacity: .7;
  pointer-events: none;
}

.v4-copilot .v4-stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 11px; font-size: 15px; flex: none;
  background: color-mix(in srgb, var(--v4cop-purple) 12%, #fff);
}
.v4-copilot .v4-stat-num { font-size: 17px; font-weight: 600; color: var(--v4cop-ink); font-variant-numeric: tabular-nums; }
.v4-copilot .v4-stat-label { font-size: 12px; color: var(--v4cop-muted); margin-top: 1px; }

.v4-copilot .v4-gauge-track { fill: none; stroke: var(--v4cop-cream-soft); }
.v4-copilot .v4-gauge-value { fill: none; stroke: currentColor; }
.v4-copilot .v4-gauge-num { font-size: 40px; font-weight: 700; color: var(--v4cop-ink); }
.v4-copilot .v4-gauge-max { font-size: 14px; font-weight: 500; color: var(--v4cop-muted); margin-left: 2px; }
.v4-copilot .v4-gauge-label { font-size: 13px; color: var(--v4cop-muted); font-weight: 500; }

/* ---- Factor cards — softer purple-tinted top accent (not a hard
   liseré like SMA's 4px band) ---- */
.v4-copilot .v4-factor-card { padding: 22px 20px; border-top: 3px solid transparent; }
.v4-copilot .v4-factor-card.v4-tone-critical { border-top-color: color-mix(in srgb, var(--v4cop-bad) 70%, transparent); }
.v4-copilot .v4-factor-card.v4-tone-warn { border-top-color: color-mix(in srgb, var(--v4cop-warn) 70%, transparent); }
.v4-copilot .v4-factor-card.v4-tone-good { border-top-color: color-mix(in srgb, var(--v4cop-good) 70%, transparent); }
.v4-copilot .v4-factor-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.v4-copilot .v4-factor-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 9px; font-size: 13px;
  background: color-mix(in srgb, var(--v4cop-purple) 12%, #fff);
}
.v4-copilot .v4-factor-name { font-size: 13.5px; font-weight: 600; color: var(--v4cop-ink); }
.v4-copilot .v4-factor-scorewrap { font-size: 26px; font-weight: 700; }
.v4-copilot .v4-factor-max { font-size: 13px; font-weight: 500; color: var(--v4cop-muted); }
.v4-copilot .v4-factor-bar { background: var(--v4cop-cream-soft); }
.v4-copilot .v4-factor-card.v4-tone-critical .v4-factor-fill { background: var(--v4cop-bad); }
.v4-copilot .v4-factor-card.v4-tone-warn .v4-factor-fill { background: var(--v4cop-warn); }
.v4-copilot .v4-factor-card.v4-tone-good .v4-factor-fill { background: var(--v4cop-good); }
.v4-copilot .v4-factor-status { font-size: 12.5px; color: var(--v4cop-muted); font-weight: 500; }

.v4-copilot .v4-col-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--v4cop-ink); margin: 0 0 18px; }
.v4-copilot .v4-hurt-x { color: var(--v4cop-bad); font-weight: 700; margin-top: 1px; }
.v4-copilot .v4-tip-box {
  background: color-mix(in srgb, var(--v4cop-purple) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--v4cop-purple) 18%, #fff);
  border-radius: 16px; padding: 14px 16px; font-size: 13.5px; line-height: 1.55; color: var(--v4cop-body);
}

/* Before card neutral-warm, After card purple/positive-tinted — see
   comment on the SMA block above re: DOM-order selectors. */
.v4-copilot .v4-diff-cols .v4-diff-col:first-of-type { background: var(--v4cop-cream-soft); border: 1px solid #EFE7DA; border-radius: 14px; padding: 12px 14px; }
.v4-copilot .v4-diff-cols .v4-diff-col:last-of-type { background: color-mix(in srgb, var(--v4cop-purple) 8%, #fff); border: 1px solid color-mix(in srgb, var(--v4cop-purple) 20%, #fff); border-radius: 14px; padding: 12px 14px; }
.v4-copilot .v4-diff-label { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 11px; width: fit-content; }
.v4-copilot .v4-diff-label-before { background: #F1E9DC; color: #9A6B33; }
.v4-copilot .v4-diff-label-after { background: color-mix(in srgb, var(--v4cop-purple) 16%, #fff); color: var(--v4cop-purple-deep); }
.v4-copilot .v4-diff-title { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--v4cop-ink); margin-top: 4px; }
.v4-copilot .v4-diff-desc { font-size: 13px; color: var(--v4cop-body); line-height: 1.5; margin: 4px 0 0; }
.v4-copilot .v4-diff-nohi { font-size: 12px; color: var(--v4cop-bad); margin-top: 4px; }
.v4-copilot .v4-diff-chip { background: color-mix(in srgb, var(--v4cop-purple) 14%, #fff); color: var(--v4cop-purple-deep); border-radius: 999px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; }
.v4-copilot .v4-diff-arrow { font-size: 20px; color: var(--v4cop-muted); align-self: center; }
.v4-copilot .v4-diff-fallback { color: var(--v4cop-muted); font-size: 13.5px; }

.v4-copilot .v4-section-heading { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--v4cop-ink); margin: 0 0 20px; }
.v4-copilot .v4-manual-copy { font-size: 14.5px; line-height: 1.65; color: var(--v4cop-body); max-width: 62ch; margin: 18px auto 0; }

.v4-copilot .v4-offer-card.tona-card { border: 1.5px solid color-mix(in srgb, var(--v4cop-purple) 30%, #fff); }
.v4-copilot .v4-offer-pill {
  display: inline-block; background: var(--v4cop-ink); color: #fff; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; padding: 5px 13px; width: fit-content; margin-bottom: 14px;
}
.v4-copilot .v4-offer-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--v4cop-ink); margin: 0 0 8px; }
.v4-copilot .v4-offer-sub { font-size: 14px; color: var(--v4cop-body); line-height: 1.55; margin: 0; max-width: 48ch; }
.v4-copilot .v4-tier { border: 1.5px solid var(--v4cop-border); background: var(--v4cop-surface); border-radius: 18px; }
.v4-copilot .v4-tier-active { border-color: var(--v4cop-purple); background: color-mix(in srgb, var(--v4cop-purple) 8%, #fff); }
.v4-copilot .v4-tier-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--v4cop-purple); color: #fff; font-size: 10px; font-weight: 600; border-radius: 999px; padding: 3px 10px;
}
.v4-copilot .v4-tier-label { font-size: 13px; font-weight: 600; color: var(--v4cop-ink); margin-top: 4px; }
.v4-copilot .v4-tier-sub { font-size: 11.5px; color: var(--v4cop-muted); margin-bottom: 6px; }
.v4-copilot .v4-tier-price { font-size: 20px; font-weight: 700; color: var(--v4cop-ink); }
.v4-copilot .v4-offer-total { font-size: 13px; color: var(--v4cop-muted); margin-bottom: 10px; }
.v4-copilot .v4-offer-total span { color: var(--v4cop-ink); font-weight: 600; }
.v4-copilot .v4-offer-micro { font-size: 12px; color: var(--v4cop-muted); text-align: center; margin-top: 10px; }
.v4-copilot .v4-check-icon { color: var(--v4cop-good); font-weight: 700; }
.v4-copilot .v4-offer-expired { text-align: center; padding: 40px 30px; }
.v4-copilot .v4-offer-expired p { font-size: 14.5px; color: var(--v4cop-body); margin: 0 0 16px; }

.v4-copilot .v4-bump-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--v4cop-ink); }
.v4-copilot .v4-bump-sub { font-size: 13px; color: var(--v4cop-muted); margin-top: 3px; }
.v4-copilot .v4-bump-feat span { color: var(--v4cop-good); font-weight: 700; }
/* Cream bump card (vs. white everywhere else), purple checked-state border */
.v4-copilot .v4-bump-card.tona-card { background: var(--v4cop-cream-soft); border: 1.5px solid transparent; box-shadow: var(--v4cop-shadow-card); }
.v4-copilot .v4-bump-card.tona-card:has(#mf-bump1:checked) { border-color: var(--v4cop-purple); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v4cop-purple) 22%, transparent), var(--v4cop-shadow-card); }

.v4-copilot .v4-automation-band { background: linear-gradient(120deg, color-mix(in srgb, var(--v4cop-purple) 22%, var(--v4cop-cream)) 0%, color-mix(in srgb, var(--v4cop-orb-b) 40%, var(--v4cop-cream)) 100%); }
.v4-copilot .v4-automation-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--v4cop-ink); margin: 0 0 4px; }
.v4-copilot .v4-automation-sub { font-size: 13.5px; color: var(--v4cop-body); margin: 0; max-width: 52ch; }
.v4-copilot .v4-automation-btn { white-space: nowrap; }
.v4-copilot .v4-automation-micro { font-size: 11.5px; color: var(--v4cop-muted); }

@media (max-width: 860px) {
  .v4-copilot .v4-gauge-num { font-size: 32px; }
}
@media (max-width: 520px) {
  .v4-copilot .v4-hero-title { font-size: 26px; }
  .v4-copilot .v4-hero-card,
  .v4-copilot .v4-offer-card.tona-card {
    box-shadow: 8px 9px 0 0 rgba(255, 255, 255, .9), 16px 17px 0 0 rgba(255, 255, 255, .62), var(--v4cop-shadow-card);
  }
}

/* ---------------------------------------------------------------------
   Responsive — desktop 1280 / mobile 375 (fixture verification widths).
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
  .v4-hero-grid { grid-template-columns: 1fr; }
  .v4-hero-right { order: -1; }
  .v4-gauge-wrap { width: 140px; height: 140px; }
  .v4-tona .v4-gauge-num { font-size: 32px; }
  .v4-factors-row { grid-template-columns: repeat(2, 1fr); }
  .v4-hurt-grid { grid-template-columns: 1fr; }
  .v4-diff-cols { grid-template-columns: 1fr; }
  .v4-diff-arrow { transform: rotate(90deg); justify-self: center; }
  .v4-offer-card { grid-template-columns: 1fr; }
  .v4-bump-card { grid-template-columns: 1fr; }
  .v4-bump-feats { grid-template-columns: 1fr; }
  .v4-automation-band { flex-direction: column; align-items: flex-start; text-align: left; }
  .v4-automation-actions { align-items: flex-start; width: 100%; }
  .v4-automation-btn { width: 100%; justify-content: center; }
}
@media (max-width: 520px) {
  .v4-hero-stats { grid-template-columns: 1fr; }
  .v4-tiers-row { grid-template-columns: 1fr; }
  .v4-factors-row { grid-template-columns: 1fr; }
  .v4-container { padding: 0 16px 56px; }
  .v4-tona .v4-hero-title { font-size: 26px; }
}
