/* ============================================================================
   Markdown Web Clipper — landing stylesheet
   Plain CSS, no framework. Pairs with tokens.css (load tokens.css first).
   Ship target: this file + tokens.css = the single style.css on Cloudflare.

   Sections:
     0. Fonts + reset + base
     1. Layout primitives + tweak axes (accent / density / pro / hero)
     2. Header
     3. Buttons / badges / chips
     4. Hero (3 variants) + live popup recreation
     5. "Why different" rail
     6. Destination matrix (table)
     7. Before / after fidelity (rendered <-> source toggle)
     8. Pro pitch
     9. Credibility (open-source / privacy)
    10. Footer
    11. Long-form pages (privacy / pro-faq) + restore card
    12. Tweaks dev panel
    13. Responsive
   ============================================================================ */

/* ---------- 0. Fonts (self-hosted; no CDN) ----------
   Same WOFF2 files the extension ships under public/fonts/. Latin +
   latin-ext per-subset, unicode-range scoped so the browser only
   fetches the slice it needs. font-display: swap to avoid FOIT and
   protect the first-paint budget.
*/
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-tight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
code, pre, .mono { font-family: var(--font-mono); }

::selection { background: var(--accent-subtle); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Visually-hidden utility — content stays in the a11y tree (table captions etc.). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Skip link — visually hidden until keyboard focus, then pinned top-left. */
.skip-link { position: absolute; left: 8px; top: -48px; z-index: 1000; padding: 10px 16px; background: var(--surface); color: var(--fg-strong); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-md); font-size: 14px; font-weight: 550; transition: top .15s ease; }
.skip-link:focus { top: 8px; }

/* Breadcrumb trail — reuses .eyebrow type; just colours the links. */
.breadcrumb { display: block; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- 1. Layout primitives + tweak axes ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 32px; }

section.band { padding-block: var(--section-y); }
.band + .band { border-top: 1px solid var(--border); }

/* density */
:root[data-density="compact"]   { --section-y: 76px;  --gap-block: 20px; }
:root[data-density="standard"]  { --section-y: 112px; --gap-block: 28px; }
:root[data-density="breathing"] { --section-y: 160px; --gap-block: 40px; }

/* accent intensity */
:root[data-accent="60"]  { --accent: var(--accent-60); }
:root[data-accent="100"] { --accent: var(--accent-100); }
:root[data-accent="140"] { --accent: var(--accent-140); }

/* eyebrow label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-weight: 500;
  white-space: nowrap;
}

/* display headings — two lines, second line gets the one rust word */
.display {
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  color: var(--fg-strong);
  text-wrap: balance;
}
h1.display { font-size: clamp(40px, 5.4vw, 68px); }
h2.display { font-size: clamp(32px, 3.8vw, 46px); }
h3.display { font-size: clamp(24px, 2.4vw, 30px); }
.rust { color: var(--accent); }

.lede { font-size: clamp(17px, 1.35vw, 19px); color: var(--fg-muted); max-width: 46ch; text-wrap: pretty; }
.section-head { max-width: 52ch; margin-bottom: 48px; }
.section-head .lede { margin-top: 16px; }

/* ---------- 2. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; color: var(--fg-strong); letter-spacing: -0.01em; white-space: nowrap; flex: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand .wordmark { font-size: 16px; }
.brand .tld { color: var(--fg-faint); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
/* :not(.btn) so the rust "Add to Chrome" button keeps its --on-accent
   white text. Without this exclusion .nav a (specificity 0,1,1) wins
   over .btn-primary (0,1,0) and paints dark fg-muted on the rust
   surface — unreadable contrast. */
.nav a:not(.btn) {
  padding: 8px 12px; border-radius: var(--r-sm); font-size: 14px; color: var(--fg-muted);
  font-weight: 500; transition: color .15s, background .15s;
}
.nav a:not(.btn):hover { color: var(--fg-strong); background: var(--surface-2); }
.nav .sep { width: 1px; height: 20px; background: var(--border); margin-inline: 6px; }

