/* SpitePDF site styles. System fonts only. */

:root {
  --ink: #0b0d14;
  --inkSoft: #141826;
  --paper: #f2efe6;
  --paperDim: #b9b6ab;
  --scarlet: #c42a2a;
  --scarletHot: #e84a45;
  --blueprint: #4fc3ff;
  --graphite: #8a8f9c;
  --pencilBody: #e0a526;

  --display: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --body: system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bar-h: 56px;
  --gutter: clamp(1rem, 5vw, 5rem);
  --scrim: rgba(11, 13, 20, 0.76);
}

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

html {
  background: var(--ink);
  color-scheme: dark;
  scroll-padding-top: var(--bar-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--scarletHot);
  outline-offset: 3px;
}

figure[hidden], img[hidden] { display: none !important; }

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  min-height: 44px;
  background: var(--scarlet);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Canvas ---------- */
#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  background: var(--ink);
}

main, .endmatter { position: relative; z-index: 1; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0 max(var(--gutter), env(safe-area-inset-left)) 0 max(var(--gutter), env(safe-area-inset-left));
  background: linear-gradient(to bottom, rgba(11, 13, 20, 0.96) 62%, rgba(11, 13, 20, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  text-decoration: none;
}
.brand-icon { width: 28px; height: 28px; border-radius: 7px; }
.brand-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.endorse {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paperDim);
  white-space: nowrap;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calm-toggle,
.cta-small {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.calm-toggle {
  background: transparent;
  color: var(--paperDim);
  border: 1px solid var(--graphite);
  border-radius: 999px;
}
.calm-toggle:hover { color: var(--paper); border-color: var(--paper); }
.calm-toggle[aria-pressed="true"] {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

.cta-small {
  background: var(--scarlet);
  color: var(--paper);
  font-weight: 700;
  border: 1px solid var(--scarlet);
  border-radius: 999px;
}
.cta-small:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

@media (max-width: 420px) {
  .endorse { display: none; }
  .calm-long { display: none; }
  .calm-toggle, .cta-small { white-space: nowrap; }
  .topbar { gap: 0.4rem; padding-left: 0.75rem; padding-right: 0.75rem; }
  .calm-toggle, .cta-small { padding: 0 0.7rem; letter-spacing: 0.08em; }
}

/* ---------- Progress rail ---------- */
.rail {
  position: fixed;
  right: max(0.5rem, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: none;
}
.rail ol { list-style: none; margin: 0; padding: 0; }
.rail a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  text-decoration: none;
}
.rail a::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--graphite);
  transition: width 0.25s ease, background-color 0.25s ease;
}
.rail a[aria-current="true"]::before {
  width: 26px;
  height: 3px;
  background: var(--scarletHot);
}
.rail a:hover::before { background: var(--paper); }
.rail a span {
  position: absolute;
  right: 100%;
  margin-right: 0.25rem;
  padding: 0.3rem 0.6rem;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.rail a:hover span,
.rail a:focus-visible span { opacity: 1; }

@media (min-width: 900px) and (min-height: 660px) {
  .rail { display: block; }
}

/* ---------- Chapters and sticky panels ---------- */
.chapter {
  position: relative;
  min-height: 240vh;
  overflow-x: clip;
}
#pencil { min-height: 180vh; }
#fuzzy { min-height: 320vh; }
#thumb { min-height: 480vh; }
#mac { min-height: 260vh; }
#drive { min-height: 280vh; }
#offline { min-height: 240vh; }
#edit { min-height: 240vh; }
#sign { min-height: 260vh; }
#takeoff { min-height: 320vh; }
#pro { min-height: 320vh; }
#yours { min-height: 170vh; }

.pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--bar-h) var(--gutter) 1.5rem;
}
[data-side="right"] .pin { justify-content: flex-end; }

@media (min-width: 900px) {
  .pin { padding-right: max(var(--gutter), 4.5rem); }
}

.panel {
  position: relative;
  isolation: isolate;
  width: min(40rem, 100%);
}

/* Soft ink scrim: a blurred wash behind text, not a card. */
.panel::before {
  content: "";
  position: absolute;
  inset: -6rem -7rem;
  z-index: -1;
  background: rgba(11, 13, 20, 0.78);
  /* Feather every edge to zero so no boundary is ever visible. */
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.12) 5%, rgba(0,0,0,0.45) 11%, rgba(0,0,0,0.8) 17%, #000 24%, #000 76%, rgba(0,0,0,0.8) 83%, rgba(0,0,0,0.45) 89%, rgba(0,0,0,0.12) 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.12) 5%, rgba(0,0,0,0.45) 11%, rgba(0,0,0,0.8) 17%, #000 24%, #000 76%, rgba(0,0,0,0.8) 83%, rgba(0,0,0,0.45) 89%, rgba(0,0,0,0.12) 95%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.12) 5%, rgba(0,0,0,0.45) 11%, rgba(0,0,0,0.8) 17%, #000 24%, #000 76%, rgba(0,0,0,0.8) 83%, rgba(0,0,0,0.45) 89%, rgba(0,0,0,0.12) 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.12) 5%, rgba(0,0,0,0.45) 11%, rgba(0,0,0,0.8) 17%, #000 24%, #000 76%, rgba(0,0,0,0.8) 83%, rgba(0,0,0,0.45) 89%, rgba(0,0,0,0.12) 95%, transparent 100%);
  mask-composite: intersect;
  pointer-events: none;
}

