/* Skim site design system. Dark-first, editorial, typography-led.
   Inspiration (taste, not templates): linear.app restraint, charm.sh
   personality, raycast.com feature storytelling. */
:root {
  --bg: #0d1017; --panel: #161b26; --panel-2: #131a2b; --border: #2c3344;
  --accent: #7aa2ff; --accent-2: #ffd866; --text: #e8eaf0; --muted: #9aa3b8;
  --ok: #4ade80; --radius: 12px; --maxw: 68rem;
  --serif: "Skim Serif", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Skim Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
/* Light palette: applied when the OS asks for it (and no explicit choice),
   or when the toggle chose light. Keep both blocks in sync. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff; --panel: #f5f7fb; --panel-2: #eef3ff; --border: #dfe3ec;
    --accent: #3b5fd9; --accent-2: #b7791f; --text: #1c2130; --muted: #5b6478;
    --ok: #15803d;
  }
}
:root[data-theme="light"] {
  --bg: #ffffff; --panel: #f5f7fb; --panel-2: #eef3ff; --border: #dfe3ec;
  --accent: #3b5fd9; --accent-2: #b7791f; --text: #1c2130; --muted: #5b6478;
  --ok: #15803d;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.7 var(--serif); overflow-x: hidden; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); }
img, svg, video { max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--accent); color: var(--bg); padding: 6px 10px; border-radius: 6px; z-index: 10; }
.muted { color: var(--muted); }
/* Inline code outside article prose (hero, cards, section copy) still gets
   the product mono, as a quiet chip. Rendered demo output keeps skim.css. */
.hero code, .card code, .section p code { font: 0.85em var(--mono); background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.eyebrow { display: block; font: 600 13px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }

/* Brand mark: three shortening reading lines, with the extension icon's warm
   accent dot at the lower right so the site mark matches the product icon. */
.lines { position: relative; display: inline-flex; flex-direction: column; gap: 3px; vertical-align: -2px; margin-right: 10px; padding-right: 5px; }
.lines span { display: block; height: 3px; border-radius: 2px; }
.lines span:nth-child(1) { width: 20px; background: var(--text); }
.lines span:nth-child(2) { width: 14px; background: var(--accent); }
.lines span:nth-child(3) { width: 8px;  background: var(--muted); }
.lines::after { content: ""; position: absolute; right: 0; bottom: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--accent-2); }

/* Header (UI chrome uses the sans stack, prose stays serif) */
.site-head { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); z-index: 5; font-family: var(--sans); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; font-size: 19px; transition: opacity 0.15s; }
.brand:hover { opacity: 0.82; }
.site-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.site-nav > a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 8px; transition: color 0.15s, background 0.15s; }
.site-nav > a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.site-nav a[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.nav-gh, .nav-ext { display: inline-flex; align-items: center; gap: 6px; }
.nav-gh svg, .nav-ext svg { opacity: 0.85; }
.theme-btn { background: none; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); width: 32px; height: 32px; font-size: 15px; cursor: pointer; line-height: 1; transition: color 0.15s, border-color 0.15s, transform 0.15s; }
/* Real tap target is 44px even though the visible chip stays 32px: a
   transparent halo extends the hit area without changing how it looks. */
.theme-btn { position: relative; }
.theme-btn::before { content: ""; position: absolute; inset: -6px; }
.theme-btn:hover { color: var(--text); border-color: var(--accent); transform: rotate(-18deg); }

/* Install button: the one moment of playful color on the page. Two-tone pill,
   the browser logo lives in a light left segment that's part of the button
   (a shared rounded shape, not a floating circle) so any logo, including
   negative-space marks like Opera's ring, reads on it. The button lifts and
   the logo nudges on hover. */
