/* Tapper marketing site.
   Layout language: one flat, saturated page colour edge to edge, black ink, a giant tight headline,
   black buttons, a centred single column, sticker-style black-and-white icons, thick rules.
   Everything below reads from the tokens in :root (colour, spacing, radius, type, tap size), so every
   section gets the same treatment. Mobile first: base rules are the phone layout; wider screens add.
   All asset paths are RELATIVE (the site is served from /tapper/). */

:root {
  /* colour */
  --bg: #FFCF3F;            /* page colour (Tapper yellow) */
  --bg-deep: #F5BF22;       /* placeholder behind media while it loads */
  --ink: #15110A;
  --ink-soft: rgba(21, 17, 10, .74);
  --rule: rgba(21, 17, 10, .14);
  --btn-bg: #15110A;
  --btn-ink: #FFFFFF;
  --card: #FFF8E2;
  --sticker-ink: #15110A;
  --sticker-paper: #FFFFFF;
  --accent: #FF7A1A;        /* the icon's orange */
  --code-bg: #15110A;
  --code-ink: #FFE9B0;
  --lift: 0 12px 24px -12px rgba(21, 17, 10, .55);   /* hover lift for buttons and cards */

  /* type */
  --font-display: "Bricolage Grotesque", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-label: .8125rem;                          /* 13px: UI labels, captions inside mock windows */
  --fs-small: .9375rem;                          /* 15px: fine print, footer, card text */
  --fs-body: 1.0625rem;                          /* 17px */
  --fs-lead: clamp(1.125rem, 2.2vw, 1.25rem);
  --fs-h3: 1.375rem;                             /* card, step and shortcut-card headings */
  --fs-h3-big: clamp(1.75rem, 4.4vw, 2.4rem);    /* feature list headings */
  --fs-h2-sm: clamp(1.6rem, 4vw, 2.25rem);       /* secondary section headings */
  --fs-h2: clamp(2.25rem, 6vw, 3.6rem);          /* section headings */
  --fs-h2-xl: clamp(2.6rem, 7.5vw, 4.4rem);      /* closing call to action */

  /* spacing scale (4-based) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --section-y: clamp(64px, 10vw, 104px);
  --gutter: 16px;

  /* shape */
  --r-sm: 10px;             /* small buttons, keycaps, code blocks */
  --r-md: 14px;             /* big buttons, chips */
  --r-lg: 20px;             /* cards, dock, media */
  --r-pill: 999px;
  --line: 3px solid var(--ink);   /* outline of every card-like box */
  --rule-w: 2px;

  --tap: 44px;              /* minimum touch target */
  --header-h: 64px;
  --w-col: 720px;           /* single text column */
  --w-wide: 940px;          /* media, sibling grid, footer */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130C;
    --bg-deep: #1F1A10;
    --ink: #FFF1CC;
    --ink-soft: rgba(255, 241, 204, .74);
    --rule: rgba(255, 241, 204, .14);
    --btn-bg: #FFCF3F;
    --btn-ink: #15110A;
    --card: #221C11;
    --sticker-ink: #FFF1CC;
    --sticker-paper: #16130C;
    --code-bg: #0C0A06;
    --lift: 0 12px 24px -12px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--sp-3)); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-body)/1.6 var(--font-body); overflow-x: hidden; }
img, video, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
p { text-wrap: pretty; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: var(--r-sm); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--w-col), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-wide { width: min(var(--w-wide), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: var(--sp-2); z-index: 100; background: var(--ink); color: var(--bg); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); }
.skip:focus { left: var(--sp-2); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; margin: 0; text-wrap: balance; }
:lang(zh-Hans) :is(h1, h2, h3), :lang(zh-Hant) :is(h1, h2, h3) { letter-spacing: 0; }
code, kbd { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--rule); padding: .15em .45em; border-radius: 5px; }
kbd { display: inline; padding: .15em .45em; border-radius: 6px; background: var(--btn-bg); color: var(--btn-ink); font-weight: 500; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.kg { white-space: nowrap; }   /* a key combo never splits across lines */
.section { padding-block: var(--section-y); border-top: var(--rule-w) solid var(--rule); }
.section h2 { text-align: center; font-size: var(--fs-h2); line-height: 1.02; margin-bottom: var(--sp-5); }
:lang(zh-Hans) .section h2, :lang(zh-Hant) .section h2 { line-height: 1.2; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--tap); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-ink); border: var(--rule-w) solid var(--btn-bg);
  font: 700 .95rem/1.2 var(--font-body); text-decoration: none; white-space: nowrap;
  transition: transform .15s ease-out, box-shadow .15s ease-out;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--lift); }
