/* ============================================================
   bradpeterson.com — custom CSS (single stylesheet by design)
   Architecture per BPLABS_STACK.md §3.5:
     1. Design tokens      — dark is the default; light = token overrides ONLY
     2. Component layer    — semantic classes used from Markdown HTML blocks
     3. Docsify overrides  — read/recurse/branding polish
     4. Responsive + print
   The theme toggle only flips data-theme="light" on <html>; components
   re-color through tokens, so nothing else needs a light-mode branch.
   Accent is one variable (--accent) — retheme without touching markup.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* dark = default */
  --bg: #0a0a0b;
  --bg-elev: #141416;
  --bg-card: #101012;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #8b8b93;              /* 5.85:1 on --bg — AA for small text (was #71717a = 4.09:1) */
  --accent: #e8b452;              /* warm amber — change here to retheme */
  --accent-hover: #d9a13a;
  --accent-contrast: #0a0a0b;
  --cat-studio-log: #7dc89b;
  --cat-story: #9db8e8;
  --border: rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .18);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .40);   /* floating chips (sidebar toggle) */
  /* Fonts = bplabs.com's system stacks (v9 parity). Neither site loads a webfont, so
     first paint never waits on a font request. --font-display keeps its name (5 call
     sites) but is now the same sans — hierarchy comes from weight, not a second face.
     The old stacks named Playfair Display / Inter / JetBrains Mono, none of which were
     ever loaded (no Google Fonts link in index.html), so the real before/after is
     Georgia serif headings -> system sans at weight 600: bplabs's look. */
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', 'SF Mono Light', Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace;
  /* Structure-only tokens (bplabs v9 numbers): 8px on cards/panels, 6px inline.
     Radii used to be per-component rem literals (.5/.6/.75rem = 8–12px). */
  --radius: 8px;
  --radius-sm: 6px;
  /* Type rhythm, measured on bplabs.com: prose computes 16px/25.6px (=1.6), H1 30px,
     H2 22.5px. Rem off the 16px prose base, so a vue.css body-size change can't move
     the scale. */
  --fs-h1: 1.875rem;     /* 30px */
  --fs-h2: 1.40625rem;   /* 22.5px */
  --lh-prose: 1.6;       /* 25.6px at 16px */
}
[data-theme="light"] {
  --bg: #fafaf9;
  --bg-elev: #ffffff;
  --bg-card: #f4f4f5;
  --text: #0a0a0b;
  --text-muted: #52525b;
  --text-dim: #71717a;
  --accent: #8a5a00;
  --accent-hover: #6f4800;
  --accent-contrast: #ffffff;
  /* Dark-mode pastels sit at ~1.9:1 on the cream bg — darken per category (AA). */
  --cat-studio-log: #2e7d52;
  --cat-story: #3b5f9e;
  --border: rgba(0, 0, 0, .10);
  --border-strong: rgba(0, 0, 0, .18);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .10);
}

/* ---------- 2. Component layer ---------- */

/* Icon layer (lucide) — bplabs.com structure. AGENTS.md §1 mandates lucide over emoji,
   but no page used an icon until now because index.html never loaded the library.
   Markup contract:

       <i class="vector-icon" data-lucide="disc-3"></i>

   The pump in index.html replaces the <i> with an <svg> (and carries `class` over onto
   it; the `data-lucide` attribute is consumed), so the rules below must match the class
   whether it lands ON the svg or on the <i> wrapping it.
   Geometry = bplabs's measured nav pattern: a fixed 16x16 box that never scales with
   font-size, `display:block` on the svg so it has no inline baseline gap, and
   `display:inline-block` (not flex) on the wrapper so a whole-row custom HTML formatter
   — e.g. a search result rendering its line as a flex row — can't stretch this slot and
   squash the icon to 0 width. currentColor = icons always match their row's text. */
.vector-icon {
  display: inline-block; flex-shrink: 0;
  width: 16px; height: 16px; vertical-align: text-bottom;
}
i.vector-icon > svg, .vector-icon > svg, .vector-icon.svg-icon { display: block; width: 16px; height: 16px; }

/* Page-title bullet: the brand's hexagon mark (favicon geometry, solid ink), sized in em
   so it tracks the H1 and needs no breakpoint. One per page — index.html injects it into
   `.markdown-section > h1:first-of-type`, NOT every h1 (post pages carry a second one). */
