/* ==========================================================================
   FFmpeguru theme

   Implemented from the Stitch project "FFmpeguru Design System"
   (project 6894168197769285845): wordmark with $ prompt and block cursor,
   input card with a status footer bar, result card with a titled header bar
   and syntax-highlighted command, large section headings with circular
   icons, and numbered section chips on the docs pages.

   The Stitch project is DARK-only, so the light palette is derived from its
   own inverse_* tokens and contrast-checked separately:

     dark  - body 14.33:1  muted 10.88:1  primary 10.93:1
     light - body 15.32:1  muted  7.12:1  primary  5.96:1

   Dark is the default. `data-theme` on <html> forces a choice; without it
   prefers-color-scheme decides.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #0b141c;
  --surface: #0b141c;
  --surface-lowest: #060f16;
  --surface-low: #141c24;
  --surface-container: #182028;
  --surface-high: #222b33;
  --surface-highest: #2d363e;

  --on-surface: #dae3ee;
  --on-surface-variant: #bdcab8;
  --outline: #879484;
  --outline-variant: #3e4a3c;

  --primary: #67df70;
  --primary-container: #3fb950;
  --on-primary: #00390d;
  --on-primary-container: #004311;

  --secondary: #a2c9ff;
  --on-secondary-container: #f0f4ff;

  --tertiary: #fabc45;
  --on-tertiary-container: #4c3400;

  --error: #ffb4ab;
  --on-error: #690005;

  /* Command syntax roles, per the design. */
  --syn-bin: #67df70;   /* ffmpeg, and codec/format values */
  --syn-flag: #fabc45;  /* every -flag */
  --syn-out: #dae3ee;   /* output filename */

  /* Code-block token roles, for the docs highlighter. */
  --tok-cmd: #67df70;
  --tok-word: #dae3ee;
  --tok-flag: #fabc45;
  --tok-str: #83fc89;
  --tok-key: #a2c9ff;
  --tok-num: #fabc45;
  --tok-const: #a2c9ff;
  --tok-url: #a2c9ff;
  --tok-comment: #6f7d74;
  --tok-punct: #879484;

  --code-bg: var(--surface-lowest);
  --code-border: var(--outline-variant);

  --radius: 6px;
  --radius-lg: 12px;
  --content: 1280px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-lowest: #ffffff;
  --surface-low: #eef1f4;
  --surface-container: #eef1f4;
  --surface-high: #e6eaee;
  --surface-highest: #dde3e8;
  --on-surface: #1a1f24;
  --on-surface-variant: #4a545e;
  --outline: #a8b2a3;
  --outline-variant: #d3dad0;
  --primary: #006e21;
  --primary-container: #c8e6c9;
  --on-primary: #ffffff;
  --on-primary-container: #00210b;
  --secondary: #0b57a4;
  --on-secondary-container: #001c38;
  --tertiary: #8a5a00;
  --on-tertiary-container: #271900;
  --error: #b3261e;
  --on-error: #ffffff;
  --syn-bin: #006e21;
  --syn-flag: #8a5a00;
  --syn-out: #1a1f24;
  --tok-cmd: #006e21;
  --tok-word: #1a1f24;
  --tok-flag: #8a5a00;
  --tok-str: #045a1c;
  --tok-key: #0b57a4;
  --tok-num: #8a5a00;
  --tok-const: #0b57a4;
  --tok-url: #0b57a4;
  --tok-comment: #7a847c;
  --tok-punct: #6b7670;
  --code-bg: #eef1f4;
  --code-border: #d3dad0;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-lowest: #ffffff;
    --surface-low: #eef1f4;
    --surface-container: #eef1f4;
    --surface-high: #e6eaee;
    --surface-highest: #dde3e8;
    --on-surface: #1a1f24;
    --on-surface-variant: #4a545e;
    --outline: #a8b2a3;
    --outline-variant: #d3dad0;
    --primary: #006e21;
    --primary-container: #c8e6c9;
    --on-primary: #ffffff;
    --on-primary-container: #00210b;
    --secondary: #0b57a4;
    --on-secondary-container: #001c38;
    --tertiary: #8a5a00;
    --on-tertiary-container: #271900;
    --error: #b3261e;
    --on-error: #ffffff;
    --syn-bin: #006e21;
    --syn-flag: #8a5a00;
    --syn-out: #1a1f24;
    --tok-cmd: #006e21;
    --tok-word: #1a1f24;
    --tok-flag: #8a5a00;
    --tok-str: #045a1c;
    --tok-key: #0b57a4;
    --tok-num: #8a5a00;
    --tok-const: #0b57a4;
    --tok-url: #0b57a4;
    --tok-comment: #7a847c;
    --tok-punct: #6b7670;
    --code-bg: #eef1f4;
    --code-border: #d3dad0;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--on-surface);
  font: 16px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; font-weight: 700; }