.install-cta { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.btn-chrome { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; padding: 11px 20px 11px 14px; border-radius: 12px; background: var(--accent); color: var(--bg); font-family: var(--sans); border: 1px solid transparent; box-shadow: 0 6px 20px -6px color-mix(in srgb, var(--accent) 65%, transparent); transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s; }
.btn-chrome:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px color-mix(in srgb, var(--accent) 70%, transparent); filter: brightness(1.03); }
.btn-chrome:active { transform: translateY(0); }
/* The browser mark sits in a round white chip that spins a third-turn on
   hover, the button's one flourish. */
.cmark-wrap { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: #fff; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.cmark { width: 22px; height: 22px; transition: transform 0.55s cubic-bezier(.2,.9,.3,1); }
.btn-chrome:hover .cmark { transform: rotate(120deg); }
.bi-text { display: inline-flex; flex-direction: column; line-height: 1.16; text-align: left; }
.bi-label { font-weight: 700; font-size: 16px; }
.bi-sub { font-size: 12px; opacity: 0.82; font-weight: 500; margin-top: 1px; }
.install-alt { font: 14px var(--sans); color: var(--muted); text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--muted) 55%, transparent); padding-bottom: 1px; }
.install-alt:hover { color: var(--accent); border-color: var(--accent); }
/* Compact variant lives in the header bar: chip + label, no subline. Its
   label is set to white explicitly: var(--bg) (the full-size button's text
   color) is dark in dark theme, but the chip's accent background is a
   lighter tint up here, so a plain white label reads reliably in both
   themes without depending on the current --bg value. */
.btn-chrome.compact { padding: 5px 15px 5px 6px; border-radius: 999px; gap: 8px; box-shadow: none; color: #fff; }
.btn-chrome.compact .cmark-wrap { width: 26px; height: 26px; }
.btn-chrome.compact .cmark { width: 18px; height: 18px; }
.btn-chrome.compact .bi-label { font-size: 14px; }

/* Ghost button: quiet, outlined, for secondary/trust actions. */
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); font: 600 14px var(--sans); background: var(--panel); transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-1px); }

/* Footer */
.site-foot { border-top: 1px solid var(--border); margin-top: 88px; padding: 48px 0 40px; font-size: 15px; font-family: var(--sans); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel) 55%, transparent)); }
.foot-top { display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; }
.foot-lead { max-width: 32ch; }
.foot-brand { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; font-size: 20px; }
.foot-brand .lines { vertical-align: baseline; }
.foot-tag { font-family: var(--serif); font-size: 18px; margin: 12px 0 6px; color: var(--text); }
.foot-tag em, .foot-mini { }
.foot-mini { margin: 0 0 16px; font-size: 14px; }
.foot-gh { color: var(--text); }
.foot-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-h { font-weight: 700; margin: 0 0 10px; color: var(--text); }
.site-foot .foot-links a { display: block; color: var(--muted); text-decoration: none; margin: 7px 0; }
.site-foot .foot-links a:hover { color: var(--accent); }
.foot-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* Buttons, pills, cards, CTA */
.btn { display: inline-block; padding: 11px 22px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font: 600 16px var(--sans); background: var(--panel); cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn:hover { filter: brightness(1.1); }
.pill { display: inline-block; font: 13px var(--mono); border: 1px solid var(--border); border-radius: 999px; padding: 2px 12px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 20px 22px; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 48%, var(--border)); box-shadow: 0 14px 34px -18px color-mix(in srgb, var(--accent) 60%, transparent); }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; font-family: var(--sans); }
/* Feature card icon: a rounded accent tile with a stroked glyph. */
.card-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
.card-ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card-ico { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.cta-box { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin: 36px 0; }
.cta-box p { margin: 0; }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* Article prose (guides, posts) */
.prose { max-width: 46rem; margin: 0 auto; padding: 40px 20px 0; }
.prose h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 10px; }
.prose h2 { margin: 2em 0 0.6em; font-size: 26px; letter-spacing: -0.01em; }
.prose h3 { margin: 1.6em 0 0.5em; font-size: 20px; }
.prose .byline { color: var(--muted); font-size: 15px; font-family: var(--sans); margin-bottom: 28px; }
.prose li { margin: 6px 0; }
.prose code { background: var(--panel); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font: 0.85em var(--mono); }
.prose pre { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1em 0; padding: 2px 18px; color: var(--muted); }

