/* Pinfall site. One stylesheet for home, support and privacy.
   Palette: graphite ink and a cool bone white; orange is a signal (buttons, the active frame, a chart line), never decoration.
   Type: Bricolage Grotesque (headings), Atkinson Hyperlegible Next (text), JetBrains Mono (scores). All OFL, self-hosted. */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("fonts/atkinson-hyperlegible-next.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --ink: #141312;
  --ink-2: #1c1a18;
  --ink-3: #262320;
  --on-ink: #f4f3f0;
  --on-ink-muted: #aaa59d;
  --ink-line: rgba(244, 243, 240, 0.12);

  --surface: #f4f3f0;
  --surface-2: #eceae5;
  --text: #191817;
  --muted: #5d5a55;
  --line: rgba(20, 19, 18, 0.12);

  --accent: #c84a1b;        /* fills with white text: 4.6:1 */
  --accent-bright: #eb5f2f; /* orange on ink: 5.4:1 */
  --accent-soft: rgba(217, 83, 31, 0.12);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(88px, 12vw, 168px);
  --radius: 22px;

  /* Layered hairline shadow: depth without a glow. */
  --lift: 0 0 0 1px rgba(20, 19, 18, 0.05), 0 1px 1px 0.5px rgba(20, 19, 18, 0.03), 0 3px 3px 1.5px rgba(20, 19, 18, 0.03),
          0 6px 6px -3px rgba(20, 19, 18, 0.04), 0 12px 12px -6px rgba(20, 19, 18, 0.04), 0 24px 24px -12px rgba(20, 19, 18, 0.05),
          0 48px 64px -24px rgba(20, 19, 18, 0.12);
  --lift-dark: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 2px 2px rgba(0, 0, 0, 0.2), 0 8px 12px -4px rgba(0, 0, 0, 0.35),
               0 24px 32px -12px rgba(0, 0, 0, 0.45), 0 60px 90px -30px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #211f1c;
    --surface-2: #2a2724;
    --text: #f1efeb;
    --muted: #a9a49c;
    --line: rgba(244, 243, 240, 0.12);
    --accent-soft: rgba(235, 95, 47, 0.14);
    --lift: var(--lift-dark);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 400 18px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; margin: 0; text-wrap: balance; font-optical-sizing: auto; overflow-wrap: anywhere; hyphens: auto; }