.markdown-section .page-h1-bullet { height: 1em; width: auto; flex-shrink: 0; color: var(--accent); }

/* Lead paragraph under a page H1 */
/* element+class: vue.css `.markdown-section p` (0-1-1) would otherwise pin line-height. */
.markdown-section .lede { font-size: 1.2rem; color: var(--text-muted); line-height: 1.65; max-width: 46rem; }

/* Post meta line: category tag + date */
.meta-line { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .75rem 0 1.5rem; }
.meta-date { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; color: var(--text-dim); }
.tag {
  display: inline-block; padding: .18rem .65rem; border: 1px solid var(--border-strong);
  border-radius: 999px; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600;
}
.tag-release     { border-color: var(--accent); color: var(--accent); }
.tag-studio-log  { border-color: var(--cat-studio-log); color: var(--cat-studio-log); }
.tag-story       { border-color: var(--cat-story); color: var(--cat-story); }

/* There is deliberately no full-width cover "hero" class any more: release art lives
   inside the story as `.story-art` newspaper art (see §Story art) — AGENTS.md §5. */

/* Dashed slots mark content pending from the user (cover art, embeds) */
.cover-placeholder, .embed-placeholder {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--bg-card); color: var(--text-dim);
  font-size: .85rem; padding: 1.5rem 1rem; text-align: center;
}
.cover-placeholder { aspect-ratio: 1 / 1; max-width: 420px; }
.embed-placeholder { aspect-ratio: 16 / 9; }

/* Responsive embed slot — 16:9 for YouTube; SoundCloud variant fixed-height */
.embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 1.5rem 0;
  overflow: hidden; border-radius: var(--radius); background: var(--bg-elev);
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed--soundcloud { aspect-ratio: auto; height: 166px; }   /* SoundCloud classic player */

/* Streaming / retail link bar */
.stream-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0; }
.stream-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem 1rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text); font-size: .85rem; font-weight: 600;
  text-decoration: none; transition: border-color .15s, color .15s;
}
.stream-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Recording / release credits block */
.credits {
  margin: 1.75rem 0; padding: 1.1rem 1.25rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card);
}
.credits h3 { margin: .2rem 0 .75rem; font-family: var(--font-display); font-size: 1.05rem; color: var(--text); }
.credits dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.25rem; margin: 0; font-size: .87rem; }
.credits dt {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); padding-top: .18rem;
}
.credits dd { margin: 0; color: var(--text-muted); }

/* Generic card + callout */
.section-card { margin: 1.5rem 0; padding: 1.25rem 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.callout {
  margin: 1.5rem 0; padding: .9rem 1.1rem; border-left: 3px solid var(--accent);
  background: var(--bg-card); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted);
}

/* Home CTA buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.cta-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-contrast); font-weight: 650; text-decoration: none;
}
.cta-btn:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.cta-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.cta-secondary:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
/* vue.css's `.markdown-section a { color: var(--accent) }` is specificity 0-1-1 and would
   paint button text amber-on-amber. Element+class selectors (also 0-1-1) declared later
   override it without !important. */
.markdown-section a.cta-btn { color: var(--accent-contrast); font-weight: 650; }
.markdown-section a.cta-btn:hover { color: var(--accent-contrast); }
.markdown-section a.cta-secondary { color: var(--text); }
.markdown-section a.cta-secondary:hover { color: var(--accent); }
/* --text-muted measures 2.33:1 on the light canvas (#a1a1aa is a DARK-theme grey);
   button labels are interactive text, so they need --text in both themes. */
.markdown-section a.stream-btn { color: var(--text); }
.markdown-section a.stream-btn:hover { color: var(--accent); }

