/* Redrafted web: Cadence design system (same tokens as the app,
   Redrafted_new/app/src/theme/tokens.ts). Night by default, Day when the
   device asks for light. Gold is the one reward accent: buttons, scores,
   XP. Sky / violet / emerald are the three practice layers. */

@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("/assets/fonts/Sora_600SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("/assets/fonts/Sora_700Bold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/fonts/Inter_400Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/assets/fonts/Inter_500Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/assets/fonts/Inter_600SemiBold.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("/assets/fonts/JetBrainsMono_500Medium.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url("/assets/fonts/JetBrainsMono_600SemiBold.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; src: url("/assets/fonts/JetBrainsMono_700Bold.woff2") format("woff2"); }

/* ------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;
  /* Night: deep blue-ink studio */
  --bg: #0A0D13;
  --bg-deep: #07090E;
  --ink: #EEF1F6;
  --ink2: #A3ACBC;
  --faint: #8A93A5;
  --card: #111622;
  --card2: #161C29;
  --card3: #1A2130;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.14);
  --chrome: rgba(10, 13, 19, 0.86);

  --gold: #F4B942;
  --gold-bright: #FFCB5C;
  --gold-ink: #F4B942;
  --gold-soft: rgba(244, 185, 66, 0.12);
  --gold-line: rgba(244, 185, 66, 0.4);
  --gold-glow: rgba(244, 185, 66, 0.18);
  --on-gold: #231A06;

  --sky: #38BDF8;
  --sky-ink: #7DD3FC;
  --sky-soft: rgba(56, 189, 248, 0.14);
  --violet: #A78BFA;
  --violet-ink: #C4B5FD;
  --violet-soft: rgba(167, 139, 250, 0.14);
  --emerald: #34D399;
  --emerald-ink: #6EE7B7;
  --emerald-soft: rgba(52, 211, 153, 0.12);
  --emerald-line: rgba(52, 211, 153, 0.55);
  --rose: #FB7185;
  --rose-ink: #FDA4AF;
  --bad-soft: rgba(251, 113, 133, 0.12);
  --track: #1A2130;
  --strike: rgba(251, 113, 133, 0.85);

  --focus: #7DD3FC;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);

  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-card: 22px;
  --radius-btn: 18px;
  --gutter: 16px;
  --max: 1120px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    /* Day: warm paper */
    --bg: #F4F2ED;
    --bg-deep: #ECE9E2;
    --ink: #161B24;
    --ink2: #4F5866;
    --faint: #626B79;
    --card: #FFFFFF;
    --card2: #FBFAF7;
    --card3: #F1EEE8;
    --line: rgba(20, 24, 33, 0.09);
    --line2: rgba(20, 24, 33, 0.16);
    --chrome: rgba(244, 242, 237, 0.9);

    --gold: #B8860B;
    --gold-bright: #F4B942;
    --gold-ink: #7A5A00;
    --gold-soft: rgba(184, 134, 11, 0.1);
    --gold-line: rgba(184, 134, 11, 0.45);
    --gold-glow: rgba(244, 185, 66, 0.22);
    --on-gold: #231A06;

    --sky: #0EA5E9;
    --sky-ink: #0369A1;
    --sky-soft: rgba(14, 165, 233, 0.12);
    --violet: #7C5CFC;
    --violet-ink: #5B3FD6;
    --violet-soft: rgba(124, 92, 252, 0.12);
    --emerald: #12A87B;
    --emerald-ink: #047857;
    --emerald-soft: rgba(18, 168, 123, 0.1);
    --emerald-line: rgba(18, 168, 123, 0.5);
    --rose: #E85D8A;
    --rose-ink: #B4234F;
    --bad-soft: rgba(226, 76, 76, 0.08);
    --track: #ECE8E0;
    --strike: rgba(226, 76, 76, 0.75);

    --focus: #0369A1;
    --shadow: 0 20px 50px rgba(20, 24, 33, 0.1);
  }
}

@media (min-width: 600px) { :root { --gutter: 24px; } }

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--gold-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
s { text-decoration-color: var(--strike); text-decoration-thickness: 2px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 12px; background: var(--gold); color: var(--on-gold); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.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; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 760px; }
.wrap--form { max-width: 480px; }