h1 { font-size: clamp(40px, 4.7vw, 68px); max-width: 14ch; }
h2 { font-size: clamp(34px, 4.6vw, 60px); max-width: 17ch; margin-bottom: 0.5em; }
h3 { font-size: clamp(22px, 2vw, 26px); letter-spacing: -0.015em; line-height: 1.15; margin-bottom: 0.5em; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 500; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* Buttons */
.store, .button {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 700 17px/1 var(--body); text-decoration: none; white-space: nowrap;
  background: var(--accent); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 20px -8px rgba(200, 74, 27, 0.55);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.store:hover, .button:hover { background: #b64217; transform: translateY(-1px); }
.store.soon { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; opacity: 0.9; cursor: default; }
.store.soon:hover { transform: none; background: transparent; }
.store.small { min-height: 38px; padding: 0 16px; font-size: 15px; }
.text-link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.text-link:hover { text-decoration-color: currentColor; }

/* Top bar: dark glass over everything */
.bar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(20, 19, 18, 0.8);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--ink-line);
  color: var(--on-ink);
}
.bar-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.brand img { border-radius: 7px; }
.nav { display: flex; gap: 26px; margin-right: auto; font-size: 15px; }
.nav a, .langs a { text-decoration: none; color: var(--on-ink-muted); transition: color 0.15s; }
.nav a:hover, .langs a:hover, .nav a[aria-current] { color: var(--on-ink); }
.bar-end { display: flex; align-items: center; gap: 18px; }
.langs { display: flex; gap: 2px; font: 500 13px/1 var(--mono); }
.langs a { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; border-radius: 8px; }
.langs a[aria-current] { color: var(--on-ink); }
.bar-support { display: none; text-decoration: none; font-size: 15px; font-weight: 700; color: var(--on-ink); padding: 8px 4px; }
@media (max-width: 900px) { .nav { display: none; } .bar-end { margin-left: auto; } .bar-support { display: inline-block; } }
@media (max-width: 420px) { .bar .store.small { display: none; } }

/* Sections */
.section { padding: var(--section) 0; position: relative; }
.section.tight { padding-top: 24px; }
.section.alt { background: var(--surface-2); }
.dark { background: var(--ink); color: var(--on-ink); --muted: var(--on-ink-muted); --line: var(--ink-line); }
.section-title { margin-bottom: clamp(40px, 6vw, 72px); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.split.top { align-items: start; }
.copy p { max-width: 38ch; color: var(--muted); font-size: 19px; }
.copy h2 + p { margin-top: 0.4em; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

/* Reveal (site.js adds .js; without it everything is simply visible) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s cubic-bezier(.2, .7, .2, 1), transform 0.8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Glass: only on small cards that float over real content (the lane, a device, a screen). */
.glass {
  position: relative;
  background: rgba(30, 28, 26, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), var(--lift-dark);
  color: var(--on-ink);
}
.glass.light {
  background: rgba(255, 254, 252, 0.78);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--lift);
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  .glass.light { background: rgba(38, 35, 32, 0.6); border-color: rgba(255, 255, 255, 0.12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--lift-dark); }
}

/* Devices: a thin light edge around the real screenshot, no drawn hardware. */
.phone, .tablet { position: relative; }
.glass-edge {
  padding: 7px; border-radius: 52px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12) 38%, rgba(255, 255, 255, 0.06) 62%, rgba(255, 255, 255, 0.28));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), var(--lift);
}
.glass-edge img { border-radius: 45px; background: #000; }
.tablet .glass-edge { border-radius: 34px; padding: 9px; }
.tablet .glass-edge img { border-radius: 25px; }
.dark .glass-edge { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), var(--lift-dark); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0 clamp(72px, 9vw, 130px); isolation: isolate; }
.lane {
  position: absolute; z-index: -1; right: -4%; bottom: 0; width: min(1100px, 78vw); height: 88%;
  background: url("img/lane.svg") center bottom / contain no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%); mask-image: linear-gradient(to right, transparent, #000 22%);
  opacity: 0.62;
}
.hero::after { /* light from above the pin deck */
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(60% 45% at 62% 18%, rgba(244, 243, 240, 0.07), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.app-id { display: flex; align-items: center; gap: 14px; font: 700 20px/1.1 var(--display); letter-spacing: -0.02em; margin-bottom: 28px; }
.app-id img { border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px -8px rgba(0, 0, 0, 0.6); }
.app-id small { display: block; font: 400 14px/1.3 var(--body); color: var(--on-ink-muted); letter-spacing: 0; }
.hero .lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--on-ink-muted); max-width: 36ch; margin: 28px 0 36px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.meta { margin: 28px 0 0; font-size: 14px; color: var(--on-ink-muted); }

.hero-stage { position: relative; min-height: 640px; }
.hero-stage .tablet { width: 82%; margin-left: auto; }
.hero-stage .hero-phone { position: absolute; left: 0; bottom: -40px; width: 40%; }
.float { position: absolute; }
.f-score { top: 7%; left: -6%; width: min(360px, 62%); }
.f-pace { right: -3%; bottom: 13%; width: 220px; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { min-height: 0; margin-top: 16px; }
  .hero-stage .tablet { width: 88%; }
  .f-score { top: -4%; left: 0; width: min(330px, 80%); }
  .f-pace { right: 0; bottom: 8%; width: 190px; }
  .lane { right: -20%; width: 140vw; height: 62%; -webkit-mask-image: none; mask-image: none; opacity: 0.7; }
}

.card-score { padding: 14px 14px 12px; }
.sc-row { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 10px; overflow: hidden; }
.sc-cell { display: grid; grid-template-rows: auto 1fr auto; text-align: center; padding: 5px 0 6px; border-left: 1px solid rgba(255, 255, 255, 0.12); min-height: 66px; }
.sc-cell:first-child { border-left: 0; }
.sc-n { font: 500 10px/1 var(--mono); color: var(--on-ink-muted); }
.sc-m { font: 700 15px/1.6 var(--mono); }
.sc-t { font: 500 13px/1 var(--mono); color: var(--on-ink-muted); }
.sc-cell.now { background: rgba(235, 95, 47, 0.18); box-shadow: inset 0 0 0 1.5px var(--accent-bright); }
.sc-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding: 0 2px; font-size: 13px; color: var(--on-ink-muted); }
.sc-foot b { font-size: 26px; color: var(--on-ink); }
.card-pace { padding: 16px 18px; }
.cp-title { font-size: 13px; color: var(--on-ink-muted); margin-bottom: 8px; line-height: 1.3; }
.cp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; font-size: 13px; color: var(--on-ink-muted); }
.cp-row b { font-size: 28px; color: var(--on-ink); }
.cp-row b.up { color: var(--accent-bright); }