/* Rolling-archive post cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.post-card {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); text-decoration: none;
  transition: border-color .15s;
}
.post-card:hover { border-color: var(--accent); }
.post-card h3 { margin: 0 0 .35rem; font-family: var(--font-display); font-size: 1.05rem; color: var(--text); }
.post-card .meta-line { margin: 0 0 .5rem; gap: .5rem; }
.markdown-section /* Story-derived excerpt; clamp to two lines with an ellipsis so cards stay uniform. */
.post-card-note {
  margin: 0;
  font-size: .87rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Cover art is capped narrower than the text column; center it in the leftover space. */
.hero { margin-left: auto; margin-right: auto; }

/* ---------- Song-post block order (templates/article-template.md) ----------
   title → story (cover art floated inside it as .story-art) → Watch (embed + stream
   bar) → Listen → Details → micro blocks (keywords, listen-if-you-like). Every
   section carries an <h2>, the embed included.
   Only --font-mono and --text-dim change on this path; both are system stacks,
   no web fonts are loaded anywhere on this site. */

/* Hero: the post's primary image (cover art, or a banner via .hero--wide).
   Width capped so a square cover reads as art, not as a wall of pixels; the wide
   variant edge-crops via aspect-ratio + object-fit. The cap on .hero (not the img)
   keeps the whole block centered — capping the img alone leaves it left-aligned. */
.hero { position: relative; margin: 1.5rem 0 1.75rem; max-width: 560px; }
.hero img { display: block; width: 100%; height: auto; border: 1px solid var(--border);
            border-radius: var(--radius); }
.hero--wide { max-width: none; aspect-ratio: 1200 / 480; overflow: hidden; }
.hero--wide img { width: 100%; height: 100%; object-fit: cover; }

/* Newspaper figure: cover art set small INSIDE the story so the liner notes wrap
   around it, the way a paper runs an art photo at the top of a feature. Deliberately
   smaller than .hero — inside the prose the art is supporting, not the page's subject.
   Width is a % of the reading column (not px) so it scales with the measure, and the
   `max-width` keeps it from ballooning on the 81rem-wide pages route. The h2 `clear`
   (see §Headings) stops the float from dragging past the first section break. */
.story-art { float: right; width: 38%; max-width: 15rem; margin: .35rem 0 1.1rem 1.6rem; }
.story-art img { display: block; width: 100%; height: auto; border: 1px solid var(--border);
                 border-radius: var(--radius); }

/* Key/value tables (release info) and link tables (platforms) share one shell.
   Docsify's markdown renderer emits a bare <table> with no class hook, so the class
   goes on a wrapper <div> and styles reach in as a descendant selector.
   IMPORTANT: style.css loads AFTER vue.css, so equal specificity is enough — but
   `.wrapper table` (0-2-0) only reaches the *table element* rules (`.markdown-section
   table`, `td, th`, `tr`). vue.css sets `display:block` +
   `overflow:auto` on the table itself, which turns a table into a scroll box, so the
   table goes back to `display:table` and the wrapper becomes the scroller instead
   (`table-layout:fixed` + a min-width keeps columns sane while it scrolls). */
.info-table, .links-table { overflow-x: auto; }
.info-table table, .links-table table {
  display: table; width: 100%; min-width: 27rem; table-layout: fixed;
  margin: 1rem 0; border-collapse: collapse; border-spacing: 0;
  font-size: .84rem; line-height: 1.45; overflow: visible;
}
.info-table th, .info-table td, .links-table th, .links-table td,
.info-table tr, .links-table tr {
  border: 0; border-bottom: 1px solid var(--border); background: transparent;
}
/* Zebra plate killer. vue.css's `.markdown-section tr:nth-child(2n) { background-color:
   #f8f8f8 }` is specificity 0-2-1, so the 0-1-1 rule above loses on every even row: a
   hardcoded light plate landed under the dark tokens, dragging 7.7:1 cell text to 2.4:1
   and `--text` cells (the platform names in the links table) to 1.03:1 — invisible.
   `body` prefixes to 0-2-2 so we win on specificity regardless of load order, and it
   covers bare markdown tables too, not just the wrapped ones. */
body .markdown-section table tr:nth-child(2n) { background-color: transparent; }
.info-table th, .links-table th {
  padding: .3rem .75rem .24rem 0; text-align: left; font-weight: 600;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); vertical-align: baseline;
}
.info-table td, .links-table td { padding: .34rem 0; color: var(--text-muted); }
.links-table td + td { padding-left: 1rem; }
/* Column widths MUST be declared on the th: `table-layout: fixed` takes them from the
   header row, so a width on td:first-child alone was silently ignored (measured live:
   359px + 359px, a dead-even 50/50 split that wasted half the column on service names).
   Both selectors are kept so the declaration survives if the header row ever disappears. */