/* ---------- 3. Buttons / badges / chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 18px; border-radius: var(--r-md); font-size: 14.5px; font-weight: 550;
  letter-spacing: -0.005em; transition: transform .12s ease, background .15s, border-color .15s, box-shadow .15s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .kbd { font-family: var(--font-mono); font-size: 12px; opacity: .8; }

.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 90%, black); }

.btn-ghost { background: var(--surface); color: var(--fg-strong); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--fg-faint); }

.btn-quiet { color: var(--fg-muted); padding-inline: 10px; }
.btn-quiet:hover { color: var(--fg-strong); }

.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: var(--r-lg); }

.badge-pro {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  background: var(--accent); color: var(--on-accent); border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 650; letter-spacing: 0.01em; white-space: nowrap;
}
.badge-pro.outline { background: transparent; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.badge-free {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  background: var(--surface-2); color: var(--fg-muted); border: 1px solid var(--border);
  border-radius: var(--r-pill); font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill);
  font-size: 13px; color: var(--fg-muted); font-weight: 500;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* ---------- 4. Hero ---------- */
.hero { padding-top: clamp(56px, 7vw, 96px); padding-bottom: var(--section-y); }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { font-size: clamp(18px, 1.5vw, 21px); max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: var(--fg-faint); font-size: 13.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }

/* hero variant visibility */
.hero[data-variant] { display: none; }
:root[data-hero="split"]    .hero[data-variant="split"]    { display: block; }
:root[data-hero="centered"] .hero[data-variant="centered"] { display: block; }
:root[data-hero="compare"]  .hero[data-variant="compare"]  { display: block; }

/* --- variant: split (text left, layered popup + output card right) --- */
.hero-split .grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.hero-stage { position: relative; min-height: 470px; display: block; }
.hero-split .popup { position: relative; z-index: 2; margin-left: auto; }
.hero-split .flow-arrow { display: none; }
.hero-split .md-card { position: absolute; left: 0; top: 56px; z-index: 1; transform: scale(0.86); transform-origin: top left; box-shadow: var(--shadow-lg); }

/* --- variant: centered (proof below) --- */
.hero-centered { text-align: center; }
.hero-centered .lede { margin-inline: auto; }
.hero-centered .hero-eyebrow, .hero-centered .hero-cta { justify-content: center; }
.hero-centered .hero-meta { justify-content: center; }
.hero-proof-wide { margin-top: 56px; }

/* --- variant: compare (before/after led) --- */
.hero-compare .grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 56px; align-items: center; }

/* ---- live popup recreation ---- */
.popup {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-2xl);
  box-shadow: var(--shadow-pop); overflow: hidden; flex: none;
}
.popup-tabs { display: flex; gap: 26px; padding: 16px 20px 0; border-bottom: 1px solid var(--border); }
.popup-tab { padding-bottom: 13px; font-size: 14px; font-weight: 550; color: var(--fg-faint); position: relative; }
.popup-tab.active { color: var(--fg-strong); }
.popup-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.popup-body { padding: 16px 20px 18px; }
.popup-hint { font-size: 12px; color: var(--fg-faint); margin-bottom: 12px; }
.popup-input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font-size: 14px; color: var(--fg-muted); background: var(--surface); margin-bottom: 16px;
}
.popup-fm { font-size: 12.5px; color: var(--fg-muted); margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.popup-fm .tri { color: var(--accent); font-size: 9px; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.seg button { padding: 7px 13px; border-radius: var(--r-sm); font-size: 13px; font-weight: 550; color: var(--fg-muted); }
.seg button.active { background: var(--fg-strong); color: var(--bg); }

.popup-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.popup-row .spacer { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--r-md); color: var(--fg-muted); background: var(--surface);
  transition: border-color .15s, color .15s, background .15s; position: relative;
}
.icon-btn:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.icon-btn .pro-dot { position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 8px; font-weight: 700; display: grid; place-items: center; }

.fmt-select {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; margin-top: 6px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md); font-size: 14px; color: var(--fg-strong); font-weight: 550;
}
.fmt-select .built-in { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--fg-muted); background: var(--surface-2); padding: 2px 7px; border-radius: var(--r-pill); white-space: nowrap; }
.fmt-select .caret { margin-left: auto; color: var(--fg-faint); }

.popup-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 12px; color: var(--fg-faint); white-space: nowrap; }