/* Frame: the interactive deck */
.deck-card { padding: clamp(24px, 3vw, 36px); max-width: 480px; margin-left: auto; }
@media (max-width: 960px) { .deck-card { margin: 0 auto; } }
.deck-try { font-weight: 700; margin-bottom: 20px; }
.deck { display: grid; gap: 12px; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.deck-row { display: flex; justify-content: center; gap: 14px; }
.pin {
  width: clamp(54px, 13vw, 66px); aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--accent-bright); background: transparent; color: var(--accent);
  font: 700 22px/1 var(--display); cursor: pointer; touch-action: none;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(.3, 1.6, .5, 1);
}
.pin:hover { background: var(--accent-soft); }
.pin[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.04); }
@media (prefers-color-scheme: dark) { .pin { color: var(--accent-bright); } }
@media (prefers-reduced-motion: reduce) { .pin { transition: none; } .pin[aria-pressed="true"] { transform: none; } }
.readout { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 26px 0 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.readout p { margin: 0; }
.readout b { font-size: 20px; }
.kind { font-weight: 700; text-align: right; }
.kind[data-type="split"] { color: var(--accent); }
@media (prefers-color-scheme: dark) { .kind[data-type="split"] { color: var(--accent-bright); } }
.deck-actions { display: flex; gap: 12px; align-items: stretch; }
.ghost { box-shadow: inset 0 0 0 1px var(--line); min-height: 52px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--text); font: 700 16px/1 var(--body); cursor: pointer; }
.enter { flex: 1; display: grid; place-items: center; min-height: 52px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 17px/1 var(--body); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.deck-note { font-size: 14px; color: var(--muted); margin: 18px 0 0; }

/* Story: steps on the left, one pinned phone on the right that follows them (site.js) */
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(40px, 8vw, 120px); }
.step { padding: 0 0 clamp(64px, 9vw, 110px); }
.step p { color: var(--muted); max-width: 40ch; font-size: 19px; }
.step .step-shot { width: min(300px, 76%); margin: 28px auto 0; }
.story-stage { display: none; }
@media (min-width: 961px) {
  .story-live .story-grid .story-stage { display: block; }
  .story-live .step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 0; opacity: 0.62; transition: opacity 0.4s ease; }
  .story-live .step.current { opacity: 1; }
  .story-live .step .step-shot { display: none; }
  .sticky-phone { position: sticky; top: calc(50vh - 330px); width: 320px; }
  .stage-screens { position: relative; aspect-ratio: 1320 / 2868; border-radius: 45px; overflow: hidden; background: #000; }
  .stage-shot { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
  .stage-shot.active { opacity: 1; }
  .stage-shot img { width: 100%; height: 100%; border-radius: 45px; }
}
@media (min-width: 961px) and (prefers-reduced-motion: reduce) { .stage-shot, .story-live .step { transition: none; } }
@media (max-width: 960px) { .story-grid { grid-template-columns: 1fr; } }

/* League */
.league-stage { position: relative; display: flex; justify-content: center; padding: 20px 0 40px; }
.league-phone { width: min(310px, 68%); }
.card-hc { position: absolute; left: 0; bottom: 8%; width: min(300px, 62%); padding: 20px 22px; }
.hc-title { font: 700 17px/1.2 var(--display); margin-bottom: 12px; }
.card-hc dl { margin: 0; }
.card-hc dl div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: 14px; }
.card-hc dt { color: var(--on-ink-muted); }
.card-hc dd { margin: 0; }
.hc-sum { font-size: 13px; color: var(--on-ink-muted); margin: 12px 0 4px; }
.hc-result { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-weight: 700; }
.hc-result b { font-size: 34px; color: var(--accent-bright); }
.hc-note { font-size: 12px; color: var(--on-ink-muted); margin: 6px 0 0; }
@media (max-width: 960px) { .card-hc { left: 50%; transform: translateX(-104%); } }
@media (max-width: 560px) { .card-hc { position: relative; left: auto; transform: none; width: 100%; margin-top: -120px; } .league-stage { flex-direction: column; align-items: center; } }

