/* ════════════════════════════════════════════════════════════════
   Home Gym Buddy — site styles
   Type system mirrors the app: SF Pro Rounded display + JetBrains
   Mono tags + system body. Yellow #e5ff38 reserved for hits only.
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --yellow: #e5ff38;
  --yellow-dim: rgba(229, 255, 56, 0.14);
  --yellow-ink: #1c2400;
  --bg: #0a0a0a;
  --bg-2: #131313;
  --bg-3: #1a1a1a;
  --ink: #f3f3f1;
  --ink-2: #c8c8c4;
  --ink-3: #7e7e78;
  --rule: #1f1f1f;
  --rule-2: #2a2a2a;

  --grad-mint: linear-gradient(180deg, #2dd4a4 0%, #1aab8a 60%, #0e8b73 100%);

  --display: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Nunito", system-ui, -apple-system, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --max: 1180px;
  --pad: 32px;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
}

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
::selection { background: var(--yellow); color: #000; }

.wrap {
  max-width: var(--max); margin: 0 auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}
@supports not (padding: env(safe-area-inset-left)) {
  .wrap { padding-left: var(--pad); padding-right: var(--pad); }
}

/* ─── Mono label / eyebrow / tag ───────────────────────────── */
.mono, .eyebrow, .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .accent, .tag.accent { color: var(--yellow); }

.tag-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--yellow-dim);
  color: var(--yellow);
  font-weight: 500;
}
.tag-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px var(--yellow);
}

/* ─── Display type ─────────────────────────────────────────── */
.display, h1, h2, h3, .hero h1, .showcase-text h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--ink);
}

/* ════════════ NAV ════════════ */
nav.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
nav.site .row {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  max-width: var(--max); margin: 0 auto;
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }
.nav-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  object-fit: cover;
}
.nav-wordmark {
  font-family: var(--display); font-weight: 700;
  font-size: 18px; letter-spacing: -0.01em;
  color: var(--ink);
}
.nav-links {
  display: flex; gap: 32px; list-style: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
}
.nav-links a {
  color: var(--ink-3);
  transition: color .15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--yellow); text-decoration: none; }
.nav-links a.is-active { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px;
  background: none; border: 1px solid var(--rule); border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .22s, opacity .22s;
  margin: 0 auto;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Language switcher */
.lang-switcher {
  display: inline-flex; align-items: center; gap: 2px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  margin-left: 18px;
}
.lang-switcher a {
  color: var(--ink-3);
  padding: 6px 8px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  min-width: 32px; text-align: center;
}
.lang-switcher a:hover { color: var(--yellow); text-decoration: none; }
.lang-switcher a.is-current {
  color: var(--ink);
  background: rgba(255,255,255,0.06);
}
.lang-switcher .sep {
  color: var(--rule-2);
  user-select: none;
}

/* ════════════ HERO ════════════ */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 78% 30%, rgba(45,212,164,0.18), transparent 70%),
    radial-gradient(ellipse 50% 50% at 12% 8%, rgba(229,255,56,0.08), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 60px;
  align-items: center;
}
.hero-left .eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.hero-left .eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--ink-3);
}
.hero h1 {
  font-size: clamp(56px, 8vw, 108px);
  margin-bottom: 28px;
  text-wrap: balance;
}
.hero h1 .y { color: var(--yellow); }
.hero h1 .stack { display: block; }
.hero-lede {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 50ch;
  margin-bottom: 14px;
}
.hero-lede:last-of-type { margin-bottom: 36px; }
.hero-kickers {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-kickers span { display: block; max-width: 100%; }
.hero-kickers span::before { content: "·  "; color: var(--yellow); }

.hero-cta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.badge-apple { display: inline-block; transition: transform .15s; }
.badge-apple:hover { transform: translateY(-1px); text-decoration: none; }
.badge-apple img {
  display: block;
  height: 54px;
  width: auto;
}
.badge-apple-fallback {
  display: inline-flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 22px;
  background: #fff; color: #000;
  border-radius: 10px;
  font-family: var(--sans);
}
.badge-apple-fallback .glyph { font-size: 24px; line-height: 1; }
.badge-apple-fallback .stack { display: flex; flex-direction: column; line-height: 1; }
.badge-apple-fallback .small { font-size: 10px; letter-spacing: 0.04em; opacity: 0.65; margin-bottom: 3px; }
.badge-apple-fallback .big { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.ghost-cta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule-2);
}
.ghost-cta:hover { color: var(--yellow); border-color: var(--yellow); text-decoration: none; }