h1 { font-size: 2.75rem; letter-spacing: -0.03em; }
h2 { font-size: 1.75rem; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 16px; }

.wrap { max-width: var(--content); margin: 0 auto; padding: 0 32px; }

/* ---- Header ------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}

.site-head-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 40px;
}

/* "$ ffmpeguru ▌" — the prompt glyph and the block cursor are the mark. */
.site-title {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: var(--on-surface);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.site-title:hover { text-decoration: none; }
.site-title .prompt,
.site-title .cursor {
  color: var(--primary);
  font-family: var(--font-mono);
}
.site-title .cursor { animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .site-title .cursor { animation: none; }
}

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a { font-size: 0.98rem; color: var(--on-surface-variant); }
.site-nav a:hover { color: var(--on-surface); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--on-surface); font-weight: 600; }

/* Three-state switch: light, dark, match the system. */
.theme-switch {
  margin-left: auto;
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: 999px;
}
.theme-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--on-surface-variant);
  width: 30px; height: 26px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-btn:hover { color: var(--on-surface); }
.theme-btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }

/* ---- Main / footer ------------------------------------------------------ */

.site-main { padding: 48px 0 96px; }

.site-foot { border-top: 1px solid var(--outline-variant); }
.site-foot-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 26px 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font: 400 0.82rem/1.5 var(--font-mono);
  color: var(--on-surface-variant);
}
.site-foot a { color: var(--on-surface-variant); }
.site-foot a:hover { color: var(--primary); }

/* ---- Hero --------------------------------------------------------------- */

.hero { margin: 28px 0 36px; max-width: 1120px; }
.hero .kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 0.74rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 20px;
}
.hero .kicker .dot-led {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--secondary);
}
.hero .kicker .sep { color: var(--outline); }
.hero h1 { margin-bottom: 18px; }
.hero-lede {
  color: var(--on-surface-variant);
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 0;
}

/* ---- Input card --------------------------------------------------------- */

/* No max-width: the input card spans the full content column so its right
   edge lines up with the "From the blog" grid below it. */
.ask { max-width: none; }

.ask-form {
  position: relative;
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.12s ease;
}
.ask-form:focus-within { border-color: var(--outline); }

.ask-form textarea {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--on-surface);
  padding: 22px 24px 16px 50px;
  font: 400 1.05rem/1.6 var(--font-sans);
  resize: vertical;
  min-height: 122px;
}
.ask-form textarea::placeholder { color: var(--on-surface-variant); opacity: 0.65; }
.ask-form textarea:focus { outline: none; }

.ask-prompt {
  position: absolute;
  top: 21px;
  left: 24px;
  color: var(--secondary);
  font: 500 1.05rem/1.6 var(--font-mono);
  pointer-events: none;
  user-select: none;
}