/* iPad */
.ipad-copy { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.ipad-copy p { color: var(--muted); font-size: 19px; max-width: 52ch; }
.tablet.wide { max-width: 780px; margin: 0 auto; }

/* Why */
.why h2 { margin-bottom: 0.8em; }
.why .big { font: 400 clamp(21px, 2.1vw, 27px)/1.5 var(--body); letter-spacing: -0.005em; max-width: 36ch; }
.sign { margin-top: 1.6em; font: 500 14px/1 var(--mono); color: var(--muted); }

/* Data */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(28px, 4vw, 56px); }
.fact { border-top: 1px solid var(--line); padding: 26px 0 40px; }
.fact h3 { font-size: 21px; }
.fact p { color: var(--muted); margin: 0; font-size: 17px; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* Price */
.price { overflow: hidden; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 920px; }
.plan { padding: clamp(26px, 3vw, 36px); border-radius: var(--radius); border: 1px solid var(--ink-line); }
.plan.pro { background: rgba(38, 35, 32, 0.72); }
.plan-name { font: 700 20px/1 var(--display); margin-bottom: 14px; }
.plan-price { font: 700 44px/1 var(--display); letter-spacing: -0.03em; margin-bottom: 26px; }
.plan-price small { font: 400 16px/1 var(--body); color: var(--on-ink-muted); letter-spacing: 0; }
.plan.pro .plan-price .num { color: var(--accent-bright); font-family: var(--display); font-weight: 700; }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { padding: 11px 0 11px 28px; border-top: 1px solid var(--ink-line); position: relative; font-size: 17px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 12px; height: 7px; border-left: 2px solid var(--accent-bright); border-bottom: 2px solid var(--accent-bright); transform: rotate(-45deg); }
.price-note { color: var(--on-ink-muted); max-width: 62ch; margin: 28px 0 32px; font-size: 16px; }
.price .store.soon { color: var(--on-ink); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* Support and FAQ */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 28px/1 var(--body); color: var(--accent-bright); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--muted); max-width: 62ch; }

/* Support and privacy pages */
.sub-hero { padding: clamp(56px, 8vw, 96px) 0 32px; }
.sub-hero h1 { font-size: clamp(32px, 5.6vw, 68px); max-width: 16ch; }
.sub-hero .lead { font-size: 20px; color: var(--muted); margin-top: 18px; max-width: 44ch; }
.sub-icon { border-radius: 16px; margin-bottom: 28px; box-shadow: var(--lift); }
.contact { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; padding: 32px 0 56px; }
.contact h2, .faq-title, .summary h2, .legal h2 { font-size: 24px; max-width: none; margin-bottom: 10px; }
.contact p { color: var(--muted); }
.faq-title { margin-bottom: 18px; }
@media (max-width: 680px) { .contact { grid-template-columns: 1fr; gap: 16px; } }
.summary { background: var(--accent-soft); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 40px; }
.summary p { margin: 0; }
.legal section { border-top: 1px solid var(--line); padding: 26px 0 8px; }
.legal p { color: var(--muted); }

/* Footer */
.foot { background: var(--ink); color: var(--on-ink-muted); font-size: 15px; padding: 64px 0 48px; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 1020px) and (min-width: 761px) { .foot-in { grid-template-columns: 1fr 1fr; } }
.foot .brand { color: var(--on-ink); margin-bottom: 16px; }
.foot-brand p { max-width: 38ch; }
.foot-links { display: grid; gap: 10px; align-content: start; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--on-ink); }
.foot-legal p { margin: 0 0 10px; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; gap: 28px; } }

/* Small phones: one device in the hero, the two glass cards around it. */
@media (max-width: 600px) {
  .hero-stage { display: flex; justify-content: center; padding: 92px 0 24px; }
  .hero-stage .tablet { display: none; }
  .hero-stage .hero-phone { position: relative; left: auto; bottom: auto; width: 66%; }
  .f-score { display: none; }
  .f-pace { top: 0; right: 0; bottom: auto; width: 176px; }
  .card-pace { padding: 12px 14px; }
  .cp-title { font-size: 12px; }
  .cp-row { margin-bottom: 4px; }
  .cp-row b { font-size: 24px; }
  .cp-row span { font-size: 12px; }
}