/* Hero right — App Store marketing screenshot, displayed flat */
.hero-poster {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}
.hero-poster .poster-label,
.hero-poster .poster-meta { display: none; }
.hero-poster img {
  width: 100%;
  height: auto;
  display: block;
}

/* ════════════ TENETS MARQUEE ════════════ */
.tenets {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  overflow: hidden;
  padding: 22px 0;
}
.tenets .track {
  display: flex; gap: 56px; width: max-content;
  white-space: nowrap;
  animation: hgb-scroll 42s linear infinite;
  font-family: var(--display); font-weight: 700; font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tenets .track span { display: inline-flex; align-items: center; gap: 24px; }
.tenets .track span::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow);
}
@keyframes hgb-scroll { to { transform: translateX(-50%); } }

/* ════════════ SECTION SCAFFOLD ════════════ */
section.block { padding: 110px 0; border-bottom: 1px solid var(--rule); }
.block-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  margin-bottom: 72px;
}
.block-head .meta { display: flex; flex-direction: column; gap: 8px; }
.block-head .meta .num { color: var(--yellow); }
.block-head h2 {
  font-size: clamp(36px, 4.5vw, 60px);
  margin: 0;
  text-wrap: balance;
}
.block-head h2 .y { color: var(--yellow); }
.block-head .kicker {
  font-size: 18px; color: var(--ink-2); margin-top: 18px; max-width: 56ch;
}

/* ════════════ SHOWCASE — varied compositions ════════════ */
.showcase-row {
  display: grid;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--rule);
}
.showcase-row:first-of-type { border-top: none; padding-top: 0; }

/* Layout A: phone left, text right */
.showcase-row.layout-a { grid-template-columns: 0.9fr 1.1fr; }
/* Layout B: text left, phone right */
.showcase-row.layout-b { grid-template-columns: 1.1fr 0.9fr; }
/* Layout C: full-bleed mint poster, phone centered, text underneath */
.showcase-row.layout-c { grid-template-columns: 1fr; gap: 32px; }

.showcase-image {
  position: relative;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
}
.showcase-image .corner-tag,
.showcase-image .corner-num { display: none; }
.showcase-image img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-text { max-width: 52ch; }
.showcase-text .label {
  display: inline-block;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 18px;
}
.showcase-text h2 {
  font-size: clamp(32px, 3.5vw, 48px);
  margin-bottom: 18px;
}
.showcase-text p {
  color: var(--ink-2);
  font-size: 17px;
  margin-bottom: 14px;
}
.showcase-text ul {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 8px;
  margin-top: 18px;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}
.showcase-text ul li {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2);
  display: grid; grid-template-columns: 1fr auto;
  padding: 6px 0;
  border-bottom: 1px dashed var(--rule);
}
.showcase-text ul li::before { content: none; }
.showcase-text ul li::after {
  content: attr(data-val);
  color: var(--yellow);
}
.btn {
  display: inline-block;
  background: var(--yellow); color: #000;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 10px;
  margin-top: 20px;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(229,255,56,0.25); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule-2);
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); box-shadow: none; }