.kicker {
  margin: 0 0 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paperDim);
}
.kicker .num {
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
}
.kicker .num::after {
  content: "";
  display: inline-block;
  width: 2.2rem;
  height: 3px;
  margin-left: 0.8rem;
  vertical-align: middle;
  background: var(--scarletHot);
}

.headline {
  margin: 0 0 1.2rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.6rem, 6.2vw, 6rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--paper);
  text-wrap: balance;
  overflow-wrap: break-word;
  text-shadow: 0 2px 24px rgba(11, 13, 20, 0.7);
}

/* Highlighter underline on the key phrase. Static by default; drawn once on reveal when motion is on. */
.hl {
  background: linear-gradient(var(--scarlet), var(--scarlet)) no-repeat 0 94% / 100% 0.075em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
html.reveals:not(.calm) .hl {
  background-size: 0% 0.075em;
  transition: background-size 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.55s;
}
html.reveals:not(.calm) .chapter.is-seen .hl { background-size: 100% 0.075em; }
html.reveals:not(.calm) #pencil .hl { transition-delay: 1.1s; transition-duration: 1.1s; background-size: 0% 0.085em; }
html.reveals:not(.calm) #pencil.is-seen .hl { background-size: 100% 0.085em; }

/* Hero kicker types in (non-calm) */
html.reveals:not(.calm) #pencil .type {
  animation: type-in 1.5s steps(36, end) 0.3s both;
}
@keyframes type-in {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.copy {
  margin: 0 0 1.4rem;
  max-width: 34rem;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.6;
  color: var(--paper);
  text-shadow: 0 1px 14px rgba(11, 13, 20, 0.8);
}

/* Screenshots: small supporting figures */
.shot { margin: 0.4rem 0 0; }
.shot img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 25vh;
  border-radius: 10px;
  border: 1px solid var(--graphite);
  background: var(--inkSoft);
}
.shot.phone img { max-width: 42%; }

/* Final CTA */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
  align-items: center;
  margin: 0.2rem 0 1.4rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  text-decoration: none;
}
.badge img { height: 48px; width: auto; max-width: none; }
.badge-text { display: none; }
.badge.txt .badge-text {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.1rem;
  border: 1px solid var(--paper);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.nw { white-space: nowrap; }
.calm-toggle, .cta-small { white-space: nowrap; }
.price {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  letter-spacing: -0.01em;
}
.note {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--paperDim);
}
.req {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--paperDim);
}