/* Status footer inside the card: counter, shortcut, and the action. */
.ask-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px 12px 22px;
  border-top: 1px solid var(--outline-variant);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  font: 400 0.78rem/1.4 var(--font-mono);
  color: var(--on-surface-variant);
}
.ask-count { white-space: nowrap; }
.ask-count.is-over { color: var(--error); }
.ask-shortcut { display: inline-flex; align-items: center; gap: 6px; }
kbd {
  font: 500 0.72rem/1 var(--font-mono);
  background: var(--surface-high);
  border: 1px solid var(--outline-variant);
  border-radius: 4px;
  padding: 3px 6px;
  color: var(--on-surface-variant);
}

.ask-actions { margin-left: auto; }

.btn-primary {
  appearance: none;
  background: var(--primary);
  color: var(--on-primary);
  border: 0;
  border-radius: var(--radius);
  padding: 10px 18px;
  font: 600 0.92rem/1 var(--font-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:disabled { opacity: 0.45; cursor: progress; }

.ask-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  font: 500 0.8rem/1.5 var(--font-mono);
  color: var(--on-surface-variant);
}
.ask-status.is-error { color: var(--error); }
.ask-status.is-done { color: var(--primary); }
.ask-status .dot-led {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 8px;
  vertical-align: 1px;
}

/* ---- Result card -------------------------------------------------------- */

.ask-result { margin-top: 28px; }

.result-card {
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Titled header bar, as in the design. */
.result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface-high);
  border-bottom: 1px solid var(--outline-variant);
  font: 600 0.8rem/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface);
}
.result-head .dot-led {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--primary);
  flex: none;
}
.result-head .sep { color: var(--outline); letter-spacing: 0; }
.result-head .spec {
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: none;
  font-weight: 500;
}

.copy-btn {
  margin-left: auto;
  appearance: none;
  background: transparent;
  border: 1px solid var(--outline-variant);
  color: var(--on-surface-variant);
  border-radius: var(--radius);
  padding: 6px 11px;
  font: 500 0.72rem/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.copy-btn:hover { color: var(--primary); border-color: var(--primary); }

.result-body { padding: 4px 18px 20px; background: var(--surface-low); }

.command-block { margin: 0; padding: 18px 0 6px; }
.command-block pre { margin: 0; overflow-x: auto; }
.command-block code {
  font: 400 1rem/1.7 var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--on-surface);
}
.syn-bin  { color: var(--syn-bin);  font-weight: 600; }
.syn-flag { color: var(--syn-flag); }
.syn-out  { color: var(--syn-out); font-weight: 600; }

/* Large section heading with a circular icon. */
.result-section { padding: 18px 0 4px; }
.result-section h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.6rem;
  margin: 0 0 12px;
  color: var(--on-surface);
}
.result-section .icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex: none;
  color: var(--bg);
}
.result-section .icon--why { background: var(--primary); }
.result-section .icon--notes { background: var(--tertiary); }

.result-section p { max-width: 78ch; color: var(--on-surface); }
.result-section ul { margin: 0; padding-left: 22px; }
.result-section li { margin: 8px 0; }
.result-notes li::marker { color: var(--tertiary); }

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-top: 1px solid var(--outline-variant);
  background: var(--surface);
  font: 500 0.78rem/1.5 var(--font-mono);
  color: var(--on-surface-variant);
}
.result-meta .chip {
  background: var(--surface-high);
  border: 1px solid var(--outline-variant);
  border-radius: 5px;
  padding: 4px 9px;
}
.result-meta .is-memory { color: var(--primary); }
.result-meta .is-degraded { color: var(--error); }
.result-meta .sep { color: var(--outline); }
.result-meta .right { margin-left: auto; }

/* ---- Blog --------------------------------------------------------------- */

