/* Pique web. Ported from docs/design/locked-design.html (TEC-8600, final).
   Lavender dusk palette, Fraunces Soft + Nunito, index-stack card, R1 Reveal,
   K1 reaction pair + link, N1 Noted, B1 Dusk hills.
   Layout: below 940px the single flipping card (a, phone and tablet);
   from 940px the open book (c). Hand-written; there is no build step. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;
  --b: light-dark(#E2DFF0, #13111D);
  --cd: light-dark(#FFFFFF, #1E1B2B);
  --i: light-dark(#241F33, #E8E5F2);
  --m: light-dark(#5A546C, #A49FB8);
  --a: light-dark(#4B3F8F, #B6ABF5);
  --oa: light-dark(#FFFFFF, #15121F);
  --a2: light-dark(#B4466B, #F2A3BD);
  --gold: light-dark(#8A6410, #F2C46B);
  --soft: color-mix(in srgb, var(--a) 13%, var(--cd));
  --sk1: light-dark(#D9D3EE, #0E0C17);
  --sk2: light-dark(#F4E7EF, #2A2140);
  --h1: light-dark(#D0C7E7, #231D35);
  --h2: light-dark(#BCB1DB, #1E192F);
  --h3: light-dark(#A497CA, #181427);
  --h4: light-dark(#8C7FB8, #120F1D);
  --sun: light-dark(#F6D6DF, #E7B7C8);
  --rose-t: light-dark(#F3C6D5, #4A2638);
  --gold-t: light-dark(#F3D99A, #4A3A16);
  --meh-bg: light-dark(#F7E6BE, #3B2F14);
  --meh-fg: light-dark(#5C4208, #F2D48E);
  --line: color-mix(in srgb, var(--i) 10%, transparent);
  --field: color-mix(in srgb, var(--i) 24%, transparent);
  --shadow: 0 0 0 1px var(--line), 0 2px 4px color-mix(in srgb, var(--i) 8%, transparent),
    0 22px 44px -20px color-mix(in srgb, var(--i) 70%, transparent);
  --hf: 'Fraunces', Georgia, serif;
  --hv: 'SOFT' 100, 'WONK' 1, 'opsz' 72;
  --bw: min(880px, calc(100vw - 204px));
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; min-width: 0; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--b);
  color: var(--i);
  font: 16px/1.5 Nunito, system-ui, sans-serif;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

svg.ln {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: none;
}
svg.ping { display: block; flex: none; }

/* ---------- background: Dusk hills on tablet and desktop, plain on phones ---------- */
.hills { display: none; }
@media (min-width: 600px) {
  .hills { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
}

/* ---------- logo ---------- */
.lock { display: inline-flex; align-items: center; gap: calc(var(--sz) * .3); color: var(--a); }
.lock .mk { width: calc(var(--sz) * 1.05); height: calc(var(--sz) * 1.05); flex: none; display: block; }
.lock .mk svg { width: 100%; height: 100%; }
.wm { display: flex; flex-direction: column; align-items: flex-start; }
.w {
  font-family: var(--hf); font-weight: 620; font-variation-settings: var(--hv);
  font-size: var(--sz); line-height: 1; letter-spacing: -.02em; white-space: nowrap;
}
.by {
  font: 700 calc(var(--sz) * .3)/1 Nunito, sans-serif; color: var(--m);
  margin-top: calc(var(--sz) * .16); padding-left: .1em; white-space: nowrap;
}

/* ---------- frame ---------- */
.app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; }
.brand { display: none; text-decoration: none; }
.stage {
  display: flex; flex-direction: column; align-items: center;
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px))
    calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.col { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 14px; position: relative; }