/* ════════════ INTERLUDE — big quote between blocks ════════════ */
.interlude {
  padding: 140px 0;
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(229,255,56,0.05), transparent 70%);
}
.interlude .wrap { text-align: center; }
.interlude .eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 36px;
}
.interlude .eyebrow::before, .interlude .eyebrow::after {
  content: ""; width: 28px; height: 1px; background: var(--ink-3);
}
.interlude .quote {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 18ch; margin: 0 auto;
  text-wrap: balance;
}
.interlude .quote .y { color: var(--yellow); }
.interlude .quote em { font-style: normal; color: var(--ink-3); }

/* ════════════ FAQ ════════════ */
.faq { border-top: 1px solid var(--rule); }
details.faq-row {
  border-bottom: 1px solid var(--rule);
  padding: 26px 0;
}
details.faq-row summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 64px 1fr 32px; gap: 24px;
  align-items: baseline;
}
details.faq-row summary::-webkit-details-marker { display: none; }
details.faq-row .q-num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
details.faq-row .q-text {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(20px, 1.9vw, 26px); line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
}
details.faq-row .plus {
  font-family: var(--display); font-weight: 700;
  font-size: 28px; line-height: 1; color: var(--ink-3);
  text-align: right; transition: transform .2s, color .2s;
}
details.faq-row[open] .plus { transform: rotate(45deg); color: var(--yellow); }
details.faq-row .a-body {
  padding: 16px 0 6px 88px;
  max-width: 70ch;
  color: var(--ink-2);
}
details.faq-row .a-body p { margin-bottom: 10px; }
details.faq-row .a-body p:last-child { margin-bottom: 0; }

/* ════════════ FOOTER ════════════ */
footer.site {
  padding: 90px 0 50px;
  border-top: 1px solid var(--rule);
  background: #000;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 64px;
  align-items: start;
}
.footer-grid h5 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.footer-grid ul a { color: var(--ink-2); font-family: var(--sans); font-size: 15px; letter-spacing: 0; text-transform: none; }
.footer-grid ul a:hover { color: var(--yellow); text-decoration: none; }
.footer-brand {
  display: flex; flex-direction: column; gap: 18px;
}
.footer-brand .word {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 14ch;
}
.footer-brand .word .y { color: var(--yellow); }
.footer-brand .small {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); line-height: 1.8;
}

.footer-legal {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 32px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
  gap: 20px; flex-wrap: wrap;
}
.footer-legal a { color: var(--ink-3); }
.footer-legal a:hover { color: var(--yellow); text-decoration: none; }

/* ════════════════════════════════════════════════════════════════
   CONTENT PAGES (Story, Support, Template Guide)
   ════════════════════════════════════════════════════════════════ */

.page-header {
  padding: 100px 0 60px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.page-header::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 50% at 50% 0%, rgba(229,255,56,0.06), transparent 60%);
  pointer-events: none;
}
.page-header .wrap { position: relative; }
.page-header .eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.page-header .eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--ink-3);
}
.page-header h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(56px, 7vw, 96px); line-height: 1; letter-spacing: -0.02em;
  margin-bottom: 24px; text-wrap: balance;
  max-width: 16ch;
}
.page-header h1 .y { color: var(--yellow); }
.page-header .deck {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.6;
}

.page-jump-links {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.page-jump-links a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 14px;
  border: 1px solid var(--rule-2); border-radius: 999px;
  transition: color .15s, border-color .15s, background .15s;
}
.page-jump-links a::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3);
}
.page-jump-links a:hover {
  color: var(--yellow); border-color: var(--yellow); text-decoration: none;
}
.page-jump-links a:hover::before { background: var(--yellow); }

.content {
  padding: 64px 0 80px;
}
.content-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  align-items: start;
}
.content-grid aside {
  position: sticky; top: 90px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.content-grid aside .num { color: var(--yellow); margin-bottom: 12px; display: block; }
.content-grid aside h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 32px; letter-spacing: -0.01em; line-height: 1;
  color: var(--ink);
  text-transform: none;
  margin-bottom: 20px;
}
.content-grid aside p {
  font-family: var(--sans); font-size: 14px; letter-spacing: 0; text-transform: none;
  color: var(--ink-3); line-height: 1.55;
}