.eb { font-family: var(--font-mono); font-weight: 600; font-size: 11.5px; line-height: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0; }
.eb--gold { color: var(--gold-ink); }
.eb--good { color: var(--emerald-ink); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.lede { font-size: 17px; line-height: 1.6; color: var(--ink2); }
.muted { color: var(--ink2); }
.fine { font-size: 14px; color: var(--faint); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ brand + header */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand:hover { color: var(--ink); }
/* The logo mark (brand/logo, concept B): three rising takes, the tallest is the R's stem. */
.brand__mark { display: block; width: 32px; height: 28px; flex: none; }
.brand__mark rect { fill: var(--gold); }
.brand__re { color: var(--gold-ink); }
.brand__word { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }

.site-header { position: sticky; top: 0; z-index: 20; background: var(--chrome); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav__links { display: none; gap: 4px; }
.site-nav a.navlink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink2); text-decoration: none; font-weight: 500; font-size: 15px; }
.site-nav a.navlink:hover { color: var(--ink); background: var(--card); }
.site-nav .btn { min-height: 44px; padding: 0 16px; font-size: 14.5px; border-radius: 14px; }
@media (min-width: 900px) { .site-nav__links { display: flex; } }
@media (max-width: 380px) { .site-nav .btn--sm-hide { display: none; } }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 22px; border-radius: var(--radius-btn);
  font-family: var(--font-display); font-weight: 700; font-size: 16.5px; line-height: 1.2; text-align: center;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gold); color: var(--on-gold); box-shadow: 0 10px 30px var(--gold-glow); }
.btn--primary:hover { background: var(--gold-bright); color: var(--on-gold); }
.btn--secondary { background: var(--card); color: var(--ink); border-color: var(--line2); }
.btn--secondary:hover { background: var(--card2); color: var(--ink); border-color: var(--ink2); }
.btn--ghost { background: transparent; color: var(--ink2); font-family: var(--font-body); font-weight: 500; min-height: 48px; }
.btn--ghost:hover { color: var(--ink); background: var(--card); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ cards / chips */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.chip--good { background: var(--emerald-soft); color: var(--emerald-ink); }
.chip--gold { background: var(--gold-soft); color: var(--gold-ink); }
.tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line2); color: var(--ink2); font-size: 12px; font-weight: 500; line-height: 1.2; }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 1px; white-space: nowrap; }

/* ------------------------------------------------------------ sections */
.section { padding-block: 72px; }
.section--tight { padding-block: 48px; }
.section__head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin-bottom: 36px; }
.section__head h2 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; }
.section--alt { background: var(--bg-deep); border-block: 1px solid var(--line); }
@media (min-width: 900px) { .section { padding-block: 104px; } }

/* ------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding-block: 40px 56px; }
.hero__glow { position: absolute; top: -220px; left: 50%; width: 760px; height: 760px; margin-left: -380px; border-radius: 50%; background: radial-gradient(circle, var(--gold-glow) 0%, transparent 65%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; gap: 40px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 18px; }
.hero h1 { font-size: clamp(40px, 11vw, 64px); line-height: 1.04; letter-spacing: -0.035em; }
.hero__actions { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.hero__note { font-size: 14px; color: var(--faint); }
@media (min-width: 600px) { .hero__actions { flex-direction: row; align-items: center; gap: 12px; } }
@media (min-width: 960px) {
  .hero { padding-block: 72px 96px; }
  .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; }
}

/* The Redraft moment card (an illustrative example; labelled as such) */
.moment { position: relative; padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); margin: 0; }
.moment__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.moment__scores { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); align-items: center; }
.score { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 0; border-radius: 20px; background: var(--card2); border: 1px solid var(--line); }
.score__n { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1.05; letter-spacing: -0.03em; }
.score--before .score__n { color: var(--ink2); }
.score--after { background: var(--emerald-soft); border: 1.5px solid var(--emerald-line); }
.score__delta { position: absolute; top: -12px; right: -6px; padding: 4px 9px; border-radius: 999px; background: var(--emerald); color: #04140D; font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.moment__arrow { display: flex; justify-content: center; color: var(--emerald-ink); }
.moment__arrow .ico { width: 22px; height: 22px; }

.moved { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--card2); border: 1px solid var(--line); }
.moved__row { display: grid; grid-template-columns: 86px minmax(0, 1fr) 78px; align-items: center; gap: 10px; font-size: 14px; }
.moved__row b { font-weight: 600; }
.moved__val { text-align: right; font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--emerald-ink); }
.track { position: relative; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.track i.after { background: var(--emerald); }
.track i.before { background: var(--ink2); opacity: 0.45; }

.quote { display: flex; flex-direction: column; gap: 6px; }
.quote p { font-size: 15px; line-height: 1.5; }
.quote--before p { color: var(--ink2); }
.quote--after { padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--emerald-line); }
.quote--after strong { color: var(--emerald-ink); font-weight: 600; }
.moment__cap { font-size: 13px; color: var(--faint); }