/* top bar: undo · plain logo · counter (phone and tablet) */
.tb { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 54px; margin-bottom: -6px; }
.tb > :last-child { justify-self: end; }
.tb-logo { display: inline-flex; }
.lk-stack { display: none; }
.app.is-end .lk-plain { display: none; }
.app.is-end .lk-stack { display: inline-flex; }
.ub {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--i); background: none; border: 0; padding: 0;
}
.ub:disabled { opacity: .35; }
.cnt { color: var(--m); font: 600 15px Nunito, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.from { margin: 0; text-align: center; font: 700 14px Nunito, sans-serif; color: var(--m); }
.from[hidden] { display: none; }
.empty { text-align: center; color: var(--m); font-weight: 700; margin: 40px 0; }

/* ---------- the card: a single card, no stack behind it (2026-12-05) ---------- */
.deck { position: relative; }
.card {
  position: relative; border-radius: 20px; background: var(--cd); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
  touch-action: pan-y; will-change: transform;
}
.pg { display: flex; flex-direction: column; position: relative; flex: 1 0 auto; }
.card[data-side="hook"] .pg-aha, .card[data-side="aha"] .pg-hook { display: none; }
.card[data-side="aha"] { cursor: pointer; }

/* image: always 3:2, never cropped (IMG) */
/* Inset with its own rounded corners, so the square art sits inside the rounded card. */
.ill { position: relative; flex: none; width: calc(100% - 20px); margin: 10px 10px 0; border-radius: 14px; aspect-ratio: 3 / 2; background: color-mix(in srgb, var(--b) 55%, var(--cd)); overflow: hidden; }
.ill img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* A picture still loading stays hidden, never the previous card's (deck.js setPicture). */
.ill img { transition: opacity .15s; }
.ill img.loading { opacity: 0; }
/* Card art is drawn on paper (some of it transparent line work), so it keeps
   a light ground in dark mode too, or the lines would vanish. */
.ill:not(.noimg) { background: light-dark(#F0EEF8, #E4E0EE); }
.ph {
  display: none; position: absolute; inset: 0; place-items: center;
  background: radial-gradient(color-mix(in srgb, var(--a) 22%, transparent) 1.4px, transparent 1.6px) 0 0 / 18px 18px, var(--soft);
}
.ill.noimg .ph { display: grid; }
.ph svg { width: 76px; height: 76px; color: var(--a); opacity: .5; }

.cpad { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 18px; flex: 1; position: relative; }
.q {
  font-family: var(--hf); font-weight: 620; font-variation-settings: var(--hv);
  font-size: 24px; line-height: 1.2; letter-spacing: -.005em; margin: 0;
}
.explanation { padding-top: 66px; gap: 10px; }
.qs { font-size: 14px; color: var(--m); line-height: 1.4; margin: 0; font-weight: 600; }
.lead { margin: 0; font-size: 17px; line-height: 1.6; max-width: 62ch; }
.kicker {
  margin: 2px 0 0; padding-left: 14px; border-left: 3px solid var(--a);
  font-family: var(--hf); font-variation-settings: 'SOFT' 100, 'WONK' 1; font-weight: 600;
  font-size: 21px; line-height: 1.25; color: var(--a);
}
.kicker[hidden] { display: none; }
.flip { font-size: 13px; color: var(--m); margin: auto 0 0; padding-top: 6px; }
.ruled, .spine { display: none; }

/* save and share: soft-fill discs, rose heart, gold share (S2, X3) */
.cicons { position: absolute; top: 18px; right: 18px; display: flex; gap: 8px; z-index: 3; }
.ci {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 0; padding: 0;
  --c: var(--a); background: color-mix(in srgb, var(--c) 14%, var(--cd)); color: var(--c);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--i) 22%, transparent);
}
.ci svg.ln { width: 19px; height: 19px; stroke-width: 2.1; }
.ci.hrt { --c: var(--a2); }
.ci.shr { --c: var(--a); } /* indigo: gold vanished against the sepia card art */
.ci.hrt[aria-pressed="true"] svg { fill: currentColor; }

/* Reveal: the plain accent pill with an eye (R1) */
.rv {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  height: 50px; padding: 0 24px; border: 0; border-radius: 25px;
  font: 800 16px Nunito, sans-serif; background: var(--a); color: var(--oa);
}

/* ---------- under the card ---------- */
.below { display: flex; flex-direction: column; align-items: center; }
.hint { text-align: center; font: 600 14px Nunito, sans-serif; color: var(--m); margin: 0; }
.skip {
  display: none; margin: 0; padding: 8px 14px; background: none; border: 0;
  font: 700 14px Nunito, sans-serif; color: var(--i);
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--i) 40%, transparent);
}
.reactions { display: none; flex-direction: column; gap: 10px; width: 100%; }
.app[data-side="aha"] .reactions { display: flex; }
.app[data-side="aha"] .hint, .app[data-side="aha"] .skip { display: none; }
.app.coaching .hint { visibility: hidden; }
.rrow { display: flex; gap: 10px; align-items: center; }
.rb {
  flex: 1; height: 56px; border-radius: 28px; border: 0; display: flex; align-items: center;
  justify-content: center; gap: 8px; font: 800 17px Nunito, sans-serif;
}
.rb svg.ln { width: 20px; height: 20px; stroke-width: 2.2; }
.rb .ping { width: 20px; height: 20px; }
.rb.meh { background: var(--meh-bg); color: var(--meh-fg); }
.rb.aha { background: var(--a); color: var(--oa); }
.rb .key, .kl .key { display: none; }
/* The Space bar drawn as a wide keycap: people know the key by its shape, not a symbol */
.key-space {
  display: inline-block; min-width: 64px; padding: 1px 10px 2px; margin: 0 2px;
  border: 1.5px solid color-mix(in srgb, currentColor 40%, transparent);
  border-bottom-width: 3px; border-radius: 7px; text-align: center;
  font: 700 .85em/1.4 Nunito, sans-serif; vertical-align: 1px;
}