.content-body { max-width: 68ch; }
.content-body h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -0.01em; line-height: 1.15;
  margin: 44px 0 12px;
  color: var(--ink);
}
.content-body h2:first-child { margin-top: 0; }
.content-body h2.section-rule {
  margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--rule);
  color: var(--yellow);
}
.content-body p, .content-body li {
  color: var(--ink-2); font-size: 17px; line-height: 1.7;
}
.content-body p { margin-bottom: 14px; }
.content-body ul {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: grid; gap: 6px;
}
.content-body ul li {
  position: relative; padding-left: 22px;
}
.content-body ul li::before {
  content: ""; position: absolute;
  left: 0; top: 12px;
  width: 10px; height: 1px; background: var(--yellow);
}
.content-body .updated {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 32px; display: block;
}

.callout {
  border: 1px solid var(--rule-2);
  border-radius: var(--r-md);
  padding: 24px 28px;
  background: var(--bg-2);
  margin: 24px 0 36px;
}
.callout .h {
  font-family: var(--display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.01em; color: var(--yellow); margin-bottom: 8px;
}
.callout p { margin-bottom: 8px; color: var(--ink); }
.callout p:last-child { margin-bottom: 0; }

/* Reach-out section (full-width head + cards below) */
.reach-out {
  margin-bottom: 64px;
}
.reach-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.reach-head .num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--yellow);
}
.reach-head h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 32px; letter-spacing: -0.01em; line-height: 1;
  color: var(--ink);
  margin-top: 6px;
}
.reach-head p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
  max-width: 64ch;
  margin-top: 10px;
}

/* Inline 'Free' (or similar) sub-label next to the card's section label */
.support-card .label-sub {
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: 0.16em;
  margin-left: 2px;
}

/* Tip jar — pricing tiers */
.tip-jar {
  border: 1px solid var(--rule-2);
  border-radius: var(--r-md);
  background: var(--bg-2);
  padding: 28px 28px 24px;
  margin: 0 0 32px;
}
.tip-jar-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 20px;
  max-width: 640px;
}
.tip-jar-head .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
}
.tip-jar-head h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
  margin: 2px 0 4px;
}
.tip-jar-head p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}
.tip-tiers {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
}
.tip-tiers-solo {
  grid-template-columns: minmax(0, 480px);
  justify-content: start;
}
.tip-tiers-duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tip-tier {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 6px;
  align-items: baseline;
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  background: var(--bg);
  padding: 18px 18px 20px;
}
.tier-name {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
  text-align: left;
  text-transform: none;
}
.tier-price {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--yellow);
  text-align: right;
  margin: 0;
}
.tier-note {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}
.tip-foot {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
  line-height: 1.55;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}

/* Funding note — independently funded callout on support page */
.funding-note {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: start;
  border: 1px solid var(--rule-2);
  border-left: 2px solid var(--yellow);
  border-radius: var(--r-md);
  background: var(--bg-2);
  padding: 26px 28px;
  margin: 0 0 48px;
}
.funding-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  padding-top: 6px;
}
.funding-body h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 8px;
}
.funding-body p {
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0 0 8px;
}
.funding-body p:last-child { margin-bottom: 0; }
.funding-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

/* Support cards */
.support-options {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}
.support-card {
  border: 1px solid var(--rule-2);
  border-radius: var(--r-md);
  background: var(--bg-2);
  padding: 28px 28px 26px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 200px;
  transition: border-color .15s, background .15s, transform .15s;
}
.support-card:hover { border-color: var(--yellow); background: var(--bg-3); transform: translateY(-2px); text-decoration: none; }
.support-card.is-soon { cursor: default; opacity: 0.85; }
.support-card.is-soon:hover { border-color: var(--rule); background: var(--bg-2); transform: none; }
.support-card .label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--yellow);
}
.support-card h3 {
  font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.01em;
  line-height: 1.1; color: var(--ink); margin: 4px 0 4px;
}
.support-card p { color: var(--ink-2); font-size: 15px; line-height: 1.55; margin-bottom: 14px; }
.support-card .open {
  margin-top: auto;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
}