/* bar widths (no inline styles: the CSP forbids them) */
.w-48 { width: 48%; } .w-54 { width: 54%; } .w-64 { width: 64%; } .w-72 { width: 72%; } .w-76 { width: 76%; }
.w-80 { width: 80%; } .w-82 { width: 82%; } .w-88 { width: 88%; }

@media (prefers-reduced-motion: no-preference) {
  .moment .score--after, .moment .score__delta, .moment .quote--after { animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .moment .score--after { animation-delay: 0.35s; }
  .moment .score__delta { animation-delay: 0.9s; }
  .moment .quote--after { animation-delay: 0.6s; }
  .moment .track i.after { animation: grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s both; transform-origin: left; }
  /* transform only: the payoff stays visible even if animations never run */
  @keyframes rise { from { transform: translateY(10px) scale(0.97); } to { transform: none; } }
  @keyframes grow { from { transform: scaleX(0.7); } to { transform: none; } }
}

/* ------------------------------------------------------------ how it works */
.steps { display: grid; gap: 16px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.step { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.step__n { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
.step h3 { font-size: 21px; line-height: 1.25; }
.step p { color: var(--ink2); }
.step__demo { margin-top: auto; padding: 16px; border-radius: 18px; background: var(--card2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.wave { display: flex; align-items: center; gap: 4px; height: 56px; }
.wave i { display: block; width: 5px; border-radius: 3px; background: var(--gold); opacity: 0.35; }
.wave i.on { opacity: 1; }
.wave i:nth-child(1) { height: 14px; } .wave i:nth-child(2) { height: 24px; } .wave i:nth-child(3) { height: 18px; }
.wave i:nth-child(4) { height: 34px; } .wave i:nth-child(5) { height: 26px; } .wave i:nth-child(6) { height: 46px; }
.wave i:nth-child(7) { height: 56px; } .wave i:nth-child(8) { height: 40px; } .wave i:nth-child(9) { height: 28px; }
.wave i:nth-child(10) { height: 36px; } .wave i:nth-child(11) { height: 20px; } .wave i:nth-child(12) { height: 26px; }
.wave i:nth-child(13) { height: 14px; } .wave i:nth-child(14) { height: 22px; } .wave i:nth-child(15) { height: 12px; }
.rec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rec-dot { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink2); }
.rec-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--rose); }
@media (prefers-reduced-motion: no-preference) {
  .wave i.on { animation: pulse 1.6s ease-in-out infinite; }
  .wave i:nth-child(2n).on { animation-delay: 0.2s; }
  .wave i:nth-child(3n).on { animation-delay: 0.4s; }
  @keyframes pulse { 50% { transform: scaleY(0.6); } }
}

.dims { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dims li { display: grid; grid-template-columns: 92px minmax(0, 1fr) 30px; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink2); }
.dims li > span:first-child { display: flex; align-items: center; gap: 8px; }
.dims .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dims .val { text-align: right; font-family: var(--font-mono); font-weight: 700; color: var(--ink); }
.dims .weak .val { color: var(--gold-ink); }
.dims .weak .track { box-shadow: 0 0 0 1.5px var(--gold); }
.bg-sky, .track i.bg-sky { background: var(--sky); } .bg-violet, .track i.bg-violet { background: var(--violet); } .bg-emerald, .track i.bg-emerald { background: var(--emerald); }

.fix { padding: 14px; border-radius: 16px; background: var(--gold-soft); border: 1px solid var(--gold-line); display: flex; flex-direction: column; gap: 8px; }
.fix h4 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.fix p { font-size: 14px; line-height: 1.45; }
.fix .was { color: var(--ink2); text-decoration: line-through; text-decoration-color: var(--strike); }

.mini-scores { display: flex; align-items: center; gap: 12px; }
.mini-scores .score { flex: 1; padding: 10px 0; }
.mini-scores .score__n { font-size: 30px; }

/* ------------------------------------------------------------ layers */
.layers { display: grid; gap: 14px; }
.layer { padding: 22px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.layer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; }
.layer--sky::before { background: var(--sky); }
.layer--violet::before { background: var(--violet); }
.layer--emerald::before { background: var(--emerald); }
.layer h3 { font-size: 20px; }
.layer__lede { color: var(--ink2); }
.layer__scored { font-size: 13.5px; color: var(--faint); }
.layer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.layer li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.layer li::before { content: ""; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; flex: none; background: currentColor; }
.layer--sky li::before { background: var(--sky); }
.layer--violet li::before { background: var(--violet); }
.layer--emerald li::before { background: var(--emerald); }
.ink-sky { color: var(--sky-ink); } .ink-violet { color: var(--violet-ink); } .ink-emerald { color: var(--emerald-ink); }
@media (min-width: 900px) { .layers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.situations { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.situations li { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14.5px; color: var(--ink2); }

/* ------------------------------------------------------------ gym */
.gym { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tile { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.tile__ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.tile__ico .ico { width: 24px; height: 24px; stroke-width: 2; }
.tile__ico--sky { background: var(--sky-soft); color: var(--sky-ink); }
.tile__ico--violet { background: var(--violet-soft); color: var(--violet-ink); }
.tile__ico--emerald { background: var(--emerald-soft); color: var(--emerald-ink); }
.tile__ico--gold { background: var(--gold-soft); color: var(--gold-ink); }
.tile__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile__title { font-weight: 600; font-size: 16px; }
.tile__sub { font-size: 13.5px; color: var(--ink2); }
.xp { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--gold-ink); background: var(--gold-soft); border-radius: 999px; padding: 4px 8px; flex: none; white-space: nowrap; }
@media (min-width: 720px) { .gym { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.more { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.more li { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.more h3 { font-size: 17px; font-family: var(--font-display); font-weight: 600; }
.more p { font-size: 14.5px; color: var(--ink2); }
@media (min-width: 720px) { .more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .more { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ------------------------------------------------------------ pricing */
.period { display: inline-flex; padding: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); gap: 4px; margin: 0 0 24px; border-style: solid; }
.period legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.period label { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 15px; color: var(--ink2); cursor: pointer; }
.period input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.period label:has(input:checked) { background: var(--card3); color: var(--ink); }
.period label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.plans { display: grid; gap: 16px; align-items: stretch; }
@media (min-width: 820px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 920px; } }
.plan { position: relative; padding: 24px; display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 24px; }
.plan--featured { border-color: var(--gold-line); background: linear-gradient(180deg, var(--gold-soft), transparent 55%), var(--card); }
.plan__flag { color: var(--gold-ink); }
.plan__name { font-size: 24px; }
.plan__tagline { color: var(--ink2); }
.plan__price { display: flex; align-items: baseline; gap: 4px; margin-top: 8px; }
.plan__amount { font-family: var(--font-display); font-weight: 700; font-size: 40px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan__unit { color: var(--ink2); font-size: 16px; }
.plan__sub { font-size: 14.5px; color: var(--ink2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan__features { list-style: none; margin: 10px 0 8px; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.plan__features li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan__features .ico { color: var(--emerald); margin-top: 3px; stroke-width: 2.6; }
.plan__cta { margin-top: auto; }
.pricing-notes { margin-top: 20px; max-width: 760px; display: flex; flex-direction: column; gap: 6px; }

/* ------------------------------------------------------------ faq */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; min-height: 56px; font-weight: 600; font-size: 16.5px; border-radius: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform 0.2s ease; color: var(--ink2); }
.faq details[open] summary .ico { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 20px; color: var(--ink2); display: flex; flex-direction: column; gap: 10px; }

/* ------------------------------------------------------------ closing CTA */
.closer { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: 12px; }
.closer h2 { font-size: clamp(30px, 7vw, 48px); line-height: 1.1; }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px 48px; color: var(--ink2); font-size: 14.5px; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 22px; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; margin-left: -10px; color: var(--ink2); text-decoration: none; border-radius: 10px; }
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .fine { max-width: 640px; }
@media (min-width: 760px) { .site-footer .wrap { flex-direction: row; justify-content: space-between; align-items: flex-start; } }

/* ------------------------------------------------------------ app pages (start / account / welcome) */
.page { padding-block: 32px 72px; position: relative; }
.page__glow { position: absolute; top: -260px; left: 50%; width: 640px; height: 640px; margin-left: -320px; border-radius: 50%; background: radial-gradient(circle, var(--gold-glow) 0%, transparent 65%); pointer-events: none; }
.page .wrap { position: relative; }
.panel { display: flex; flex-direction: column; gap: 18px; }
.panel__head { display: flex; flex-direction: column; gap: 10px; }
.panel__head h1 { font-size: clamp(28px, 7.5vw, 36px); line-height: 1.15; }
.box { padding: 22px; display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14.5px; }
.input-wrap { position: relative; }
.field input[type="email"], .field input[type="password"], .field input[type="text"] {
  width: 100%; min-height: 54px; padding: 0 16px; border-radius: 16px; font-size: 16px;
  background: var(--card2); color: var(--ink); border: 1.5px solid var(--line2);
}
.field input:hover { border-color: var(--ink2); }
.field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.field input[aria-invalid="true"] { border-color: var(--rose); }
.field .hint { font-size: 13.5px; color: var(--faint); }
.input-wrap input { padding-right: 76px !important; }
.reveal-pw { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 42px; padding: 0 12px; border-radius: 12px; border: 0; background: transparent; color: var(--ink2); font-weight: 600; font-size: 14px; cursor: pointer; }
.reveal-pw:hover { color: var(--ink); background: var(--card3); }

.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line2); background: var(--card2); cursor: pointer; font-size: 14.5px; line-height: 1.45; }
.consent input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--gold); cursor: pointer; }
.consent:has(input:checked) { border-color: var(--gold-line); background: var(--gold-soft); }
.consent:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.consent a { color: var(--ink); }

.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.oauth { display: flex; flex-direction: column; gap: 10px; }
.oauth .btn { font-family: var(--font-body); font-weight: 600; font-size: 16px; }
.switch { text-align: center; font-size: 15px; color: var(--ink2); }
.linkbtn { background: none; border: 0; padding: 0 2px; min-height: 44px; color: var(--gold-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--ink); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; font-size: 15px; line-height: 1.5; }
.alert .ico { margin-top: 2px; }
.alert--error { background: var(--bad-soft); border: 1px solid var(--rose); color: var(--ink); }
.alert--error .ico { color: var(--rose-ink); }
.alert--info { background: var(--card2); border: 1px solid var(--line2); color: var(--ink); }
.alert--good { background: var(--emerald-soft); border: 1px solid var(--emerald-line); color: var(--ink); }
.alert--good .ico { color: var(--emerald-ink); }
.alert__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.alert__body a { color: var(--ink); font-weight: 600; }
.alert__detail { font-family: var(--font-mono); font-size: 12px; color: var(--faint); word-break: break-word; }

.who { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14.5px; color: var(--ink2); }
.who strong { color: var(--ink); font-weight: 600; word-break: break-all; }

.choices { display: flex; flex-direction: column; gap: 12px; border: 0; margin: 0; padding: 0; }
.choices legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; border: 1.5px solid var(--line2); background: var(--card); cursor: pointer; }
.choice:hover { border-color: var(--ink2); }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice__radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); display: flex; align-items: center; justify-content: center; }
.choice__radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.choice:has(input:checked) { border: 2px solid var(--gold); background: var(--gold-soft); padding: 17.5px; }
.choice:has(input:checked) .choice__radio { border-color: var(--gold); }
.choice:has(input:checked) .choice__radio::after { background: var(--gold); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.choice__name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.choice__sub { font-size: 13.5px; color: var(--ink2); }
.choice__price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.choice__price .num { font-weight: 700; font-size: 18px; }
.choice__price small { font-size: 12.5px; color: var(--ink2); }
.choice__price .was { color: var(--faint); text-decoration: line-through; font-size: 13px; }
.choice .badge { position: absolute; top: -11px; right: 16px; background: var(--gold); color: var(--on-gold); }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); margin: 0; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg label { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: 12px; font-weight: 600; font-size: 15px; color: var(--ink2); cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--card3); color: var(--ink); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.offer { padding: 18px; border-radius: 20px; border: 1.5px solid var(--gold-line); background: var(--gold-soft); display: flex; flex-direction: column; gap: 10px; }
.offer__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.offer__timer { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--gold-ink); }
.offer h2 { font-size: 20px; line-height: 1.3; }
.offer p { font-size: 14.5px; color: var(--ink2); }
.offer .btn { min-height: 48px; font-size: 15px; }

.summary { padding: 14px 16px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); font-size: 14.5px; color: var(--ink2); display: flex; flex-direction: column; gap: 6px; }
.summary strong { color: var(--ink); }
.secure { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; color: var(--faint); text-align: center; }
.secure .ico { width: 15px; height: 15px; }

.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps-list li { display: flex; gap: 16px; padding: 18px; align-items: flex-start; }
.steps-list .step__n { flex: none; }
.steps-list h2 { font-size: 18px; line-height: 1.3; font-family: var(--font-display); font-weight: 600; }
.steps-list p { color: var(--ink2); font-size: 15px; }
.steps-list .li-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.store-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border-radius: 14px; background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600; align-self: flex-start; }
.store-btn:hover { color: var(--bg); opacity: 0.9; }
.store-btn .ico { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.soon { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1.5px dashed var(--line2); color: var(--ink2); font-weight: 600; font-size: 14.5px; align-self: flex-start; }

.big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--emerald-soft); color: var(--emerald-ink); display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--emerald-line); }
.big-check .ico { width: 30px; height: 30px; stroke-width: 2.6; }