.dest-row { display: flex; gap: 8px; margin-top: 14px; }

/* rendered markdown card (the "output" beside the popup) */
.md-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: 22px 24px; max-width: 360px; }
.md-card .md-h { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--fg-strong); margin-bottom: 14px; }
.md-card p, .md-card li { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--fg-muted); }
.md-card .sub { font-weight: 600; color: var(--fg-strong); margin-top: 14px; margin-bottom: 8px; }
.code-well { background: var(--code-bg); color: var(--code-fg); border-radius: var(--r-sm); padding: 11px 13px; font-family: var(--font-mono); font-size: 12px; margin: 8px 0 14px; overflow-x: auto; }
.mini-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; }
.mini-table th, .mini-table td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; color: var(--fg-muted); }
.mini-table th { background: var(--surface-2); color: var(--fg-strong); font-weight: 600; }
.mini-table td .ok { color: var(--success); }

/* macOS window (centered hero proof) */
.macwin { width: 100%; max-width: 680px; margin-inline: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; position: relative; }
.macwin-bar { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.traffic { display: flex; gap: 7px; }
.traffic i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.traffic i:nth-child(1){ background:#ec6a5e; } .traffic i:nth-child(2){ background:#f4bf4f; } .traffic i:nth-child(3){ background:#61c454; }
.macwin-title { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-muted); }
.macwin-body { padding: 20px 24px; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; }
.macwin-body .hr { color: var(--fg-faint); }
.macwin-body .k { color: var(--syn-key); } .macwin-body .v { color: var(--syn-val); }
.macwin-body .h { color: var(--fg-strong); font-weight: 600; }
.macwin-body .b { color: var(--fg-strong); font-weight: 600; }
.macwin-body p { color: var(--fg-muted); }
.toast { position: absolute; right: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 9px; background: var(--fg-strong); color: var(--bg); padding: 11px 16px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 550; box-shadow: var(--shadow-lg); }
.toast .check { width: 18px; height: 18px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; font-size: 11px; }

/* ---------- 5. Why-different rail ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; }
.why-cell { background: var(--bg); padding: 30px 28px; }
.why-cell .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 600; }
.why-cell h3 { font-size: 18px; font-weight: 600; color: var(--fg-strong); margin: 14px 0 9px; letter-spacing: -0.01em; }
.why-cell p { font-size: 14.5px; color: var(--fg-muted); }
.why-cell code { font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: var(--r-xs); color: var(--fg-strong); }

/* ---------- 6. Destination matrix ---------- */
.matrix-wrap { border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-sm); }
.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td { text-align: left; padding: 18px 22px; border-bottom: 1px solid var(--border); vertical-align: top; }
.matrix thead th { background: var(--surface-2); font-size: 12px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-faint); font-weight: 500; padding-block: 14px; }
.matrix tbody tr:last-child td { border-bottom: none; }
.matrix tbody tr { background: var(--surface); transition: background .12s; }
.matrix tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.matrix .dest { display: flex; align-items: center; gap: 12px; }
.matrix .dest .di { width: 34px; height: 34px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--fg-strong); flex: none; }
.matrix .dest .name { font-weight: 600; color: var(--fg-strong); font-size: 15px; white-space: nowrap; }
.matrix .dest .sub { font-size: 12.5px; color: var(--fg-faint); }
.matrix td .yes { color: var(--success); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.matrix td .partial { color: var(--fg-muted); font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; }
.matrix td.best { color: var(--fg-muted); font-size: 14px; max-width: 30ch; }
.matrix td.best b { color: var(--fg-strong); font-weight: 600; }
.matrix .tag-pro { margin-left: 8px; }
.matrix-note { margin-top: 16px; font-size: 13.5px; color: var(--fg-faint); display: flex; align-items: center; gap: 8px; }

/* ---------- 7. Before / after ---------- */
.ba-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.ba-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 3px; }
.ba-toggle button { padding: 8px 16px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 550; color: var(--fg-muted); }
.ba-toggle button.active { background: var(--surface); color: var(--fg-strong); box-shadow: var(--shadow-sm); }
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ba-card { border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-md); }
.ba-card .cap { padding: 12px 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); border-bottom: 1px solid var(--border); background: var(--surface-2); display: flex; align-items: center; justify-content: space-between; }
.ba-card .cap.bad { color: var(--accent-ink); }
.ba-card .cap.good { color: var(--success); }
.ba-body { padding: 22px 24px; min-height: 300px; }