.btn:active { transform: none; box-shadow: none; }
.btn--line { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--line:hover { border-color: var(--ink); box-shadow: none; }
.btn--big { min-height: 56px; max-width: 100%; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); font-size: clamp(1rem, 4.6vw, 1.125rem); white-space: normal; text-align: center; }
@media (min-width: 761px) { .btn--big { padding: var(--sp-4) var(--sp-6); white-space: nowrap; } }
.apple { width: 1em; height: 1.15em; flex: none; margin-top: -.12em; }
.fine { margin: var(--sp-3) 0 0; font-size: var(--fs-small); color: var(--ink-soft); }
.fine a { display: inline-flex; align-items: center; min-height: var(--tap); }   /* taller tap area without moving the text */
/* Homebrew line under the download buttons (hero and final CTA): label, then the command on the
   code-block colours with a copy button. The box never widens the page: on a phone the command
   wraps inside it. */
.brew { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); max-width: 100%; font-size: var(--fs-small); color: var(--ink-soft); }
.brew-box { display: flex; align-items: stretch; max-width: min(100%, calc(100vw - 2 * var(--gutter))); min-width: 0; background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-sm); text-align: left; }
.brew-box code { align-self: center; min-width: 0; overflow-wrap: anywhere; background: none; padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3); font: 500 .86rem/1.5 var(--font-mono); color: inherit; }
.brew-copy { flex: none; min-height: var(--tap); min-width: var(--tap); padding: 0 var(--sp-3); border: 0; border-left: 2px solid rgba(255, 233, 176, .22); background: transparent; color: inherit; font: 700 .875rem/1 var(--font-body); cursor: pointer; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.brew-copy:hover { background: rgba(255, 233, 176, .1); }
.brew-copy.done { color: var(--accent); }
.steps code { overflow-wrap: anywhere; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: transparent; border-bottom: 4px solid transparent;
  transition: background-color .2s ease-out, border-color .2s ease-out;
}
.site-header.is-solid { background: var(--bg); border-bottom-color: var(--ink); }
.bar {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); min-width: var(--tap); text-decoration: none; font: 800 1.25rem/1 var(--font-display); letter-spacing: -.04em; }
.brand img { border-radius: var(--r-sm); }
@media (max-width: 359px) { .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.nav { display: flex; align-items: center; gap: var(--sp-2); }
.nav-link { display: none; }
.nav-gh { display: none; }
.nav-dl { width: var(--tap); padding: 0; }
.nav-dl span { display: none; }
.lang { display: inline-flex; border: var(--rule-w) solid var(--rule); border-radius: var(--r-sm); overflow: hidden; }
.lang button {
  appearance: none; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer;
  min-width: var(--tap); min-height: var(--tap); padding: 0 var(--sp-2); font: 700 var(--fs-label)/1 var(--font-body);
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media (min-width: 1024px) {
  .nav-link { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: var(--sp-2); font-weight: 500; font-size: .95rem; text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
  .nav-link:hover { color: var(--ink); }
}
@media (min-width: 761px) {
  .bar { padding-inline: max(var(--sp-5), env(safe-area-inset-left)) max(var(--sp-5), env(safe-area-inset-right)); }
  .nav { gap: var(--sp-3); }
  .nav-gh { display: inline-flex; }
  .nav-dl { width: auto; padding: var(--sp-2) var(--sp-4); }
  .nav-dl span { display: inline; }
}

@media (min-width: 1024px) and (pointer: fine) { .lang button { min-width: 36px; min-height: 36px; } }

/* ---------- Hero = live stage ---------- */
.stage { position: relative; overflow: hidden; touch-action: manipulation; }
@media (pointer: fine) { .stage, .stage * { cursor: none !important; } }
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--header-h) + var(--sp-6)) var(--gutter) var(--sp-7);
}
.hero-inner { position: relative; z-index: 1; width: min(1180px, 100%); display: flex; flex-direction: column; align-items: center; }
.faces { display: flex; justify-content: center; margin-bottom: var(--sp-5); }
.face {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden; margin-left: -14px;
  border: 4px solid var(--bg); display: grid; place-items: start center;
  animation: pop .5s cubic-bezier(.34, 1.4, .64, 1) both;
}
.face:first-child { margin-left: 0; }
.face img { width: 100%; height: auto; }
.f-icon { background: #FFF; place-items: center; }
.f-icon img { width: 112%; max-width: none; }
.f-tiny { background: #FFF; animation-delay: 80ms; }
.f-paw { background: #FFD3E2; animation-delay: 160ms; }
.f-mid { background: #D9C2FF; animation-delay: 240ms; }
.face:not(.f-icon) img { width: 70%; margin-top: 6px; }
@keyframes pop { from { transform: scale(.3) translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

.hero h1 { font-size: clamp(3rem, 10.5vw, 6rem); line-height: .92; max-width: 11ch; }
:lang(zh-Hans) .hero h1, :lang(zh-Hant) .hero h1 { max-width: none; line-height: 1.08; font-size: clamp(2.6rem, 11vw, 6rem); }
.hl { box-shadow: inset 0 -.18em 0 var(--accent); }
.lede { font-size: var(--fs-lead); line-height: 1.55; max-width: 34em; margin: var(--sp-5) auto var(--sp-6); }
.cta { display: flex; flex-direction: column; align-items: center; }
.cta .fine { max-width: 13em; }
:lang(zh-Hans) .cta .fine, :lang(zh-Hant) .cta .fine { max-width: 12em; }
.nw { white-space: nowrap; }   /* kept as narrow as the button, so the resting glove beside it covers nothing */
@media (min-width: 761px) { .cta .fine { max-width: 17em; } }
@media (min-width: 761px) {
  .face { width: 76px; height: 76px; margin-left: -16px; }
  .hero { padding-top: calc(var(--header-h) + var(--sp-7)); }
}

/* Dock: hero glove controls. Phone: stacked rows. Wide: one pill row. */
.dock {
  width: 100%; margin-top: var(--sp-7); display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-4); border: var(--line); border-radius: var(--r-lg); background: var(--card); text-align: left;
}
.dock-group { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.dock-lbl { font-size: var(--fs-label); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); white-space: nowrap; }
:lang(zh-Hans) .dock-lbl, :lang(zh-Hant) .dock-lbl { letter-spacing: 0; font-size: .875rem; }
.styles { display: flex; gap: var(--sp-2); }
.style-btn {
  appearance: none; width: var(--tap); height: 48px; padding: 2px; display: grid; place-items: center;
  border: var(--rule-w) solid var(--rule); border-radius: var(--r-sm); background: #FFF;
}
.style-btn img { width: 26px; height: auto; }
.style-btn[aria-checked="true"] { border-color: #15110A; background: #FFE58A; box-shadow: 0 0 0 2px #15110A; }
.mood-wrap { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3); min-width: 0; }
.mood input { flex: 1; min-width: 72px; max-width: 160px; height: var(--tap); margin: 0; accent-color: var(--accent); }
.mood output { font-size: .875rem; font-weight: 700; white-space: nowrap; }
.dock-group.color, .dock-group.mood { flex-wrap: wrap; }
.dock-group.color .dock-lbl { width: 100%; }
@media (max-width: 400px) { .dock-group.mood .dock-lbl { width: 100%; } .mood input { max-width: none; } }
.swatches { flex: 1; display: grid; grid-template-columns: repeat(8, minmax(24px, 36px)); justify-content: space-between; gap: var(--sp-1); }
.sw { appearance: none; width: 100%; aspect-ratio: 1; border-radius: 50%; border: var(--rule-w) solid #15110A; background: var(--c); padding: 0; }
.sw[aria-checked="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.toggle {
  appearance: none; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap);
  padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-2); border: var(--rule-w) solid var(--ink); border-radius: var(--r-pill);
  background: transparent; color: var(--ink); font: 700 .875rem/1 var(--font-body);
}
.knob { width: 22px; height: 22px; border-radius: 50%; background: var(--ink-soft); transition: background-color .15s ease-out; }
.toggle[aria-pressed="true"] .knob { background: #34C759; }
@media (min-width: 761px) and (max-width: 1023px) { .dock { max-width: 520px; } }
@media (min-width: 1024px) {
  .dock { width: auto; margin-top: var(--sp-7); display: grid; grid-template-columns: auto auto; align-items: center; gap: var(--sp-3) var(--sp-6); padding: var(--sp-4) var(--sp-5); }
  .dock-group, .dock-group.color { flex-wrap: nowrap; justify-content: flex-start; }
  .dock-group.color .dock-lbl { width: auto; }
  .mood input { flex: none; width: 112px; }
  .mood output { min-width: 8.6em; }
  .swatches { display: flex; gap: 6px; }
  .sw { width: 26px; }
}

/* Rig + bursts */
.rig { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; will-change: transform; transform-origin: 0 0; }
.rig img { position: absolute; display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
.rig .stick { position: absolute; display: block; max-width: none; overflow: visible; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.stage-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
/* Resting glove sits behind the hero content so its stick never crosses the controls' text;
   once the pointer is in the hero, the glove is the pointer and comes back on top. */
.stage.is-parked .rig { z-index: 0; }
.burst { position: absolute; width: 280px; height: 280px; margin: -140px 0 0 -140px; animation: burst .5s ease-out forwards; overflow: visible; }
@keyframes burst { 0% { transform: scale(.4); opacity: 1; } 60% { opacity: 1; } 100% { transform: scale(1.15); opacity: 0; } }
.hint {
  position: relative; z-index: 4; margin: var(--sp-4) 0 0; max-width: 100%;
  background: var(--ink); color: var(--bg); font-size: .875rem; font-weight: 700; line-height: 1.35;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill); text-align: center;
  transition: opacity .3s ease-out; pointer-events: none;
}
.hint.is-gone { opacity: 0; }
.hint .touch { display: none; }
@media (hover: none) { .hint .mouse { display: none; } .hint .touch { display: inline; } }
@media (min-width: 761px) { .hint { position: absolute; left: 50%; bottom: var(--sp-4); transform: translateX(-50%); margin: 0; white-space: nowrap; } }

/* ---------- Quick demo ---------- */
.demo { padding-bottom: var(--section-y); }
.demo-card { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-deep); aspect-ratio: 1110 / 694; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .45); }
.demo-card video { display: block; width: 100%; height: 100%; object-fit: cover; }
.demo-tag { position: absolute; left: var(--sp-3); top: var(--sp-3); background: var(--btn-bg); color: var(--btn-ink); font: 800 .875rem/1 var(--font-display); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-pill); }
.demo-cap { text-align: center; color: var(--ink-soft); font-size: var(--fs-small); margin: var(--sp-4) auto 0; max-width: 34em; }

/* ---------- Works everywhere: sticky stack ---------- */
.where-track { position: relative; height: 340vh; }
.where-sticky {
  position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-5);
  padding: var(--sp-4) var(--gutter); text-align: center;
}
.where h2 { font-size: var(--fs-h2-sm); line-height: 1.1; }
.where-stack { position: relative; width: min(820px, 100%, calc((100svh - var(--header-h) - 230px) * 1.48)); aspect-ratio: 1600 / 1080; clip-path: inset(-60px -60px 0 -60px); }
.shot {
  position: absolute; inset: 0; margin: 0; border-radius: var(--r-lg); overflow: hidden; background: #1B1B1D;
  box-shadow: 0 18px 50px -16px rgba(0, 0, 0, .5); transform-origin: 50% 0; will-change: transform;
}
.shot img { display: block; width: 100%; height: auto; }
.shot-bar { height: 7.4%; min-height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 var(--sp-3); color: #EEE; font-size: var(--fs-label); font-weight: 700; }
.shot-bar i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #48484C; }
.shot-bar .rec { margin-left: var(--sp-2); display: inline-flex; align-items: center; gap: 6px; background: #2E7D32; color: #FFF; padding: var(--sp-1) var(--sp-3); border-radius: var(--r-pill); white-space: nowrap; }
.shot-bar .rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FFF; }
.shot-bar .app { margin-left: auto; color: #AAA; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where-note { margin: 0; font-size: var(--fs-small); color: var(--ink-soft); }
@media (max-width: 480px) { .shot-bar i { display: none; } .shot-bar .rec { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) {
  .where-track { height: auto; }
  .where-sticky { position: static; height: auto; padding-block: var(--section-y); }
  .where-stack { aspect-ratio: auto; display: grid; gap: var(--sp-4); clip-path: none; }
  .shot { position: relative; transform: none !important; }
}

/* ---------- 1 / 2 / 3: what it is, why, how to use ---------- */
.sub { text-align: center; font: 800 clamp(1.25rem, 3vw, 1.6rem)/1.25 var(--font-display); letter-spacing: -.02em; margin: 0 auto var(--sp-4); max-width: 26em; text-wrap: balance; }
:lang(zh-Hans) .sub, :lang(zh-Hant) .sub { letter-spacing: 0; }
.big-p { font-size: var(--fs-lead); line-height: 1.65; text-align: center; margin: 0 auto; max-width: 34em; }
.facts { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: grid; gap: var(--sp-3); }
.uses { margin-top: var(--sp-6); display: grid; gap: var(--sp-3); }
.card { border: var(--line); border-radius: var(--r-lg); background: var(--card); padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.card h3 { font-size: var(--fs-h3); line-height: 1.2; margin-bottom: var(--sp-2); }
.card p { margin: 0; color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.55; }
@media (min-width: 761px) { .facts { grid-template-columns: repeat(3, 1fr); } .uses { grid-template-columns: repeat(2, 1fr); } }

.steps { list-style: none; counter-reset: step; padding: 0; margin: var(--sp-2) 0 0; }
.steps li { counter-increment: step; position: relative; padding: var(--sp-5) 0 var(--sp-5) 56px; border-bottom: var(--rule-w) solid var(--rule); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: var(--sp-5); width: 40px; height: 40px; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-ink); display: grid; place-items: center; font: 800 1.125rem/1 var(--font-display);
}
.steps h3 { font-size: var(--fs-h3); line-height: 1.2; margin: 6px 0 var(--sp-2); }
.steps p { margin: 0; color: var(--ink-soft); }
.steps a { color: var(--ink); font-weight: 700; }
@media (min-width: 761px) { .steps li { padding-left: 68px; } .steps li::before { width: 48px; height: 48px; font-size: 1.3rem; top: 20px; } }
.keys-card { margin-top: var(--sp-6); }
.keys-card dl { margin: 0; }
.keys-card dl div { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: var(--rule-w) solid var(--rule); }
.keys-card dt { flex: none; width: 112px; }
.keys-card dt kbd { font-size: 1rem; }
.keys-card dd { margin: 0; }
.keys-card .click { display: inline-block; border: var(--rule-w) solid var(--ink); border-radius: var(--r-sm); padding: 6px var(--sp-3); font-weight: 700; font-size: .875rem; }
.keys-card .muted { margin: var(--sp-4) 0 0; }
@media (min-width: 761px) { .keys-card dt { width: 132px; } }

/* ---------- Features ---------- */
.flist { list-style: none; margin: 0; padding: 0; }
.flist li { text-align: center; padding: var(--sp-6) 0; border-bottom: var(--rule-w) solid var(--rule); }
.flist li:last-child { border-bottom: 0; }
.ficon { height: 76px; display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.ficon img { height: 68px; width: auto; filter: drop-shadow(3px 3px 0 var(--ink)); }
.ficon.trio img { height: 58px; }
.ficon.keys kbd { display: inline-flex; flex-direction: column; justify-content: center; width: 54px; height: 54px; border-radius: var(--r-sm); font-size: 1.2rem; box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.ficon.keys small { font-size: .5rem; font-family: var(--font-body); opacity: .75; }
.ficon.term span { background: var(--btn-bg); color: var(--btn-ink); font: 500 1rem var(--font-mono); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.flist h3 { font-size: var(--fs-h3-big); line-height: 1.1; margin-bottom: var(--sp-2); }
.flist p { margin: 0 auto; max-width: 30em; color: var(--ink-soft); }
.center-cta { text-align: center; margin-top: var(--sp-6); }
/* Rows fade up as they arrive; only when JS is running, so a failed script never hides content. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s cubic-bezier(.16, 1, .3, 1), transform .55s cubic-bezier(.16, 1, .3, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- FAQ ---------- */
.faq h2 { margin-bottom: var(--sp-6); }
.faq-list details { border-bottom: var(--rule-w) solid var(--rule); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); min-height: var(--tap); padding: var(--sp-4) 2px; font-weight: 700; font-size: 1.0625rem; line-height: 1.4; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease-out; }
.faq-list details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.ans { padding: 0 2px var(--sp-5); color: var(--ink-soft); }
.ans p { margin: 0 0 var(--sp-3); }
.ans .muted { font-size: var(--fs-small); }
pre { background: var(--code-bg); color: var(--code-ink); border-radius: var(--r-sm); padding: var(--sp-4); overflow-x: auto; font: 500 .86rem/1.7 var(--font-mono); margin: var(--sp-1) 0 var(--sp-3); }
pre code { background: none; padding: 0; font-size: inherit; }
pre .c { color: #A89A72; }
.muted { color: var(--ink-soft); font-size: var(--fs-small); }

/* ---------- Final CTA ---------- */
.final { text-align: center; }
.final h2 { font-size: var(--fs-h2-xl); line-height: 1; margin-bottom: var(--sp-6); }

/* ---------- Siblings ---------- */
.sibs .wrap { width: min(var(--w-wide), 100% - 2 * var(--gutter)); }
.sibs h2 { font-size: var(--fs-h2-sm); margin-bottom: var(--sp-5); }
.sib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: var(--sp-3); }
.sib { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4); border: var(--line); border-radius: var(--r-lg); background: var(--card); text-decoration: none; transition: transform .15s ease-out, box-shadow .15s ease-out; }
.sib:hover { transform: translateY(-2px); box-shadow: var(--lift); }
.sib img { flex: none; border-radius: var(--r-sm); }
.sib-text { display: flex; flex-direction: column; min-width: 0; }
.sib-name { font: 800 1.125rem/1.2 var(--font-display); letter-spacing: -.02em; }
.sib-desc { font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.4; }

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--sp-6) calc(var(--sp-7) + env(safe-area-inset-bottom)); border-top: var(--rule-w) solid var(--rule); }
.site-footer .wrap { width: min(var(--w-wide), 100% - 2 * var(--gutter)); }
.note-box { display: flex; align-items: center; gap: var(--sp-4); border: var(--line); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5); font-weight: 700; margin-bottom: var(--sp-5); }
.note-box svg { flex: none; }
.note-box p { margin: 0; line-height: 1.5; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 var(--sp-5); font-size: var(--fs-small); color: var(--ink-soft); }
.foot-row nav, .foot-sib { display: flex; flex-wrap: wrap; column-gap: var(--sp-5); }
.foot-row a, .foot-sib a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); text-decoration: none; }
.foot-row a:hover, .foot-sib a:hover { color: var(--ink); text-decoration: underline; }
.foot-sib { margin-top: var(--sp-1); font-size: var(--fs-small); color: var(--ink-soft); }

/* ---------- Phone download bar ---------- */
.mbar { display: none; }
@media (max-width: 760px) {
  .mbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: var(--sp-3) max(var(--gutter), env(safe-area-inset-right)) calc(var(--sp-3) + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    background: var(--bg); border-top: var(--line); transform: translateY(110%); transition: transform .25s ease-out;
  }
  .mbar.is-on { transform: none; }
  .mbar .btn { width: 100%; }
  .site-footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
}

/* ---------- Reduced motion: keep every state change, drop the travel ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .face { animation: none; }
  .burst { animation: fade .35s ease-out forwards; }
  .btn:hover, .sib:hover { transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
@keyframes fade { from { opacity: 1; } to { opacity: 0; } }