/* ---------- Portrait layout ---------- */
@media (max-aspect-ratio: 1/1) {
  .pin {
    align-items: flex-end;
    padding-bottom: max(3.6rem, calc(env(safe-area-inset-bottom) + 3.2rem));
  }
  [data-side="right"] .pin { justify-content: flex-start; }
  .panel { width: 100%; }
  .panel::before {
    inset: -7rem -3rem -2rem;
    border-radius: 0;
    -webkit-mask-image: none;
    mask-image: none;
    background: linear-gradient(to bottom, rgba(11, 13, 20, 0) 0%, rgba(11, 13, 20, 0.84) 34%, rgba(11, 13, 20, 0.92) 100%);
  }
  .headline { font-size: clamp(2.2rem, 11vw, 3.6rem); margin-bottom: 0.8rem; }
  .kicker { margin-bottom: 0.7rem; }
  .copy { margin-bottom: 1rem; }
  .shot img { max-height: 22vh; }
  .shot.phone img { max-width: 30%; }
}

/* Short screens: drop the supporting figure and tighten type so the panel always fits below the top bar. */
@media (max-height: 760px) and (max-aspect-ratio: 1/1), (max-height: 520px) {
  .shot { display: none; }
}
@media (max-height: 760px) and (max-aspect-ratio: 1/1) {
  .headline { font-size: clamp(1.9rem, 9.5vw, 2.7rem); line-height: 1.08; margin-bottom: 0.6rem; }
  .kicker { margin-bottom: 0.5rem; font-size: 0.68rem; }
  .copy { font-size: 0.94rem; line-height: 1.5; margin-bottom: 0.7rem; }
  .badge, .badge img { min-height: 44px; }
  .badge img { height: 44px; }
  .badges { gap: 0.5rem 1rem; margin-bottom: 0.9rem; }
  .price { font-size: 1.2rem; }
  .note { font-size: 0.82rem; margin-bottom: 0.6rem; }
  .req { font-size: 0.66rem; line-height: 1.55; }
}

@media (max-aspect-ratio: 1/1) {
  .folio {
    width: 100%;
    bottom: 0;
    padding: 1.4rem 1rem max(0.6rem, env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(11, 13, 20, 0.96) 55%, rgba(11, 13, 20, 0));
  }
  .folio-rule { width: min(18rem, 70%); margin-left: auto; margin-right: auto; }
}


@media (max-width: 379px) {
  .badges { flex-direction: column; align-items: flex-start; }
}

/* ---------- Folio HUD ---------- */
.folio {
  position: fixed;
  left: 50%;
  bottom: max(0.4rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 14;
  width: min(24rem, calc(100vw - 2rem));
  padding: 0.5rem 0.5rem 0.6rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paperDim);
  cursor: pointer;
  text-shadow: 0 0 10px var(--ink), 0 0 4px var(--ink);
  transition: opacity 0.3s ease;
}
.folio.off { opacity: 0; pointer-events: none; }
.folio-line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.folio-rule {
  display: block;
  height: 2px;
  margin-top: 0.45rem;
  background: rgba(138, 143, 156, 0.45);
}
.folio-fill {
  display: block;
  height: 100%;
  background: var(--scarletHot);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
html:not(.js) .folio { display: none; }

/* ---------- Scroll cue ---------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 4.2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paperDim);
  pointer-events: none;
  text-shadow: 0 0 10px var(--ink);
}
.scroll-cue i {
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--scarletHot);
  border-bottom: 3px solid var(--scarletHot);
  transform: rotate(45deg);
  animation: cue-bob 1.8s ease-in-out infinite;
}
@keyframes cue-bob {
  0%, 100% { translate: 0 -3px; }
  50% { translate: 0 4px; }
}

/* ---------- Small print and footer ---------- */
.endmatter {
  background: var(--ink);
  padding: 0 var(--gutter) 2rem;
}
.endmatter::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: clamp(3rem, 8vw, 6rem);
  background: linear-gradient(to right, var(--scarletHot), var(--graphite) 18%, transparent 80%);
}

.small-print { max-width: 46rem; }
.small-print h2 {
  margin: 0 0 1.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paperDim);
}
.small-print ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--graphite);
}
.small-print li {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(138, 143, 156, 0.4);
  color: var(--paper);
  font-size: 0.98rem;
}

.footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--graphite);
}
.footer-id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
}
.footer-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0.6rem 0 0.4rem;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
  color: var(--paper);
  text-decoration-color: var(--graphite);
  text-underline-offset: 0.2em;
}
.footer-links a:hover { text-decoration-color: var(--scarletHot); }
.legal {
  margin: 0.5rem 0 0;
  max-width: 46rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--paperDim);
}

/* ---------- Reveals (enhancement only; content is visible by default) ---------- */
html.reveals:not(.calm) .rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.reveals:not(.calm) .chapter.is-seen .rv {
  opacity: 1;
  transform: none;
}

/* ---------- No-WebGL / no-JS backdrop (CSS only) ---------- */
html.js #stage { opacity: 0; transition: opacity 0.9s ease; }
html.js.stage-ready #stage { opacity: 1; }
html.no-webgl #stage { display: none; }

html:not(.stage-ready) body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 50% at 50% 106%, rgba(242, 239, 230, 0.55), rgba(242, 239, 230, 0.18) 50%, rgba(242, 239, 230, 0) 82%),
    radial-gradient(ellipse 130% 26% at 50% 100%, rgba(196, 42, 42, 0.22), rgba(196, 42, 42, 0) 75%),
    linear-gradient(to bottom, #06070b 0%, #0b0d14 38%, #1b2033 100%);
}
html.no-webgl #stage,
html:not(.js) #stage { display: none; }

/* Per-section paper glow, opposite the text side */
html.no-webgl .chapter,
html:not(.js) .chapter {
  background: radial-gradient(ellipse 50% 42% at 74% 52%, rgba(242, 239, 230, 0.22), rgba(242, 239, 230, 0.06) 55%, rgba(242, 239, 230, 0) 78%);
}
html.no-webgl .chapter[data-side="right"],
html:not(.js) .chapter[data-side="right"] {
  background: radial-gradient(ellipse 50% 42% at 26% 52%, rgba(242, 239, 230, 0.22), rgba(242, 239, 230, 0.06) 55%, rgba(242, 239, 230, 0) 78%);
}
html.no-webgl #takeoff,
html:not(.js) #takeoff {
  background: radial-gradient(ellipse 42% 36% at 26% 52%, rgba(79, 195, 255, 0.12), rgba(79, 195, 255, 0) 72%);
}
/* Per-section scarlet hairline */
html.no-webgl .chapter::after,
html:not(.js) .chapter::after {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  width: min(26rem, 70vw);
  height: 1px;
  background: linear-gradient(to right, var(--scarlet), rgba(196, 42, 42, 0));
}
html.no-webgl [data-side="right"].chapter::after,
html:not(.js) [data-side="right"].chapter::after {
  left: auto;
  right: var(--gutter);
  background: linear-gradient(to left, var(--scarlet), rgba(196, 42, 42, 0));
}

/* No scrim needed on a plain backdrop. */
html.no-webgl .panel::before,
html:not(.js) .panel::before { display: none; }

/* Controls that need JavaScript stay hidden without it */
html:not(.js) .calm-toggle,
html:not(.js) .folio,
html:not(.js) .scroll-cue { display: none; }

/* ---------- Calm mode ---------- */
html.calm *,
html.calm *::before,
html.calm *::after {
  animation: none !important;
  transition: none !important;
}
html.calm .rv { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  #stage, .topbar, .rail, .skip-link, .folio, .scroll-cue { display: none; }
  .chapter { min-height: 0; }
  .pin { position: static; height: auto; }
  body, .endmatter { background: #fff; color: #000; }
  .headline, .copy, .kicker, .note, .req { color: #000; text-shadow: none; }
  .panel::before { display: none; }
}


/* =========================================================
   v6: gestures, dense blocks, closing copy, compare table
   ========================================================= */

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* thumb: eight gestures */
.panel-gest .headline { font-size: clamp(2.4rem, 5vw, 4.6rem); }
.panel-gest .copy { font-size: clamp(0.95rem, 1.1vw, 1.05rem); margin-bottom: 1rem; }
.gestures {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(138, 143, 156, 0.5);
}
.gestures li {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.38rem 0;
  border-bottom: 1px solid rgba(138, 143, 156, 0.28);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--paperDim);
}
.gestures .g-n {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--graphite);
}
.gestures .g-title { font-weight: 600; }
.gestures .g-text { display: block; margin-top: 0.15rem; }
.gestures li[aria-current="true"] { color: var(--paper); }
.gestures li[aria-current="true"] .g-n { color: var(--scarletHot); }
.gestures li[aria-current="true"] .g-title {
  background: linear-gradient(var(--scarlet), var(--scarlet)) no-repeat 0 100% / 100% 2px;
}
.gestures li[aria-current="true"] .g-n::before { content: "\25B8\00a0"; color: var(--scarletHot); }
.g-count {
  display: none;
  margin: 0.6rem 0 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  color: var(--paperDim);
}

