/* =====================================================================
   Percent Gainer — light / dark modes (light is the default; theme.js).
   Dark mode = the original look, untouched. Light mode keeps the same palette:
   black, 9D blue (#1e3bf5) buttons and accents, white text on black, plus the
   logo's lime as a soft glow only (never as text on white).
   Dark bands in light mode are the original black + blue top glow, with diagonal
   edges rising left → right. Lives in the funnel (not the skin) so a skin re-apply never wipes it.
   ===================================================================== */

/* ---- Switch button ---- */
.k-head-end { justify-self: end; display: flex; align-items: center; gap: 0.6rem; }
.site-header:not(.k-head) .theme-toggle { margin-left: auto; }
.theme-toggle {
  flex: none; display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0;
  border-radius: 9999px; border: 1px solid var(--rule); background: var(--nav-bg, transparent); color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---- Logo: the header is dark in both modes, so the original for-dark logo is always used ---- */
.skin .logo .logo-on-light { display: none; }

/* ---- Hero split (both modes): headline zone, then video + summary ---- */
main.page > .k-hero-top { padding-bottom: 1.25rem; }

/* ---- Light tokens ---- */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"], html[data-theme="light"] .skin {
  --paper: #FFFFFF;
  --ink: #0A0A0F;
  --muted: #2B2F3A;
  --soft: #5B6273;
  --rule: rgba(0, 0, 0, 0.12);
  --link: #1E3BF5;          /* 9D blue on white ≈ 6.9:1 */
  --kicker: #1E3BF5;
  --mark-bg: #0B1452;       /* the white highlight box flips to deep navy on white pages */
  --mark-ink: #FFFFFF;
  --card: #FFFFFF;
  --card-on-band: #FFFFFF;
  --card-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
  --frame-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 30px 80px rgba(30, 59, 245, 0.25);
  --button-glow: 0 10px 30px rgba(30, 59, 245, 0.30);
  --nav-bg: rgba(0, 0, 0, 0.05);
  --nav-active: rgba(0, 0, 0, 0.09);
  --ph-bg: repeating-linear-gradient(135deg, #EEF1F8 0 12px, #E6EAF4 12px 24px);
  --field: #FFFFFF;
  --yes: #15803D;
  --no: #B42318;
}
/* Light page depth: blue glow (site colour) + lime glow (logo colour) behind the hero, faint dot grid */
html[data-theme="light"] body.skin {
  background:
    radial-gradient(ellipse 55% 42rem at 15% -6rem, rgba(30, 59, 245, 0.16), rgba(30, 59, 245, 0) 70%) no-repeat,
    radial-gradient(ellipse 50% 40rem at 90% -4rem, rgba(174, 226, 46, 0.22), rgba(174, 226, 46, 0) 70%) no-repeat,
    radial-gradient(circle, rgba(0, 0, 0, 0.065) 1px, rgba(0, 0, 0, 0) 1.4px) 0 0 / 24px 24px,
    #FFFFFF;
}
html[data-theme="light"] .skin .sticky-cta { background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); }
html[data-theme="light"] .skin .site-footer { background: #FFFFFF; }

/* ---- Tinted band: pale wash, blue glow top-left, lime glow bottom-right, hairline edges ---- */
html[data-theme="light"] .skin .band-tint {
  --band-bg: radial-gradient(ellipse 50% 70% at 0% 0%, rgba(30, 59, 245, 0.14), rgba(30, 59, 245, 0) 70%),
             radial-gradient(ellipse 50% 70% at 100% 100%, rgba(174, 226, 46, 0.22), rgba(174, 226, 46, 0) 70%), #F4F6FB;
  --final-bg: var(--band-bg);
  --card-on-band: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(30, 59, 245, 0.16);
  border-bottom: 1px solid rgba(103, 169, 24, 0.20);
}

/* ---- Dark diagonal band: the original black + blue glow look ---- */
html[data-theme="light"] .skin .band-panel,
html[data-theme="light"] .skin .k-frame,
html[data-theme="light"] .skin .consent {
  --ink: #FFFFFF;
  --muted: #F6F6F6;
  --soft: #A9AEC4;
  --rule: rgba(255, 255, 255, 0.14);
  --link: #8FA0FF;
  --kicker: #8FA0FF;
  --mark-bg: #FFFFFF;
  --mark-ink: #000000;
  --card: rgba(255, 255, 255, 0.04);
  --card-on-band: rgba(255, 255, 255, 0.05);
  --card-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  --ph-bg: repeating-linear-gradient(135deg, #0A1236 0 12px, #0D1741 12px 24px);   /* navy stripes, not black */
  --nav-bg: rgba(255, 255, 255, 0.06);
  --yes: #4ADE80;
  --no: #F87171;
  --band-bg: linear-gradient(180deg, #060A2E 0, #050A24 70%);   /* deep navy: the dark-mode top look, in navy */
  --final-bg: linear-gradient(0deg, #060A2E 0, #050A24 80%);
  color: var(--ink);
}
html[data-theme="light"] .skin .k-frame { background: #050A24; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.10), 0 30px 80px rgba(30, 59, 245, 0.25), 0 0 0 10px rgba(255, 255, 255, 0.55); }
html[data-theme="light"] .skin main.page > .band-panel {
  --slant: clamp(28px, 5.5vw, 88px);
  padding-top: calc(clamp(3rem, 6.7vw, 6rem) + var(--slant));
  padding-bottom: calc(clamp(3rem, 6.7vw, 6rem) + var(--slant));
  clip-path: polygon(0 var(--slant), 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}
/* Two dark bands in a row (pain headline + proof wall) read as one block: slant only the outer edges */
html[data-theme="light"] .skin main.page > .band-panel:has(+ .band-panel) {
  padding-bottom: clamp(3rem, 6.7vw, 6rem);
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
}
html[data-theme="light"] .skin main.page > .band-panel + .band-panel {
  --band-bg: #050A24;
  padding-top: 0;
  margin-top: -1px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}

/* Dark bands that are not .k-alt / .k-final in the layout (hero, Before vs After, Old vs New) still get the band background */
html[data-theme="light"] .skin .band-panel:not(.k-alt):not(.k-final) { background: var(--band-bg); }

/* Hero headline zone: flush with the dark header on top, diagonal only at the bottom */
html[data-theme="light"] .skin main.page > .band-panel.band-top {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  margin-top: -1px; /* overlap the header by 1px so no hairline shows */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}
html[data-theme="light"] .skin main.page > .k-hero-video { padding-top: 2rem; }

/* Header: dark navy in light mode too (same as the top of dark mode), full width */
html[data-theme="light"] .skin .site-header {
  --ink: #FFFFFF;
  --rule: rgba(255, 255, 255, 0.16);
  --nav-bg: rgba(255, 255, 255, 0.07);
  --nav-active: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  background: #060A2E;
  box-shadow: 0 0 0 100vmax #060A2E;
  clip-path: inset(0 -100vmax);
}
html[data-theme="light"] .skin .site-header:not(.k-head) { padding-bottom: 1rem; }

/* ---- Cancel note (both modes): a soft read-through card, not a divider ---- */
main.page > .k-cancel { padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.cancel-note {
  max-width: 34rem; margin: 0 auto; padding: 1.5rem 1.75rem; border-radius: 18px;
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.skin .cancel-note h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin: 0.75rem 0 0.35rem; letter-spacing: -0.03em; }
.skin .cancel-note p { margin: 0; font-size: 1.05rem; color: var(--muted); }
.cancel-badge {
  display: inline-block; padding: 0.3rem 0.8rem; border-radius: 9999px; font-family: var(--ui); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; background: var(--signal); color: var(--signal-ink);
}
.skin .cancel-link { display: inline-block; margin-top: 0.9rem; font-family: var(--ui); font-weight: 600; color: var(--link); text-decoration: underline; text-underline-offset: 0.2em; }
html[data-theme="light"] .cancel-note { background: #F1F4FF; box-shadow: inset 0 0 0 1px rgba(30, 59, 245, 0.16); }

/* ---- A tinted band right after a diagonal dark band slides up under the slant,
        so the angle meets the tint directly (no straight line after the angle) ---- */
html[data-theme="light"] .skin main.page > .band-panel { position: relative; z-index: 1; }
html[data-theme="light"] .skin main.page > .band-panel + .band-tint {
  --slant: clamp(28px, 5.5vw, 88px);
  margin-top: calc(-1 * var(--slant));
  padding-top: calc(clamp(3rem, 6.7vw, 6rem) + var(--slant));
  border-top: 0;
}

/* ---- A dark diagonal right after a tinted band slides up over the tint's bottom,
        so the slant's open corner shows the tint (not a white triangle) ---- */
html[data-theme="light"] .skin main.page > .band-tint:has(+ .band-panel) {
  --slant: clamp(28px, 5.5vw, 88px);
  padding-bottom: calc(clamp(3rem, 6.7vw, 6rem) + var(--slant));
  border-bottom: 0;
}
html[data-theme="light"] .skin main.page > .band-tint + .band-panel { margin-top: calc(-1 * var(--slant)); }
.skin .k-123 .steps { margin-top: 2rem; }

/* Nov 10: no leftover straight hairlines in light mode (they clash with the diagonals) */
html[data-theme="light"] .skin .site-footer { border-top: 0; }
html[data-theme="light"] .skin .band-tint { border-top: 0; border-bottom: 0; }