/* "I knew it already" and Noted (K1, N1) */
.kl {
  align-self: center; display: inline-flex; gap: 6px; align-items: center; position: relative;
  background: none; border: 0; padding: 6px 8px; font: 700 14px Nunito, sans-serif; color: var(--m);
}
.kl svg.ln { width: 16px; height: 16px; stroke-width: 2.2; }
.kt { display: inline-grid; }
.kt > span { grid-area: 1 / 1; }
.k0 {
  text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
  text-decoration-color: color-mix(in srgb, currentColor 50%, transparent);
}
.k1 { opacity: 0; display: inline-flex; align-items: center; gap: 5px; color: var(--a); position: relative; }
.k1 .ping { width: 14px; height: 14px; }
.pul {
  position: absolute; left: -2px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border-radius: 50%; border: 2px solid var(--a); opacity: 0;
}
.ck path { stroke-dasharray: 24; stroke-dashoffset: 0; }
@keyframes kdraw { 0% { stroke-dashoffset: 24; } 100% { stroke-dashoffset: 0; } }
@keyframes kout { 0% { opacity: 1; transform: none; } 15%, 80% { opacity: 0; transform: translateY(-5px); } 100% { opacity: 1; transform: none; } }
@keyframes kin { 0% { opacity: 0; transform: translateY(5px); } 15%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-3px); } }
@keyframes kpul { 0% { opacity: .8; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes ktint { 0%, 100% { color: var(--m); } 12%, 80% { color: var(--a); } }
.play .ck path { animation: kdraw .35s ease-out both; }
.play .kl { animation: ktint .9s ease both; }
.play .k0 { animation: kout .9s ease both; }
.play .k1 { animation: kin .9s ease both; }
.play .pul { animation: kpul .7s ease-out .12s both; }

/* ---------- first-card coach: on the card only ---------- */
.coach {
  position: absolute; inset: 0; z-index: 6; border-radius: inherit; padding: 24px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; color: #fff; background: rgba(18, 15, 29, .8);
}
.coach[hidden] { display: none; }
.coach-ping { width: 46px; height: 46px; color: #fff; margin-bottom: 4px; }
.c1 { margin: 0; font: 800 20px/1.3 Nunito, sans-serif; max-width: 22ch; }
.c2 { margin: 0; font: 600 16px/1.4 Nunito, sans-serif; opacity: .92; }
.c-desk { display: none; }
.got {
  margin-top: 8px; padding: 8px 26px; border: 2px solid #fff; border-radius: 22px;
  background: none; color: #fff; font: 800 16px Nunito, sans-serif;
}
.got:focus-visible { outline-color: #fff; }

/* ---------- movement ---------- */
@keyframes flipin { from { transform: perspective(1400px) rotateY(-90deg); } to { transform: perspective(1400px) rotateY(0); } }
@keyframes slidein { from { opacity: 0; transform: translateX(-40px); } }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
@keyframes appear { to { opacity: 1; } }
.card.an-flip { animation: flipin .5s ease-out both; }
.card.an-enter { animation: fadein .3s ease-out both; }
.reactions.an-in { animation: fadein .35s ease-out .35s both; }

/* Until deck.js has placed the visitor on their card; shown anyway after 2.5s. */
.js .col { opacity: 0; animation: appear 0s 2.5s forwards; }
.js .app.ready .col { opacity: 1; animation: none; }
/* Without JavaScript the explanation simply sits under the hook. */
html:not(.js) .card .pg-aha { display: flex; }
html:not(.js) .rv, html:not(.js) .cicons, html:not(.js) .below, html:not(.js) .ub { display: none; }

/* ---------- end screen ---------- */
.app.is-end .deck, .app.is-end .below, .app.is-end .from { display: none; }
.end { display: flex; flex-direction: column; gap: 18px; }
.end[hidden] { display: none; }
.panel {
  background: var(--cd); border-radius: 20px; padding: 26px 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.panel h1, .panel h2 {
  font-family: var(--hf); font-weight: 620; font-variation-settings: var(--hv);
  font-size: 28px; line-height: 1.15; letter-spacing: -.01em; margin: 0;
}
.panel p { margin: 0; font-size: 17px; line-height: 1.55; }
.lab { display: block; font: 700 15px Nunito, sans-serif; color: var(--i); margin: 12px 0 0; }
.lab span { color: var(--m); font-weight: 600; }
.srow { display: flex; gap: 8px; margin-top: 8px; }
.star {
  width: 48px; height: 48px; border-radius: 12px; border: 0; padding: 0;
  display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 14%, var(--cd)); color: var(--gold);
}
.star svg.ln { width: 26px; height: 26px; stroke-width: 1.8; }
.star.on svg { fill: currentColor; }
.fb { display: flex; flex-direction: column; gap: 6px; }
.fb textarea, .fb input {
  width: 100%; font: 16px/1.45 Nunito, sans-serif; color: var(--i); background: var(--cd);
  border: 1.5px solid var(--field); border-radius: 12px; padding: 10px 12px;
}
.fb textarea { resize: vertical; min-height: 84px; }
.fb ::placeholder { color: var(--m); opacity: 1; }
.erow { display: flex; gap: 8px; }
.send {
  flex: none; height: 46px; padding: 0 22px; border: 0; border-radius: 23px;
  background: var(--a); color: var(--oa); font: 800 16px Nunito, sans-serif;
}
.thanks { color: var(--a); font-weight: 700; }
.thanks[hidden] { display: none; }
.panel hr { border: 0; height: 1px; background: var(--line); margin: 14px 0 6px; width: 100%; }
.share-site {
  height: 50px; border-radius: 25px; border: 1.5px solid var(--field); background: none;
  display: flex; align-items: center; justify-content: center; gap: 8px; font: 800 16px Nunito, sans-serif;
}
.share-site svg.ln { color: var(--gold); }
/* reader profile (TEC-8608): step 1 of the end screen, before feedback */
.panel[hidden] { display: none; }
.profile { gap: 12px; }
.profile .eyebrow { font: 700 14px Nunito, sans-serif; color: var(--m); letter-spacing: .02em; }
.profile h2 { font-size: 34px; color: var(--a); margin-top: -4px; }
.profile h2:focus { outline: none; }
.pf-trait { color: var(--m); font-weight: 700; font-style: italic; }
.pf-trait[hidden], .pf-spot[hidden], .pf-top[hidden], .again[hidden] { display: none; }
.pf-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 0; }
.pf-nums div { background: color-mix(in srgb, var(--i) 5%, var(--cd)); border-radius: 12px; padding: 10px 6px 8px; text-align: center; }
.pf-nums .n-aha { background: var(--soft); color: var(--a); }
.pf-nums .n-meh { background: var(--meh-bg); color: var(--meh-fg); }
.pf-nums dd { margin: 0; font: 800 24px/1.1 Nunito, sans-serif; font-variant-numeric: tabular-nums; }
.pf-nums dt { font: 700 12px Nunito, sans-serif; opacity: .85; order: 2; }
.pf-nums div { display: flex; flex-direction: column-reverse; gap: 2px; }
.pf-spot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.pf-spot svg { width: 20px; height: 20px; color: var(--a); flex: none; }
.pf-spot b { color: var(--a); }
.pf-sv { white-space: nowrap; }
.pf-spot #pf-spot-n { color: var(--m); font-size: 15px; }
.pf-top .lab { margin: 4px 0 4px; }
.pf-hook {
  padding-left: 14px; border-left: 3px solid var(--a2);
  font-family: var(--hf); font-variation-settings: 'SOFT' 100, 'WONK' 1; font-weight: 600; font-size: 20px; line-height: 1.3;
}
.pf-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pf-act button { white-space: nowrap; }
.pf-act .share-site { flex: 1 1 auto; padding: 0 16px; }
.pf-act .send { flex: 1 0 auto; height: 50px; border-radius: 25px; }
.again {
  align-self: center; background: none; border: 0; padding: 6px 10px; margin-top: 2px;
  color: var(--m); font: 700 14px Nunito, sans-serif; text-decoration: underline; text-underline-offset: 3px;
}
.foot { display: flex; justify-content: center; align-items: center; gap: 16px; color: var(--m); font: 600 14px Nunito, sans-serif; padding: 4px 0 8px; }

/* ---------- app nudge: bottom sheet on phones, docked banner on desktop ---------- */
.scrim { position: fixed; inset: 0; z-index: 19; background: rgba(18, 15, 29, .55); }
.scrim[hidden], .nudge[hidden] { display: none; }
.nudge {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 12px 24px calc(26px + env(safe-area-inset-bottom, 0px));
  background: var(--cd); color: var(--i); border-radius: 24px 24px 0 0;
  box-shadow: 0 0 0 1px var(--line), 0 -12px 40px -12px color-mix(in srgb, var(--i) 45%, transparent);
}
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--field); margin-bottom: 6px; }
.appic { width: 56px; height: 56px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--a); color: var(--oa); }
.appic .ping { width: 34px; height: 34px; transform: translate(3px, -3px); }
.ntext h2 { margin: 0; font: 800 22px/1.25 Nunito, sans-serif; }
.ntext p { margin: 4px 0 0; color: var(--m); font: 600 15px/1.4 Nunito, sans-serif; }
.qr { display: none; }
.getapp {
  display: grid; place-items: center; width: 100%; max-width: 420px; height: 52px; margin-top: 6px;
  border-radius: 26px; background: var(--a); color: var(--oa); font: 800 17px Nunito, sans-serif; text-decoration: none;
}
/* "Remind me tomorrow" (TEC-8609): the same sheet, with a bell and no QR. */
.remind .appic .ln { width: 30px; height: 30px; stroke-width: 2.2; }
.remind .ntext[hidden] { display: none; }
.remind .ntext b { font-weight: 800; color: var(--i); }
.remind .inl { width: 18px; height: 18px; vertical-align: -3px; }
.notnow {
  background: none; border: 0; padding: 6px 10px; color: var(--m); font: 700 15px Nunito, sans-serif;
  text-decoration: underline; text-underline-offset: 3px;
}

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  background: var(--i); color: var(--cd); font: 700 15px Nunito, sans-serif; padding: 10px 18px; border-radius: 22px;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 404 ---------- */
.lost { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.lost .panel { max-width: 460px; gap: 14px; }
.lost-logo { text-decoration: none; margin-bottom: 8px; }
.btn {
  display: inline-grid; place-items: center; align-self: flex-start; height: 50px; padding: 0 24px;
  border-radius: 25px; background: var(--a); color: var(--oa); font: 800 16px Nunito, sans-serif; text-decoration: none;
}

/* ---------- phone: room around the top bar; card centred in the space left ---------- */
@media (max-width: 599px) {
  .stage { min-height: 100vh; min-height: 100dvh; padding-top: calc(env(safe-area-inset-top, 0px) + 14px); }
  .col { flex: 1; }
  .tb { margin-bottom: 10px; }
  .deck { margin-top: auto; }
  .below { margin-bottom: auto; }
}

/* ---------- tablet: same card, centred over the hills ---------- */
@media (min-width: 600px) {
  .stage { min-height: 100vh; min-height: 100dvh; justify-content: center; padding-top: 24px; padding-bottom: 32px; }
  .col::before {
    content: ""; position: absolute; inset: -90px -160px; z-index: -1; border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--b) 75%, transparent), transparent);
  }
  .col { isolation: isolate; }
}