.latest { margin-top: 72px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.section-head h2 { margin: 0; }

.post-list {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.post-card {
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 230px;
}
.post-card .cat {
  font: 600 0.72rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.post-card h3 { margin: 0 0 16px; font-size: 1.3rem; line-height: 1.3; }
.post-card h3 a { color: var(--on-surface); }
.post-card h3 a:hover { color: var(--primary); text-decoration: none; }
.post-card .post-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 400 0.8rem/1 var(--font-mono);
  color: var(--on-surface-variant);
}
.post-card .arrow { color: var(--on-surface); font-size: 1rem; }

.section-foot { display: flex; gap: 28px; margin-top: 22px; font-size: 0.92rem; }

/* ---- Docs --------------------------------------------------------------- */

/* Terminal-style path, e.g. "docs / v1 / http-api-reference". */
.doc-path {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 0.95rem/1 var(--font-mono);
  color: var(--on-surface-variant);
  margin: 0 0 28px;
}
.doc-path .seg { color: var(--on-surface); }
.doc-path .seg--accent { color: var(--primary); }
.doc-path .sep { color: var(--outline); }

.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.badge {
  font: 500 0.78rem/1 var(--font-mono);
  border-radius: 6px;
  padding: 7px 12px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  color: var(--on-surface-variant);
}
.badge--accent {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.layout-docs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 64px;
  align-items: start;
}
@media (max-width: 1040px) {
  .layout-docs { grid-template-columns: minmax(0, 1fr); }
  .docs-toc { display: none; }
}

.docs-toc { position: sticky; top: 96px; font-size: 0.88rem; }
.docs-toc h2 {
  font: 600 0.72rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 14px;
}
.docs-toc ul { list-style: none; margin: 0; padding: 0; }
.docs-toc li { margin: 0 0 10px; }
.docs-toc a { color: var(--on-surface-variant); }
.docs-toc a:hover, .docs-toc a.is-active { color: var(--primary); text-decoration: none; }

.docs-body { max-width: 820px; }
.docs-body h2 {
  margin: 56px 0 18px;
  font-size: 1.9rem;
  display: flex;
  align-items: center;
  gap: 14px;
  scroll-margin-top: 100px;
}
.docs-body h2:first-child { margin-top: 0; }
.docs-body h3 { margin: 34px 0 12px; font-size: 1.2rem; scroll-margin-top: 100px; }

/* Numbered chip in front of each h2, added by ffmpeguru.js. */
.sec-num {
  font: 600 0.85rem/1 var(--font-mono);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  border-radius: 5px;
  padding: 6px 8px;
  flex: none;
}

.docs-body p, .post-content p { color: var(--on-surface); max-width: 74ch; }
.docs-body ul, .docs-body ol, .post-content ul, .post-content ol { padding-left: 24px; }
.docs-body li, .post-content li { margin: 8px 0; }
.docs-body img, .post-content img { max-width: 100%; border-radius: var(--radius-lg); }

.docs-body pre, .post-content pre {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  overflow-x: auto;
  margin: 20px 0;
}
.docs-body pre code, .post-content pre code { font: 400 0.9rem/1.75 var(--font-mono); }

.docs-body :not(pre) > code, .post-content :not(pre) > code {
  background: var(--surface-high);
  border: 1px solid var(--outline-variant);
  border-radius: 5px;
  padding: 2px 7px;
  font: 500 0.86em/1 var(--font-mono);
  color: var(--primary);
}

.method-chip {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 5px;
  padding: 4px 10px;
  font: 700 0.78rem/1 var(--font-mono);
  letter-spacing: 0.06em;
  margin-right: 10px;
}

.docs table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 0.95rem;
}
.docs th, .docs td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--outline-variant);
  vertical-align: top;
}
.docs th { color: var(--on-surface-variant); font-weight: 600; white-space: nowrap; }

.callout {
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 24px 0;
}
.callout--warn { border-left-color: var(--tertiary); }
.callout h3 { margin: 0 0 8px; }
.callout p:last-child { margin-bottom: 0; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--outline-variant);
  margin-top: 56px;
  padding-top: 22px;
  font-size: 0.92rem;
}