.links-table th:first-child, .links-table td:first-child { width: 28%; }
.info-table th:first-child, .info-table td:first-child { width: 34%; }
.links-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.links-table a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
/* All-songs catalog table — 9 dense reference columns (release data + licensing
   identifiers). Markdown table, not raw HTML: Docsify only runs its link compiler
   on markdown links — raw-HTML anchors to /posts/x render as dead un-routed hrefs.
   The empty .catalog-anchor div immediately before the table is the style hook.
   display:block stays (vue.css default) because block + overflow-x is what scrolls
   the grid inside the prose shell; columns size to content (no fixed layout under
   display:block), so nowrap keeps IDs and Listen links from ragged-wrapping. */
.catalog-anchor { height: 0; margin: 0; }
.markdown-section .catalog-anchor + table {
  display: block; overflow-x: auto; width: 100%;
  margin: 1rem 0; border-collapse: collapse; border-spacing: 0;
  font-size: .8rem; line-height: 1.4;
}
.catalog-anchor + table th, .catalog-anchor + table td,
.catalog-anchor + table tr { border: 0; border-bottom: 1px solid var(--border); background: transparent; }
.catalog-anchor + table th {
  padding: .3rem .6rem .24rem 0; text-align: left; font-weight: 600; white-space: nowrap;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); vertical-align: baseline;
}
.catalog-anchor + table td { padding: .32rem .6rem .32rem 0; color: var(--text-muted); vertical-align: top; }
.catalog-anchor + table td:first-child { color: var(--text); }
/* Identifier columns (UPC/ISRC/ASCAP ID/ISWC) read as codes, not prose. */
.catalog-anchor + table td:nth-child(5), .catalog-anchor + table td:nth-child(6),
.catalog-anchor + table td:nth-child(7), .catalog-anchor + table td:nth-child(8) {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .01em; white-space: nowrap;
}
.catalog-anchor + table td:last-child { white-space: nowrap; }
.catalog-anchor + table a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
/* Details' markdown header row is empty (`| | |`) — render nothing rather than pay a
   17px row plus its rule line above the first real value. */
.info-table thead { display: none; }
/* element+class (0-1-1) so a stray markdown `_…_` in a cell can't win the color race
   with vue.css's `.markdown-section em { color:#7f8c8d }` (see /em-tokens note below).
   Inline, not block: a note stacked under its link doubled every row of the Listen table. */
.markdown-section span.cell-note {
  display: inline; margin-left: .3rem;
  font-size: .74rem; color: var(--text-dim);
}
.markdown-section span.cell-note::before { content: "·"; margin-right: .3rem; opacity: .6; }

/* Lyrics: its own section above Details, set as verse rather than prose. Line breaks come
   from <br> in the source (markdown newlines don't survive Docsify's marked config) and
   each verse is a <p>; the left rule is the newspaper poetry cue. */
.lyrics {
  margin: 1rem 0 0; padding-left: 1.05rem; border-left: 2px solid var(--border);
  font-size: .95rem; line-height: 1.62; color: var(--text-muted);
}
.lyrics p { margin: 0 0 .85rem; }
.lyrics p:last-child { margin-bottom: 0; }

/* Micro blocks near the foot of a song post: keyword chips + a "listen if you like" list.
   Chips are real text inside <ul>/<li>, not pseudo-elements, so screen readers and
   text-only browsing still read them. */
.micro-block { margin: 1.4rem 0; }
.micro-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em;
               text-transform: uppercase; color: var(--text-dim); margin-bottom: .5rem; }
.micro-block ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem;
                  margin: 0; padding: 0; }
.micro-block li { padding: .2rem .6rem; border: 1px solid var(--border); border-radius: 999px;
                  font-size: .78rem; color: var(--text-muted); background: var(--bg-card); }

/* ---------- 3. Docsify overrides ---------- */
html, body { background: var(--bg); color: var(--text); font-family: var(--font-body); }
/* Native UI (scrollbar, form controls, date pickers) follows the theme — without this
   the scrollbar stays black in light mode on a prefers-dark OS. */
html { color-scheme: dark; }
/* Before the theme script stamps html[data-theme] (or with JS off), honor the OS
   preference so a light-mode visitor never gets cream text on a dark canvas. */