/* With the engine running, wide screens show every title and open the current one only. */
html.has-engine:not(.calm) .gestures li:not([aria-current="true"]) .g-text { display: none; }
html.has-engine:not(.calm) .gestures li { transition: color 0.25s ease; }

/* Narrow or short screens: only the current gesture, with a counter. */
@media (max-width: 900px), (max-height: 760px) {
  html.has-engine:not(.calm) .gestures { border-top: 0; }
  html.has-engine:not(.calm) .gestures li:not([aria-current="true"]) { display: none; }
  html.has-engine:not(.calm) .gestures li { border-bottom: 0; font-size: 0.95rem; }
  html.has-engine:not(.calm) .gestures li .g-text { display: block !important; }
  html.has-engine:not(.calm) .g-count { display: block; }
}

/* Without the engine (no JS, no WebGL) or in calm mode: the full list flows, never clipped. */
html:not(.has-engine) #thumb,
html.calm #thumb { min-height: 0; }
html:not(.has-engine) #thumb .pin,
html.calm #thumb .pin {
  position: relative;
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  align-items: flex-start;
  padding-top: calc(var(--bar-h) + 2rem);
  padding-bottom: 5rem;
}

/* Dense block panels (takeoff, pro) */
.panel-dense { width: min(46vw, 46rem); min-width: min(100%, 24rem); }
.panel-dense .headline { font-size: clamp(2.2rem, 4.6vw, 4.2rem); margin-bottom: 0.8rem; }
.panel-dense .copy { font-size: clamp(0.95rem, 1.1vw, 1.05rem); margin-bottom: 1rem; max-width: 40rem; }
.blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem 1.4rem;
}
.block { border-top: 1px solid var(--graphite); padding-top: 0.6rem; }
.block-title {
  margin: 0 0 0.2rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--scarletHot);
}
.block-for { margin: 0 0 0.45rem; font-size: 0.86rem; line-height: 1.4; color: var(--paper); }
.block ul { margin: 0; padding: 0; list-style: none; }
.block li {
  position: relative;
  padding-left: 0.9rem;
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
  line-height: 1.38;
  color: var(--paperDim);
}
.block li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.4rem; height: 1px;
  background: var(--graphite);
}
.block-note {
  margin: 0.4rem 0 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--paperDim);
}

/* Closing panel: tighter, with the Core line */
.panel-yours .headline { font-size: clamp(2.4rem, 4.8vw, 4.6rem); margin-bottom: 0.8rem; }
.panel-yours .copy { margin-bottom: 1rem; }
.panel-yours .badges { margin-bottom: 1rem; }
.panel-yours .note { margin-bottom: 0.6rem; }
.core-line {
  margin: 0 0 0.6rem;
  max-width: 34rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--paper);
}
.inline-link {
  display: inline;
  padding: 0.7rem 0;
  color: var(--paper);
  text-decoration-color: var(--scarletHot);
  text-underline-offset: 0.2em;
  font-weight: 600;
}
.inline-link:hover { color: var(--scarletHot); }

