/* CardSum v2 TRIAL (2026-11-22). Every rule is scoped to html.v2, so with the trial off nothing here applies.
   One bold thing: the hero, a fan of real cards with a frosted "₹100 test" receipt over a soft green/peach glow.
   Everything below the hero stays in the quiet statement style. */

/* ---------- 1. gradient: hero only, fades into the page ---------- */
/* four glows to compare (?glow=mint|dawn|ink|paper). mint = default */
html.v2 { --v2-glow-a: rgba(92, 200, 166, .38); --v2-glow-b: rgba(255, 190, 140, .34); --v2-glow-c: rgba(11, 93, 75, .10); }
html.v2[data-theme="dark"] { --v2-glow-a: rgba(60, 195, 160, .20); --v2-glow-b: rgba(255, 170, 110, .10); --v2-glow-c: rgba(60, 195, 160, .08); }
/* dawn: warm sunrise, no green in the glow; the green stays only on buttons and money */
html.v2[data-glow="dawn"] { --v2-glow-a: rgba(255, 196, 120, .42); --v2-glow-b: rgba(255, 150, 140, .26); --v2-glow-c: rgba(255, 228, 92, .18); }
html.v2[data-glow="dawn"][data-theme="dark"] { --v2-glow-a: rgba(255, 170, 90, .14); --v2-glow-b: rgba(255, 120, 110, .10); --v2-glow-c: rgba(255, 210, 80, .06); }
/* ink: one deep money-green pool, stronger and more "bank" */
html.v2[data-glow="ink"] { --v2-glow-a: rgba(11, 93, 75, .30); --v2-glow-b: rgba(92, 200, 166, .22); --v2-glow-c: rgba(11, 93, 75, .14); }
html.v2[data-glow="ink"][data-theme="dark"] { --v2-glow-a: rgba(60, 195, 160, .26); --v2-glow-b: rgba(20, 110, 90, .30); --v2-glow-c: rgba(60, 195, 160, .10); }
/* paper: no colour at all, a faint dot grid like statement paper */
html.v2[data-glow="paper"] { --v2-glow-a: transparent; --v2-glow-b: transparent; --v2-glow-c: transparent; }
html.v2[data-glow="paper"] .v2-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 14%, transparent) 1px, transparent 1.2px); background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(70% 80% at 75% 40%, #000, transparent 75%); mask-image: radial-gradient(70% 80% at 75% 40%, #000, transparent 75%); }
/* the full-bleed hero is 100vw wide, which includes the scrollbar: clip the sideways overflow (clip keeps the sticky header working) */
html.v2 body { overflow-x: clip; }
html.v2 .v2-hero { position: relative; margin: -20px calc(50% - 50vw) 0; padding: 56px 16px 64px; isolation: isolate; }
html.v2 .v2-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  /* ONE picture per theme (SAM, 2026-11-22): swap site/img/hero/hero-light.webp or hero-dark.webp to change the look,
     no code change. tools/make_hero_art.py makes them; ?glow=mint|dawn|ink|paper previews the other styles. */
  background: url("../img/hero/hero-light.webp") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
html.v2 .v2-hero-in { max-width: 1048px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }

/* hero copy */
html.v2 .v2-hero h1 { font-family: var(--display); font-size: clamp(2.3rem, 5.2vw, 3.7rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 750; margin: 0 0 18px; max-width: 15ch; text-wrap: balance; }
html.v2 .v2-lede { font-size: 1.15rem; line-height: 1.55; color: var(--muted); max-width: 44ch; margin: 0 0 22px; }
html.v2 .v2-presets { margin: 0 0 16px; }
html.v2 .v2-answer { font-size: 1.05rem; line-height: 1.55; max-width: 46ch; min-height: 3.2em; margin: 0 0 22px; }
html.v2 .v2-answer b { font-family: var(--display); font-size: 1.15em; }
html.v2 .v2-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }

/* the fan of real cards: spreads when you point at it */
html.v2 .v2-hero-art { position: relative; height: 340px; }
html.v2 .v2-fan { position: absolute; inset: 0 0 40px 30px; }
html.v2 .v2-fan img { position: absolute; right: 0; top: 70px; width: min(320px, 78%); height: auto; aspect-ratio: 1.6; object-fit: contain; border-radius: 16px;
  filter: drop-shadow(0 18px 30px rgba(20, 30, 25, .22)); opacity: 0; transform: translate(-110px, -90px) rotate(-26deg);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .45s ease; }
html.v2 .v2-fan img[data-pos="0"] { z-index: 3; opacity: 1; transform: rotate(-4deg); }
html.v2 .v2-fan img[data-pos="1"] { z-index: 2; opacity: .96; transform: translate(-34px, -36px) rotate(-12deg); }
html.v2 .v2-fan img[data-pos="2"] { z-index: 1; opacity: .9; transform: translate(-70px, -64px) rotate(-20deg); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.v2 .v2-hero-art:hover img[data-pos="0"] { transform: translate(14px, 6px) rotate(-2deg); }
  html.v2 .v2-hero-art:hover img[data-pos="1"] { transform: translate(-60px, -46px) rotate(-13deg); }
  html.v2 .v2-hero-art:hover img[data-pos="2"] { transform: translate(-130px, -82px) rotate(-24deg); }
}

/* ---------- 2. glass: only where it sits over colour or moving content ---------- */
html.v2 .glass { background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  html.v2 .glass { background: color-mix(in srgb, var(--surface) 52%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
    border: 1px solid color-mix(in srgb, #fff 55%, transparent); }
  html.v2[data-theme="dark"] .glass { background: color-mix(in srgb, var(--surface) 55%, transparent); border-color: color-mix(in srgb, #fff 14%, transparent); }
  /* header turns to frosted glass once content scrolls under it */
  html.v2 .topbar { transition: background-color .25s ease, box-shadow .25s ease; }
  html.v2 .topbar.v2-scrolled { background: color-mix(in srgb, var(--surface) 70%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); box-shadow: 0 1px 0 var(--line); }
  /* the Apply bar paints its background on ::before (it fades in), so the glass goes there */
  html.v2 .sticky-apply::before { background: color-mix(in srgb, var(--surface) 74%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); }
  html.v2 .compare-tray { background: color-mix(in srgb, var(--surface) 74%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); }
  html.v2 .hs-list { background: color-mix(in srgb, var(--surface) 80%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); }
}
html.v2 .v2-receipt.glass { background: color-mix(in srgb, var(--surface) 78%, transparent); }
html.v2 .v2-receipt { position: absolute; left: 0; bottom: 0; z-index: 4; width: 250px; padding: 16px 18px 14px; border-radius: 16px; box-shadow: 0 20px 40px rgba(20, 30, 25, .16); }
html.v2 .v2-receipt p { margin: 0; }
html.v2 .v2-r-t { font-size: .82rem; color: var(--muted); }
html.v2 .v2-r-card { font-weight: 600; font-size: .92rem; line-height: 1.3; margin: 2px 0 10px !important; }
html.v2 .v2-receipt dl { margin: 0; }
html.v2 .v2-receipt dl div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px dashed color-mix(in srgb, var(--text) 25%, transparent); font-size: .92rem; }
html.v2 .v2-receipt dt { color: var(--muted); }
html.v2 .v2-receipt dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
html.v2 .v2-r-back { color: var(--accent); }
html.v2 .v2-receipt .v2-r-net { border-top: 1.5px solid var(--text); margin-top: 4px; padding-top: 8px; }
html.v2 .v2-r-net dt { color: var(--text); font-weight: 600; }
html.v2 .v2-r-net dd { font-family: var(--display); font-size: 1.35rem; line-height: 1; }

/* ---------- 3. home sections under the hero: quiet statement style ---------- */
html.v2 .v2-sec { padding: 44px 0; border-top: 1px solid var(--line); }
html.v2 .v2-sec h2 { font-family: var(--display); font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 8px; }
html.v2 .v2-sub { color: var(--muted); margin: 0 0 20px; max-width: 60ch; }
html.v2 .v2-hero + .v2-sec { border-top: 0; }

/* the ₹100 test bars */
html.v2 .v2-bars { list-style: none; margin: 0 0 14px; padding: 0; }
html.v2 .v2-bars a { display: grid; grid-template-columns: 56px minmax(0, 15rem) minmax(0, 1fr) 4.5rem; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
html.v2 .v2-bars img { width: 56px; height: 35px; object-fit: contain; }
html.v2 .v2-bar-name { font-weight: 600; font-size: .95rem; line-height: 1.3; }
html.v2 .v2-bar { display: block; height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
html.v2 .v2-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--accent); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
html.v2 .v2-bars li:first-child .v2-bar i { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #5CC8A6)); }
html.v2 .v2-bars b { font-family: var(--display); font-size: 1.25rem; text-align: right; font-variant-numeric: tabular-nums; }
html.v2 .v2-bars a:hover .v2-bar-name { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { html.v2 .v2-bar i, html.v2 .v2-fan img { transition: none; } }

/* how we add it up: a real sequence, so numbered */
html.v2 .v2-steps { list-style: none; counter-reset: s; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
html.v2 .v2-steps li { counter-increment: s; display: grid; gap: 6px; }
html.v2 .v2-steps li::before { content: counter(s); font-family: var(--display); font-weight: 750; font-size: 2.4rem; line-height: 1; color: var(--accent); }
html.v2 .v2-steps b { font-size: 1.05rem; }
html.v2 .v2-steps span { color: var(--muted); line-height: 1.55; }

/* start from how you live */
html.v2 .v2-life-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
html.v2 .v2-life-grid a { display: grid; gap: 4px; align-content: start; padding-top: 14px; border-top: 3px solid var(--accent); text-decoration: none; color: var(--text); height: 100%; }
html.v2 .v2-life-t { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
html.v2 .v2-life-grid img { width: 120px; height: 75px; object-fit: contain; margin: 10px 0 4px; transition: transform .3s ease; }
html.v2 .v2-life-c { font-weight: 600; font-size: .92rem; }
html.v2 .v2-life-n { font-size: .9rem; color: var(--muted); }
html.v2 .v2-life-n b { color: var(--accent); font-family: var(--display); font-size: 1.15rem; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.v2 .v2-life-grid a:hover img { transform: rotate(-4deg) scale(1.06); }
  html.v2 .v2-life-grid a:hover .v2-life-c { text-decoration: underline; }
}

/* SAM */
html.v2 .v2-sam { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; align-items: center; }
html.v2 .v2-sam-photo { width: 200px; height: 230px; border-radius: 22px; object-fit: cover; object-position: 50% 20%; box-shadow: 0 18px 40px rgba(20, 30, 25, .16); }
html.v2 .v2-sam p { max-width: 62ch; margin: 0 0 12px; }
html.v2 .v2-promise { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
html.v2 .v2-promise li { position: relative; padding-left: 28px; max-width: 62ch; }
html.v2 .v2-promise li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
html.v2 .v2-promise li::after { content: ""; position: absolute; left: 5px; top: calc(.3em + 5px); width: 8px; height: 4px; border: solid var(--accent); border-width: 0 0 2px 2px; transform: rotate(-45deg); }

/* the existing table becomes a section of the story */
html.v2 .v2-table-h { font-family: var(--display); font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -.02em; margin: 0; padding-top: 44px; border-top: 1px solid var(--line); outline: none; scroll-margin-top: 80px; }
html.v2 .home-sum .hs-head > p { display: none; }
html.v2 .v2-trust { margin: 10px 0 0; }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  html.v2 .v2-hero { padding: 28px 16px 36px; }
  html.v2 .v2-hero-in { grid-template-columns: 1fr; gap: 20px; }
  html.v2 .v2-hero-art { height: 250px; max-width: 420px; width: 100%; justify-self: center; }
  html.v2 .v2-fan { inset: 0 0 30px 40px; }
  html.v2 .v2-fan img { width: 74%; }
  html.v2 .v2-receipt { width: 210px; padding: 12px 14px 10px; }
  html.v2 .v2-steps, html.v2 .v2-life-grid { grid-template-columns: 1fr 1fr; }
  html.v2 .v2-sam { grid-template-columns: 1fr; gap: 18px; }
  html.v2 .v2-sam-photo { width: 120px; height: 120px; }
}
@media (max-width: 560px) {
  html.v2 .v2-bars a { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "img name val" "img bar bar"; gap: 6px 12px; }
  html.v2 .v2-bars img { grid-area: img; width: 48px; height: 30px; }
  html.v2 .v2-bar-name { grid-area: name; font-size: .9rem; }
  html.v2 .v2-bar { grid-area: bar; }
  html.v2 .v2-bars b { grid-area: val; font-size: 1.1rem; }
  html.v2 .v2-steps { grid-template-columns: 1fr; gap: 18px; }
  html.v2 .v2-steps li { grid-template-columns: 44px 1fr; column-gap: 10px; }
  html.v2 .v2-steps li::before { grid-row: span 2; font-size: 2rem; }
  html.v2 .v2-life-grid { gap: 22px 16px; }
  html.v2 .v2-ctas .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- 2026-11-22 upgrades ---------- */
html.v2 .v2-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; }
html.v2 .v2-pick-l { font-size: .88rem; color: var(--muted); min-width: 9.5rem; }
html.v2 .v2-pick .lh-presets { margin: 0; }
html.v2 .v2-answer { margin-top: 10px; }
html.v2 .v2-answer b { font-variant-numeric: tabular-nums; }
html.v2 .v2-bar-name small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
html.v2 .v2-bars li.v2-off a { opacity: .5; }
html.v2 .v2-bars li.v2-off .v2-bar i { background: var(--muted); }
html.v2 .v2-receipt dd { font-variant-numeric: tabular-nums; }
html.v2 .v2-end { text-align: left; }
html.v2 .v2-end p { max-width: 56ch; margin: 0 0 16px; }
html.v2 .v2-trust + .v2-end { margin-top: 32px; }

/* review pages: glass only where something floats over the text */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  /* phone: "Your CardSum" box sits on top of the sliders while you scroll */
  @media (max-width: 760px) {
    html.v2 .calc-out, html.v2 .calc-box .calc-out, html.v2.cs-review[data-design="statement"] #savings .calc-out {
      background: color-mix(in srgb, var(--surface) 76%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6); }
  }
  html.v2 .share-menu { background: color-mix(in srgb, var(--surface) 78%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); }
}

@media (max-width: 560px) {
  html.v2 .v2-hero h1 { font-size: 2.05rem; }
  html.v2 .v2-pick-l { min-width: 0; width: 100%; }
  html.v2 .v2-receipt { width: 190px; }
  html.v2 .v2-hero-art { height: 220px; }
}

html.v2[data-theme="dark"] .v2-hero::before { background-image: url("../img/hero/hero-dark.webp"); }
html.v2[data-glow="mint"] .v2-hero::before { background-image: url("../img/hero/mint-light.webp"); }
html.v2[data-glow="mint"][data-theme="dark"] .v2-hero::before { background-image: url("../img/hero/mint-dark.webp"); }
html.v2[data-glow="ink"] .v2-hero::before { background-image: url("../img/hero/ink-light.webp"); }
html.v2[data-glow="ink"][data-theme="dark"] .v2-hero::before { background-image: url("../img/hero/ink-dark.webp"); }
html.v2[data-glow="paper"] .v2-hero::before { background-image: url("../img/hero/paper-light.webp"); }
html.v2[data-glow="paper"][data-theme="dark"] .v2-hero::before { background-image: url("../img/hero/paper-dark.webp"); }
html.v2[data-glow="paper"] .v2-hero::after { content: none; }

/* the "₹ on every ₹100" figure carries the green money marker, like the milestone line in reviews */
html.v2 .v2-answer b[data-n="per"] { background: linear-gradient(transparent 52%, #AEE6CF 52%); padding: 0 3px; border-radius: 2px; }
html.v2[data-theme="dark"] .v2-answer b[data-n="per"] { background: linear-gradient(transparent 52%, rgba(80, 210, 160, .32) 52%); }