@media (prefers-color-scheme: light) {
  html:not([data-theme]) { background: #fafaf9; color: #1c1c1f; color-scheme: light; }
}
html[data-theme="light"] { color-scheme: light; }
::selection { background: var(--accent); color: var(--accent-contrast); }
/* vue.css `body { font-size:15px }` (0-0-1) loads after this file, so an equal-
   specificity rule here wins by source order and puts prose back on 16px. */
body { font-size: 1rem; line-height: var(--lh-prose); }

/* vue.css sets `.sidebar { color:#364149 }` and `.sidebar ul li a { color:#505d6b }`
   (0-1-1 / 0-3-3) — a slate-on-near-black wash in dark mode (2.7:1, fails AA). Load
   order means my equal-specificity rules lose, so these are written to outspecify it,
   matching the same element+class technique the CTA/stream buttons use. */
/* Doubled class on purpose: docsify-sidebar-collapse injects `.sidebar { padding-top: 0 }`
   at runtime (after this file), which would otherwise flush the brand to the top edge.
   0-2-0 beats it without `!important`. */
.sidebar.sidebar {
  background: var(--bg-elev); color: var(--text-muted); border-right: 1px solid var(--border);
  /* bplabs chrome geometry: a 40px band over the brand, and 15px nav type — vue.css
     sizes each nav row as 2em of THIS font-size, so 15px yields bplabs's 30px rows
     instead of the 32px a 16px sidebar gives. */
  padding: 0; font-size: .9375rem;
  /* The search box bplabs doesn't have is emitted as the sidebar's FIRST child, so the
     brand sat under it. Flex `order` restores brand -> search -> nav without touching
     index.html (deleting the search is not an option: it's one of two routes to the
     posts pages). */
  display: flex; flex-direction: column;
}
.sidebar > .search { order: 1; margin-bottom: 20px; }
.sidebar > .sidebar-nav { order: 2; }
.sidebar > h1, .sidebar > h1 a { font-family: var(--font-display); color: var(--text); }
.sidebar .app-name a { font-family: var(--font-display); color: var(--text); }

/* Site-title lockup (bplabs v9 geometry). The mark is an inline SVG inside $docsify's
   `name`, so it exists in the first render — no icon-less title on slow loads — and is
   drawn with stroke="currentColor" so one colour token drives it in both themes.
   .app-name must be flex as well as the <a>: vue.css gives the H1 a 2.5rem line box and
   the mark was falling outside the visible band under the sidebar's overflow:hidden
   (measured in the rendered DOM, where a block lockup measured 33px tall).
   padding-left: 15px lines the mark's left edge up with the nav links below it, which
   carry vue's own 15px item padding. */
/* `margin: 0 0 1rem` + `width: 100%` undo vue.css's `.sidebar > h1 { margin: 0 auto;
   text-align: center }`. bplabs does not center its brand: the lockup is a full-width flex
   row. padding-left: 15px lines the mark up with the top-level nav icons (their ul carries
   margin-left: 15px). The value was 72px for one thing only — clearance under
   the old TOP-left toggle; the toggle now floats bottom-left, so the brand row is clear.
   margin-top 12px stops the mark bleeding into the viewport edge, since .sidebar padding is 0. */
.sidebar > h1.app-name {
  display: flex; align-items: center; width: 100%; margin: 12px 0 1rem; line-height: normal;
  white-space: nowrap; padding-left: 15px; font-weight: 300; color: var(--text);
}
/* 44px = bplabs's mark box (its `.logo-icon` measures 44x44); the wordmark stays vue's
   24px h1 size, so the lockup reads mark-led, like theirs. */
.app-name .logo-icon { width: 44px; height: 44px; flex-shrink: 0; color: var(--accent); }
.app-name-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.sidebar a, .sidebar ul li a { color: var(--text-muted); }
.sidebar a:hover, .sidebar ul li.active > a { color: var(--accent); }
.sidebar ul li.active > a { border-right-color: var(--accent); }

/* Nav rows (bplabs.com structure): icon slot + label, measured there at 41.6px row
   pitch = 14px x 1.6 line-height + vue's own 4px link padding + ~10px item margin.
   14px is bplabs's own override of vue's default; we match it (the old 15px bump made
   the sidebar look heavier than the prose beside it). Colours stay ours (accent
   hover); bplabs's hover underline comes along as interaction structure. */
.sidebar.sidebar .sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  font-size: .875rem; line-height: 1.6; font-weight: 500;
  padding: 4px 15px 4px 0; text-decoration: none;
}
.sidebar.sidebar .sidebar-nav a:hover { text-decoration: underline; }
.sidebar .sidebar-nav ul > li { margin: 6px 0; }
/* Sub-nav (page headings): bplabs keeps vue's own 1.5em indent at weight 400 — the
   previous zero-indent bold copy read as a flat duplicate of the top-level nav. */