/* Tables always scroll inside their own wrapper, never the page. */
.table-scroll { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--border); border-radius: var(--radius); }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 560px; font: 15px var(--sans); }
.table-scroll th, .table-scroll td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table-scroll th { background: var(--panel); }
.table-scroll tr:last-child td { border-bottom: 0; }
td.yes { color: var(--text); } td.no { color: var(--muted); }
/* Yes/no cells lead with a glyph so the eye scans the column, not the prose. */
.compare td.yes::before, .compare td.no::before { display: inline-block; width: 1.15em; font-weight: 700; }
.compare td.yes::before { content: "✓"; color: var(--ok); }
.compare td.no::before { content: "✕"; color: color-mix(in srgb, var(--muted) 70%, transparent); }

/* Landing hero */
.hero { padding: 72px 20px 36px; text-align: left; }
.hero h1 { font-size: clamp(36px, 6.2vw, 62px); line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 16px; max-width: 15ch; }
/* The landing page's single warm-accent moment: the promise in the headline.
   Nothing else on the page uses --accent-2. */
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero .sub { color: var(--muted); font-size: 20px; margin: 0 0 26px; max-width: 46ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { font: 14px var(--sans); color: var(--muted); margin-top: 14px; }

/* Two-column hero: headline + CTA on the left, an auto-advancing screenshot
   gallery on the right, so the page opens with product imagery above the fold. */
.hero-split { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 48px; align-items: center; padding-top: 60px; }
.hero-split .hero-lead h1 { max-width: 16ch; }
.hero-split .sub { max-width: 44ch; }
.hero-gallery { display: flex; flex-direction: column; gap: 13px; }
.gal { position: relative; aspect-ratio: 1280 / 800; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6); }
.gal-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s ease; }
.gal-img.active { opacity: 1; }
.gal-dots { display: flex; gap: 7px; justify-content: center; }
.gal-dot { position: relative; width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--muted) 45%, transparent); cursor: pointer; transition: background 0.2s, transform 0.2s; }
/* Same halo trick as the theme toggle: a bigger invisible hit area around
   the small visible dot, so the gallery is easy to drive on a phone. */
.gal-dot::before { content: ""; position: absolute; inset: -18px; }
.gal-dot:hover { background: var(--muted); }
.gal-dot.active { background: var(--accent); transform: scale(1.25); }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .hero-split .hero-lead h1 { max-width: 15ch; }
}
@media (prefers-reduced-motion: reduce) { .gal-img { transition: none; } }

/* Live demo: source pane types itself, rendered pane follows. */
.demo { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: hidden; margin: 40px 0 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.demo-head { display: flex; align-items: center; flex-wrap: wrap; row-gap: 4px; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); font: 13px var(--mono); color: var(--muted); }
.demo-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
.demo-head .demo-live { color: var(--ok); }
.demo-replay { margin-left: auto; font: 13px var(--mono); }
/* min-height matches the panes' max-height cap below: the card is reserved
   at its finished size up front, so the typewriter run never grows it. */