/* ---- Post --------------------------------------------------------------- */

.post-head { margin: 0 0 32px; }
.post-head h1 { max-width: 900px; }
.post-meta {
  font: 500 0.82rem/1.4 var(--font-mono);
  color: var(--on-surface-variant);
  margin: 16px 0 0;
}
.post-content { max-width: 820px; }

/* ---- Utilities ---------------------------------------------------------- */

.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;
}
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }

.kg-width-wide { width: 100%; }
.kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); }

/* ---- Post: author bar, blue section numbers, muted prose ---------------- */

.author-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin: 0 0 40px;
  max-width: 820px;
  font: 400 0.92rem/1.4 var(--font-sans);
  color: var(--on-surface-variant);
}
.author-bar .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-high);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 1rem/1 var(--font-mono);
  color: var(--primary);
  overflow: hidden;
  flex: none;
}
.author-bar .avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-bar .author-name { color: var(--on-surface); font-weight: 600; }
.author-bar .sep { color: var(--outline); }

/* The design numbers post sections `#01` in blue, while the docs pages use a
   green chip - two different components, so they get different classes. */
.post-content h2 { counter-increment: sec; }
.post-content { counter-reset: sec; }
.post-content h2 .sec-num {
  background: none;
  border: 0;
  padding: 0;
  color: var(--secondary);
  font-weight: 500;
}
.post-content h2 .sec-num::before { content: "#"; }

/* Body copy in the design sits back from the headings. */
.post-content p,
.post-content li { color: var(--on-surface-variant); }
.post-content h3 { color: var(--on-surface); }
.post-content h2 code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92em;
}

/* Code block header bar: a green label on the left, filename on the right. */
.post-content pre { padding-top: 44px; }
.post-content pre::before {
  content: attr(data-label);
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--code-border);
  background: var(--surface-high);
  color: var(--primary);
  font: 600 0.72rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Docs code highlighting -------------------------------------------- */

.docs pre code .tok-cmd,
.post-content pre code .tok-cmd { color: var(--tok-cmd); font-weight: 600; }
.docs pre code .tok-word,
.post-content pre code .tok-word { color: var(--tok-word); }
.docs pre code .tok-flag,
.post-content pre code .tok-flag { color: var(--tok-flag); }
.docs pre code .tok-str,
.post-content pre code .tok-str { color: var(--tok-str); }
.docs pre code .tok-key,
.post-content pre code .tok-key { color: var(--tok-key); }
.docs pre code .tok-num,
.post-content pre code .tok-num { color: var(--tok-num); }
.docs pre code .tok-const,
.post-content pre code .tok-const { color: var(--tok-const); }
.docs pre code .tok-url,
.post-content pre code .tok-url { color: var(--tok-url); text-decoration: underline; text-underline-offset: 2px; }
.docs pre code .tok-comment,
.post-content pre code .tok-comment { color: var(--tok-comment); font-style: italic; }
.docs pre code .tok-punct,
.post-content pre code .tok-punct { color: var(--tok-punct); }

/* ---- Blog index --------------------------------------------------------- */

.blog-index { max-width: none; }
.post-list--index { list-style: none; margin: 0; }
.post-card[hidden] { display: none; }

.post-card-title { margin: 0 0 10px; font-size: 1.3rem; line-height: 1.3; }
.post-card-title a { color: var(--on-surface); }
.post-card-title a:hover { color: var(--primary); text-decoration: none; }
.post-card-excerpt {
  color: var(--on-surface-variant);
  font-size: 0.95rem;
  margin: 0 0 16px;
}

.pager--paged { justify-content: center; gap: 8px; flex-wrap: wrap; }
.pager--paged a {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius);
  color: var(--on-surface-variant);
  text-decoration: none;
  font: 500 0.88rem/1 var(--font-mono);
}
.pager--paged a:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }
.pager--paged a[aria-current="page"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}