.sidebar .sidebar-nav ul ul { margin: 0; padding-left: 1.5em; }
.sidebar .sidebar-nav ul ul a { font-weight: 400; }
/* Group header rows ("Latest", "Social links" in _sidebar.md): same 14px row rhythm
   as links — dimmer and lighter than the links, not the h4-style bold markdown's
   **bold** produced; children nest under them at the sub-nav indent. */
/* Search rows: bplabs renders each hit as icon + title flex row (16px slot, 10px gap,
   title weight 400 like vue's nav) — our pump prepends the <i data-lucide>. */
/* Search field (docsify-search emits `.input-wrap > input[type=search]`, unstyled by our
   sheet so far): token surfaces + a lucide `search` glyph baked as a data-URI, since the
   plugin gives us no element to hang <i data-lucide> on. 34px left pad clears the 15px glyph.
   Colors are ours; the shape is bplabs's inset field. */
.search, .sidebar > .search { margin: 0 15px 16px; padding: 0; border-bottom: 0; }
.search .input-wrap { position: relative; }
.search .input-wrap input[type="search"] {
  width: 100%; padding: 8px 26px 8px 34px; box-sizing: border-box;
  background-color: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9375rem;
  background-repeat: no-repeat; background-position: 10px center; background-size: 15px 15px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b9098' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>");
}
.search .input-wrap input[type="search"]::placeholder { color: var(--text-dim); }

.search .matching-post h2, .search .results-row h2 {
  display: flex; align-items: center; gap: 10px; font-weight: 400;
}

.sidebar .sidebar-nav .sidebar-group {
  display: flex; align-items: center; gap: 10px;
  font-size: .875rem; line-height: 1.6; font-weight: 400;
  color: var(--text-dim); padding: 4px 15px 4px 0;
}
/* Mobile chrome: vue.css hides .sidebar/.content/.app-name at <=768px, but its toggle
   button lives inside .sidebar-toggle — a SIBLING of .sidebar — so clicking it was a
   no-op (pane slid out and stayed out). Keep the brand wordmark visible, keep the
   button fixed outside the collapsing pane (bplabs: toggle-left 25px / toggle-top 14px
   are vue's own defaults), and collapse pane + content on body.close. */
@media (min-width: 769px) {
  /* bplabs-style desktop collapse: pane (and its brand) vanish; content reclaims full
     width instead of vue's translateX(-300px) slide. */
  body.close .sidebar, body.close .sidebar > h1.app-name { width: 0; min-width: 0; opacity: 0; visibility: hidden; overflow: hidden; }
  body.close .content { left: 0; }
}
/* The brand wordmark never hides (desktop pane, mobile drawer alike). vue.css inverts
   body.close at <=768px - .sidebar rests at left:-300 and body.close slides it in with
   translateX(300px), i.e. 'close' = drawer OPEN there; never zero its width at mobile. */
body.close .sidebar > h1.app-name, body.close .sidebar > .app-name { display: block; }
/* Toggle = fixed 36px square BOTTOM-left at EVERY width. `width:auto` was not enough: vue's
   media blocks restyle this box into a full-width bar (desktop `width:284px;padding:10px`,
   mobile `padding:30px 30px 10px 10px`) and the inner button stretched with it, so at 390px
   the 36px control rendered as a 284x37 slab painted with the surface background. The
   doubled-class selectors (0-2-0) outspecify every vue variant regardless of media order,
   and `right:auto` kills the left+right-anchored stretch vue's rules leave behind. */
.sidebar-toggle.sidebar-toggle, .sidebar-toggle-button.sidebar-toggle-button {
  /* !important is load-bearing, not laziness: docsify's injected sheet keeps a *late*
     `width:284px` rule matching .sidebar-toggle whose source order out-orders our
     (0-2-0) selector even at equal specificity; getMatchedStylesForNode confirmed it. */
  position: fixed !important; left: 25px !important; bottom: 14px !important;
  right: auto !important; top: auto !important; margin: 0 !important;
  width: 36px !important; height: 36px !important; min-width: 0 !important;
  padding: 9px !important; box-sizing: border-box;
  display: flex !important; align-items: center; justify-content: center; text-align: center;
  background: var(--bg-elev) !important; border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-sm) !important; color: var(--text-dim) !important; opacity: 1 !important; z-index: 40;
}
/* 9px padding + 1px border leaves a 16px content box for the lucide glyph. */
.sidebar-toggle-button .vector-icon { display: block; }
body.close .sidebar-toggle, body.close .sidebar-toggle-button { transform: none; }
/* Heading icons at bplabs's 20px for h1/h2 (their own rule); 16px looked under-scaled
   beside 30px display titles. */