/* rendered mode */
.ba-render .md-h { font-size: 17px; font-weight: 600; color: var(--fg-strong); margin-bottom: 12px; }
.ba-render p { font-size: 14px; color: var(--fg-muted); margin-bottom: 12px; }
.ba-render pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; font-size: 12.5px; color: var(--fg-strong); overflow-x: auto; margin-bottom: 14px; }
.ba-render table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ba-render th, .ba-render td { border: 1px solid var(--border); padding: 7px 11px; text-align: left; }
.ba-render th { background: var(--surface-2); font-weight: 600; color: var(--fg-strong); }
.ba-render td { color: var(--fg-muted); }
.ba-render .ok { color: var(--success); }
/* the "broken" side */
.ba-broken { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-muted); line-height: 1.7; white-space: pre-wrap; }
.ba-broken .lost { color: var(--accent-ink); background: var(--accent-subtle); padding: 0 3px; border-radius: 3px; }
.ba-broken .strip { color: var(--fg-faint); text-decoration: line-through; }

/* source mode */
.ba-source { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; color: var(--fg-muted); }
.ba-source .h { color: var(--fg-strong); font-weight: 600; }
.ba-source .fence { color: var(--accent); }
.ba-source .pipe { color: var(--fg-faint); }

[data-ba="rendered"] .ba-show-source { display: none; }
[data-ba="source"]   .ba-show-rendered { display: none; }

/* ---------- 8. Pro pitch ---------- */
.pro-band { background: var(--surface-2); }
:root[data-pro="subtle"]    .pro-band { background: var(--bg); }
:root[data-pro="prominent"] .pro-band { background: var(--accent-subtle); }

.pro-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; border: 1px solid var(--border); border-radius: var(--r-2xl); background: var(--surface); padding: 44px; box-shadow: var(--shadow-md); }
:root[data-pro="prominent"] .pro-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow-lg); }
:root[data-pro="subtle"] .pro-card { box-shadow: var(--shadow-sm); }
.pro-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.pro-card h2 { font-size: clamp(26px, 2.6vw, 34px); }
.pro-feats { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.pro-feats li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--fg-muted); }
.pro-feats li b { color: var(--fg-strong); font-weight: 600; }
.pro-feats .tick { color: var(--accent); flex: none; margin-top: 2px; }
.price-box { border: 1px solid var(--border); border-radius: var(--r-xl); padding: 28px; background: var(--bg); text-align: center; }
:root[data-pro="prominent"] .price-box { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--surface); }
.price-box .now { font-size: 48px; font-weight: 700; color: var(--fg-strong); letter-spacing: -0.02em; line-height: 1; }
.price-box .was { font-size: 18px; color: var(--fg-faint); text-decoration: line-through; margin-left: 8px; }
.price-box .once { font-size: 13.5px; color: var(--fg-muted); margin-top: 10px; }
.price-box .promo { display: inline-flex; margin-top: 16px; }
.price-box .btn { width: 100%; margin-top: 22px; }
.price-box .fine { font-size: 12.5px; color: var(--fg-faint); margin-top: 14px; line-height: 1.5; }
.pro-tip { margin-top: 18px; font-size: 13.5px; color: var(--fg-muted); font-style: italic; }

/* ---------- 9. Credibility ---------- */
.cred-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cred-card { border: 1px solid var(--border); border-radius: var(--r-xl); padding: 28px; background: var(--surface); }
.cred-card .ic { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--fg-strong); margin-bottom: 18px; }
.cred-card h3 { font-size: 17px; font-weight: 600; color: var(--fg-strong); margin-bottom: 9px; letter-spacing: -0.01em; }
.cred-card p { font-size: 14.5px; color: var(--fg-muted); }
.cred-card a.inline { color: var(--accent); font-weight: 550; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.cred-card .repo { margin-top: 16px; display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-muted); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 12px; }

