/* ============================================================================
   Can you beat your kid? — Detect The Bet · "Fluent"
   Warm editorial face-off. Parent = signal (terracotta) · Kid = teal.
   Source Serif 4 + IBM Plex. Mobile-first inside a phone frame.
   ============================================================================ */

:root {
  --signal:   #e55f31;
  --signal-d: #c94718;
  --teal:     #2f7a70;
  --teal-l:   #479388;
  --amber:    #d39836;
  --amber-d:  #9a6a1a;
  --ink:      #1a1c1e;

  --paper:      #f6f1e7;
  --paper-deep: #efe6d2;
  --card:       #fffdf8;
  --page:       #e7ddc8;

  --t-1: #8a7a63;   /* muted */
  --t-2: #6b5d4d;   /* body muted */
  --t-3: #a08a66;   /* faint */
  --t-4: #a89c86;   /* fainter mono */
  --t-5: #b9a986;   /* faintest */

  --bd-1: #d3c8af;
  --bd-2: #e2d8c2;
  --bd-3: #e9e0cd;
  --bd-4: #e6ddcb;
  --bd-5: #d9cdb4;
  --bd-6: #e3dccb;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, monospace;
  --e: cubic-bezier(.2,0,0,1);

  /* accent flips parent/kid */
  --accent: var(--signal);
  --accent-d: var(--signal-d);
  --accent-tint: rgba(229,95,49,.10);
  --accent-glow: rgba(229,95,49,.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--signal); color: #fffdf8; }
img { display: block; }

/* ── Stage + phone frame ─────────────────────────────────────────────────── */
.stage {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: radial-gradient(120% 90% at 50% -8%, #f3ead7 0%, #e9dfca 50%, #ddd2ba 100%);
}
.stage-noise {
  position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.phone {
  position: relative;
  width: min(428px, 100vw);
  height: min(896px, calc(100vh - 28px));
  background: var(--paper);
  border-radius: 42px;
  border: 1px solid var(--bd-1);
  box-shadow: 0 40px 110px -24px rgba(60,44,20,.5), 0 2px 0 rgba(255,255,255,.5) inset;
  overflow: hidden;
}
.phone[data-player="kid"] {
  --accent: var(--teal); --accent-d: #1c4d47;
  --accent-tint: rgba(47,122,112,.10); --accent-glow: rgba(47,122,112,.55);
}

/* ── Screens ─────────────────────────────────────────────────────────────── */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto; }
.screen::-webkit-scrollbar { width: 0; height: 0; }

/* ── Shared atoms ────────────────────────────────────────────────────────── */
.eyebrow, .mono-label, .mono-faint { font-family: var(--mono); text-transform: uppercase; }
.eyebrow { font-size: 11px; letter-spacing: .28em; color: var(--t-1); }
.eyebrow-signal { color: var(--signal-d); letter-spacing: .3em; }
.eyebrow-warm { color: #b06a45; letter-spacing: .26em; }
.mono-label { font-size: 11px; letter-spacing: .2em; color: var(--t-1); font-weight: 500; }
.mono-label.tiny { font-size: 10px; letter-spacing: .16em; }
.mono-label.signal { color: var(--signal-d); }
.mono-label.teal { color: var(--teal); }
.mono-faint { font-size: 10px; letter-spacing: .2em; color: var(--t-4); }
.lede { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--t-2); }
.dot { width: 9px; height: 9px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); flex: none; }

.btn {
  border: none; cursor: pointer; width: 100%; font-family: var(--sans); font-weight: 600; font-size: 16px;
  padding: 17px 20px; border-radius: 4px; color: #fffdf8; background: var(--accent);
  display: flex; align-items: center; justify-content: center; gap: 9px; line-height: 1.2;
  transition: transform .12s var(--e), background .18s;
}
.btn:active { transform: translateY(2px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-signal { background: var(--signal); box-shadow: 0 12px 26px -12px rgba(229,95,49,.65); }
.btn-signal:hover { background: #d34e22; }
.btn-ink { background: var(--ink); box-shadow: 0 14px 30px -12px rgba(60,44,20,.5); }
.btn-outline-lg { background: var(--card); color: var(--ink); border: 1px solid #c9bb9c; }
.btn-outline-lg:hover { background: #f3ead7; }
.btn-outline { border: 1px solid #c9bb9c; background: var(--card); cursor: pointer; color: var(--ink); font-family: var(--sans); font-weight: 600; font-size: 14px; padding: 0 18px; border-radius: 4px; white-space: nowrap; transition: background .15s; }
.btn-outline:hover { background: #f3ead7; }
.linkbtn { background: none; border: none; cursor: pointer; font-family: var(--sans); font-weight: 500; font-size: 14px; color: var(--t-2); padding: 8px 0; display: inline-flex; align-items: center; gap: 7px; }
.field { width: 100%; background: var(--card); border: 1px solid var(--bd-5); border-radius: 4px; padding: 15px 16px; font-family: var(--sans); font-size: 15px; color: var(--ink); outline: none; }
.field:focus { border-color: var(--accent); }

/* ── 1 · Cover ───────────────────────────────────────────────────────────── */
.cover { background: radial-gradient(130% 80% at 50% 4%, #fdf8ec 0%, #f4edda 52%, #efe6d2 100%); }
.mast { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 26px 28px 0; }
.mast-mark { width: 26px; height: 26px; object-fit: contain; }
.mast-name { font-family: var(--mono); font-size: 11px; letter-spacing: .26em; color: var(--t-1); text-transform: uppercase; }
.mast-chip { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: var(--t-3); text-transform: uppercase; border: 1px solid #ddd0b6; padding: 4px 8px; border-radius: 2px; white-space: nowrap; }

.cover-hero { flex-shrink: 0; margin-top: auto; display: flex; flex-direction: column; padding: 24px 28px 8px; }
.hook { font-family: var(--serif); font-weight: 500; font-size: 35px; line-height: 1.08; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; margin-top: 18px; }
.hook-mark { position: relative; white-space: nowrap; }
.hook-mark svg { position: absolute; left: -2%; bottom: -9px; width: 104%; height: 13px; overflow: visible; }
.hook-mark svg path { stroke: var(--signal); stroke-width: 3.4; fill: none; stroke-linecap: round; }
.hook-q { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 42px; line-height: 1; letter-spacing: -.03em; color: var(--ink); margin-top: 16px; }

.vs-wrap { display: flex; justify-content: center; margin: 30px 0 24px; }
.vs-mark { position: relative; width: 130px; height: 130px; animation: vsPulse 4.2s ease-in-out infinite; }
.vs-half { position: absolute; inset: 0; }
.vs-you { clip-path: polygon(50% 3%,50% 97%,3% 50%); background: linear-gradient(150deg,#ef8057,#c94718); }
.vs-kid { clip-path: polygon(50% 3%,97% 50%,50% 97%); background: linear-gradient(150deg,#479388,#1c4d47); }
.vs-divider { position: absolute; left: 50%; top: 6%; bottom: 6%; width: 1.5px; transform: translateX(-50%); background: var(--ink); }
.vs-sheen { position: absolute; inset: 0; overflow: hidden; clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%); pointer-events: none; }
.vs-sheen span { position: absolute; top: 0; bottom: 0; width: 38%; left: -10%; background: linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent); animation: vsSheen 3.6s ease-in-out infinite; }
.vs-badge { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 999px; background: var(--ink); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-style: italic; font-size: 21px; color: #fdf8ec; letter-spacing: -.02em; box-shadow: 0 4px 14px rgba(60,44,20,.35); }
.vs-side { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; writing-mode: vertical-rl; }
.vs-side-you { left: -28px; color: var(--signal-d); rotate: 180deg; }
.vs-side-kid { right: -30px; color: var(--teal); }

.stamp-wrap { display: flex; justify-content: center; }
.stamp { transform: rotate(-2.4deg); background: var(--ink); padding: 13px 22px; box-shadow: 0 12px 28px -10px rgba(60,44,20,.5); }
.stamp span { font-family: var(--serif); font-weight: 600; font-size: 21px; color: #fdf8ec; letter-spacing: -.01em; }

.cover-foot { flex-shrink: 0; padding: 24px 28px 26px; margin-top: auto; }
.cover-sub { font-size: 14px; line-height: 1.5; color: var(--t-1); text-align: center; margin-bottom: 18px; }
.anon { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 16px; color: var(--t-3); }
.anon span { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }

/* cover staggered entrance (transform-only → never blank) */
.cover [data-fx] { animation: flUp .55s var(--e) both; }
.cover [data-fx="2"] { animation-duration: .6s; animation-delay: .12s; }
.cover [data-fx="3"] { animation-delay: .2s; }
.cover [data-fx="4"] { animation: flPop .7s var(--e) .34s both; }
.cover [data-fx="5"] { animation-delay: .46s; }
.cover [data-fx="6"] { animation-delay: .54s; }
.cover [data-fx="7"] { animation-delay: .6s; }
.cover [data-fx="8"] { animation-delay: .7s; }

/* ── 2 · Personalize ─────────────────────────────────────────────────────── */
.personalize { background: var(--paper); }
.pz-head { padding: 34px 28px 14px; }
.pz-head .eyebrow-warm { margin-bottom: 14px; }
.q { font-family: var(--serif); font-weight: 500; font-size: 31px; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); }
.pz-head .lede { margin-top: 10px; }
.chips { padding: 18px 28px 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.chip {
  display: flex; flex-direction: column; cursor: pointer; text-align: left; border-radius: 6px; padding: 16px;
  border: 1.5px solid var(--bd-6); background: var(--card); color: var(--ink); font: inherit;
  transition: transform .12s var(--e), border-color .15s, background .15s, box-shadow .15s, color .15s;
}
.chip:active { transform: translateY(2px); }
.chip-top { display: flex; align-items: center; justify-content: space-between; }
.chip-tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fffdf8; transform: scale(0); opacity: 0; transition: transform .2s var(--e), opacity .2s; }
.chip-name { display: block; font-weight: 600; font-size: 16px; margin-top: 18px; }
.chip-sub { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .6; margin-top: 3px; }
.chip.sel { box-shadow: 0 8px 22px -14px var(--chip-c); border-color: var(--chip-c); background: var(--chip-tint); color: var(--chip-c); }
.chip.sel .chip-tick { background: var(--chip-c); transform: scale(1); opacity: 1; }
.chip-notsure-wrap { padding: 5px 28px 0; }
.chip-notsure {
  width: 100%; display: flex; align-items: center; gap: 11px; cursor: pointer; border-radius: 6px; padding: 16px; font: inherit;
  border: 1.5px dashed #cbbf9f; background: transparent; color: var(--t-2);
  transition: transform .12s var(--e), background .15s, border-color .15s, color .15s;
}
.chip-notsure:active { transform: translateY(2px); }
.chip-notsure.sel { border: 1.5px solid var(--signal); background: rgba(229,95,49,.1); color: var(--signal); }
.pz-foot { margin-top: auto; padding: 20px 28px 30px; display: flex; align-items: center; justify-content: space-between; }
.pz-foot .mono-faint { color: var(--t-4); letter-spacing: .14em; }

/* ── Turn card ───────────────────────────────────────────────────────────── */
.turn { background: radial-gradient(120% 70% at 50% 14%, #fdf3e6, #f2e8d4 62%); }
.phone[data-player="kid"] .turn { background: radial-gradient(120% 70% at 50% 14%, #e8f1ec, #dceae3 62%); }
.turn-inner { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: safe center; text-align: center; padding: 34px; }
.turn-id { display: flex; align-items: center; gap: 9px; }
.turn-id .mono-label { letter-spacing: .3em; font-size: 12px; color: var(--accent-d); }
.phone[data-player="kid"] .turn-id .mono-label { color: var(--teal); }
.turn-headline { font-family: var(--serif); font-weight: 500; font-size: 38px; line-height: 1.06; letter-spacing: -.025em; color: var(--ink); margin-top: 20px; text-wrap: balance; }
.turn-sub { font-size: 15px; line-height: 1.55; color: var(--t-2); margin-top: 18px; max-width: 300px; }
.turn-note { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--bd-1); border-radius: 999px; padding: 8px 16px; color: var(--t-1); }
.turn-note span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.turn-btn { width: auto; margin-top: 38px; padding: 16px 40px; box-shadow: 0 12px 26px -12px var(--accent-glow); }
.turn-inner > * { animation: flUp .55s var(--e) both; }
.turn-inner > .turn-headline { animation-delay: .08s; }
.turn-inner > .turn-sub { animation-delay: .16s; }
.turn-inner > .turn-note { animation-delay: .24s; }
.turn-inner > .turn-btn { animation: flPop .6s var(--e) .3s both; }

/* ── Play ────────────────────────────────────────────────────────────────── */
.play { background: var(--paper); }
.phone[data-player="kid"] .play { background: #eaf1ee; }
.play-top { flex-shrink: 0; padding: 26px 26px 0; }
.play-top-row { display: flex; align-items: center; justify-content: space-between; }
.play-id .mono-label { font-size: 11px; letter-spacing: .24em; color: var(--accent); }
.play-count { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--t-2); font-weight: 500; }
.phone[data-player="kid"] .play-count { color: #42554e; }
.play-count-tot { opacity: .45; }
.track { margin-top: 14px; height: 4px; border-radius: 999px; background: var(--bd-4); overflow: hidden; }
.phone[data-player="kid"] .track { background: #d3e2db; }
.track-fill { height: 100%; border-radius: 999px; background: var(--accent); width: 0%; transition: width .45s var(--e); }
.pips { margin-top: 11px; display: flex; gap: 6px; }
.pips span { flex: 1; height: 5px; border-radius: 999px; background: var(--bd-4); transition: background .3s; }
.phone[data-player="kid"] .pips span { background: #d3e2db; }
.pips span.cur { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.pips span.ok { background: var(--teal-l); }
.pips span.no { background: var(--amber); }

.round { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 30px 26px 0; }
.type-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--type-bd); background: var(--type-bg); border-radius: 999px; padding: 6px 13px; animation: flIn .4s var(--e) both; }
.type-badge span:last-child { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--type-c); font-weight: 500; }
.type-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--type-c); }
.prompt { font-family: var(--serif); font-weight: 500; font-size: 27px; line-height: 1.22; letter-spacing: -.015em; color: var(--ink); text-wrap: pretty; margin-top: 18px; animation: flUp .42s var(--e) .04s both; }
.phone[data-player="kid"] .prompt { color: #13211d; }

.options { margin-top: 24px; display: flex; flex-direction: column; gap: 11px; }
.option {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; cursor: pointer;
  border-radius: 5px; padding: 15px; font: inherit; background: var(--card); border: 1.5px solid var(--bd-4);
  transition: background .18s var(--e), border-color .18s, box-shadow .18s, opacity .18s, transform .1s var(--e);
}
.phone[data-player="kid"] .option { background: #f5faf7; }
.option:active { transform: scale(.99); }
.opt-badge { flex-shrink: 0; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 999px; font-family: var(--mono); font-size: 12px; font-weight: 600; background: #f1e9d8; color: var(--t-1); transition: all .18s; }
.phone[data-player="kid"] .opt-badge { background: #e3efe9; color: #3f5650; }
.opt-text { flex: 1; font-family: var(--serif); font-size: 16.5px; line-height: 1.32; color: var(--ink); }
.opt-mark { width: 18px; flex-shrink: 0; text-align: center; font-weight: 700; }
.options.locked .option { cursor: default; }
.option.active { background: var(--accent-tint); border-color: var(--accent); }
.option.active .opt-badge { background: var(--accent); color: #fffdf8; }
.option.correct { background: rgba(71,147,136,.14); border-color: var(--teal); box-shadow: 0 6px 18px -12px var(--teal); }
.option.correct .opt-badge { background: var(--teal); color: #fff; }
.option.correct .opt-mark { color: var(--teal); }
.option.wrong { background: rgba(211,152,54,.16); border-color: var(--amber); }
.option.wrong .opt-badge { background: var(--amber); color: #fff; }
.option.wrong .opt-text { color: var(--t-2); }
.option.wrong .opt-mark { color: var(--amber-d); font-size: 18px; }
.option.dim { opacity: .45; border-color: #ece4d3; }

.feedback { min-height: 46px; margin-top: 16px; display: flex; align-items: flex-start; gap: 9px; }
.feedback:empty { min-height: 46px; }
.feedback .fb-dot { margin-top: 4px; flex-shrink: 0; width: 7px; height: 7px; border-radius: 999px; }
.feedback .fb-text { font-size: 13.5px; line-height: 1.45; font-weight: 500; }
.feedback.show { animation: flIn .32s var(--e) both; }

/* ── Hand-off (flip) ─────────────────────────────────────────────────────── */
.handoff { background: var(--paper); perspective: 1500px; overflow: hidden; }
.flipper { position: absolute; inset: 0; }
.flipper.out { animation: flipOut .42s cubic-bezier(.5,0,1,.4) forwards; }
.flipper.in { animation: flipIn .42s cubic-bezier(.2,.7,.4,1) forwards; }
.flip-face { position: absolute; inset: 0; overflow-y: auto; }
.flip-front { background: radial-gradient(120% 70% at 50% 12%,#fdf8ec,#f1e8d5 62%); }
.flip-back { background: radial-gradient(120% 70% at 50% 12%,#e8f1ec,#dceae3 62%); }
.flip-scroll { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 34px; text-align: center; }
.ho-scored { font-size: 14px; color: var(--t-1); margin: 18px 0 4px; }
.ho-num { display: flex; align-items: baseline; gap: 4px; font-family: var(--serif); font-weight: 500; color: var(--ink); animation: flPop .6s var(--e) .12s both; }
.ho-num #hoScore { font-size: 96px; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ho-num .ho-tot { font-size: 34px; color: var(--t-4); }
.ho-title { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.05; letter-spacing: -.02em; color: var(--ink); margin-top: 26px; }
.ho-pill { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #e2cfa0; background: #faf1da; border-radius: 999px; padding: 9px 16px; color: var(--amber-d); }
.ho-pill span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.ho-pass { width: auto; margin-top: 40px; padding: 17px 34px; }
.lock-ring { width: 64px; height: 64px; border-radius: 999px; border: 1.5px solid var(--teal-l); display: grid; place-items: center; margin-bottom: 24px; background: #f1f8f4; color: var(--teal); }
.ho-locked-title { font-family: var(--serif); font-weight: 500; font-size: 30px; color: #16302b; letter-spacing: -.02em; margin-top: 14px; }
.flip-front .eyebrow, .flip-front .ho-scored, .flip-front .ho-title, .flip-front .ho-pill, .flip-front .ho-pass { animation: flUp .5s var(--e) both; }
.flip-front .ho-title { animation-delay: .2s; }
.flip-front .ho-pill { animation-delay: .28s; }
.flip-front .ho-pass { animation: flPop .6s var(--e) .36s both; }

/* ── Tally ───────────────────────────────────────────────────────────────── */
.tally { align-items: center; justify-content: safe center; text-align: center; padding: 34px; background: radial-gradient(120% 70% at 50% 18%,#fdf8ec,#f1e8d5 60%); }
.tally-dots { display: flex; gap: 9px; margin-bottom: 26px; }
.tally-dots span { width: 9px; height: 9px; border-radius: 999px; animation: flDot 1.1s ease-in-out infinite; }
.tally-dots span:nth-child(1) { background: var(--signal); }
.tally-dots span:nth-child(2) { background: var(--ink); animation-delay: .18s; }
.tally-dots span:nth-child(3) { background: var(--teal); animation-delay: .36s; }
.tally-title { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 30px; color: var(--ink); letter-spacing: -.02em; }
.tally .mono-faint { margin-top: 12px; }

/* ── Reveal ──────────────────────────────────────────────────────────────── */
.reveal { background: var(--paper); }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.reveal-scroll { position: relative; }
.reveal-hero { padding: 38px 28px 30px; text-align: center; background: radial-gradient(120% 80% at 50% 0%,#fdf8ec,#f1e8d5 72%); border-bottom: 1px solid var(--bd-2); }
.reveal-hero .eyebrow { animation: flIn .5s var(--e) both; }
.scoreboard { display: flex; align-items: stretch; justify-content: center; margin-top: 22px; animation: flScaleIn .6s var(--e) .1s both; }
.sb-side { flex: 1; display: flex; flex-direction: column; align-items: center; }
.sb-label { font-size: 11px; letter-spacing: .2em; }
.sb-label.signal { color: var(--signal-d); }
.sb-label.teal { color: var(--teal); }
.sb-num { font-family: var(--serif); font-weight: 500; font-size: 80px; line-height: .92; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 6px; }
.sb-vs { align-self: center; width: 42px; height: 42px; border-radius: 999px; background: var(--ink); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-style: italic; font-size: 18px; color: #fdf8ec; margin: 0 6px; }
.verdict { margin-top: 20px; display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; border-radius: 999px; padding: 7px 15px; animation: flUp .55s var(--e) .3s both; }
.verdict.even { color: #1c4d47; border: 1px solid #cfe2da; background: #e9f2ee; }
.verdict.close { color: var(--amber-d); border: 1px solid #e7d3a3; background: #faf1da; }
.verdict.wide { color: var(--signal-d); border: 1px solid #f0cdbb; background: #fbeae1; }

.reveal-block { padding: 26px 28px 4px; }
.reframe { font-family: var(--serif); font-size: 20px; line-height: 1.45; color: #2a2722; text-wrap: pretty; border-left: 3px solid var(--signal); padding-left: 18px; }
.rule-label { display: flex; align-items: center; gap: 10px; }
.rule-label .rule { flex: 1; height: 1px; background: var(--bd-2); }
.missed-list { margin-top: 14px; display: flex; flex-direction: column; }
.missed-item { padding: 16px 0; border-bottom: 1px solid var(--bd-3); display: flex; gap: 14px; align-items: baseline; }
.missed-num { font-family: var(--mono); font-size: 11px; color: var(--t-5); font-weight: 500; padding-top: 3px; }
.missed-term { font-family: var(--sans); font-weight: 600; font-size: 16px; color: var(--ink); letter-spacing: -.01em; }
.missed-plain { margin-top: 5px; font-family: var(--serif); font-size: 15px; line-height: 1.5; color: #5a5247; }
.opener { margin-top: 14px; background: #e9f2ee; border: 1px solid #cfe2da; border-radius: 6px; padding: 22px; }
.opener p { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 19px; line-height: 1.42; color: #16302b; text-wrap: pretty; }
.reveal-block .field { margin-top: 9px; }
.cta-row { display: flex; gap: 11px; padding-top: 16px; }
.cta-row .btn { padding: 17px; }

.playbook { margin-top: 14px; padding: 22px 28px 30px; border-top: 1px solid var(--bd-3); background: var(--paper-deep); display: flex; gap: 14px; align-items: flex-start; }
.pb-mark { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; margin-top: 2px; }
.pb-body { flex: 1; }
.pb-title { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.pb-sub { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--t-2); }
.pb-row { margin-top: 14px; display: flex; gap: 9px; }
.pb-row .field { padding: 12px 13px; font-size: 14px; }
.card-foot { padding: 0 28px 26px; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--t-5); text-transform: uppercase; background: var(--paper-deep); }
.gap-stat { margin-top: 14px; font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--signal-d); animation: flUp .5s var(--e) both; }
.pb-consent { margin-top: 11px; font-family: var(--sans); font-size: 11px; line-height: 1.45; color: var(--t-4); }

/* ── 7 · Share card ──────────────────────────────────────────────────────── */
.share { background: var(--paper-deep); }
.share-head { flex-shrink: 0; padding: 24px 26px 6px; display: flex; align-items: center; justify-content: space-between; }
.share-stage { flex: 1; display: flex; align-items: center; justify-content: safe center; overflow-y: auto; padding: 8px 26px; min-height: 0; }
.sharecard { position: relative; flex-shrink: 0; width: 100%; max-width: 340px; aspect-ratio: 4/5; background: #fbf5e7; border: 1px solid #e4d8bf; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 60px -22px rgba(60,44,20,.45); animation: flScaleIn .55s var(--e) both; }
.sc-noise { position: absolute; inset: 0; opacity: .55; mix-blend-mode: multiply; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E"); }
.sc-bar { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg,#e55f31 0 50%,#2f7a70 50% 100%); }
.sc-watermark { position: absolute; right: -40px; bottom: -34px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 230px; line-height: 1; color: rgba(26,28,30,.045); pointer-events: none; }
.sc-mast { position: relative; padding: 26px 24px 0; display: flex; align-items: center; gap: 9px; }
.sc-mast img { width: 22px; height: 22px; object-fit: contain; }
.sc-mast span { font-family: var(--mono); font-size: 10px; letter-spacing: .24em; color: var(--t-1); text-transform: uppercase; white-space: nowrap; }
.sc-title-wrap { position: relative; padding: 20px 24px 0; }
.sc-title { margin-top: 10px; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.04; letter-spacing: -.025em; color: var(--ink); }
.sc-scores { position: relative; margin-top: auto; padding: 0 24px; display: flex; align-items: flex-end; justify-content: center; gap: 18px; }
.sc-score { text-align: center; }
.sc-num { font-family: var(--serif); font-weight: 500; font-size: 62px; line-height: .9; color: var(--ink); letter-spacing: -.04em; }
.sc-vs { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--t-4); padding-bottom: 14px; }
.sc-foot { position: relative; padding: 18px 24px 24px; margin-top: 18px; }
.sc-divider { height: 1px; background: #e4d8bf; margin-bottom: 16px; }
.sc-line { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.4; color: #2a2722; text-wrap: pretty; }
.sc-meta { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; }
.sc-meta span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--t-1); white-space: nowrap; }
.sc-meta .sc-url { letter-spacing: .1em; color: var(--t-5); }
.share-actions { flex-shrink: 0; padding: 14px 26px 30px; display: flex; gap: 11px; animation: flUp .5s var(--e) .1s both; }
.share-actions .btn { font-size: 15px; padding: 16px; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 40; background: var(--ink); color: #fdf8ec; font-family: var(--sans); font-weight: 600; font-size: 13px; padding: 11px 18px; border-radius: 999px; box-shadow: 0 14px 34px -10px rgba(60,44,20,.5); white-space: nowrap; animation: flPop .35s var(--e) both; }

/* ── Help footer (outside the frame) ─────────────────────────────────────── */
.help-foot { position: fixed; left: 0; right: 0; bottom: 0; text-align: center; padding: 6px; z-index: 60; pointer-events: none; }
.help-foot a { pointer-events: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; color: rgba(60,44,20,.45); text-decoration: none; text-transform: uppercase; }
.help-foot a:hover { color: rgba(60,44,20,.75); text-decoration: underline; }

/* ── Keyframes ───────────────────────────────────────────────────────────── */
@keyframes flUp { from { transform: translateY(18px); } to { transform: translateY(0); } }
@keyframes flUpSm { from { transform: translateY(10px); } to { transform: translateY(0); } }
@keyframes flIn { from { transform: translateY(7px); } to { transform: translateY(0); } }
@keyframes flPop { 0% { transform: scale(.88); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes flScaleIn { from { transform: scale(.94) translateY(9px); } to { transform: scale(1) translateY(0); } }
@keyframes vsPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes vsSheen { 0% { transform: translateX(-130%) rotate(8deg); } 100% { transform: translateX(130%) rotate(8deg); } }
@keyframes flDot { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes flipOut { from { transform: scaleX(1); } to { transform: scaleX(.02); } }
@keyframes flipIn { from { transform: scaleX(.02); } to { transform: scaleX(1); } }

/* ── Small screens: let the frame fill the device ────────────────────────── */
@media (max-width: 460px), (max-height: 760px) {
  .stage { padding: 0; }
  .phone { width: 100vw; height: 100dvh; border-radius: 0; border: none; }
  .help-foot { mix-blend-mode: normal; }
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .confetti { display: none; }
}