.markdown-section h1 .vector-icon, .markdown-section h2 .vector-icon,
.markdown-section h3 .vector-icon { width: 20px; height: 20px; }
/* Heading anchor glyph inside article headings (vue.css: #34495e — invisible on dark). */
.markdown-section h1 a.anchor span, .markdown-section h2 a.anchor span,
.markdown-section h3 a.anchor span { color: var(--text-dim); }
/* Keyboard-visible focus on the scroll containers (bplabs's a11y layer). Vue replaces the
   pane's children on every navigation and the browser hands focus to the nearest
   scrollable ancestor, so this outline flashes briefly on each page change — that is the
   point of it, not a bug. */
#app:focus, main:focus { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Content column = bplabs's box as measured there (1536px viewport): `main` carries NO
   padding, `.content` supplies the whole 60px top band from vue.css's own
   `padding-top:60px`, and `.markdown-section` owns its padding — 30px top / 15px lateral
   / 40px bottom, `width:100%` up to max-width 860px, so the 15px laterals ARE the gutter
   against the sidebar. Two earlier attempts here were wrong: `main{padding:0 25px}`
   stacked 25+15=40px of gutter, and `main.content{padding-top:30px}` never applied at all
   — `.content` is the <section>, so that compound selector matched nothing. Only color and
   the 16px prose size stay ours (vue.css pins 15px; see the note below). */
main { padding: 0; }
.markdown-section {
  max-width: 860px; padding: 30px 15px 40px; color: var(--text);
  /* vue.css sets `body { font-size:15px }` and re-declares it on `.markdown-section > *`
     (0-1-1) — at 15px the .89rem component type reads larger than the prose around it. */
  font-size: 1rem; line-height: var(--lh-prose);
}
.markdown-section h1, .markdown-section h2, .markdown-section h3 {
  font-family: var(--font-display); font-weight: 600; color: var(--text);
  /* bplabs geometry: an icon in a heading is flex, not an inline-image hack — the
     .vector-icon svg is a flex item, this gap is the optical spacing, cap height does
     the vertical work. max-width:100% stops a long H1 escaping the padding.
     line-height:normal is bplabs's measured value on all three levels; vue.css's 2rem
     heading line boxes padded ~25% onto every heading and loosened the whole rhythm. */
  max-width: 100%; display: flex; align-items: center; gap: 12px;
  line-height: normal; margin-top: 1.5em;
}
.markdown-section h1 { font-size: var(--fs-h1); margin: 0 0 1rem; }
.markdown-section h2 { font-size: var(--fs-h2); clear: both; }   /* clear: never let a .story-art float escape its section */
/* bplabs measures h3 at vue.css's stock 1.5rem (24px) — but there it is a dead value: their
   own h2 override (1.40625rem) makes h3 LARGER than h2, and no bplabs page renders an h3.
   Article pages here put h3 under h2 on nearly every page, so the step lands at the next
   interval below h2 (1.25rem) rather than copying the inversion. */
.markdown-section h3 { font-size: 1.25rem; }
.markdown-section a { color: var(--accent); font-weight: 400; }
.markdown-section a:hover { color: var(--accent-hover); }
/* bplabs interaction: prose links underline on hover; button-style links keep
   their own affordance (border/glow) and must not double up. */
.markdown-section a:hover:not(.cta-btn):not(.cta-secondary):not(.stream-btn) { text-decoration: underline; }
/* Block spacing ported from bplabs as ratios, not rems: 1em padding and 2em vertical margin
   (their 15px prose base renders that as 15px / 30px), so the block scales with the text. */