.demo-body { display: grid; grid-template-columns: 1fr 1fr; min-height: 480px; }
.demo-src { margin: 0; padding: 18px; border-right: 1px solid var(--border); background: var(--bg); overflow: auto; max-height: 480px; }
.demo-src code { font: 13px/1.6 var(--mono); color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.demo-out { padding: 18px 22px; overflow: auto; max-height: 480px; }
@keyframes pulse { 50% { opacity: 0.3; } }
/* The agent's cursor: a block caret blinks in the source pane while the demo
   types, and disappears once the run finishes (Replay becomes visible). */
.demo-src code::after { content: ""; display: inline-block; width: 7px; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--accent); animation: caret 1.1s steps(2, start) infinite; }
.demo:has(.demo-replay:not([hidden])) .demo-src code::after { display: none; }
@keyframes caret { 50% { opacity: 0; } }
@media (max-width: 820px) {
  .demo-body { grid-template-columns: 1fr; }
  .demo-src { border-right: 0; border-bottom: 1px solid var(--border); max-height: 160px; }
}
@media (max-width: 480px) {
  /* The "editable" hint is a nice-to-have; on narrow phones it crowds the
     demo-head row next to the filename and live badge, so it drops. */
  .demo-edit { display: none; }
}

/* Scroll reveals: subtle, and off entirely for reduced motion. */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }
/* Card reveals arrive as a quiet left-to-right wave (per grid column). */
.cards .reveal:nth-child(3n + 2) { transition-delay: 70ms; }
.cards .reveal:nth-child(3n) { transition-delay: 140ms; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .demo-head .dot { animation: none; }
  .demo-src code::after { display: none; }
}

/* /ai page: numbered workflow list, and a compact static variant of .demo
   (no JS, no bundle load) used as an illustration rather than the live demo. */
.workflow { font: 16px/1.7 var(--sans); color: var(--text); padding-left: 22px; margin: 18px 0 0; }
.workflow li { margin: 10px 0; }
.workflow strong { color: var(--text); }
.demo.compact .demo-body { min-height: 220px; }
.demo.compact .demo-src, .demo.compact .demo-out { max-height: 220px; }
.demo-out.static .static-h1 { font: 700 20px var(--serif); margin: 0 0 10px; }
.demo-out.static .static-h2 { font: 700 15px var(--serif); margin: 16px 0 6px; }
.demo-out.static ul { margin: 0 0 10px; padding-left: 22px; }
.demo-out.static li { margin: 4px 0; }
.demo-out.static code { font: 0.85em var(--mono); background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.demo-out.static input[type="checkbox"] { margin-right: 6px; }

/* Section rhythm */
.section { padding: 48px 0 8px; }
.section > .wrap > h2 { font-size: clamp(24px, 3.5vw, 32px); letter-spacing: -0.01em; margin: 0 0 18px; }
/* Landing headings show their own markdown source: a ghost "##" in mono.
   The page quietly demonstrates the raw-to-rendered transformation Skim does. */
.md-h::before { content: "## "; font: 400 0.55em var(--mono); color: var(--muted); opacity: 0.6; letter-spacing: 0; vertical-align: 0.18em; }

/* Comparison table: Skim's column is spotlit (accent frame + tint) so the
   five-second scan lands on the right column first; row labels are set in the
   serif to add warmth, and rows lift on hover. */
.compare { min-width: 620px; }
.compare thead th { padding: 14px; font-weight: 700; }
.compare tbody td:first-child, .compare thead th:first-child { font-family: var(--serif); font-weight: 600; color: var(--text); font-size: 15.5px; }
.compare tbody tr { transition: background 0.12s; }
.compare tbody tr:hover td { background: color-mix(in srgb, var(--text) 4%, transparent); }
.compare th:nth-child(2), .compare td:nth-child(2) { background: var(--panel-2); border-left: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border)); border-right: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border)); }
.compare thead th:nth-child(2) { color: var(--accent); border-top: 2px solid var(--accent); border-top-left-radius: 6px; border-top-right-radius: 6px; }
.compare tbody tr:hover td:nth-child(2) { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.compare tbody tr:last-child td:nth-child(2) { border-bottom: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border)); }