/* ---------- desktop: the open book (Dc, L1) ---------- */
@media (min-width: 940px) {
  .brand { display: block; position: absolute; left: 36px; top: 26px; z-index: 2; }
  .stage { padding: 96px 40px 40px; }
  .col { width: var(--bw); max-width: none; gap: 12px; }
  .col::before { inset: -90px -230px; }
  .tb { display: flex; justify-content: space-between; height: 40px; margin: 0; }
  .tb-logo { display: none; }
  .ub { background: color-mix(in srgb, var(--cd) 88%, transparent); box-shadow: 0 0 0 1px var(--line); }

  .card { flex-direction: row; }
  .card[data-side] .pg { display: flex; flex: 1 1 0; }
  .card[data-side="aha"] { cursor: default; }
  .spine {
    display: block; position: absolute; left: 50%; top: 0; bottom: 0; width: 40px; margin-left: -20px; z-index: 4;
    pointer-events: none; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--i) 9%, transparent) 50%, transparent);
  }
  /* The right page is a ruled index card with a faint Ping until Reveal. The
     explanation is laid out underneath all along, so the book never changes size. */
  .ruled {
    display: grid; place-items: center; position: absolute; inset: 0; z-index: 1;
    background:
      linear-gradient(color-mix(in srgb, var(--a2) 45%, transparent), color-mix(in srgb, var(--a2) 45%, transparent)) 0 66px / 100% 1.5px no-repeat,
      repeating-linear-gradient(transparent 0 33px, color-mix(in srgb, var(--a) 13%, transparent) 33px 34px) 0 66px / 100% calc(100% - 66px) no-repeat;
  }
  .ruled svg { width: 64px; height: 64px; color: var(--a); opacity: .18; }
  .card[data-side="aha"] .ruled { display: none; }
  .explanation { padding: 72px 32px 28px; gap: 14px; }
  .card[data-side="hook"] .explanation { visibility: hidden; }
  .card[data-side="aha"] .rv { visibility: hidden; }
  .card.an-flip { animation: none; }
  .card.an-flip .explanation { animation: slidein .5s ease-out both; }
  .qs, .flip { display: none; }

  .below { min-height: 100px; justify-content: flex-start; }
  .hint { display: none; }
  .skip { display: block; }
  .reactions { width: 420px; }

  .c-desk { display: block; }
  .c-touch { display: none; }

  .app.is-end .col { width: min(560px, 100%); }

  .nudge {
    left: 50%; right: auto; bottom: 16px; transform: translateX(-50%);
    width: min(780px, calc(100vw - 32px)); flex-direction: row; text-align: left; gap: 16px;
    padding: 12px 18px; border-radius: 20px;
    box-shadow: 0 0 0 1px var(--line), 0 18px 40px -12px color-mix(in srgb, var(--i) 55%, transparent);
  }
  .grab, .scrim { display: none !important; }
  .ntext { flex: 1; }
  .ntext h2 { font-size: 18px; }
  .getapp { width: auto; padding: 0 22px; height: 48px; margin: 0; }
  .appic { width: 48px; height: 48px; border-radius: 12px; }
  .appic .ping { width: 30px; height: 30px; }
  /* Keep the reactions clear of the docked banner. */
  .app.nudged .stage { padding-top: 76px; padding-bottom: 116px; }
}
/* A QR code only makes sense on a computer; touch screens get the button. */
@media (min-width: 940px) and (hover: hover) and (pointer: fine) {
  .qr { display: flex; align-items: center; gap: 10px; }
  .qr svg { width: 68px; height: 68px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
  .qr span { width: 84px; font: 600 13px/1.3 Nunito, sans-serif; color: var(--m); }
  .getapp:not(#remind-yes) { display: none; }
  /* Desktop: show the arrow keys on Meh and Aha */
  .rb .key {
    display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px;
    border-radius: 7px; font: 700 14px/1 Nunito, sans-serif;
    border: 1.5px solid color-mix(in srgb, currentColor 45%, transparent); opacity: .85;
  }
  .rb.meh .key { margin-right: 4px; }
  .rb.aha .key { margin-left: 4px; }
  .kl .key {
    display: inline-grid; place-items: center; min-width: 20px; height: 19px; padding: 0 4px;
    border-radius: 6px; font: 700 12px/1 Nunito, sans-serif; margin-left: 4px;
    border: 1.5px solid color-mix(in srgb, currentColor 40%, transparent); opacity: .8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card, .card *, .reactions, .reactions *, .toast { animation: none !important; transition: none !important; }
  .play .kl { color: var(--a); }
}