.markdown-section blockquote {
  margin: 2em 0; padding: 1em; border-left: 3px solid var(--accent);
  background: var(--bg-card); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted);
}
.markdown-section code {
  font-family: var(--font-mono); font-size: .85em; padding: .1em .35em;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: .3rem; color: var(--accent);
  margin: 0;
}
.markdown-section pre { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.markdown-section pre code { color: var(--text); background: transparent; border: 0; }
.markdown-section hr { border: 0; border-bottom: 1px solid var(--border); margin: 2em 0; }
.markdown-section details { margin: 1.25rem 0; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); }
.markdown-section summary { cursor: pointer; color: var(--text-muted); font-weight: 600; }
/* vue.css leaves emphasis at its own grey (#7f8c8d) and puts a grey border +
   min-width:300px on every iframe. Token colors keep `em` legible in both themes, and
   `min-width:0` lets the SoundCloud/YouTube frames shrink below 300px on phones
   (.embed already zeroes the border for players; this covers bare markdown embeds). */
.markdown-section em { color: var(--text-muted); }
/* vue.css `.markdown-section strong { color:#2c3e50 }` — dark slate on near-black
   (1.6:1, effectively invisible); inherit keeps emphasis readable in both themes. */
.markdown-section strong { color: inherit; font-weight: 700; }
.markdown-section iframe { border: 0; min-width: 0; max-width: 100%; margin: 1rem 0; }
.markdown-section img { max-width: 100%; height: auto; }

/* Docsify's own sidebar/hamburger toggle (`.sidebar-toggle`, a <button> sibling of
   .sidebar — NOT our .theme-toggle above). vue.css paints it `rgba(255,255,255,.8)`:
   a white plate at the sidebar foot in dark mode (desktop) and a bare amber hamburger
   floating over article content at <768px. Token colors + a top hairline + a drop
   shadow keep it legible on both the sidebar and over cover art. */
.sidebar-toggle {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .35);
}
/* lucide hamburger replaces vue's three span bars (see index.html toggleIcon());
   glyph in --text-dim per Brad — the toggle is chrome, not a call-to-action. */
.sidebar-toggle svg { width: 16px; height: 16px; display: block; color: var(--text-dim); }
.sidebar-toggle .sidebar-toggle-button { position: static; width: auto; }
[data-theme="light"] .sidebar-toggle { box-shadow: 0 -2px 10px rgba(0, 0, 0, .08); }
.sidebar-toggle:hover { background: var(--bg-card); }
@media screen and (max-width: 768px) {
  /* vue.css re-paints this white in its own mobile block — win it back. */
  body.close .sidebar-toggle { background: var(--bg-elev); }
  .sidebar-toggle { right: auto; }
}

/* Theme toggle (fixed button lives outside #app so re-renders can't eat it) */
.theme-toggle {
  position: fixed; top: .85rem; right: .9rem; z-index: 99;
  width: 2.3rem; height: 2.3rem; padding: 0; cursor:pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: 50%;
  background: var(--bg-elev); color: var(--text);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }
.icon-moon { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: none; }

/* ---------- 4. Responsive + print ---------- */
@media (max-width: 768px) {
  /* Deep bottom padding is thumb-room: the stream-button row ends the page and the
     last row must be comfortably tappable on a phone. The bottom-left floating toggle
     clears the text column; stream rows are centered/inset, but keep this padding.
     NOTE: this is the last .markdown-section shorthand in the file; an earlier
     media-block rule here gets overridden by it (equal specificity, source order). */
  .markdown-section { padding: 2rem 1.25rem 5.5rem; }
  .cover-placeholder { max-width: 100%; }
}
@media (max-width: 640px) {
  /* 27rem is wider than a phone content column, which sent every key/value table to a
     sideways scroll. Release rows are short, so let them wrap instead. */
  .info-table table { min-width: 0; font-size: .85rem; }
  .info-table td:last-child { padding-left: .75rem; }
  .markdown-section h1 { font-size: 1.7rem; }
  .post-grid { grid-template-columns: 1fr; }
  .credits dl { grid-template-columns: 1fr; gap: .15rem; }
  .credits dt { margin-top: .5rem; }
  /* A 38% float on a 390px screen leaves ~200px of text — unreadable measure. Drop the
     wrap and run the art as a centered block above the prose instead. */
  .story-art { float: none; width: 62%; max-width: 13rem; margin: 0 auto 1.15rem; }
}
@media print {
  body { background: #fff; color: #000; }
  .sidebar, .app-nav, .toolbar, .theme-toggle, .stream-bar, .embed, .embed-placeholder,
  .links-table, .micro-block { display: none !important; }
  .sidebar-toggle { display: none !important; }
}