/* Closing coda: one line, one button, centered. */
.closing { text-align: center; padding: 88px 0 12px; }
.closing .close-line { font-size: clamp(22px, 3vw, 30px); line-height: 1.3; letter-spacing: -0.01em; margin: 0 auto 24px; max-width: 26ch; }
.closing .close-line code { font: 0.85em var(--mono); background: var(--panel); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
.closing .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.closing .note { font: 14px var(--sans); color: var(--muted); margin-top: 16px; }

/* Viewer page */
.dropzone { display: grid; place-items: center; gap: 6px; text-align: center; padding: 56px 24px; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--panel); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--panel-2); }
.dropzone strong { font-size: 20px; }
.dropzone span { color: var(--muted); font: 15px var(--sans); }
.paste { margin: 14px 0; font-family: var(--sans); }
.paste textarea { width: 100%; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 12px; font: 14px/1.5 var(--mono); }
.out-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 24px 0 10px; margin-bottom: 18px; color: var(--muted); font: 14px var(--mono); }
.viewer-pane { font-size: 16.5px; line-height: 1.72; overflow-x: hidden; }

/* ---- Custom scrollbars (scoped to scrolling panels, not the page) -------
   The default OS scrollbar in the demo/viewer overflow read as clunky; this
   makes a thin, themed, rounded track that disappears into the surface. */
.demo-src, .demo-out, .viewer-pane, .prose pre, .table-scroll, .demo.compact .demo-src {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent;
}
.demo-src::-webkit-scrollbar, .demo-out::-webkit-scrollbar, .viewer-pane::-webkit-scrollbar, .prose pre::-webkit-scrollbar, .table-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.demo-src::-webkit-scrollbar-thumb, .demo-out::-webkit-scrollbar-thumb, .viewer-pane::-webkit-scrollbar-thumb, .prose pre::-webkit-scrollbar-thumb, .table-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 42%, transparent);
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
.demo-src::-webkit-scrollbar-thumb:hover, .demo-out::-webkit-scrollbar-thumb:hover, .viewer-pane::-webkit-scrollbar-thumb:hover, .prose pre::-webkit-scrollbar-thumb:hover, .table-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--muted); background-clip: padding-box;
}
.demo-src::-webkit-scrollbar-track, .demo-out::-webkit-scrollbar-track, .viewer-pane::-webkit-scrollbar-track, .prose pre::-webkit-scrollbar-track, .table-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---- Editable hero demo -------------------------------------------------
   Once the typewriter finishes, the source pane becomes a real editor: the
   page you're reading is proof the render keeps up with what you type. */
.demo-src code[contenteditable] { outline: none; caret-color: var(--accent); cursor: text; }
.demo-edit { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 12px var(--mono); color: var(--accent); opacity: 0; transition: opacity 0.3s; }
.demo:has(.demo-replay:not([hidden])) .demo-edit { opacity: 1; }
.demo-edit .dot-edit { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.demo-replay { margin-left: 14px; }

/* ---- Product screenshots / illustrations -------------------------------- */
.shot { display: block; width: 100%; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 24px 60px -28px rgba(0,0,0,0.55); background: var(--panel); }
figure.figure { margin: 28px 0 8px; }
figure.figure figcaption { margin-top: 10px; font: 14px var(--sans); color: var(--muted); text-align: center; }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.split.rev { grid-template-columns: 0.95fr 1.05fr; }

/* ---- Trust strip: open-source / privacy / free, at a glance ------------- */
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font: 14px var(--sans); color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { width: 16px; height: 16px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.trust a { color: var(--muted); text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--muted) 50%, transparent); }
.trust a:hover { color: var(--accent); border-color: var(--accent); }
.hero .install-cta { margin-top: 4px; }
.closing .install-cta { align-items: center; }