/* Without JS the deck is a picture of the app: no "try it" and no clear button. */
.deck-try, [data-clear] { display: none; }
.js .deck-try { display: block; }
.js [data-clear] { display: inline-block; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pro-tag { display: inline-block; vertical-align: 0.2em; margin-left: 10px; padding: 3px 8px; border-radius: 6px; font: 700 12px/1 var(--mono); letter-spacing: 0.02em; color: var(--accent); box-shadow: inset 0 0 0 1px currentColor; }
@media (prefers-color-scheme: dark) { .pro-tag { color: var(--accent-bright); } }
.pro-note { font-size: 15px !important; color: var(--on-ink-muted) !important; }

/* Data: title on the left, a plain list of facts on the right (no card grid). */
@media (min-width: 900px) {
  .data .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: clamp(40px, 6vw, 96px); }
  .data .section-title { position: sticky; top: 110px; align-self: start; }
}
.data .facts { grid-template-columns: 1fr; }
.data .fact { display: grid; grid-template-columns: minmax(150px, 0.8fr) 2fr; gap: 8px 32px; padding: 24px 0; }
.data .fact:last-child { border-bottom: 1px solid var(--line); }
.data .fact h3 { margin: 0; font-size: 20px; }
@media (max-width: 560px) { .data .fact { grid-template-columns: 1fr; } }

/* Price: the two plans use the full width. */
.plans { max-width: none; }

/* Official App Store badge (live state). Apple: at least 40px high on screen, clear space around it, not recolored. */
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.store-badge img { height: 53px; width: auto; }
.store-badge:focus-visible { outline-offset: 4px; }
.price-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 20px; margin-top: 36px; scroll-margin-top: 120px; }