/* Roadmap */
.roadmap { display: grid; gap: 0; margin-top: 32px; }
.roadmap-item {
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  align-items: start;
}
.roadmap-item:last-child { border-bottom: 1px solid var(--rule); }
.roadmap-status {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 8px;
}
.roadmap-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3);
}
.roadmap-item.is-now .roadmap-status { color: var(--yellow); }
.roadmap-item.is-now .roadmap-status::before { background: var(--yellow); box-shadow: 0 0 12px var(--yellow); }
.roadmap-item h3 {
  font-family: var(--display); font-weight: 700; font-size: clamp(24px, 2.3vw, 32px);
  letter-spacing: -0.01em; line-height: 1.1; margin-bottom: 12px;
}
.roadmap-item p { color: var(--ink-2); font-size: 16px; margin-bottom: 8px; }

/* Template guide */
.tg-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 36px;
}
.tg-meta .cell {
  border: 1px solid var(--rule-2); border-radius: var(--r-md);
  padding: 18px 20px;
  background: var(--bg-2);
}
.tg-meta .cell .l {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px;
}
.tg-meta .cell .v {
  font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em;
  color: var(--ink);
}

.tg-table {
  border: 1px solid var(--rule-2);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 12px 0 36px;
}
.tg-table .row {
  display: grid; grid-template-columns: 120px 1fr 1.2fr;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}
.tg-table .row:first-child { border-top: none; background: var(--bg-2); }
.tg-table .row > div { padding: 14px 18px; }
.tg-table .col-name {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--yellow);
  border-right: 1px solid var(--rule);
}
.tg-table .row:first-child .col-name { color: var(--ink-3); }
.tg-table .col-eg {
  font-family: var(--mono); font-size: 13px; color: var(--ink-2);
  border-right: 1px solid var(--rule);
}
.tg-table .col-note { color: var(--ink-2); }