/* social proof placeholder (honest TBD) */
.tbd { border: 1px dashed var(--border-strong); border-radius: var(--r-xl); padding: 40px; text-align: center; color: var(--fg-faint); background: color-mix(in srgb, var(--surface-2) 40%, var(--bg)); }
.tbd .eyebrow { margin-bottom: 10px; }
.tbd p { font-size: 15px; max-width: 46ch; margin-inline: auto; }

/* ---------- 10. Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 56px; background: var(--surface-2); }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 30ch; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; color: var(--fg-faint); }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h2 { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-faint); margin-bottom: 14px; font-weight: 500; }
.footer-col a { display: block; font-size: 14px; color: var(--fg-muted); padding: 5px 0; transition: color .12s; }
.footer-col a:hover { color: var(--accent); }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--fg-faint); }

/* ---------- 11. Long-form pages + restore ---------- */
.page-hero { padding-top: 72px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(34px, 4vw, 48px); }
.page-hero .meta { margin-top: 14px; font-size: 14px; color: var(--fg-faint); font-family: var(--font-mono); }
.prose { max-width: var(--maxw-prose); margin-inline: auto; padding-block: 56px; }
.prose h2 { font-size: 24px; font-weight: 650; color: var(--fg-strong); margin: 44px 0 14px; letter-spacing: -0.01em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; font-weight: 600; color: var(--fg-strong); margin: 28px 0 10px; }
.prose p, .prose li { font-size: 16px; color: var(--fg-muted); line-height: 1.7; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.prose code { font-family: var(--font-mono); font-size: 14px; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: var(--r-xs); color: var(--fg-strong); }
.prose strong { color: var(--fg-strong); font-weight: 600; }
.prose .callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--accent-subtle); border-radius: var(--r-md); padding: 16px 20px; margin: 24px 0; }
.prose .callout p { color: var(--accent-ink); margin: 0; font-size: 14.5px; }
.toc { position: sticky; top: 88px; font-size: 13.5px; }
.toc h2 { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-faint); margin-bottom: 12px; }
.toc a { display: block; padding: 5px 0; color: var(--fg-muted); }
.toc a:hover { color: var(--accent); }
.prose-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; max-width: 980px; margin-inline: auto; padding-block: 56px; align-items: start; }
.prose-layout .prose { padding-block: 0; margin: 0; }

/* faq */
.faq-item { border-bottom: 1px solid var(--border); padding: 22px 0; }
.faq-item:first-child { padding-top: 0; }
.faq-item h3 { font-size: 18px; font-weight: 600; color: var(--fg-strong); margin-bottom: 10px; letter-spacing: -0.01em; }
.faq-item p { font-size: 15.5px; color: var(--fg-muted); line-height: 1.65; margin-bottom: 10px; }
.faq-item p:last-child { margin-bottom: 0; }

/* restore card */
.restore-screen { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 48px 24px; }
.restore-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); padding: 40px; text-align: center; }
.restore-card .mark { width: 44px; height: 44px; border-radius: 11px; margin: 0 auto 20px; }
.restore-card h1 { font-size: 26px; font-weight: 700; color: var(--fg-strong); letter-spacing: -0.015em; margin-bottom: 10px; }
.restore-card p { font-size: 15px; color: var(--fg-muted); margin-bottom: 22px; }
.restore-card .field { text-align: left; margin-bottom: 16px; }
.restore-card label { display: block; font-size: 13px; font-weight: 550; color: var(--fg-strong); margin-bottom: 7px; }
.restore-card input[type=email], .restore-card input[type=text] { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md); font-size: 15px; background: var(--surface); color: var(--fg); }
.restore-card .btn { width: 100%; }
.restore-card .status { margin-top: 18px; font-size: 13.5px; min-height: 20px; }
.restore-card .status.ok { color: var(--success); }
.restore-card .status.err { color: var(--accent); }
.restore-card .help { margin-top: 22px; font-size: 13px; color: var(--fg-faint); }
.restore-card .help a { color: var(--accent); }