/* ---- Blog / guides hub: pick-a-card index ------------------------------- */
.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 8px; }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); text-decoration: none; color: var(--text); transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.post-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: 0 20px 44px -22px color-mix(in srgb, var(--accent) 55%, transparent); }
.post-card.feature { grid-column: 1 / -1; }
.post-thumb { aspect-ratio: 16 / 9; width: 100%; display: block; object-fit: cover; border-bottom: 1px solid var(--border); }
.post-card.feature .post-thumb { aspect-ratio: 21 / 7; }
/* Generated file-chip thumbnail: every post is about a kind of .md file, so
   the "image" is that filename, set big in the product mono on a soft accent
   wash. Zero image weight, and unmistakably on-theme. */
.pthumb { aspect-ratio: 16 / 9; display: grid; place-items: center; position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: radial-gradient(130% 120% at 18% 0%, color-mix(in srgb, var(--accent) 20%, var(--panel)) 0%, var(--panel) 62%); }
.post-card.feature .pthumb { aspect-ratio: 21 / 7; }
.pthumb .fname { font: 700 clamp(22px, 3.6vw, 34px) var(--mono); color: var(--text); letter-spacing: -0.02em; }
.pthumb .fname .ext { color: var(--accent); }
.pthumb .lines { position: absolute; top: 16px; left: 16px; margin: 0; }
.pthumb .ptag { position: absolute; bottom: 12px; right: 14px; font: 600 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.post-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-kicker { font: 600 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.post-card h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.post-card p { margin: 0; color: var(--muted); font: 15px var(--sans); }
.post-card .more { margin-top: auto; color: var(--accent); font: 600 14px var(--sans); }

/* ---- Install page: one card per browser --------------------------------- */
.browser-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 8px 0 12px; }
.browser-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--panel); text-decoration: none; color: var(--text); transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease; }
.browser-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: 0 16px 36px -20px color-mix(in srgb, var(--accent) 55%, transparent); }
.browser-card.on { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent) inset; }
.browser-card .more { margin-top: 14px; color: var(--accent); font: 600 14px var(--sans); }
.browser-card h3 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.browser-card .status { font: 12px var(--mono); color: var(--muted); }
.browser-card .status.ok { color: var(--ok); }
.browser-card .status.soon { color: var(--accent-2); }
.browser-card.soon { opacity: 0.68; cursor: default; }
.browser-card.soon:hover { transform: none; border-color: var(--border); box-shadow: none; }
.browser-card p { margin: 10px 0 0; color: var(--muted); font: 15px var(--sans); }
.browser-logo { width: 26px; height: 26px; flex: none; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 18px 0 0; font-family: var(--sans); }
.steps li { counter-increment: step; position: relative; padding: 0 0 16px 44px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font: 700 14px var(--sans); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 30px; bottom: 2px; width: 1px; background: var(--border); }

/* ---- Responsive ---------------------------------------------------------- */
/* Between tablet and desktop the full nav + CTA gets tight: drop the GitHub
   word (icon stays) and tighten spacing so nothing clips before the small-
   screen layout kicks in. */
@media (max-width: 1024px) {
  .site-nav { gap: 3px; }
  .site-nav > a { padding: 6px 9px; }
  .nav-gh span, .nav-ext span { display: none; }
}
@media (max-width: 860px) {
  .foot-top { grid-template-columns: 1fr; gap: 30px; }
  .foot-links { grid-template-columns: repeat(2, 1fr); }
  .split, .split.rev { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 680px) {
  .bar { gap: 10px 12px; min-height: 54px; padding-top: 8px; padding-bottom: 8px; }
  .site-nav { gap: 2px; width: 100%; justify-content: flex-start; }
  .site-nav > a { padding: 6px 8px; font-size: 14px; }
  .nav-gh span { display: none; }
  .btn-chrome.compact { margin-left: auto; }
  .hero { padding: 40px 0 24px; }
  .section { padding: 36px 0 8px; }
  .foot-bar { flex-direction: column; gap: 6px; }
}
@media (max-width: 420px) {
  .foot-links { grid-template-columns: 1fr; }
  .btn-chrome.compact .bi-label { display: none; }
  .btn-chrome.compact { padding: 6px; }
}