/* ════════════ RESPONSIVE ════════════ */
@media (max-width: 960px) {
  :root { --pad: 22px; }
  .hero { padding: 50px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-poster { max-width: 360px; }
  .block-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 44px; }
  .showcase-row.layout-a, .showcase-row.layout-b {
    grid-template-columns: 1fr; gap: 28px; padding: 40px 0;
  }
  .showcase-image { max-width: 320px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .content-grid aside { position: static; }
  .reach-head { grid-template-columns: 1fr; gap: 8px; }
  .reach-head h2 { margin-top: 4px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .support-options { grid-template-columns: 1fr; }
  .funding-note { grid-template-columns: 1fr; gap: 12px; }
  .funding-tag { padding-top: 0; }
  .tip-tiers { grid-template-columns: 1fr; }
  .tg-meta { grid-template-columns: repeat(2, 1fr); }
  .tg-table .row { grid-template-columns: 100px 1fr; }
  .tg-table .col-eg { border-right: none; }
  .tg-table .col-note { display: none; }
  .roadmap-item { grid-template-columns: 1fr; gap: 12px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--rule);
    padding: 8px 0; z-index: 200;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  }
  .nav-links.open li {
    padding: 0; border-bottom: 1px solid var(--rule);
  }
  .nav-links.open li:last-child { border-bottom: none; }
  .nav-links.open a { display: block; padding: 16px 22px; font-size: 12px; min-height: 44px; }
  .nav-toggle { display: flex; }
  section.block { padding: 70px 0; }
  .block-head h2 { font-size: 36px; }
  details.faq-row summary { grid-template-columns: 44px 1fr 24px; gap: 14px; }
  details.faq-row .a-body { padding-left: 58px; }
  .interlude { padding: 90px 0; }
  .tenets .track { font-size: 20px; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 560px) {
  :root { --pad: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .tg-meta { grid-template-columns: 1fr; }
  details.faq-row summary { grid-template-columns: 36px 1fr 20px; gap: 12px; }
  details.faq-row .q-text { font-size: 17px; }
  details.faq-row .a-body { padding-left: 0; padding-top: 12px; }
  details.faq-row .a-body p { font-size: 15px; }

  /* Hero refinements */
  .hero { padding: 36px 0 48px; }
  .hero h1 { font-size: 48px; }
  .hero-lede { font-size: 16px; }
  .hero-kickers { font-size: 11px; line-height: 1.9; }
  .hero-cta { gap: 14px; }
  .badge-apple-fallback { height: 50px; padding: 0 18px; }
  .badge-apple-fallback .big { font-size: 16px; }
  .badge-apple img { height: 50px; }

  /* Section heads */
  section.block { padding: 56px 0; }
  .block-head h2 { font-size: 30px; }
  .block-head .kicker { font-size: 16px; }

  /* Showcase */
  .showcase-row { padding: 32px 0; gap: 22px; }
  .showcase-image { max-width: 280px; }
  .showcase-text h2 { font-size: 26px; }
  .showcase-text p { font-size: 16px; }
  .showcase-text ul li {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 0;
  }
  .showcase-text ul li::after {
    margin-top: 2px;
  }

  /* Interlude */
  .interlude { padding: 64px 0; }
  .interlude .quote { font-size: 36px; }

  /* Page header */
  .page-header { padding: 64px 0 40px; }
  .page-header h1 { font-size: 44px; }
  .page-header .deck { font-size: 16px; }

  /* Footer */
  footer.site { padding: 56px 0 36px; }
  .footer-brand .word { font-size: 36px; }
  .footer-grid { margin-bottom: 40px; }

  /* Tenets */
  .tenets { padding: 16px 0; }
  .tenets .track { font-size: 18px; gap: 36px; }

  /* Content pages */
  .content { padding: 40px 0 56px; }
  .content-body h2 { font-size: 22px; margin: 32px 0 10px; }
  .content-body p, .content-body li { font-size: 16px; }

  /* Support cards stack */
  .support-options { gap: 12px; margin-bottom: 32px; }
  .support-card { padding: 22px; min-height: 0; }
  .funding-note { padding: 20px 22px; margin-bottom: 32px; }
  .funding-body h3 { font-size: 20px; }
  .tip-jar { padding: 22px 22px 20px; }
  .tip-jar-head h3 { font-size: 22px; }
  .tier-name { font-size: 20px; }
  .tier-price { font-size: 24px; }

  /* Page jump links wrap nicer */
  .page-jump-links { gap: 8px; padding: 18px 0; }
  .page-jump-links a { padding: 7px 12px; font-size: 10px; }

  /* Template guide */
  .step-num { width: 40px; height: 40px; font-size: 16px; border-radius: 12px; }
  .guide-step h2 { font-size: 22px; }
  .guide-toc { padding: 20px; }
  .table-wrap { border-radius: 14px; position: relative; }
  .ex-table thead th { padding: 10px 12px; font-size: 9px; }
  .ex-table tbody td { padding: 10px 12px; font-size: 13px; word-break: break-word; }
  /* Smaller tables shrink to fit the viewport; wide variant keeps min-width so it scrolls horizontally. */
  .table-wrap .ex-table:not(.ex-table--wide) { min-width: 0; }
  .table-wrap .ex-table--wide { min-width: 540px; }
  /* The wide example table scrolls horizontally — keep every cell on one line. */
  .table-wrap .ex-table--wide thead th,
  .table-wrap .ex-table--wide tbody td { white-space: nowrap; }
  /* Keep label cells in the leftmost column on one line (e.g. "Google Sheets"). */
  .table-wrap .ex-table:not(.ex-table--wide) tbody td:first-child { white-space: nowrap; }
  /* Inline pill labels should never break across lines. */
  .badge-req, .badge-rec, .badge-opt { white-space: nowrap; }

  /* "Columns explained" table → stacked cards on mobile.
     Locale-proof: each row is a card with name + badge inline, description below. */
  .table-wrap:has(.col-table) {
    border: none; background: transparent; overflow: visible;
  }
  .table-wrap .col-table { min-width: 0; }
  .col-table, .col-table tbody, .col-table tr, .col-table td { display: block; }
  .col-table thead { display: none; }
  .col-table tr {
    border: 1px solid var(--rule-2);
    border-radius: var(--r-md);
    background: var(--bg-2);
    padding: 14px 16px;
    margin-bottom: 10px;
  }
  .col-table tr:last-child { margin-bottom: 0; }
  .col-table td {
    border: none;
    padding: 0;
    font-size: 14px;
  }
  .col-table td:first-child {
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
    font-size: 12px;
  }
  .col-table td:nth-child(2) {
    display: inline-block;
    vertical-align: middle;
  }
  .col-table td:nth-child(3) { margin-top: 10px; }

  /* Roadmap */
  .roadmap-item { padding: 24px 0; }
  .roadmap-item h3 { font-size: 22px; }

  /* Nav refinements */
  nav.site .row { height: 58px; }
  .nav-wordmark { font-size: 16px; }
  .nav-icon { width: 32px; height: 32px; border-radius: 8px; }

  /* Lang switcher tightens */
  .lang-switcher { margin-left: 8px; font-size: 10.5px; gap: 0; }
  .lang-switcher a { padding: 6px 6px; min-width: 28px; }

  /* Hero kickers wrap cleanly + don't overflow */
  .hero-kickers { font-size: 10.5px; letter-spacing: 0.12em; line-height: 1.6; gap: 5px; }
  .hero-kickers span { white-space: normal; overflow-wrap: anywhere; }

  /* Tap target floor for inline nav-ish links */
  .footer-grid ul a,
  .page-jump-links a,
  .ghost-cta { min-height: 32px; display: inline-flex; align-items: center; }

  /* Page header tightens further; image-y eyebrow stays small */
  .page-header .eyebrow { font-size: 10px; }
}

/* Very narrow phones (iPhone SE 1st gen, small Androids) */
@media (max-width: 400px) {
  :root { --pad: 14px; }
  nav.site .row { height: 54px; }
  .nav-wordmark { font-size: 15px; }

  .hero { padding: 28px 0 40px; }
  .hero h1 { font-size: 40px; }
  .hero-lede { font-size: 15px; }

  .badge-apple-fallback { height: 48px; padding: 0 16px; gap: 10px; }
  .badge-apple-fallback .big { font-size: 15px; }
  .badge-apple-fallback .small { font-size: 9px; }
  .badge-apple img { height: 46px; }

  .block-head h2 { font-size: 26px; }
  .block-head .kicker { font-size: 15px; }
  .showcase-text h2 { font-size: 24px; }
  .showcase-text p { font-size: 15px; }
  .showcase-image { max-width: 260px; }

  .interlude .quote { font-size: 30px; }
  .tenets .track { font-size: 16px; gap: 28px; }
  .tenets .track span { gap: 16px; }

  .page-header h1 { font-size: 36px; }
  .page-header .deck { font-size: 15px; }
  .footer-brand .word { font-size: 30px; }

  details.faq-row { padding: 20px 0; }
  details.faq-row .q-text { font-size: 16px; }

  /* Tip jar tightens */
  .tip-tier { padding: 16px; }
  .tier-name { font-size: 18px; }
  .tier-price { font-size: 22px; }

  /* Template guide table column */
  .tg-table .row { grid-template-columns: 80px 1fr; }
  .tg-table .row > div { padding: 12px 14px; }
}