/* Compare table */
.compare {
  position: relative;
  z-index: 1;
  background: var(--inkSoft);
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
}
.compare-inner { max-width: 62rem; margin: 0 auto; }
.compare h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.compare-lead { margin: 0 0 2rem; max-width: 38rem; font-size: 1.1rem; }
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.92rem;
  line-height: 1.4;
}
.compare-table col, .compare-table th:not([scope="row"]):not(.grp) { }
.compare-table thead th {
  position: sticky;
  top: var(--bar-h);
  z-index: 2;
  padding: 0.7rem 0.4rem;
  background: var(--inkSoft);
  border-bottom: 1px solid var(--graphite);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paperDim);
  text-align: center;
}
.compare-table thead th:first-child { text-align: left; padding-left: 0; }
.compare-table thead th:nth-child(2),
.compare-table thead th:nth-child(3),
.compare-table td { width: 4.6rem; text-align: center; }
.compare-table tbody th[scope="row"] {
  padding: 0.5rem 0.6rem 0.5rem 0;
  font-weight: 400;
  text-align: left;
  border-bottom: 1px solid rgba(138, 143, 156, 0.22);
  overflow-wrap: anywhere;
}
.compare-table td {
  padding: 0.5rem 0.2rem;
  border-bottom: 1px solid rgba(138, 143, 156, 0.22);
}
.compare-table .grp {
  padding: 1.6rem 0 0.5rem;
  text-align: left;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--scarletHot);
  border-bottom: 1px solid var(--graphite);
}
.plat {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--paperDim);
}
.mark { display: inline-block; vertical-align: middle; }
.mark.in { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--scarletHot); }
.mark.out { width: 0.7rem; height: 2px; background: var(--graphite); }
.price-row th, .price-row td {
  padding-top: 1rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  border-bottom: 0 !important;
}
.upgrade {
  margin: 1.4rem 0 0.4rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
}
.compare-foot {
  margin: 0 0 1.6rem;
  max-width: 44rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--paperDim);
}

@media (max-width: 420px) {
  .compare-table { font-size: 0.86rem; }
  .compare-table thead th:nth-child(2),
  .compare-table thead th:nth-child(3),
  .compare-table td { width: 3.7rem; }
  .price-row th, .price-row td { font-size: 0.8rem; }
  .price-row td { padding-left: 0; padding-right: 0; }
  .compare-table thead th { letter-spacing: 0.06em; padding-left: 0; padding-right: 0; }
}

/* Dense and closing panels on portrait phones: flow when they cannot fit in a pinned viewport. */
@media (max-aspect-ratio: 1/1) {
  .blocks { gap: 0.8rem; }
  .panel-dense .headline, .panel-yours .headline, .panel-gest .headline { font-size: clamp(2rem, 9vw, 3rem); }
  .block li { font-size: 0.78rem; margin-bottom: 0.1rem; }
  .block-for { font-size: 0.82rem; margin-bottom: 0.3rem; }
}

.past-end .rail { opacity: 0; pointer-events: none; }

@media (max-aspect-ratio: 1/1) { .panel-dense { width: 100%; } }
@media (max-width: 480px) {
  #pencil .kicker { flex-wrap: wrap; gap: 0.35rem 0.8rem; }
  #pencil .kicker .num { flex-basis: 100%; }
}

@media (max-aspect-ratio: 1/1) { .scroll-cue { display: none; } }

/* Dense panels sit over bright scene content: much stronger backing, feather confined to the outer 12%. */
.panel-dense::before {
  inset: -4rem -6rem;
  background: rgba(11, 13, 20, 0.9);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.25) 3%, rgba(0,0,0,0.6) 6.5%, rgba(0,0,0,0.9) 9.5%, #000 12%, #000 88%, rgba(0,0,0,0.9) 90.5%, rgba(0,0,0,0.6) 93.5%, rgba(0,0,0,0.25) 97%, transparent 100%), linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.25) 3%, rgba(0,0,0,0.6) 6.5%, rgba(0,0,0,0.9) 9.5%, #000 12%, #000 88%, rgba(0,0,0,0.9) 90.5%, rgba(0,0,0,0.6) 93.5%, rgba(0,0,0,0.25) 97%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.25) 3%, rgba(0,0,0,0.6) 6.5%, rgba(0,0,0,0.9) 9.5%, #000 12%, #000 88%, rgba(0,0,0,0.9) 90.5%, rgba(0,0,0,0.6) 93.5%, rgba(0,0,0,0.25) 97%, transparent 100%), linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.25) 3%, rgba(0,0,0,0.6) 6.5%, rgba(0,0,0,0.9) 9.5%, #000 12%, #000 88%, rgba(0,0,0,0.9) 90.5%, rgba(0,0,0,0.6) 93.5%, rgba(0,0,0,0.25) 97%, transparent 100%);
}
@media (max-aspect-ratio: 1/1) {
  .panel-dense::before {
    inset: -7rem -3rem -2rem;
    -webkit-mask-image: none;
    mask-image: none;
    background: linear-gradient(to bottom, rgba(11, 13, 20, 0) 0%, rgba(11, 13, 20, 0.9) 30%, rgba(11, 13, 20, 0.94) 100%);
  }
}
html.no-webgl .panel-dense::before,
html:not(.js) .panel-dense::before { display: none; }