.plan-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.plan-card__name { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 16px; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.kv dt { font-size: 13px; color: var(--faint); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 10px; }
.kv dd { margin: 0; font-size: 15.5px; }
@media (min-width: 520px) { .kv { grid-template-columns: 170px minmax(0, 1fr); } .kv dt, .kv dd { margin-top: 10px; } }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.status-dot--on { background: var(--emerald); }
.status-dot--off { background: var(--faint); }

.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--card2), var(--card3), var(--card2)); background-size: 200% 100%; min-height: 20px; }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: shimmer 1.4s ease-in-out infinite; } @keyframes shimmer { to { background-position: -200% 0; } } }

.dev-banner { position: fixed; bottom: 12px; left: 12px; right: 12px; z-index: 40; padding: 10px 14px; border-radius: 12px; background: var(--violet-soft); border: 1px solid var(--violet); color: var(--ink); font-family: var(--font-mono); font-size: 12px; text-align: center; backdrop-filter: blur(10px); }

/* ------------------------------------------------------------ legal + 404 */
.legal { padding-block: 40px 80px; }
.legal h1 { font-size: clamp(30px, 7vw, 42px); }
.legal .draft { margin: 18px 0 8px; }
.legal section { margin-top: 32px; }
.legal h2 { font-size: 21px; margin-bottom: 10px; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--ink2); }
.legal p + p { margin-top: 10px; }
.legal ul { margin: 10px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal .toc-links { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 14px; }

.notfound { min-height: 62vh; display: flex; align-items: center; padding-block: 56px; }
.notfound .wrap { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.notfound h1 { font-size: clamp(34px, 9vw, 56px); line-height: 1.08; }
.notfound .strike { color: var(--ink2); }
.skeleton--h1 { height: 40px; width: 70%; }
.box .skeleton { height: 54px; }
.offer p.eb--gold, .offer p.offer__timer { color: var(--gold-ink); }
.offer p.fine { color: var(--faint); }
/* Keep the footer at the bottom of short pages. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; }
#billing-web { display: flex; flex-direction: column; gap: 8px; }
#notice { margin-bottom: 18px; }