/* Free tools: calculators and explainers (tool_copy.py) */
.eyebrow { font: 700 14px/1 var(--body); color: var(--muted); margin: 0 0 18px; }
.eyebrow a { color: inherit; }
.tool-widget { margin: 8px 0 56px; }
.tool-widget .deck-card { margin: 0 auto; }
.calc { padding: clamp(22px, 3vw, 34px); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.field.inline { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.field input, .field select { font: 500 18px/1.2 var(--mono); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%; }
.field.inline select { width: auto; font-family: var(--body); }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.calc-out { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.calc-result { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0; font-weight: 700; }
.calc-result b { font-size: clamp(44px, 7vw, 64px); color: var(--accent); line-height: 1; }
.calc-how { color: var(--muted); margin: 10px 0 4px; }
.calc-series { margin: 0; }
.sheet { display: grid; grid-template-columns: repeat(10, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.sheet .sc-cell { border-left: 1px solid var(--line); min-height: 70px; }
.sheet .sc-cell:first-child { border-left: 0; }
.sheet .sc-n, .sheet .sc-t { color: var(--muted); }
.sheet .sc-m { font-size: 14px; white-space: nowrap; }
.sheet .sc-cell.now { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.totals { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; }
.totals p { margin: 0; display: grid; gap: 2px; font-size: 14px; color: var(--muted); }
.totals p:last-child { text-align: right; }
.totals b { font-size: 34px; color: var(--text); line-height: 1.1; }
.calc-status { margin: 12px 0 16px; font-weight: 700; }
.keys { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.keys button { min-height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 700 20px/1 var(--mono); cursor: pointer; }
.keys button:hover:not(:disabled) { border-color: var(--accent); }
.keys button:disabled { opacity: 0.3; cursor: default; }
.keys button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.key-actions { display: flex; gap: 10px; margin-top: 12px; }
@media (max-width: 560px) {
  .sheet { grid-template-columns: repeat(5, 1fr); }
  .sheet .sc-cell:nth-child(6) { border-left: 0; }
  .sheet .sc-cell:nth-child(n+6) { border-top: 1px solid var(--line); }
}
.tool-text h2 { font-size: clamp(26px, 3.4vw, 36px); max-width: none; margin: 40px 0 12px; }
.tool-text p { color: var(--muted); max-width: 66ch; }
.terms { margin: 0 0 8px; }
.terms dt { font-weight: 700; margin-top: 18px; }
.terms dd { margin: 4px 0 0; color: var(--muted); max-width: 66ch; }
.table-wrap { overflow-x: auto; }
.leaves { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.leaves th, .leaves td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.leaves th { font-size: 14px; color: var(--muted); }
.tool-cta { margin: 56px 0; padding: clamp(24px, 3.4vw, 40px); background: var(--ink); color: var(--on-ink); border-color: var(--ink-line); }
.tool-cta h2 { font-size: clamp(26px, 3.4vw, 36px); max-width: none; }
.tool-cta p { color: var(--on-ink-muted); max-width: 60ch; }
.tool-cta .store.soon { color: var(--on-ink); }
.tool-cta .actions { margin-top: 22px; }
.more-tools { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: baseline; margin-top: 48px; }
.more-tools p { width: 100%; margin: 0 0 4px; font-weight: 700; }
.deck-link, .hc-link { margin: 14px 0 0; }
.hc-link + .hc-link { margin-top: 6px; }
.foot-head { margin: 0 0 4px; color: var(--on-ink); font-weight: 700; }

/* New in 1.1: two real screens beside a plain list of what changed. */
.new-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.new-head p:last-child { color: var(--on-ink-muted); font-size: 19px; max-width: 46ch; }
.new-tag { display: inline-block; margin: 0 0 18px; padding: 6px 12px; border-radius: 999px; font: 700 13px/1 var(--mono); letter-spacing: 0.04em; color: var(--accent-bright); box-shadow: inset 0 0 0 1px currentColor; }
.new-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.new-shots { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2.4vw, 28px); align-items: start; }
.new-shots .new-phone:last-child { margin-top: clamp(28px, 6vw, 72px); }
.new .facts.new-list { grid-template-columns: 1fr; }
.new .fact { border-color: var(--ink-line); padding: 22px 0 24px; }
.new .fact:last-child { border-bottom: 1px solid var(--ink-line); }
@media (max-width: 960px) { .new-grid { grid-template-columns: 1fr; } .new-shots { max-width: 560px; margin: 0 auto; } }

/* Tool pages: a numbered how-to, and links to the related tools. */
.steps { margin: 0 0 20px; padding-left: 1.4em; color: var(--muted); max-width: 66ch; }
.steps li { padding: 6px 0 6px 6px; }
.steps li::marker { font: 700 16px var(--mono); color: var(--accent); }
.related { margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* Printable score sheet: six bowlers, ten frames, total and handicap. */
.score-sheet { color: var(--text); }
.sheet-fields { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px 20px; margin-bottom: 18px; }
.sheet-field { margin: 0; padding: 0 0 22px; border-bottom: 1px solid var(--text); font-size: 13px; color: var(--muted); }
.print-sheet { border-collapse: collapse; width: 100%; min-width: 680px; table-layout: fixed; background: var(--surface); }
.print-sheet th { font: 700 12px/1.15 var(--mono); padding: 8px 2px; border: 1px solid var(--text); text-align: center; overflow-wrap: anywhere; }
.print-sheet th.sh-name { width: 13%; text-align: left; padding-left: 8px; font-family: var(--body); }
.print-sheet td { border: 1px solid var(--text); padding: 0; height: 58px; vertical-align: top; }
.sh-balls { display: flex; justify-content: flex-end; }
.sh-balls span { width: 34%; height: 22px; border-left: 1px solid var(--text); border-bottom: 1px solid var(--text); }
.sh-balls span:first-child:nth-last-child(3), .sh-balls span:first-child:nth-last-child(3) ~ span { width: 33.34%; }
.print-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 22px 0 0; color: var(--muted); font-size: 15px; }
[data-print], .print-row span { display: none; }
.js [data-print] { display: inline-flex; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.js .print-row span { display: inline; }
@media (max-width: 680px) { .sheet-fields { grid-template-columns: 1fr 1fr; } }

@media print {
  @page { size: landscape; margin: 10mm; }
  .page-sheet { background: #fff; color: #000; }
  .page-sheet .bar, .page-sheet .foot, .page-sheet .skip, .page-sheet .tool-text, .page-sheet .tool-cta, .page-sheet .faq-title,
  .page-sheet .faq, .page-sheet .more-tools, .page-sheet .print-row, .page-sheet .sub-hero .lead, .page-sheet .eyebrow { display: none !important; }
  .page-sheet .sub-hero { padding: 0 0 4mm; }
  .page-sheet .sub-hero h1 { font-size: 18pt; max-width: none; }
  .page-sheet .section.tight { padding: 0; }
  .page-sheet .wrap, .page-sheet .wrap.narrow { max-width: none; padding: 0; }
  .page-sheet .tool-widget { margin: 0; }
  .page-sheet .table-wrap { overflow: visible; }
  .page-sheet .print-sheet { min-width: 0; background: #fff; }
  .page-sheet .print-sheet td { height: 22mm; }
  .page-sheet .score-sheet, .page-sheet .sheet-field, .page-sheet .print-sheet th, .page-sheet .print-sheet td, .page-sheet .sh-balls span { color: #000; border-color: #000; }
  .page-sheet .sheet-field { color: #444; }
}
.leaves td.num { white-space: nowrap; }