/* Fallback: a clear scarlet hairline above each chapter's kicker */
html.no-webgl .panel,
html:not(.js) .panel {
  padding-top: 1.1rem;
  border-top: 3px solid var(--scarletHot);
  border-image: linear-gradient(to right, var(--scarletHot), rgba(232, 74, 69, 0.15)) 1;
}
html.no-webgl .chapter::after,
html:not(.js) .chapter::after { display: none; }

/* Pro blocks: tool lists collapse on portrait (JS closes them); always open on wide screens */
.tools summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
}
.tools summary::-webkit-details-marker { display: none; }
.tools summary::before { content: "+"; display: inline-block; width: 1.2rem; color: var(--scarletHot); }
.tools[open] > summary::before { content: "\2212"; }
@media (min-aspect-ratio: 1/1) { .tools > summary { display: none; } }

/* Phones: pinned, compact panels */
@media (max-aspect-ratio: 1/1) {
  .panel-dense .headline { font-size: clamp(1.8rem, 8vw, 2.5rem); margin-bottom: 0.5rem; }
  .panel-dense .copy { font-size: 0.88rem; line-height: 1.45; margin-bottom: 0.6rem; }
  .blocks { gap: 0.2rem; }
  .block { padding-top: 0.2rem; }
  .block-title { margin-bottom: 0.1rem; }
  .block-for { margin-bottom: 0; font-size: 0.8rem; }
  .block-note { margin: 0 0 0.2rem; font-size: 0.64rem; }
  .tools summary { min-height: 40px; }

  .panel-yours .headline { font-size: clamp(1.9rem, 8.4vw, 2.6rem); margin-bottom: 0.5rem; }
  .panel-yours .copy { font-size: 0.9rem; line-height: 1.45; margin-bottom: 0.6rem; }
  .panel-yours .badges { margin-bottom: 0.6rem; gap: 0.4rem 0.75rem; }
  .panel-yours .badge, .panel-yours .badge img { min-height: 44px; }
  .panel-yours .badge img { height: 44px; }
  .panel-yours .price { font-size: 1.1rem; margin-bottom: 0.1rem; }
  .panel-yours .note { font-size: 0.76rem; line-height: 1.4; margin-bottom: 0.4rem; }
  .panel-yours .core-line { font-size: 0.8rem; line-height: 1.4; margin-bottom: 0; }
  .panel-yours .req { display: none; }
  .inline-link { padding: 0.5rem 0; }
  #yours .pin { padding-top: max(30vh, var(--bar-h)); padding-top: max(30svh, var(--bar-h)); }
}
@media (max-aspect-ratio: 1/1) and (max-height: 700px) {
  #yours .pin { padding-top: max(18vh, var(--bar-h)); padding-top: max(18svh, var(--bar-h)); }
}

/* thumb on short portrait screens: give the paper iPhone room above the panel */
@media (max-aspect-ratio: 1/1) and (max-height: 739px) {
  #thumb .copy { display: none; }
  #thumb .headline { font-size: clamp(1.7rem, 7.5vw, 2.1rem); margin-bottom: 0.4rem; }
  #thumb .kicker { margin-bottom: 0.4rem; }
}

.price-row .founder {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--scarletHot);
}
