/* FlashSheet. The Quietworks sheet family look (chunky outlines, offset "sticker" shadows) on an electric
   periwinkle hero with hot-pink accents. Self-hosted Bricolage Grotesque (OFL, see /fonts/OFL.txt).
   No external requests. No inline styles anywhere (the CSP forbids them): printed font sizes are classes
   (.fzNN = NN points on the printed card), set in units of the sheet's width so screen = paper. */

@font-face {
  font-family: 'Bricolage';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2-variations'), url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --lime: #b6f03c;
  --pink: #ff4f9a;
  --sky: #38bdf8;
  --peri: #7aa2ff;
  --sun: #ffd23f;
  --grape: #7c4dff;
  --tang: #ff8a1f;
  --mint: #3ee0b0;
  --deep: #16123d; /* fixed ink for outlines and paper */

  --bg: #fbfaf2;
  --bg-alt: #eef2ff;
  --surface: #ffffff;
  --surface-2: #f5f6fc;
  --ink: #16123d;
  --ink-soft: #4a4570;
  --line: #16123d;
  --shadow: #16123d;
  --hero-bg: #7aa2ff; /* deep ink on it: 7.2:1 */
  --hero-ink: #16123d;
  --hero-line: rgba(22, 18, 61, 0.09);
  --brand-b: #3a0ca3; /* on the periwinkle header: 4.8:1 */
  --mark-bg: #ff4f9a;
  --mark-ink: #16123d;
  --pop: #5b2be0;
  --pop-btn: #ff4f9a; /* deep ink text: 5.8:1 */
  --pop-ink: #16123d;
  --chip-bg: #ffffff;
  --ok-bg: #dcf7b0;
  --ok-ink: #2c4a00;
  --bad-bg: #ffd9e8;
  --bad-ink: #8a0c43;
  --warn-bg: #fff1c2;
  --warn-ink: #5c3d00;
  --band: #5b2be0;
  --band-ink: #ffffff;
  --focus: #5b2be0;

  --font: 'Bricolage', ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 22px;
  --bw: 3px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f0c29;
    --bg-alt: #151137;
    --surface: #1d1846;
    --surface-2: #262057;
    --ink: #f3f0ff;
    --ink-soft: #c9c2ee;
    --line: #f3f0ff;
    --shadow: #7aa2ff;
    --hero-bg: #1b1a55;
    --hero-ink: #f3f0ff;
    --hero-line: rgba(122, 162, 255, 0.12);
    --brand-b: #7aa2ff;
    --mark-bg: #ff4f9a;
    --mark-ink: #16123d;
    --pop: #7aa2ff;
    --pop-btn: #ff4f9a;
    --chip-bg: #262057;
    --ok-bg: #2c4a00;
    --ok-ink: #d9f99d;
    --bad-bg: #5a1235;
    --bad-ink: #ffc2db;
    --warn-bg: #4a3500;
    --warn-ink: #ffe49a;
    --band: #7aa2ff;
    --band-ink: #16123d;
    --focus: #7aa2ff;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f0c29;
  --bg-alt: #151137;
  --surface: #1d1846;
  --surface-2: #262057;
  --ink: #f3f0ff;
  --ink-soft: #c9c2ee;
  --line: #f3f0ff;
  --shadow: #7aa2ff;
  --hero-bg: #1b1a55;
  --hero-ink: #f3f0ff;
  --hero-line: rgba(122, 162, 255, 0.12);
  --brand-b: #7aa2ff;
  --mark-bg: #ff4f9a;
  --mark-ink: #16123d;
  --pop: #7aa2ff;
  --pop-btn: #ff4f9a;
  --chip-bg: #262057;
  --ok-bg: #2c4a00;
  --ok-ink: #d9f99d;
  --bad-bg: #5a1235;
  --bad-ink: #ffc2db;
  --warn-bg: #4a3500;
  --warn-ink: #ffe49a;
  --band: #7aa2ff;
  --band-ink: #16123d;
  --focus: #7aa2ff;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); overflow-x: hidden; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 0.4em; font-weight: 800; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); padding: 0.05em 0.35em; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* The header and hero use their own ink for rings (3:1+ on periwinkle and on the dark hero). */
.site-header, .hero { --focus: var(--hero-ink); }
.site-header nav a.nav-all:focus-visible { outline-color: var(--hero-ink); }
.marquee, .site-footer, .sister-panel, .map { --focus: #b6f03c; }
/* White paper in every theme: lime or periwinkle rings vanish on it in dark mode. */
.fc-sheet, .pro-card, .flip-card { --focus: #5b2be0; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; min-height: 44px; border-radius: 10px; }
.skip:focus { left: 8px; }
main:focus { outline: none; }
.fine { font-size: 0.86rem; color: var(--ink-soft); margin: 0.6em 0 0; }
.test-banner { background: var(--sun); color: var(--deep); text-align: center; font-weight: 700; padding: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  --sh: 4px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  padding: 0.62em 1.25em; border: var(--bw) solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-weight: 750; text-decoration: none; cursor: pointer;
  box-shadow: var(--sh) var(--sh) 0 var(--shadow); transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s;
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: calc(var(--sh) + 2px) calc(var(--sh) + 2px) 0 var(--shadow); }
.btn:active { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--shadow); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-pop { background: var(--pop-btn); color: var(--pop-ink); border-color: var(--deep); box-shadow: var(--sh) var(--sh) 0 var(--deep); }
.btn-pop:hover { box-shadow: calc(var(--sh) + 2px) calc(var(--sh) + 2px) 0 var(--deep); }
.btn-ghost { background: var(--surface); }
.btn-ink { background: var(--deep); color: #f3f0ff; border-color: var(--deep); }
.btn-sm { --sh: 3px; padding: 0.42em 0.95em; font-size: 0.92rem; }
.btn-round { width: 44px; height: 44px; padding: 0; font-size: 1.2rem; }
.btn-xl { --sh: 6px; font-size: clamp(1.15rem, 2.4vw, 1.45rem); padding: 0.7em 1.4em; }
.btn-block { width: 100%; }
.btn .arrow { display: inline-block; transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(5px); }
.linkish { background: none; border: 0; padding: 0; color: inherit; font-weight: 750; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--hero-bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: var(--bw) solid var(--line); color: var(--hero-ink); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; text-decoration: none; }
.brand b { color: var(--brand-b); font-weight: 800; }
.logo-mark { width: 34px; height: 34px; transition: transform 0.4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .logo-mark { transform: rotate(-12deg) scale(1.08); }
.site-footer .brand b { color: var(--peri); }
.nav { margin-left: auto; display: flex; gap: 22px; font-weight: 700; align-items: center; }
.nav a { text-decoration: none; position: relative; white-space: nowrap; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: var(--hero-ink); transform: scaleX(0); transform-origin: left; transition: transform 0.2s; border-radius: 3px; }
.nav a:hover::after { transform: scaleX(1); }
.theme-toggle { width: 42px; height: 42px; border-radius: 50%; border: var(--bw) solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: transform 0.3s; flex: none; }
.theme-toggle:hover { transform: rotate(-20deg) scale(1.06); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.theme-toggle .i-moon { fill: var(--ink); stroke: none; }
.theme-toggle .i-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .i-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .i-moon { display: none; }
}
@media (max-width: 860px) {
  .nav a:not(.nav-all) { display: none; } /* phones keep only the "All tools" pill */
  .nav { gap: 0; }
  .brand { font-size: 1.25rem; }
  .header-inner { gap: 10px; min-height: 60px; }
}
@media (max-width: 420px) {
  .header-inner { gap: 7px; }
  .brand { font-size: 1.08rem; gap: 6px; }
  .logo-mark { width: 28px; height: 28px; }
  .header-cta { font-size: 0.85rem; padding-inline: 0.75em; }
}
@media (max-width: 359px) {
  .site-header .header-inner { gap: 4px; padding-inline: 12px; }
  .brand { font-size: 0.96rem; gap: 5px; letter-spacing: -0.04em; }
  .logo-mark { width: 26px; height: 26px; }
  .header-cta { font-size: 0.8rem; padding-inline: 0.6em; white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; background-color: var(--hero-bg); color: var(--hero-ink); padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 6vw, 80px); overflow: hidden; isolation: isolate;
  background-image: radial-gradient(circle, var(--hero-line) 2.5px, transparent 3px);
  background-size: 28px 28px;
}
:root[data-theme='dark'] .hero { background-image: radial-gradient(circle, var(--hero-line) 2.5px, transparent 3px), radial-gradient(1000px 520px at 85% 0%, rgba(255, 79, 154, 0.28), transparent 62%), linear-gradient(160deg, #1b1a55, #0f0b2e); background-size: 28px 28px, auto, auto; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .hero { background-image: radial-gradient(circle, var(--hero-line) 2.5px, transparent 3px), radial-gradient(1000px 520px at 85% 0%, rgba(255, 79, 154, 0.28), transparent 62%), linear-gradient(160deg, #1b1a55, #0f0b2e); background-size: 28px 28px, auto, auto; }
}
/* Floating index cards. */
.hero-deco i { position: absolute; z-index: -1; display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--deep); border: var(--bw) solid var(--deep); border-radius: 10px; width: 74px; height: 50px; font-size: 1.6rem; box-shadow: 4px 4px 0 var(--deep); animation: float 7s ease-in-out infinite; background: #fff; }
.hero-deco i:nth-child(1) { background: var(--pink); top: 7%; right: 4%; transform: rotate(10deg); }
.hero-deco i:nth-child(2) { background: var(--sun); top: 50%; left: -18px; width: 60px; height: 40px; font-size: 1.3rem; animation-delay: -2s; }
.hero-deco i:nth-child(3) { background: var(--lime); bottom: 5%; right: 40%; width: 54px; height: 36px; font-size: 1.2rem; animation-delay: -4s; }
.hero-deco i:nth-child(4) { top: 3%; left: 43%; width: 46px; height: 32px; font-size: 1.1rem; animation-delay: -1s; }
.hero-deco i:nth-child(5) { background: var(--mint); top: 2.5%; right: 30%; width: 42px; height: 28px; font-size: 0.95rem; animation-delay: -3s; }
.hero-deco i:nth-child(6) { background: var(--grape); color: #fff; bottom: 10%; left: 3%; width: 54px; height: 36px; font-size: 1.2rem; animation-delay: -5s; }
@media (max-width: 760px) { .hero-deco i:nth-child(1), .hero-deco i:nth-child(4), .hero-deco i:nth-child(5) { display: none; } }
@keyframes float { 0%, 100% { translate: 0 0; rotate: -6deg; } 50% { translate: 0 -16px; rotate: 8deg; } }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; font-size: 0.95rem; padding: 6px 14px 6px 10px; border: var(--bw) solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: 3px 3px 0 var(--shadow); margin-bottom: 18px; }
.eyebrow .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--pink); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 79, 154, 0.7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(255, 79, 154, 0); } }
.hero-title { font-size: clamp(2.6rem, 6.2vw, 4.7rem); line-height: 0.95; letter-spacing: -0.045em; margin-bottom: 0.3em; max-width: 13ch; }
.hero-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: -6px 0 clamp(22px, 3vw, 34px); }
.hero-cta-note { font-weight: 700; font-size: 0.95rem; }
.hero-title-theme { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 15ch; }
.hero-emoji { display: inline-block; animation: wiggle 2.6s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes wiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) scale(1.04); } }
/* The marker word flips in like a card. */
.hero-title mark {
  color: var(--mark-ink); padding: 0 0.16em 0.04em; margin: 0 -0.04em; border-radius: 0.3em; display: inline-block; transform: rotate(-2.5deg);
  background: var(--mark-bg); box-shadow: 0 0 0 var(--bw) var(--deep), 5px 5px 0 var(--bw) var(--deep);
  animation: cardflip 0.9s cubic-bezier(.3, 1.4, .5, 1) 0.25s both;
}
@keyframes cardflip { from { transform: perspective(600px) rotateX(-90deg) rotate(-2.5deg); opacity: 0; } to { transform: perspective(600px) rotateX(0) rotate(-2.5deg); opacity: 1; } }
.hero-lede { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 44ch; margin-bottom: clamp(22px, 3vw, 32px); }
.hero-lede b { background: linear-gradient(transparent 58%, color-mix(in srgb, var(--pink) 60%, transparent) 58%); }
.crumbs { font-size: 0.9rem; font-weight: 650; margin-bottom: 14px; opacity: 0.9; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Generator ---------- */
.gen { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); grid-template-areas: 'intro preview' 'form preview'; column-gap: clamp(28px, 4.5vw, 64px); row-gap: 8px; align-items: start; }
.gen-intro { grid-area: intro; }
.gen-form { grid-area: form; scroll-margin-top: 90px; }
.preview { grid-area: preview; position: sticky; top: 88px; }
@media (max-width: 920px) {
  .gen { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'intro' 'preview' 'form'; row-gap: 22px; }
  .preview { position: relative; top: 0; }
}
.panel { background: var(--surface); color: var(--ink); border: var(--bw) solid var(--line); border-radius: var(--r); box-shadow: 8px 8px 0 var(--shadow); }
.gen-form { padding: clamp(18px, 2.6vw, 30px); display: grid; gap: 18px; animation: rise 0.6s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.lbl { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.lbl-note { text-transform: none; letter-spacing: 0; font-weight: 600; opacity: 0.85; }
.lbl-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Field outline 55% ink: 3.7:1+ on the white panel and its tint in light and dark (WCAG 1.4.11). */
.input { width: 100%; border: var(--bw) solid color-mix(in srgb, var(--line) 55%, transparent); background: var(--surface-2); border-radius: 14px; padding: 0.6em 0.85em; transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus { outline: none; border-color: var(--grape); box-shadow: 0 0 0 4px color-mix(in srgb, var(--grape) 30%, transparent); }
.input[aria-invalid='true'] { border-color: var(--bad-ink); }
.input::placeholder { color: color-mix(in srgb, var(--ink-soft) 80%, transparent); }
.input-title { font-size: 1.25rem; font-weight: 750; }
.input-sm { padding: 0.45em 0.7em; border-radius: 10px; font-size: 1rem; width: auto; min-height: 44px; }
.words { min-height: 150px; resize: vertical; line-height: 1.5; font-size: 1rem; unicode-bidi: plaintext; }
.hint { font-size: 0.85rem; color: var(--ink-soft); margin: 0; }
.badge { font-size: 0.82rem; font-weight: 800; padding: 3px 11px; border-radius: 999px; transition: background-color 0.2s, color 0.2s; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink); animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; align-items: center; }
.chips-lbl { font-weight: 800; font-size: 0.85rem; }
.chip { --c: var(--sun); display: inline-flex; align-items: center; gap: 6px; border: 2px solid color-mix(in srgb, var(--line) 25%, transparent); background: var(--chip-bg); border-radius: 999px; padding: 0.3em 0.85em; font-weight: 700; font-size: 0.9rem; cursor: pointer; text-decoration: none; transition: transform 0.15s, border-color 0.15s, background-color 0.15s; }
.chip:hover { transform: translateY(-2px) rotate(-1.5deg); border-color: var(--c); }
.chip.on { background: var(--c); color: var(--deep); border-color: var(--deep); box-shadow: 2px 2px 0 var(--deep); }
.chip-more { border-style: dashed; }
.chip-table { --c: var(--lime); font-variant-numeric: tabular-nums; }
.c-pink { --c: var(--pink); } .c-orange, .c-tang { --c: var(--tang); } .c-yellow, .c-sun { --c: var(--sun); }
.c-teal, .c-mint { --c: var(--mint); } .c-blue, .c-sky { --c: var(--peri); } .c-violet, .c-grape { --c: var(--grape); } .c-lime { --c: var(--lime); }
.chip.on.c-violet, .chip.on.c-grape { color: #fff; }

/* Cards-per-page and print-mode pickers: real radio buttons inside big labels. */
.opt { position: relative; cursor: pointer; display: flex; align-items: center; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 10px; }
.seg-opt { gap: 10px; padding: 6px 14px; min-height: 48px; border: 2px solid color-mix(in srgb, var(--line) 30%, transparent); border-radius: 14px; background: var(--chip-bg); font-weight: 800; font-size: 1.15rem; transition: transform 0.15s, background-color 0.15s; }
.seg-opt:hover { transform: translateY(-2px); }
.seg-pic { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px; width: 17px; height: 22px; padding: 2px; border: 2px solid currentColor; border-radius: 3px; }
.seg-pic i { background: currentColor; border-radius: 1px; opacity: 0.6; }
.opt:has(input:checked) { background: var(--lime); color: var(--deep); border-color: var(--deep); box-shadow: 3px 3px 0 var(--deep); }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.modes { display: grid; gap: 8px; }
.modes-2 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.mode-opt { gap: 12px; padding: 9px 14px; border: 2px solid color-mix(in srgb, var(--line) 30%, transparent); border-radius: 14px; background: var(--chip-bg); min-height: 48px; transition: transform 0.15s; }
.mode-opt:hover { transform: translateX(3px); }
.mode-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--deep); color: #fff; font-weight: 800; font-size: 1.15rem; }
.mode-txt { display: grid; gap: 1px; line-height: 1.25; }
.mode-txt b { font-weight: 800; }
.mode-txt small { font-size: 0.84rem; font-weight: 600; opacity: 0.85; }
.modes .opt:has(input:checked) { background: var(--peri); }
fieldset:disabled .mode-opt { opacity: 0.5; cursor: not-allowed; }

details.more { border: 2px dashed color-mix(in srgb, var(--line) 30%, transparent); border-radius: 16px; padding: 0 14px; }
details.more summary { cursor: pointer; font-weight: 800; padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+'; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--ink); color: var(--bg); font-size: 1rem; line-height: 1; transition: transform 0.2s; }
details.more[open] summary::before { transform: rotate(45deg); }
.more-body { display: grid; gap: 16px; padding: 4px 0 16px; }
.toggles { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; background: none; border: 0; padding: 0; color: inherit; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track { width: 46px; height: 26px; border-radius: 999px; background: color-mix(in srgb, var(--line) 50%, transparent); position: relative; transition: background-color 0.2s; flex: none; }
.track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1); }
.switch input:checked + .track { background: var(--grape); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }
.switch-pro .switch-text { opacity: 0.85; }
.switch-pro:hover .track::after { transform: translateX(6px); }
.pro-tag, .upsell-btn i { font-style: normal; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; background: var(--grape); color: #fff; padding: 2px 7px; border-radius: 6px; }
.form-error { margin: 0; font-weight: 700; color: var(--bad-ink); background: var(--bad-bg); padding: 10px 14px; border-radius: 12px; }
.report { overflow-wrap: anywhere; font-size: 0.92rem; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; border: 2px solid color-mix(in srgb, var(--line) 18%, transparent); }
.report.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: color-mix(in srgb, var(--warn-ink) 40%, transparent); }
.report p { margin: 0 0 6px; }
.report p:last-child { margin: 0; }
.fine-row { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; align-items: center; }
.handoff-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 0; }
.handoff { font-weight: 750; color: var(--ink); }

/* ---------- Preview: the flip card ---------- */
.preview { padding: 30px 14px 0 10px; max-width: 560px; width: 100%; justify-self: center; position: relative; }
.stack span { position: absolute; left: 24px; right: 10px; top: 46px; aspect-ratio: 3 / 2; border-radius: 20px; border: var(--bw) solid var(--deep); }
.stack span:nth-child(1) { background: var(--sun); transform: rotate(6deg); }
.stack span:nth-child(2) { background: var(--pink); transform: rotate(3deg); }
.sticker { position: absolute; z-index: 5; font-weight: 800; padding: 6px 14px; border-radius: 12px; border: var(--bw) solid var(--deep); box-shadow: 3px 3px 0 var(--deep); font-size: 0.95rem; white-space: nowrap; pointer-events: none; }
.sticker-top { top: 4px; right: -6px; background: var(--lime); color: var(--deep); transform: rotate(6deg); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.deck-meter { position: absolute; z-index: 5; left: -6px; top: 10px; background: var(--deep); color: #fff; font-weight: 800; padding: 5px 12px; border-radius: 12px; border: var(--bw) solid var(--deep); box-shadow: 3px 3px 0 var(--pink); transform: rotate(-5deg); font-size: 0.95rem; }
.deck-meter b { color: var(--lime); font-size: 1.1em; }
.flip-wrap { position: relative; z-index: 2; perspective: 1400px; }
.flip-card { display: block; width: 100%; aspect-ratio: 3 / 2; border: 0; padding: 0; margin: 0; background: none; cursor: pointer; container-type: inline-size; transform: rotate(-1.5deg); transition: transform 0.3s; border-radius: 20px; text-align: center; color: var(--deep); }
.flip-card:hover { transform: rotate(0deg) translateY(-3px); }
.flip-card:focus-visible { outline: 4px solid var(--hero-ink); outline-offset: 6px; }
.flip-card:disabled { cursor: default; }
.flip-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(.3, 1.3, .5, 1); }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8cqi 7cqi; background: #fff; color: var(--deep); border: var(--bw) solid var(--deep); border-radius: 20px; box-shadow: 8px 8px 0 var(--deep); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
/* The back is a ruled index card: a red margin line and blue rules. */
.face-back { transform: rotateY(180deg); background-color: #fffdf3; background-image: linear-gradient(transparent 17%, #ff6b8b 17%, #ff6b8b calc(17% + 2px), transparent calc(17% + 2px)), repeating-linear-gradient(transparent 0 calc(11cqi - 1px), #bcd0ff calc(11cqi - 1px) 11cqi); }
.face-kicker { position: absolute; top: 3.6cqi; left: 5cqi; font-size: max(12px, 3.3cqi); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #4a4570; }
.face-hint { position: absolute; bottom: 3.4cqi; right: 5cqi; font-size: max(12px, 3.2cqi); color: #4a4570; font-weight: 700; }
.face-text { font-weight: 800; line-height: 1.12; overflow-wrap: anywhere; max-width: 100%; }
.face-back .face-text { font-weight: 650; }
.face-missing { color: #8a0c43; font-style: italic; }
.flip-card.in-right .flip-inner { animation: dealr 0.42s cubic-bezier(.3, 1.4, .5, 1); }
.flip-card.in-left .flip-inner { animation: deall 0.42s cubic-bezier(.3, 1.4, .5, 1); }
.flip-card.deal .flip-inner { animation: dealr 0.55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes dealr { from { transform: translateX(14%) rotate(6deg); opacity: 0.2; } }
@keyframes deall { from { transform: translateX(-14%) rotate(-6deg); opacity: 0.2; } }
.flip-bar { position: relative; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.flip-count { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: center; }
/* Where card N prints: tiny front and back pages. */
.map { position: relative; z-index: 4; margin-top: 18px; background: var(--deep); color: #f3f0ff; border: var(--bw) solid var(--deep); border-radius: 16px; box-shadow: 4px 4px 0 var(--pink); padding: 12px 14px; }
.map-pages { display: flex; align-items: flex-end; justify-content: center; gap: 12px; }
.mini { margin: 0; text-align: center; }
.mini figcaption { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #c9c2ee; margin-top: 5px; }
.mini-page { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 74px; aspect-ratio: 7.5 / 9.98; background: #fff; padding: 4px 4px 9px; border-radius: 4px; }
.mini-page.strip-top { padding: 9px 4px 4px; }
.mini-page.r2 { grid-template-rows: repeat(2, 1fr); } .mini-page.r3 { grid-template-rows: repeat(3, 1fr); } .mini-page.r4 { grid-template-rows: repeat(4, 1fr); } .mini-page.r5 { grid-template-rows: repeat(5, 1fr); }
.mini-page i { font-style: normal; display: grid; place-items: center; background: #dfe7ff; color: var(--deep); font-size: 0.66rem; font-weight: 800; border-radius: 2px; line-height: 1; transition: background-color 0.2s, transform 0.2s; }
.mini-page i.m-back { background: #fff1b8; }
.mini-page i.m-empty { background: transparent; box-shadow: inset 0 0 0 1px #c9c2ee; }
.mini-page i.on { background: var(--pink); transform: scale(1.12); box-shadow: 0 0 0 2px var(--deep); }
.mini-flip { font-size: 1.5rem; font-weight: 800; color: var(--lime); align-self: center; padding-bottom: 14px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.25); } }
.map-caption { margin: 10px 0 0; font-weight: 700; font-size: 0.92rem; display: flex; gap: 8px; align-items: flex-start; }
.pin { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--pink); animation: ping 1.6s infinite; }

/* ---------- Marquee ---------- */
.marquee { background: var(--deep); color: #f3f0ff; border-block: var(--bw) solid var(--deep); overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; width: max-content; animation: scroll 40s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee a, .marquee-dup { display: inline-flex; }
.marquee a { padding: 0 22px; font-weight: 750; font-size: 1.1rem; text-decoration: none; white-space: nowrap; gap: 8px; }
.marquee a:hover { color: var(--lime); }
.marquee a:focus-visible { outline-offset: -3px; }
.marquee a + a::before, .marquee-dup a::before { content: '✦'; color: var(--pink); margin-right: 22px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Results ---------- */
.results { background: var(--bg-alt); padding: clamp(36px, 5vw, 64px) 0; border-bottom: var(--bw) solid var(--line); scroll-margin-top: 70px; }
.results-title { font-size: clamp(2.3rem, 6vw, 4.2rem); letter-spacing: -0.04em; outline: none; }
.results-title span { display: inline-block; background: var(--mark-bg); color: var(--mark-ink); padding: 0 0.15em; border-radius: 0.3em; transform: rotate(-2deg); animation: countpop 0.5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes countpop { from { transform: scale(0.4) rotate(-10deg); } }
.results-sub { color: var(--ink-soft); font-weight: 650; }
.howto { background: var(--surface); border: var(--bw) solid var(--line); border-radius: 18px; box-shadow: 5px 5px 0 var(--peri); padding: 16px 22px; margin: 6px 0 20px; max-width: 860px; }
.howto-title { font-size: 1.2rem; margin-bottom: 6px; }
.howto ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; margin: 8px 0 28px; }
.btn-print { font-size: 1.1rem; }
@media (max-width: 700px) { .btn-print { width: 100%; } }
.sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 34px 30px; align-items: start; }
.page { animation: rise 0.45s cubic-bezier(.2, .9, .3, 1.2) both; min-width: 0; }
.page-label { font-weight: 800; font-size: 0.9rem; margin: 0 0 12px; color: var(--ink); }
.page-back .page-label::before { content: '↻ '; color: var(--pink); }
.upsell { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 34px; }
.upsell-lbl { font-weight: 800; }
.upsell-btn { border: 2px dashed color-mix(in srgb, var(--line) 50%, transparent); background: var(--surface); border-radius: 999px; padding: 0.45em 1em; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: transform 0.15s, border-color 0.15s; }
.upsell-btn:hover { transform: translateY(-2px); border-color: var(--grape); border-style: solid; }

/* ---------- Printed sheet (screen + print) ---------- */
/* Always white paper with deep ink, in light and dark mode. The sheet keeps the printed proportions, and every
   size inside it is in cqi (1cqi = 1% of the sheet width = 5.4pt on Letter), so the screen copy is the printout. */
.fc-sheet { container-type: inline-size; position: relative; display: flex; flex-direction: column; width: 100%; aspect-ratio: 7.5 / 9.98; background: #fff; color: var(--deep); box-shadow: 0 0 0 12px #fff, 0 0 0 15px var(--deep), 9px 9px 0 15px var(--deep); border-radius: 1px; margin: 15px 15px 24px; width: calc(100% - 30px); }
.paper-a4 .fc-sheet { aspect-ratio: 7.27 / 10.67; }
.fc-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: max(1px, 0.14cqi) dashed #8a86a6; border-left: max(1px, 0.14cqi) dashed #8a86a6; }
.r2 .fc-grid { grid-template-rows: repeat(2, minmax(0, 1fr)); } .r3 .fc-grid { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.r4 .fc-grid { grid-template-rows: repeat(4, minmax(0, 1fr)); } .r5 .fc-grid { grid-template-rows: repeat(5, minmax(0, 1fr)); }
.fc-fold .fc-grid { grid-template-columns: 1fr; }
.fc-row { display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
.fc-card { position: relative; min-width: 0; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2.6cqi 2.6cqi 3.4cqi; border-right: max(1px, 0.14cqi) dashed #8a86a6; border-bottom: max(1px, 0.14cqi) dashed #8a86a6; }
/* Fold mode: the line between front and back is a fold, not a cut. */
.fc-row .fc-card.front { border-right: max(1px, 0.18cqi) dotted #16123d; }
.fc-row .fc-card.front::after { content: 'fold'; position: absolute; right: 0.6cqi; top: 0.8cqi; font-size: 1.3cqi; font-weight: 700; color: #6b6690; letter-spacing: 0.08em; text-transform: uppercase; }
.fc-text { margin: 0; font-weight: 800; line-height: 1.18; overflow-wrap: anywhere; hyphens: manual; max-width: 100%; }
.fc-card.back .fc-text { font-weight: 600; }
.fc-meta { position: absolute; right: 1.6cqi; bottom: 1cqi; font-size: 1.4cqi; font-weight: 700; color: #5a5480; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.fc-strip { flex: none; height: 4cqi; margin: 0; display: flex; align-items: center; justify-content: center; font-size: 1.4cqi; font-weight: 600; color: #5a5480; }
.fc-sheet .fz64 { font-size: 11.852cqi; } .fc-sheet .fz54 { font-size: 10cqi; } .fc-sheet .fz44 { font-size: 8.148cqi; } .fc-sheet .fz36 { font-size: 6.667cqi; } .fc-sheet .fz30 { font-size: 5.556cqi; } .fc-sheet .fz26 { font-size: 4.815cqi; } .fc-sheet .fz22 { font-size: 4.074cqi; } .fc-sheet .fz20 { font-size: 3.704cqi; } .fc-sheet .fz18 { font-size: 3.333cqi; } .fc-sheet .fz16 { font-size: 2.963cqi; } .fc-sheet .fz14 { font-size: 2.593cqi; } .fc-sheet .fz13 { font-size: 2.407cqi; } .fc-sheet .fz12 { font-size: 2.222cqi; } .fc-sheet .fz11 { font-size: 2.037cqi; } .fc-sheet .fz10 { font-size: 1.852cqi; } .fc-sheet .fz9 { font-size: 1.667cqi; } .fc-sheet .fz8 { font-size: 1.481cqi; }
.face .fz64 { font-size: 17.778cqi; } .face .fz54 { font-size: 15cqi; } .face .fz44 { font-size: 12.222cqi; } .face .fz36 { font-size: 10cqi; } .face .fz30 { font-size: 8.333cqi; } .face .fz26 { font-size: 7.222cqi; } .face .fz22 { font-size: 6.111cqi; } .face .fz20 { font-size: 5.556cqi; } .face .fz18 { font-size: 5cqi; } .face .fz16 { font-size: 4.444cqi; } .face .fz14 { font-size: 3.889cqi; } .face .fz13 { font-size: 3.611cqi; } .face .fz12 { font-size: 3.333cqi; } .face .fz11 { font-size: 3.056cqi; } .face .fz10 { font-size: 2.778cqi; } .face .fz9 { font-size: 2.5cqi; } .face .fz8 { font-size: 2.222cqi; }

/* ---------- Sections ---------- */
section.how, section.features, section.themes, section.pricing, section.faq, section.related, .guide { padding: clamp(48px, 7vw, 96px) 0; }
.section-title { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -0.035em; }
.section-title-sm { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 1.2em; }
.section-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step-card { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: 6px 6px 0 var(--c); transition: transform 0.2s; }
.step-card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.step-n { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--c); color: var(--deep); font-weight: 800; font-size: 1.6rem; border: var(--bw) solid var(--deep); margin-bottom: 14px; transform: rotate(-6deg); }
.step-card h3 { font-size: 1.5rem; }
.step-card p { margin: 0; color: var(--ink-soft); }
.features { background: var(--bg-alt); border-block: var(--bw) solid var(--line); }
.feat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 26px; }
.feat { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: 6px 6px 0 var(--c, var(--shadow)); transition: transform 0.2s; }
.feat:hover { transform: translateY(-4px); }
.feat-wide { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; }
.feat h3 { font-size: 1.35rem; }
.feat p { margin: 0; color: var(--ink-soft); }
.feat-wide h3 { font-size: 2rem; }
.feat-wide p { font-size: 1.1rem; }
@media (max-width: 960px) { .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: minmax(0, 1fr); } .feat-wide { grid-column: auto; grid-row: auto; } .feat-wide h3 { font-size: 1.6rem; } }
.feat-demo { height: 90px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
/* Front page 1 2 / 3 4 and its mirrored back 2 1 / 4 3. */
.demo-mirror { height: auto; flex: 1; min-height: 190px; justify-content: center; gap: clamp(12px, 3vw, 30px); }
.dm-page { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: clamp(96px, 14vw, 130px); aspect-ratio: 3 / 4; padding: 8px; background: #fff; border: var(--bw) solid var(--deep); border-radius: 8px; box-shadow: 5px 5px 0 var(--deep); }
.dm-page i { font-style: normal; display: grid; place-items: center; background: #dfe7ff; color: var(--deep); font-weight: 800; font-size: clamp(1.1rem, 2.4vw, 1.6rem); border-radius: 4px; border: 2px dashed #8a86a6; }
.dm-back i { background: #fff1b8; }
.dm-page i:first-child, .dm-back i:nth-child(2) { animation: litup 3s ease-in-out infinite; }
@keyframes litup { 0%, 15%, 100% { background-color: #dfe7ff; } 30%, 80% { background-color: var(--pink); } }
.dm-back i:nth-child(2) { animation-name: litupb; }
@keyframes litupb { 0%, 15%, 100% { background-color: #fff1b8; } 30%, 80% { background-color: var(--pink); } }
.dm-arrow { font-size: 2.4rem; font-weight: 800; animation: nudge 1.6s ease-in-out infinite; }
.demo-flip { perspective: 600px; }
.df-card { position: relative; width: 104px; height: 70px; transform-style: preserve-3d; animation: spin 3.2s ease-in-out infinite; }
.df-card b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; background: #fff; color: var(--deep); border: var(--bw) solid var(--deep); border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.df-card b + b { transform: rotateY(180deg); background: var(--sun); }
@keyframes spin { 0%, 35% { transform: rotateY(0); } 50%, 85% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }
.dfo { display: flex; width: 120px; height: 60px; border: var(--bw) solid var(--deep); border-radius: 8px; overflow: hidden; background: #fff; }
.dfo i { flex: 1; }
.dfo i + i { border-left: 3px dotted var(--deep); background: #fff1b8; transform-origin: left center; animation: fold 3s ease-in-out infinite; }
@keyframes fold { 0%, 30%, 100% { transform: perspective(300px) rotateY(0); } 55%, 75% { transform: perspective(300px) rotateY(-150deg); } }
.demo-link { font-size: 3.2rem; animation: wiggle 2.6s infinite; }
.demo-games { font-size: 2.6rem; gap: 16px; }
.demo-games span { display: grid; place-items: center; width: 64px; height: 64px; border: var(--bw) solid var(--line); border-radius: 16px; animation: bob 2.6s ease-in-out infinite; }
.demo-games span + span { animation-delay: -1.3s; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.tiles-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-decoration: none; background: var(--surface); border: var(--bw) solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: 5px 5px 0 var(--c); transition: transform 0.16s, box-shadow 0.16s; }
.tile:hover { transform: translate(-3px, -3px) rotate(-0.8deg); box-shadow: 8px 8px 0 var(--c); }
.tile-emoji { grid-row: span 2; font-size: 2rem; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c) 32%, transparent); transition: transform 0.3s cubic-bezier(.3, 1.8, .5, 1); }
.tile:hover .tile-emoji { transform: scale(1.15) rotate(-8deg); }
.tile-name { font-weight: 800; font-size: 1.12rem; line-height: 1.15; }
.tile-meta { font-size: 0.85rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pro { background: var(--band); color: var(--band-ink); padding: clamp(48px, 7vw, 96px) 0; border-block: var(--bw) solid var(--line); position: relative; overflow: hidden; }
.pro::before { content: 'PRO PRO PRO PRO PRO PRO'; position: absolute; right: -40px; top: 10px; font-weight: 800; font-size: 9rem; opacity: 0.08; white-space: nowrap; letter-spacing: -0.04em; pointer-events: none; }
.tag { display: inline-block; font-weight: 800; font-size: 0.85rem; padding: 5px 12px; border-radius: 999px; border: 2px solid var(--deep); margin-bottom: 14px; }
.tag-lime { background: var(--lime); color: var(--deep); }
.tag-ink { background: var(--deep); color: #f3f0ff; }
.pro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
@media (max-width: 900px) { .pro-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pro-grid { grid-template-columns: 1fr; } }
.pro-card { background: #fff; color: var(--deep); border: var(--bw) solid var(--deep); border-radius: 18px; padding: 20px; box-shadow: 5px 5px 0 var(--deep); display: flex; flex-direction: column; align-items: flex-start; transition: transform 0.18s; }
.pro-card:hover { transform: translateY(-4px) rotate(0.5deg); }
.pro-card h3 { font-size: 1.3rem; margin-top: 8px; }
.pro-card p { color: #4a4570; flex: 1; }
.pro-emoji { font-size: 2rem; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 34px 0 18px; align-items: start; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.plan { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--r); padding: 26px; box-shadow: 6px 6px 0 var(--shadow); position: relative; }
.plan h3 { font-size: 1.2rem; }
.plan .price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 6px; }
.plan ul { padding: 0; list-style: none; margin: 14px 0 22px; display: grid; gap: 8px; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--lime); color: var(--deep); font-weight: 800; font-size: 0.75rem; display: grid; place-items: center; margin-top: 3px; }
.plan-hot { border-color: var(--grape); box-shadow: 8px 8px 0 var(--grape); transform: translateY(-10px); }
.plan-flag { position: absolute; top: -16px; right: 20px; background: var(--pop-btn); color: var(--pop-ink); font-weight: 800; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--deep); transform: rotate(4deg); }
.plan-note { background: var(--lime); color: var(--deep); border-radius: 10px; padding: 6px 10px; font-size: 0.92rem; font-weight: 600; }

.faq details { background: var(--surface); border: var(--bw) solid var(--line); border-radius: 16px; margin-bottom: 12px; box-shadow: 4px 4px 0 var(--shadow); }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 800; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--pink); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 16px; margin: 0; color: var(--ink-soft); }

/* ---------- Landing pages ---------- */
.guide-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-intro { font-size: 1.18rem; line-height: 1.6; }
.guide-steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; margin: 22px 0 10px; }
.guide-steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 62px; background: var(--surface); border: var(--bw) solid var(--line); border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow); }
.guide-steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--lime); color: var(--deep); border: 2px solid var(--deep); font-weight: 800; transform: rotate(-6deg); }
.guide-steps li:nth-child(2)::before { background: var(--peri); } .guide-steps li:nth-child(3)::before { background: var(--pink); } .guide-steps li:nth-child(4)::before { background: var(--sun); }
.guide-tips { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.guide-tips li { padding-left: 34px; position: relative; }
.guide-tips li::before { content: '✦'; position: absolute; left: 4px; top: -1px; color: var(--pink); font-size: 1.2rem; }
.guide-side { position: sticky; top: 90px; display: grid; gap: 24px; }
@media (max-width: 900px) { .guide-side { position: static; } }
.words-panel { padding: 22px; }
.words-title { font-size: 1.3rem; }
.cluelist { margin: 0 0 18px; display: grid; gap: 8px; max-height: 520px; overflow-y: auto; padding-right: 4px; }
.cluelist div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: 10px; padding-bottom: 8px; border-bottom: 2px dashed color-mix(in srgb, var(--line) 18%, transparent); }
.cluelist .cluelist-head { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); border-bottom-style: solid; }
.cluelist dt { font-weight: 800; overflow-wrap: anywhere; }
.cluelist dd { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.sister-panel { background: var(--deep); color: #f3f0ff; border: var(--bw) solid var(--deep); border-radius: var(--r); padding: 22px; box-shadow: 6px 6px 0 var(--pink); }
.sister-panel p { color: #d6d0f5; }
.sister-panel .btn-ink { background: var(--lime); color: var(--deep); border-color: #f3f0ff; box-shadow: 4px 4px 0 #f3f0ff; }
.sister-panel .btn-ink-2 { background: var(--pink); }
.sister-btns { display: flex; flex-wrap: wrap; gap: 12px 14px; }
.sister-panel .chips { margin-top: 16px; }
.sister-panel .chip { background: transparent; color: #f3f0ff; border-color: rgba(243, 240, 255, 0.4); }
.sister-panel .chip:hover { border-color: var(--pink); }
.sister-panel-wide { margin-top: 40px; }
.sister-kicker { font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pink) !important; margin-bottom: 6px; }
.sister-title { font-size: 1.6rem; }
.related { background: var(--bg-alt); border-top: var(--bw) solid var(--line); }
.related-more { margin-top: 22px; font-weight: 700; }
.prose { padding-block: 48px 72px; font-size: 1.08rem; }
.prose h1 { font-size: 3rem; } .prose h2 { font-size: 1.5rem; margin-top: 1.4em; }
.success-box { padding: 22px; margin: 18px 0; }
.license-key { font-size: 1.05rem; word-break: break-all; }
.hero-hub { padding-bottom: 56px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: #f3f0ff; padding: 48px 0 40px; }
.footer-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.footer-top p { margin: 0; opacity: 0.9; }
.footer-themes { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; font-size: 0.95rem; margin-bottom: 22px; }
.footer-themes a { opacity: 0.9; text-decoration: none; }
.footer-themes a:hover { opacity: 1; color: var(--lime); }
.site-footer .fine { color: #c9c2ee; }

/* ---------- Dialogs ---------- */
.dlg { border: var(--bw) solid var(--line); border-radius: 26px; background: var(--surface); color: var(--ink); padding: 0; box-shadow: 10px 10px 0 var(--pink); max-width: min(96vw, 560px); width: 100%; max-height: 94vh; }
.dlg[open] { animation: dlgin 0.35s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes dlgin { from { transform: translateY(30px) scale(0.94); opacity: 0; } }
.dlg::backdrop { background: rgba(15, 12, 41, 0.6); backdrop-filter: blur(6px); }
.dlg-waitlist form { padding: 26px; display: grid; gap: 10px; }
.dlg-waitlist h2 { font-size: 2rem; margin: 0; }
.dlg-waitlist .tag { justify-self: start; margin: 0; }
.wl-feature { margin: 0; font-weight: 700; color: var(--grape); }
:root[data-theme='dark'] .wl-feature { color: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .wl-feature { color: var(--lime); } }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.consent input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--grape); flex: none; }
.consent input[aria-invalid='true'] { outline: 3px solid var(--bad-ink); outline-offset: 2px; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.4em; margin: 8px 0 0; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: var(--deep); color: #f3f0ff; font-weight: 750; padding: 12px 20px; border-radius: 999px; border: 2px solid #f3f0ff; box-shadow: 4px 4px 0 var(--pink); animation: dlgin 0.3s; max-width: calc(100vw - 32px); text-align: center; }

/* ---------- Planned Pro (not built: waitlist only) ---------- */
.pro-lede { font-size: 1.1rem; max-width: 62ch; opacity: 0.95; }
.planned-tag { display: inline-block; margin-top: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: var(--sun); color: var(--deep); border: 2px solid var(--deep); padding: 1px 8px; border-radius: 6px; }

/* 404 page */
.nf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 26px; }
.nf-hero .hero-title { max-width: 16ch; }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .preview { padding-inline: 4px; padding-top: 46px; }
  .deck-meter { top: 2px; }
  .stack span { top: 62px; }
  .flip-card { transform: none; }
  .sticker { font-size: 0.8rem; }
  .sticker-top { right: -2px; }
  .deck-meter { font-size: 0.82rem; left: -2px; }
  .toolbar .btn { white-space: normal; }
  .seg-opt { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .mini-page { width: 62px; }
  .fc-sheet { margin: 10px 10px 20px; width: calc(100% - 20px); box-shadow: 0 0 0 8px #fff, 0 0 0 11px var(--deep), 6px 6px 0 11px var(--deep); }
}

/* ---------- Touch screens: tap targets of at least 44 px, 16 px inputs (no iOS zoom) ---------- */
@media (pointer: coarse) {
  .btn-sm, .chip, .switch, .upsell-btn { min-height: 44px; }
  .handoff { display: inline-flex; align-items: center; min-height: 44px; }
  .theme-toggle { width: 44px; height: 44px; flex: none; }
  .brand { min-height: 44px; }
  nav a.nav-all { min-width: 44px; min-height: 44px; justify-content: center; }
  .crumbs a { display: inline-block; padding-block: 12px; }
  .crumbs { margin-block: -12px 2px; }
  .footer-themes { row-gap: 0; }
  .footer-themes a { display: inline-flex; align-items: center; min-height: 44px; }
  .marquee { padding-block: 4px; }
  .marquee a { padding-block: 10px; }
  .related-more a, .prose a { display: inline-flex; align-items: center; min-height: 44px; }
  .input-sm, .input { font-size: 16px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee-dup { display: none; }
}

/* ---------- Print: only the sheets, black on white, exact physical size ---------- */
/* Letter by default; an A4 deck's pages use the named page "a4sheet". The sheet fills the printable area
   inside equal 0.5in margins, so fronts and backs share the same position on the paper. */
@page { size: letter; margin: 0.5in; }
@page a4sheet { size: A4; margin: 0.5in; }
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  html.has-deck .np, html.has-deck .hero, html.has-deck .marquee, html.has-deck .site-header, html.has-deck dialog, html.has-deck .toast, html.has-deck .skip, html.has-deck .test-banner, html.has-deck .qw-strip, html.has-deck .site-footer { display: none !important; }
  html.has-deck main > :not(#results) { display: none !important; }
  .results { padding: 0; background: #fff; border: 0; }
  .results .wrap { max-width: none; padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; transition: none !important; }
  .sheets { display: block; }
  .page { break-after: page; page-break-after: always; break-inside: avoid; }
  .page:last-child { break-after: auto; page-break-after: auto; }
  .page.paper-a4 { page: a4sheet; }
  .page-label { display: none !important; }
  .fc-sheet { width: 7.5in; height: 9.98in; aspect-ratio: auto; margin: 0 auto; box-shadow: none; border-radius: 0; color: #000; }
  .paper-a4 .fc-sheet { width: 7.27in; height: 10.67in; }
  .fc-grid, .fc-card { border-color: #777; }
  .fc-row .fc-card.front { border-right-color: #000; }
  .fc-meta, .fc-strip, .fc-row .fc-card.front::after { color: #555; }
  /* Ctrl+P on the maker with no usable cards: one line of help, not the whole landing page. */
  html.print-empty body > * { display: none !important; }
  html.print-empty body::before { content: 'No flashcards to print yet. Type at least one card (front - back), press "Make my flashcards", then print.'; display: block; font: 600 14pt/1.4 var(--font); color: #000; }
  /* Pages without a deck (privacy, hub) print as plain black-on-white text. */
  .site-header, .marquee, .qw-strip, .site-footer, .hero-deco, .toast, dialog { box-shadow: none; }
  .hero, .pro, .features, .related, .results, .sister-panel, .panel, .tile, .plan, .faq details, .guide-steps li { background: #fff !important; color: #000 !important; box-shadow: none !important; }
}
