/* ──────────────────────────────────────────────────────────────────────────
   Group Factor marketing site — shared design system (Nov 2026 redesign)

   Editorial, flat look: Plus Jakarta Sans display headings, Inter body,
   JetBrains Mono for eyebrows/numbers. Hairline rules instead of cards,
   no glows or gradients. Pages open dark (nav + hero) and switch to a
   light "paper" body by wrapping sections in `.on-light`.

   Every public page links this file and keeps only page-specific CSS
   inline. Google Fonts link each page must include:
   https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap
   ────────────────────────────────────────────────────────────────────────── */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root, .on-dark {
  --bg: #0A1422;
  --soft: #0E1B2E;
  --surface: #11203A;
  --ink: #F7F5F5;
  --muted: #A6B1C2;
  --rule: #22324A;
  --accent: #186EB3;
  --accentInk: #FFFFFF;
  --hl: #3F97DD;
  --panel: #0A1422;
  --ok: #3DBE8B;
  --err: #F08A8A;
}
.on-light {
  --bg: #F7F5F5;
  --soft: #ECEAEB;
  --surface: #FFFFFF;
  --ink: #0A1422;
  --muted: #4A5567;
  --rule: #D6D3D5;
  --accent: #186EB3;
  --accentInk: #FFFFFF;
  --hl: #186EB3;
  --panel: #0A1422;
  --ok: #1F7A54;
  --err: #B42318;
}
.on-light, .on-dark { background: var(--bg); color: var(--ink); }

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:hover { opacity: .75; }
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }

/* Type helpers */
.d { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; letter-spacing: -0.02em; }
.m { font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace; }
.hl { color: var(--hl); }
.muted { color: var(--muted); }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.h-hero    { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-weight: 700; font-size: clamp(44px, 6vw, 76px);   line-height: 1.02; }
.h-page    { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-weight: 700; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; }
.h-section { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-weight: 700; font-size: clamp(32px, 4vw, 46px);   line-height: 1.06; }
.h-sub     { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-weight: 600; font-size: clamp(26px, 3vw, 34px);   line-height: 1.1; }
.h-card    { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-weight: 600; font-size: 22px; line-height: 1.15; }
.lede { font-size: 20px; line-height: 1.5; color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.section { padding-top: 96px; padding-bottom: 96px; }
.section-xl { padding-top: 104px; padding-bottom: 104px; }
.section-tight { padding-top: 64px; padding-bottom: 64px; }
.band { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-soft { background: var(--soft); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-soft + .site-footer, .band + .site-footer { border-top: 0; }
.split { display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: flex-start; }
.split > * { min-width: 0; }
.split-1 { flex: 1 1 320px; }
.split-2 { flex: 2 1 520px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Page header (dark, under nav) */
.page-head { padding-top: 72px; padding-bottom: 64px; }
.page-head .lede { margin-top: 20px; max-width: 760px; }
.page-head .eyebrow + .h-page, .page-head .eyebrow + .h-hero { margin-top: 14px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 22px;
  border-radius: 6px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  background: transparent; color: inherit;
}
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-accent  { background: var(--accent); color: var(--accentInk); border-color: var(--accent); }
.btn-ink     { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-lg      { padding: 15px 26px; font-size: 17px; }
.btn-sm      { min-height: 40px; padding: 9px 16px; font-size: 15px; }
.btn-block   { width: 100%; }
.link-arrow  { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: ' →'; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 20, 34, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
[id] { scroll-margin-top: 84px; } /* anchored sections clear the sticky nav */
.site-nav .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 16px 36px; padding-top: 18px; padding-bottom: 18px;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo:hover { opacity: 1; }
.nav-logo img { height: 32px; width: auto; display: block; }
.nav-links {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  flex: 1 1 auto; margin: 0; padding: 0; list-style: none;
  font-size: 15px;
}
.nav-links a { text-decoration: none; padding: 12px 0; display: inline-block; }
.nav-links a.active { font-weight: 600; }
.nav-right { display: flex; gap: 12px; align-items: center; }
.nav-right .nav-signin { font-size: 15px; text-decoration: none; padding: 12px 8px; }
.nav-right .btn { font-size: 15px; padding: 12px 18px; }
.nav-toggle { display: none; }
.nav-sm { display: none; } /* short trial-button label, phones only */

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px 32px; padding-top: 28px; padding-bottom: 28px;
  font-size: 14px; color: var(--muted);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer nav a { padding: 12px 0; display: inline-block; }

/* ── Rule lists (hairline-separated rows) ───────────────────────────────── */
.rule-list { border-top: 1px solid var(--rule); }
.rule-list.heavy { border-top: 2px solid var(--ink); }
.rule-list > * { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.rule-list.compact > * { padding: 10px 0; }
.rule-list strong { color: var(--ink); }
.rule-list .muted, .rule-list span { color: var(--muted); }

/* Numbered ledger rows (feature list) */
.ledger { border-top: 2px solid var(--ink); }
.ledger-row {
  display: flex; flex-wrap: wrap; gap: 6px 24px;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
.ledger-row .num { flex: 0 0 36px; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--muted); padding-top: 4px; }
.ledger-row .title { flex: 1 1 200px; font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: 21px; font-weight: 600; }
.ledger-row .desc { flex: 2 1 320px; color: var(--muted); }

/* Step columns */
.steps { display: flex; flex-wrap: wrap; gap: 40px 48px; }
.step { flex: 1 1 280px; min-width: 0; border-top: 2px solid var(--ink); padding-top: 20px; }
.step .num { font-family: 'JetBrains Mono', monospace; font-size: 44px; font-weight: 500; line-height: 1; }
.step .title { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: 22px; font-weight: 600; margin: 18px 0 8px; }
.step .desc { color: var(--muted); }

/* Two-column mono checklist (audit log capabilities) */
.check-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; font-family: 'JetBrains Mono', monospace; font-size: 14px; }
.check-cols > * { min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--rule); }

/* ── Cards & panels ─────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 28px 32px; }
.panel { background: var(--panel); color: #F1F2EE; border-radius: 10px; padding: 32px; }
.panel .muted { color: #A6ACB2; }
.frame { border: 1px solid var(--rule); border-radius: 10px; display: block; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--rule); }
.tab {
  font: 500 16px 'Inter', sans-serif; padding: 14px 20px; min-height: 48px;
  background: transparent; color: var(--muted); border: 0;
  border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel[hidden] { display: none; }

/* Pills (blog filters) */
.pill {
  font: 500 15px 'Inter', sans-serif; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--rule);
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}
.pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ── Pricing ────────────────────────────────────────────────────────────── */
/* 30-day trial callout above the plan cards */
.trial-callout {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  margin-bottom: 28px; padding: 16px 22px;
  border: 1.5px solid var(--hl); border-radius: 10px;
  background: color-mix(in srgb, var(--hl) 10%, transparent);
}
.trial-days { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: 24px; font-weight: 700; color: var(--hl); white-space: nowrap; }
.trial-text { flex: 1 1 320px; color: var(--muted); font-size: 15px; }
.price-trial { display: inline-block; margin-top: 10px; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hl); border: 1px solid var(--hl); border-radius: 4px; padding: 4px 8px; }
.plans { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.plan {
  flex: 1 1 300px; min-width: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  padding: 32px; display: flex; flex-direction: column; gap: 20px;
}
.plan.featured { border: 2px solid var(--accent); padding: 31px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan-name { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: 22px; font-weight: 600; }
.plan-badge { font-family: 'JetBrains Mono', monospace; font-size: 12px; padding: 4px 10px; border-radius: 4px; background: var(--accent); color: #fff; }
.price { font-family: 'JetBrains Mono', monospace; font-size: 48px; font-weight: 500; line-height: 1; }
.price-per { color: var(--muted); font-size: 15px; }
.price-alt { color: var(--muted); font-size: 14px; margin-top: 6px; }
.plan .rule-list { font-size: 15px; }
.plan .rule-list > *:last-child { border-bottom: 0; }
.plan .btn { margin-top: auto; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { font-size: 14px; font-weight: 500; }
.form input, .form textarea, .form select {
  width: 100%; padding: 13px 14px;
  border: 1px solid var(--rule); border-radius: 6px;
  background: var(--surface); color: var(--ink);
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--hl); outline-offset: 1px; border-color: var(--hl); }
.form input::placeholder, .form textarea::placeholder { color: var(--muted); opacity: .8; }
.form-note { font-size: 14px; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--rule); display: none; }
.form-note.success { display: block; border-color: var(--ok); color: var(--ok); }
.form-note.error   { display: block; border-color: var(--err); color: var(--err); }

/* ── Blog index ─────────────────────────────────────────────────────────── */
.tile {
  font-family: 'JetBrains Mono', monospace; font-weight: 500; border-radius: 8px;
  display: flex; align-items: flex-end; padding: 16px; line-height: 1.15;
}
.t-sec   { background: #1C54AF; color: #FFFFFF; }
.t-guide { background: var(--panel); color: #F1F2EE; border: 1px solid var(--rule); }
.t-play  { background: #186EB3; color: #FFFFFF; }
/* Image tiles (blog thumbnails): the picture fills the tile, any label sits on top */
.tile-img { position: relative; padding: 0; overflow: hidden; background: var(--panel); }
.tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-img .label { position: relative; z-index: 1; padding: 24px 28px; color: #FFFFFF; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.t-ai    { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }

.post-list { border-top: 2px solid var(--ink); }
.post-row {
  display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-start;
  padding: 28px 0; border-bottom: 1px solid var(--rule); text-decoration: none;
}
.post-row .tile { flex: 0 0 168px; height: 112px; font-size: 15px; }
.post-row .body { flex: 1 1 420px; min-width: 0; }
.post-row .tag { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.post-row .title { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: 25px; line-height: 1.15; font-weight: 600; margin: 8px 0; }
.post-row .excerpt { color: var(--muted); max-width: 640px; }
.post-row .when { flex: 0 0 150px; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); padding-top: 4px; }

.featured-post {
  text-decoration: none; display: flex; flex-wrap: wrap;
  border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--surface);
}
.featured-post .tile { flex: 1 1 380px; min-height: 340px; border-radius: 0; padding: 32px; flex-direction: column; justify-content: space-between; align-items: stretch; }
.featured-post .body { flex: 1 1 440px; min-width: 0; padding: 40px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.featured-post .title { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; font-weight: 700; }

/* ── Article / prose ────────────────────────────────────────────────────── */
.article-head { padding-top: 56px; padding-bottom: 48px; }
.article-head .back { font-family: 'JetBrains Mono', monospace; font-size: 13px; display: inline-block; padding: 12px 0; text-decoration: none; }
.article-head .eyebrow { margin-top: 16px; }
.article-head h1 { margin: 16px 0 24px; max-width: 980px; font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-weight: 700; font-size: clamp(38px, 5vw, 64px); line-height: 1.03; }
.article-head .lede { font-size: 21px; max-width: 760px; }
.article-head .byline { margin-top: 28px; font-size: 15px; }
/* Article header image at the foot of the dark head */
.article-hero { margin: 0 0 64px; }
.article-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--rule); background: var(--panel); }

.article-body { display: flex; flex-wrap: wrap; gap: 40px 72px; align-items: flex-start; padding-top: 56px; padding-bottom: 88px; }
.toc { flex: 1 1 220px; max-width: 280px; min-width: 0; position: sticky; top: 24px; }
.toc .eyebrow { font-size: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.toc a { display: block; font-size: 15px; text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--rule); }

.prose { flex: 999 1 560px; min-width: 0; max-width: 720px; font-size: 19px; line-height: 1.65; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 22px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }
.prose h2 { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: 32px; line-height: 1.12; font-weight: 700; margin: 56px 0 18px; }
.prose h3 { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: 22px; font-weight: 600; margin: 32px 0 10px; }
.prose h4 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 600; }
.prose code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; background: var(--soft); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 6px; }
.prose pre { font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.6; background: var(--panel); color: #F1F2EE; border-radius: 8px; padding: 20px 24px; overflow-x: auto; margin: 0 0 22px; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose blockquote { margin: 0 0 22px; padding: 4px 0 4px 20px; border-left: 2px solid var(--ink); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 0 0 22px; }
.prose th, .prose td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-weight: 600; border-bottom: 2px solid var(--ink); }
.prose img { border-radius: 8px; border: 1px solid var(--rule); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }

.callout { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 28px 32px; margin: 0 0 40px; font-size: 17px; line-height: 1.55; }
.callout .eyebrow { font-size: 12px; margin-bottom: 12px; }
.callout p:last-child { margin-bottom: 0; }
.callout .rule-list.compact > * { font-size: 17px; }

.stat { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 28px 0; margin: 36px 0; }
.stat .num { font-family: 'JetBrains Mono', monospace; font-size: clamp(56px, 7vw, 84px); font-weight: 500; line-height: 1; }
.stat .num span { color: var(--muted); }
.stat .desc { flex: 1 1 300px; min-width: 0; font-size: 17px; line-height: 1.5; }

.cta-panel { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; margin: 48px 0 0; font-size: 17px; line-height: 1.5; }
.cta-panel .body { flex: 1 1 320px; min-width: 0; }
.cta-panel .title { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: 26px; font-weight: 600; line-height: 1.15; }
.cta-panel a { text-decoration: none; }

.keep-reading { display: flex; flex-wrap: wrap; gap: 24px 40px; border-top: 2px solid var(--ink); }
.keep-reading a { flex: 1 1 300px; min-width: 0; text-decoration: none; padding-top: 20px; }
.keep-reading .meta { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); text-transform: uppercase; }
.keep-reading .title { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: 22px; font-weight: 600; line-height: 1.18; margin-top: 8px; }

/* Closing CTA band (blog index, secondary pages) */
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: center; justify-content: space-between; padding-top: 64px; padding-bottom: 64px; }
.cta-band .body { flex: 1 1 460px; min-width: 0; }
.cta-band .title { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; line-height: 1.08; }
.cta-band .small { margin-top: 10px; }

/* ── Auth card (login / invite) ─────────────────────────────────────────── */
.auth-wrap { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 36px; }
.auth-card .h-card { margin-bottom: 6px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-top: 1px solid var(--rule); }

/* ── Scroll reveal (homepage) ───────────────────────────────────────────── */
/* home.html adds .reveal to section blocks and .in when they scroll into view;
   --d staggers list items. Reduced-motion users get the content immediately. */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  /* Hamburger menu: one row (logo, sign in, trial button, toggle); links drop down when open */
  .site-nav .wrap { flex-wrap: wrap; gap: 0 12px; padding-top: 12px; padding-bottom: 12px; }
  .nav-logo { flex: 1 1 auto; }
  .nav-logo img { height: 28px; }
  .nav-right { gap: 4px; }
  .nav-right .nav-signin { font-size: 14px; padding: 10px 8px; }
  .nav-right .btn { padding: 10px 14px; font-size: 14px; min-height: 40px; white-space: nowrap; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 10px; margin-right: -10px;
    background: transparent; border: 0; cursor: pointer; -webkit-appearance: none; appearance: none;
  }
  /* explicit width: Safari does not stretch flex children inside a <button> */
  .nav-toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .site-nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links { display: none; order: 10; flex-basis: 100%; flex-direction: column; gap: 0; margin-top: 12px; font-size: 16px; }
  .site-nav.open .nav-links { display: flex; }
  .nav-links li a { display: block; padding: 13px 0; border-top: 1px solid var(--rule); }
  .site-nav.open .nav-links li:last-child a { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  /* Shorter button label and tighter spacing so Sign in fits beside it on 360px phones */
  .nav-xl { display: none; }
  .nav-sm { display: inline; }
  .site-nav .wrap { gap: 0 8px; }
  .nav-logo img { height: 24px; }
  .nav-right .nav-signin { padding: 10px 6px; }
  .nav-right .btn { padding: 10px 11px; }
  .wrap, .wrap-narrow { padding-left: 20px; padding-right: 20px; }
  .section, .section-xl { padding-top: 64px; padding-bottom: 64px; }
  .section-tight { padding-top: 48px; padding-bottom: 48px; }
  .page-head { padding-top: 48px; padding-bottom: 40px; }
  .article-head { padding-top: 40px; padding-bottom: 36px; }
  .article-hero { margin-bottom: 40px; }
  .article-body { padding-top: 40px; padding-bottom: 64px; }
  .lede { font-size: 18px; }
  .post-row .tile { flex-basis: 100%; height: 88px; }
  .post-row .when { flex-basis: 100%; padding-top: 0; }
  .toc { position: static; max-width: none; flex-basis: 100%; }
  .check-cols { grid-template-columns: 1fr; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 27px; margin-top: 44px; }
  .plan, .plan.featured { padding: 24px; }
  .btn-lg { width: 100%; }
}
@media (max-width: 340px) {
  /* Narrowest phones (320px): squeeze the nav row a little further */
  .site-nav .wrap { padding-left: 16px; padding-right: 16px; gap: 0 6px; }
  .nav-logo img { height: 22px; }
  .nav-right { gap: 2px; }
  .nav-right .nav-signin { font-size: 13px; padding: 10px 4px; }
  .nav-right .btn { font-size: 13px; padding: 10px 9px; }
  .nav-toggle { margin-right: -12px; }
}