/* demo gif slot */
.demo-slot { aspect-ratio: 720 / 405; width: 100%; max-width: 720px; border: 1px dashed var(--border-strong); border-radius: var(--r-xl); background: repeating-linear-gradient(135deg, var(--surface-2) 0 14px, var(--bg) 14px 28px); display: grid; place-items: center; text-align: center; color: var(--fg-faint); }
.demo-slot .label { font-family: var(--font-mono); font-size: 12.5px; }
.demo-slot .dim { font-size: 11px; margin-top: 6px; }

/* ---------- 12. Tweaks dev panel ---------- */
.tweaks {
  position: fixed; top: 14px; right: 14px; z-index: 90; width: 248px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); font-size: 13px; overflow: hidden;
}
.tweaks-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
.tweaks-head .t { font-weight: 600; color: var(--fg-strong); font-size: 12.5px; letter-spacing: -0.01em; }
.tweaks-head .badge-free { margin-left: auto; font-size: 10px; padding: 2px 7px; }
.tweaks-head .chev { color: var(--fg-faint); transition: transform .2s; }
.tweaks.collapsed .tweaks-body { display: none; }
.tweaks.collapsed .chev { transform: rotate(-90deg); }
.tweaks-body { padding: 6px 13px 13px; max-height: 80vh; overflow-y: auto; }
.tw-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.tw-row:last-child { border-bottom: none; }
.tw-row > label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--fg-faint); font-family: var(--font-mono); margin-bottom: 8px; }
.tw-seg { display: flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.tw-seg button { flex: 1; padding: 6px 4px; border-radius: 6px; font-size: 12px; font-weight: 550; color: var(--fg-muted); transition: background .12s, color .12s; }
.tw-seg button.active { background: var(--surface); color: var(--fg-strong); box-shadow: var(--shadow-sm); }
.tw-seg button.active.rust { color: var(--accent); }

/* ---------- 11.5. Blog (index + post) ---------- *
   Long-form content section. Index lists article cards; posts reuse the
   shared .prose-layout (with sticky TOC) from §11 so they pick up the
   same mobile-responsive prose treatment as /privacy and /pro-faq. The
   only blog-specific additions are: the .blog-index card row, an
   honest-disclosure callout variant, and a .compare-table that uses
   the same mobile table→stacked-cards transform as the home .matrix. */
.blog-index { display: grid; gap: 28px; max-width: var(--maxw-prose); margin-inline: auto; }
.blog-card {
  display: grid; grid-template-columns: auto 1fr; gap: 28px;
  padding: 28px 32px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.blog-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.blog-card .date-pill {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  background: var(--surface-2); color: var(--fg-muted);
  padding: 8px 14px; border-radius: var(--r-md); align-self: start; white-space: nowrap;
}
.blog-card h2 {
  font-size: 24px; font-weight: 700; color: var(--fg-strong);
  letter-spacing: -0.012em; line-height: 1.18; margin-bottom: 10px;
  text-wrap: balance;
}
.blog-card h2 a:hover { color: var(--accent); }
.blog-card .meta {
  display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px;
  color: var(--fg-faint); font-family: var(--font-mono); margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.blog-card .meta .tag {
  background: var(--accent-subtle); color: var(--accent-ink);
  padding: 3px 9px; border-radius: var(--r-pill); font-size: 11px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.blog-card .excerpt { font-size: 15.5px; color: var(--fg-muted); line-height: 1.6; text-wrap: pretty; }
.blog-card .read-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 550; color: var(--accent); margin-top: 14px;
}

/* Article meta row under the page-hero on a post page. */
.article-meta {
  display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px;
  font-size: 13.5px; color: var(--fg-faint); font-family: var(--font-mono);
}
.article-meta .dot { color: var(--fg-faint); opacity: .5; }
.article-meta .tag {
  background: var(--accent-subtle); color: var(--accent-ink);
  padding: 3px 10px; border-radius: var(--r-pill); font-size: 11px;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* Honest-disclosure callout — used in the comparison article to flag
   "I built one of these" before the methodology. Variant of .callout. */
.prose .callout.disclosure { background: var(--surface-2); border-color: var(--border-strong); }
.prose .callout.disclosure::before {
  content: "Disclosure"; display: block;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-faint); margin-bottom: 8px;
}

/* Comparison table — desktop layout. Mobile transform lives in §13
   responsive (table→stacked cards with data-label ::before, same
   pattern as the home destination .matrix). */
.compare-table {
  width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 24px 0;
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top;
}
.compare-table thead th {
  background: var(--surface-2); color: var(--fg-strong);
  font-weight: 600; font-size: 13px; letter-spacing: 0.02em;
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr.us { background: color-mix(in srgb, var(--accent-subtle) 50%, transparent); }
.compare-table tbody tr.us td:first-child { font-weight: 700; color: var(--accent-ink); }
.compare-table td .good { color: var(--success); font-weight: 600; }
.compare-table td .bad { color: var(--fg-faint); }
.compare-table td .partial { color: var(--accent-ink); }

/* ---------- 13. Responsive ---------- */
@media (max-width: 960px) {
  .hero-split .grid, .hero-compare .grid, .pro-card { grid-template-columns: 1fr; gap: 36px; }
  .hero-stage { min-height: auto; display: flex; flex-direction: column; align-items: center; gap: 24px; }
  .hero-stage .flow-arrow { transform: rotate(90deg); }
  .hero-split .popup { margin-left: 0; }
  .hero-split .md-card { position: static; transform: none; max-width: 380px; width: 100%; }
  .why-grid, .cred-grid { grid-template-columns: 1fr 1fr; }
  .prose-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; display: none; }
  .blog-card { grid-template-columns: 1fr; gap: 14px; padding: 24px 22px; }
  .blog-card .date-pill { justify-self: start; }
}
@media (max-width: 680px) {
  .wrap { padding-inline: 22px; }
  .site-header .wrap { gap: 14px; }
  .brand .wordmark { display: none; }
  .popup { max-width: 100%; }
  .hero-split .md-card { max-width: 100%; }
  .why-grid, .cred-grid, .ba-grid { grid-template-columns: 1fr; }
  .ba-body { min-height: auto; padding: 16px 18px; overflow-x: auto; }
  .nav .hide-sm { display: none; }
  .matrix thead { display: none; }
  .matrix, .matrix tbody, .matrix tr, .matrix td { display: block; width: 100%; }
  .matrix tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .matrix td { border: none; padding: 6px 18px; }
  .matrix td.best { max-width: none; }
  .matrix .dest .name { white-space: normal; }
  .matrix td:nth-child(2)::before { content: "Works offline: "; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-faint); display: block; margin-bottom: 4px; }
  .matrix td:nth-child(3)::before { content: "Best for: "; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-faint); display: block; margin-bottom: 4px; }
  /* Comparison table → stacked cards (mirrors the .matrix transform).
     Each <td> after the first uses data-label="..." to source the
     mono-uppercase label via ::before. */
  .compare-table thead { display: none; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table td { display: block; width: 100%; }
  .compare-table tr { border-bottom: 1px solid var(--border); padding: 14px 18px; background: var(--surface); }
  .compare-table tr.us { background: var(--accent-subtle); }
  .compare-table td { border: none; padding: 6px 0; }
  .compare-table td:first-child { font-weight: 700; color: var(--fg-strong); font-size: 15.5px; margin-bottom: 8px; }
  .compare-table td:not(:first-child)::before {
    content: attr(data-label) ": ";
    font-family: var(--font-mono); font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--fg-faint); display: block; margin-bottom: 4px;
  }
  .pro-card { padding: 28px; gap: 28px; }
  .price-box { padding: 22px 18px; }
  .price-box .now { font-size: 40px; }
  .footer-cols { gap: 32px; width: 100%; }
  .footer-legal { flex-direction: column; text-align: center; gap: 6px; }
  .tweaks { display: none; }
}
@media (max-width: 480px) {
  section.band { padding-block: 64px; }
  h1.display { font-size: clamp(28px, 8vw, 40px); }
  h2.display { font-size: clamp(24px, 6vw, 32px); }
  .hero-copy, .hero-stage { min-width: 0; overflow-wrap: break-word; }
  .hero-eyebrow { flex-wrap: wrap; }
  .eyebrow { white-space: normal; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .section-head { margin-bottom: 32px; }
  .why-cell { padding: 22px 20px; }
  .cred-card { padding: 22px; }
  .blog-card { padding: 22px 18px; }
  .blog-card h2 { font-size: 21px; }
  .article-meta { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
