/* Commons theme, recovered from Zen Commons. Zero JavaScript. */

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ── Chakra gradient bar (top of sticky header) ── */
.chakra-bar {
  height: 3px;
  background: linear-gradient(to right,
    #8b5cf6,   /* Crown — Violet */
    #6366f1,   /* Third Eye — Indigo */
    #3b82f6,   /* Throat — Blue */
    #22c55e,   /* Heart — Green */
    #eab308,   /* Solar Plexus — Yellow */
    #f97316,   /* Sacral — Orange */
    #ef4444    /* Root — Red */
  );
}

/* ── Header (full-width, sticky) ── */
.site-header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(4px);
  -webkit-backdrop-filter: saturate(180%) blur(4px);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.wordmark {
  font-family: var(--font-serif);
  font-size: 20px;
  text-decoration: none !important;
  letter-spacing: 0.02em;
}
.header-right {
  display: flex;
  align-items: center;
}

/* Hamburger (CSS-only, no JS) */
.nav-toggle-input {
  display: none;
}
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg-muted);
  border-radius: 1px;
  transition: all 0.2s;
}
.hamburger:hover span { background: var(--fg); }

/* Dropdown nav menu (CSS checkbox hack) */
.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 0;
  min-width: 140px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 200;
  flex-direction: column;
}
.nav-toggle-input:checked ~ .nav-menu { display: flex; }
.nav-menu a {
  padding: 8px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
}
.nav-menu a:hover { color: var(--fg); background: var(--bg); }
.header-rule {
  height: 1px;
  background: var(--border);
}

/* ── Main ── */
/* An article with the reader sidebar uses its own wider frame. */
.content:has(.article-layout.has-sidebar) {
  max-width: none;
  padding: 0;
}
.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 40px 24px;
  flex: 1;
  width: 100%;
}

/* ── Footer ── */
.site-footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg-dim);
}
.footer-sep { margin: 0 8px; }

/* ── Article layout — article + right-rail sidebar with stacked section panels ── */
.article-layout {
  padding: 40px 24px;
  max-width: var(--content-width);
  margin: 0 auto;
}
.article-layout.has-sidebar {
  display: grid;
  /* Article can shrink down to 480 before stacking — keeps sidebar on-screen
     for intermediate widths. */
  grid-template-columns: minmax(480px, var(--content-width)) 320px;
  /* space-between — article flush left, sidebar flush right, extra flex in the middle.
     Matches header centering so the article's left edge aligns with the wordmark. */
  justify-content: space-between;
  column-gap: 32px;
  max-width: 1100px;  /* matches header-inner so left edges align */
  margin: 0 auto;
  padding: 40px 24px;  /* explicit — overrides .article-layout base */
  align-items: start;
  /* Relative for the vertical-line ::after pseudo-element below. */
  position: relative;
}
.article-layout .article { max-width: 100%; min-width: 0; }
.article-layout.has-sidebar .article-sidebar {
  /* Subtle left rule next to the companion content — but the *real*
     vertical line traversing the whole article lives on the parent
     `.article-layout::after` below, so an empty tab doesn't collapse it. */
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-left: 24px;
  padding-right: 4px;
}
/* Vertical separator that runs the full article height. Anchored to the
   grid container (not the sticky sidebar) so it remains visible even when
   the active companion tab is empty (HYPERLINKS with no [](url) links,
   FOOTNOTES with no [^id], etc.) and the sticky sidebar collapses. */
.article-layout.has-sidebar::after {
  content: '';
  position: absolute;
  top: 40px;
  bottom: 40px;
  /* Right edge of the article column = right edge of layout - sidebar (320px) - column-gap (32px).
     Place the line in the column-gap, half-way: -16px from the sidebar's left edge. */
  right: calc(320px + 16px);
  width: 1px;
  background: var(--border-subtle, rgba(255, 255, 255, 0.08));
  pointer-events: none;
}

/* Very narrow viewports: stack sidebar below article. */
@media (max-width: 900px) {
  .article-layout.has-sidebar {
    display: block;
    max-width: var(--content-width);
  }
  .article-layout.has-sidebar .article-sidebar {
    position: static;
    max-height: none;
    margin-top: 40px;
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid var(--border);
  }
  .article-layout.has-sidebar::after { display: none; }
}
/* ── Response sidebar ── */
.article-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.article-sidebar-empty {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg-dim);
  text-align: center;
  padding: 20px 0;
}


/* ── Reading companion sidebar (Links · Footnotes · Related) ─────────
   Tabbed sidebar that streams the essay's references. Tabs are CSS-only
   (hidden radio inputs + labels using `:checked ~` sibling combinator) —
   ZERO JavaScript. Lives inside .article-sidebar. */
.companion {
  font-family: var(--font-sans);
}
/* Radios are visually hidden; their :checked state drives the active tab
   + visible pane via sibling selectors below. */
.companion-radio {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.companion-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.companion-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 4px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  text-align: center;
  user-select: none;
}
.companion-tab:hover { color: var(--fg); }
/* Active tab styling — driven by which radio is :checked. */
#ct-links:checked     ~ .companion-tabs label[for="ct-links"],
#ct-footnotes:checked ~ .companion-tabs label[for="ct-footnotes"],
#ct-related:checked   ~ .companion-tabs label[for="ct-related"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.companion-tab-count {
  font-size: 10px;
  font-weight: 500;
  color: var(--fg-dim);
  margin-left: 2px;
}
.companion-pane { display: none; }
/* Visible pane — tied to the matching radio's :checked state. */
#ct-links:checked     ~ .pane-links,
#ct-footnotes:checked ~ .pane-footnotes,
#ct-related:checked   ~ .pane-related {
  display: block;
}
.companion-empty {
  font-size: 12px;
  color: var(--fg-dim);
  font-style: italic;
  padding: 12px 4px;
  margin: 0;
}
/* Newspaper feel — Georgia serif for prose, no card chrome (just hairline
   dividers between cards), small caps for meta lines, italic for descriptions.
   Kind is encoded by a small color-bracketed in-text marker rather than a
   loud chip. */
.companion-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.companion-card {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  text-decoration: none !important;
  color: var(--fg) !important;
  font-family: var(--font-serif);
  transition: opacity 0.12s;
}
.companion-list > .companion-card:first-child { border-top: none; padding-top: 4px; }
a.companion-card:hover { opacity: 0.85; }
a.companion-card:hover .cl-resolved { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.4); text-underline-offset: 3px; }

/* Small uppercase kind indicator (e.g. "COMMONS", "INTERNAL NOTE") sitting
   above the brackets line. Replaces the background tint — keeps the
   newspaper feel + adds an unambiguous label without adding chrome. */
.cl-kind-tag {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--fg-muted);
}
/* Commons-Link kind tag in pink — calls out an in-system link distinctly
   from the rest of the violet Commons card chrome. The rest of the card
   (in-text bracket, title, meta) stays crown-violet. */
.companion-card.cl-commons .cl-kind-tag { color: #f472b6; }
.companion-card.cl-wiki    .cl-kind-tag { color: var(--syntax-wikilink, #4ade80); }
/* Related essays — indigo (third-eye chakra). Distinct from external blue,
   Commons violet, wiki green; carries the "insight from another piece" feel. */
.companion-card.cl-related .cl-kind-tag { color: #818cf8; }

/* In-text representation — small mono bracketed line so the reader can
   visually match the sidebar entry to the link in the body. Color-coded:
   blue (external), violet (commons), green (wiki). */
.cl-intext {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.3;
  margin-bottom: 4px;
  word-break: break-all;
  color: var(--fg-muted);
}
.companion-card.cl-external .cl-intext { color: #60a5fa; }
.companion-card.cl-commons  .cl-intext { color: var(--syntax-title, #8b5cf6); }
.companion-card.cl-wiki     .cl-intext { color: var(--syntax-wikilink, #4ade80); }

/* Resolved title — the "headline" of the card. Georgia semibold.
   Color follows the kind: white (external), crown violet (commons),
   heart green (wiki). Self-authored Commons keeps violet — the star prefix
   is the differentiator. */
.cl-resolved {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  margin: 2px 0 4px;
  color: var(--fg) !important;
}
.companion-card.cl-commons .cl-resolved { color: var(--syntax-title, #8b5cf6) !important; }
.companion-card.cl-wiki    .cl-resolved { color: var(--syntax-wikilink, #4ade80) !important; }
/* Self-authored Commons signal: green ★ + green author handle inline in
   the meta line. Title stays violet so the kind hierarchy is preserved;
   only the author segment of the meta line is recolored. */
.cl-self-author {
  color: var(--syntax-wikilink, #4ade80);
  font-weight: 700;
}
.cl-self-star {
  color: var(--syntax-wikilink, #4ade80);
  font-weight: 700;
  margin-right: 2px;
}

/* Meta line — small caps, sans-serif, dim. The bylines / domains. */
.cl-meta {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 2px;
}

/* Description — italic serif, the "blockquote" voice. */
.cl-desc {
  font-family: var(--font-serif);
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  color: var(--fg-muted);
  margin-top: 6px;
}

/* Wikilink-only italic note */
.cl-wiki-note { font-style: italic; text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Section group heading in the sidebar — mirrors article <h2> structure
   so readers can locate links by section at a glance. */
.cl-section-head {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 18px 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
/* The rule goes before each group, never under its heading. */
.companion-list > .cl-section-head:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }

/* The link's own text, with a badge when it leads somewhere on this site. */
.cl-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.cl-badge {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f472b6;
  border: 1px solid color-mix(in srgb, #f472b6 40%, transparent);
  border-radius: 3px;
  padding: 0 4px;
}

/* Card wrapper — holds the bracket-link + the card-body link side-by-side.
   The wrapper IS the card; the bracket label is its own anchor (jumps to
   body) and the rest of the card content is a separate anchor (URL nav).
   Border-top lives on the wrapper. */
.cl-card-wrap, .cl-card-wrap.companion-card {
  padding: 8px 0;
  border-top: 0;
}
.companion-list > .cl-card-wrap:first-child,
.companion-list > .cl-section-head + .cl-card-wrap {
  border-top: none;
  padding-top: 4px;
}
/* Inner card body anchor — wraps title, meta, description; navigates
   to the URL on click. Doesn't include the bracket-label (separate <a>). */
.cl-card-body {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
  transition: opacity 0.12s;
}
a.cl-card-body:hover { opacity: 0.85; }
a.cl-card-body:hover .cl-resolved {
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.4);
  text-underline-offset: 3px;
}

/* The bracket-link — anchor-jumps to body. Color-coded by kind via
   parent .cl-external/.cl-commons/.cl-wiki classes (rules below). */
a.cl-intext {
  text-decoration: none;
  cursor: pointer;
  transition: color 0.12s;
}
a.cl-intext:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.cl-jump-arrow {
  margin-left: 4px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
  opacity: 0.6;
  transition: opacity 0.12s;
}
a.cl-intext:hover .cl-jump-arrow { opacity: 1; }
/* Static (non-link) bracket label for wikilinks — same look but no hover affordance. */
.cl-intext-static { cursor: default; }

/* Body link jump-target offset — when an anchor jump lands on a body
   link, scroll into a comfortable reading position rather than slammed
   against the top edge. */
.prose a[id^="cl-link-"], .prose .footnote-reference, .prose .footnote-definition { scroll-margin-top: 80px; }

/* Footnote: inline numeric marker `[N]` to the left of the first line.
   Flex layout keeps the body wrapping cleanly under the marker. No border
   between footnotes — the gap + marker are signal enough. */
.companion-footnote {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
}
.companion-footnote-marker {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  padding-top: 3px;
  white-space: nowrap;
}
.companion-footnote-body { flex: 1; min-width: 0; }
.companion-footnote-body p { margin: 0; }
.companion-footnote-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(167, 139, 250, 0.35);
}
@media (prefers-color-scheme: light) {
  .companion-card { background: #ffffff; border-color: #d0d0d0; }
  a.companion-card:hover { background: #f5f5f5; }
}


/* ── Article ── */
.article-header { margin-bottom: 32px; }
.article-title {
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.article-meta {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.author-link { color: var(--accent); font-weight: 500; }
.author-name { color: var(--fg-muted); }
.meta-sep { color: var(--fg-dim); }
.article-tags { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--tag-bg);
  color: var(--tag-fg);
}

/* ── Prose (Chakra color scheme) ── */

/* Headings — chakra spectrum */
.prose h1 { font-size: 28px; margin: 40px 0 16px; font-weight: 700; color: #6366f1; /* Third Eye — Indigo */ }
.prose h2 { font-size: 24px; margin: 36px 0 14px; font-weight: 600; color: #3b82f6; /* Throat — Blue */ }
.prose h3 { font-size: 20px; margin: 28px 0 10px; font-weight: 600; color: #22c55e; /* Heart — Green */ }
.prose h4 { font-size: 17px; margin: 24px 0 8px; font-weight: 600; color: #eab308; /* Solar Plexus — Yellow */ }
.prose h5 { font-size: 16px; margin: 20px 0 6px; font-weight: 600; color: #f97316; /* Sacral — Orange */ }
.prose h6 { font-size: 15px; margin: 16px 0 4px; font-weight: 600; color: #ef4444; /* Root — Red */ }

/* Body text */
.prose p { margin: 0 0 16px; }
.prose strong { color: var(--fg); font-weight: 700; }
.prose em { color: var(--fg-muted); }
/* Body links: external (http/https) get standard web blue; internal
   references (Commons refs `[[@h/s]]`, wikilinks, anchor jumps) keep the
   crown-violet accent. The attribute prefix selector handles the split
   without any markup change. */
.prose a[href^="http"] {
  color: #3b82f6; /* throat-chakra blue, web-standard hyperlink */
  text-decoration: underline;
  text-decoration-color: rgba(59, 130, 246, 0.35);
  text-underline-offset: 2px;
}
.prose a[href^="http"]:hover { text-decoration-color: #3b82f6; }
.prose a:not([href^="http"]) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(167, 139, 250, 0.3);
  text-underline-offset: 2px;
}
.prose a:not([href^="http"]):hover { text-decoration-color: var(--accent); }

/* Lists */
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin-bottom: 4px; }
.prose li::marker { color: #3b82f6; /* Throat — Blue */ }
.prose ul li::marker { content: "• "; }

/* Blockquote */
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 16px;
  margin: 16px 0;
  color: var(--fg-muted);
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* Inline code */
.prose code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.88em;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 3px;
  color: #f97316; /* Sacral — Orange for inline code */
}

/* Code blocks */
.prose pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}
.prose pre code { background: none; padding: 0; color: var(--fg); font-size: 14px; }
/* Syntax-highlighted blocks (syntect output) */
.code-block { margin: 16px 0; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.code-block pre { margin: 0; border: none; border-radius: 0; }
.code-lang {
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 4px 12px;
  background: var(--border);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Images */
.prose img { max-width: 100%; height: auto; border-radius: 4px; margin: 16px 0; }

/* Images with a caption */
.prose figure { margin: 24px 0; }
.prose figcaption { margin-top: 8px; font-size: 14px; color: var(--fg-muted); text-align: center; }

/* Tables */
/* Wide tables scroll inside their own box instead of widening the page. */
.prose .table-wrap { overflow-x: auto; margin: 16px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0; font-size: 15px; }
.prose th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid #3b82f6; /* Throat — Blue */
  font-family: var(--font-sans);
  font-size: 13px;
  color: #3b82f6;
  font-weight: 600;
}
.prose td { padding: 6px 12px; border-bottom: 1px solid var(--border); }
.prose tr:hover td { background: var(--bg-secondary); }

/* Horizontal rule — chakra gradient */
.prose hr {
  border: none;
  height: 2px;
  margin: 32px 0;
  background: linear-gradient(to right, #8b5cf6, #6366f1, #3b82f6, #22c55e, #eab308, #f97316, #ef4444);
}

/* Task lists — hide bullet markers when checkbox present */
.prose ul:has(input[type="checkbox"]), .prose ul:has(> li.task-doing) { list-style: none; padding-left: 4px; }
.prose li.task-doing::before { content: "◐"; color: var(--accent); margin-right: 8px; }
.prose li:has(> input[type="checkbox"]) { display: flex; align-items: baseline; gap: 4px; }

/* Footnotes */
/* Body footnote definitions — number inline-LEFT of the body text via flex,
   no left border. Mirrors the sidebar companion-footnote layout for visual
   consistency. The first definition gets a "Footnotes" heading injected
   server-side (see markdown.rs::add_footnote_heading). */
.prose .footnote-definition {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 10px;
  padding-left: 0;
  border-left: none;
  line-height: 1.55;
}
.prose .footnote-definition-label a { color: inherit; text-decoration: none; }
.prose .footnote-definition-label a:hover { text-decoration: underline; }
.prose .footnote-definition-label .fn-back { margin-left: 2px; font-size: 10px; opacity: 0.6; }
.prose .footnote-definition-label a:hover .fn-back { opacity: 1; }
.prose .footnote-definition-label {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
  padding-top: 3px;
  white-space: nowrap;
}
.prose .footnote-definition > p { flex: 1; min-width: 0; margin: 0; }
.prose .footnote-definition > p + p { margin-top: 6px; }
.prose .footnotes-heading {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  margin: 40px 0 12px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.prose sup a { color: var(--accent); font-size: 0.8em; text-decoration: none; }
.prose sup a:hover { text-decoration: underline; }

/* Strikethrough */
.prose del { color: var(--fg-dim); text-decoration: line-through; }

/* Task lists */
.prose input[type="checkbox"] { margin-right: 6px; accent-color: var(--accent); }

/* Definition lists */
.prose dt { font-weight: 600; color: var(--fg); margin-top: 12px; }
.prose dd { margin-left: 20px; color: var(--fg-muted); }

/* Abbreviations */
.prose abbr { text-decoration: underline dotted; cursor: help; }

/* ── Article footer ── */
.article-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.author-card { display: flex; flex-direction: column; gap: 4px; }
.author-card-handle { font-family: var(--font-sans); font-size: 15px; color: var(--accent); font-weight: 500; }
.author-card-name { font-family: var(--font-sans); font-size: 14px; color: var(--fg-muted); }


/* ── Highlights ── */
mark {
  background: rgba(234, 179, 8, 0.25); /* Solar Plexus yellow, transparent */
  color: inherit;
  padding: 1px 3px;
  border-radius: 2px;
}

/* ── Web layout blocks ── */

/* Drop cap */
.drop-cap {
  float: left;
  font-size: 3.2em;
  line-height: 0.8;
  padding-right: 8px;
  padding-top: 4px;
  color: var(--accent);
  font-weight: 700;
}

/* Two columns */
.web-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 24px 0;
}
.web-col { min-width: 0; }

/* Pullquote */
.web-pullquote {
  font-size: 24px;
  line-height: 1.4;
  color: var(--accent);
  border-left: 4px solid var(--accent);
  padding: 8px 24px;
  margin: 32px -24px;
  font-style: italic;
}

/* Aside / sidenote */
.web-aside {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 15px;
  color: var(--fg-muted);
  border-radius: 0 4px 4px 0;
}

/* Card grid */
.web-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.web-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}
.web-card h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent);
}

/* Stats row */
.web-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin: 32px 0;
  flex-wrap: wrap;
}
.web-stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-sans);
}
.stat-label {
  font-size: 13px;
  color: var(--fg-muted);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose div.web-card h4 { margin-top: 0; }

/* Steps */
.web-steps { counter-reset: step; margin: 24px 0; }
.web-steps h3::before {
  counter-increment: step;
  content: counter(step) ". ";
  color: var(--accent);
  font-weight: 700;
}

/* Hero section */
.web-hero {
  text-align: center;
  padding: 48px 0;
  margin: -40px -24px 32px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.hero-title {
  font-size: 36px;
  margin-bottom: 16px;
}

/* Full bleed */
.web-full-bleed {
  margin: 32px calc(-50vw + 50%);
  padding: 0 calc(50vw - 50%);
}
.web-full-bleed img {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  border-radius: 0;
}

/* Epigraph */
.web-epigraph {
  font-style: italic;
  color: var(--fg-muted);
  border-left: 2px solid var(--fg-dim);
  padding: 8px 20px;
  margin: 24px 0;
  font-size: 17px;
}

.prose div.web-epigraph blockquote { border: 0; padding: 0; margin: 0; }

/* Preface */
.web-preface {
  font-size: 17px;
  color: var(--fg-muted);
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

/* Call to action */
.web-cta {
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  margin: 32px 0;
}

/* Callout */
.web-callout {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
}
.callout-title {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .article-title { font-size: 28px; }
  .content { padding: 24px 16px; }
  .web-columns { grid-template-columns: 1fr; gap: 16px; }
  .web-pullquote { margin: 24px 0; font-size: 20px; }
  .web-stats { gap: 16px; }
  .stat-value { font-size: 24px; }
  .drop-cap { font-size: 2.4em; }
}

/* ── Site publisher additions ── */
.wordmark { color: var(--fg); font-weight: 600; }
.article-cover { margin: 0 0 24px; }
.article-cover img { width: 100%; height: auto; border-radius: 6px; display: block; }
.article-meta { font-family: var(--font-sans); font-size: 14px; color: var(--fg-muted); }
.article-tags a.tag:hover { text-decoration: none; opacity: 0.85; }

.page-heading { font-size: 32px; line-height: 1.2; margin-bottom: 8px; }
.page-intro { color: var(--fg-muted); margin-bottom: 32px; }
.post-list { list-style: none; display: flex; flex-direction: column; gap: 32px; }
.post-item { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.post-item:last-child { border-bottom: none; }
.post-item-title { font-size: 24px; line-height: 1.3; margin-bottom: 6px; }
.post-item-title a { color: var(--fg); }
.post-item-meta { font-family: var(--font-sans); font-size: 13px; color: var(--fg-dim); margin-bottom: 8px; }
.post-item-desc { color: var(--fg-muted); font-size: 17px; }
.post-item-text { font-size: 20px; line-height: 1.5; color: var(--fg); margin-bottom: 8px; }
.post-item-text p { margin: 0 0 .6em; }
.post-item-text p:last-child { margin-bottom: 0; }
.post-item-text .web-poem { margin: 0; }
.post-item.short .post-item-meta a { color: var(--fg-dim); }
.post-item.short:has(.web-poem) .post-item-meta { text-align: center; }
.post-item-thumb img { width: 140px; height: 96px; object-fit: cover; border-radius: 4px; display: block; }
.archive-year { font-family: var(--font-sans); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); margin: 40px 0 16px; }
.archive-list { list-style: none; }
.archive-list li { display: flex; gap: 16px; padding: 6px 0; }
.archive-list time { font-family: var(--font-sans); font-size: 14px; color: var(--fg-dim); min-width: 56px; }
.footer-links a { color: var(--fg-dim); }
.web-reveal { margin: 16px 0; border: 1px solid var(--border); border-radius: 6px; padding: 12px 16px; }
.web-reveal summary { cursor: pointer; font-family: var(--font-sans); font-size: 15px; color: var(--accent); }
.web-reveal[open] summary { margin-bottom: 12px; }
.not-found { text-align: center; padding: 80px 0; }

@media (max-width: 600px) {
  .post-item { grid-template-columns: 1fr; }
  .post-item-thumb { order: -1; }
  .post-item-thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}


/* Poems: each line keeps its break, stanzas apart, set on the center line. */
.web-poem { text-align: center; margin: 28px 0; }
.web-poem p { margin: 0 0 1.1em; }
.web-poem p:last-child { margin-bottom: 0; }
.poem-title { font-weight: 600; margin-bottom: .8em; }

/* Platform marks: a post's other homes and the profile's links. */
.pmark { width: 1em; height: 1em; vertical-align: -0.15em; fill: currentColor; flex: 0 0 auto; }
.also { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.also-link { display: inline-flex; align-items: center; color: var(--fg) !important; text-decoration: none !important; }
.also-link .pmark { width: 1.1em; height: 1.1em; color: var(--brand, currentColor); transition: transform .15s; }
.also-link:hover .pmark { transform: scale(1.15); }

/* Brand colors for platform marks (Simple Icons); dark brands use the text color. */
.pmark-bandcamp { --brand: #408294; }
.pmark-bluesky { --brand: #0285FF; }
.pmark-discord { --brand: #5865F2; }
.pmark-facebook { --brand: #0866FF; }
.pmark-flickr { --brand: #0063DC; }
.pmark-instagram { --brand: #FF0069; }
.pmark-kofi { --brand: #FF6433; }
/* Buy and give providers. */
.pmark-stripe { --brand: #635BFF; }
.pmark-gumroad { --brand: #FF90E8; }
.pmark-lemonsqueezy { --brand: #FFC233; }
.pmark-payhip { --brand: #5C6AC4; }
.pmark-paypal { --brand: #2a9fd6; }
.pmark-shopify { --brand: #7AB55C; }
.pmark-etsy { --brand: #F16521; }
.pmark-amazon { --brand: #FF9900; }
.pmark-itchdotio { --brand: #FA5C5C; }
.pmark-udemy { --brand: #A435F0; }
.pmark-calendly { --brand: #006BFF; }
.pmark-razorpay { --brand: #3395FF; }
.pmark-buymeacoffee { --brand: #FFDD00; }
.pmark-opencollective { --brand: #7FADF2; }
.pmark-cashapp { --brand: #00C244; }
.pmark-venmo { --brand: #3d95ce; }
.pmark-wise { --brand: #9FE870; }
.pmark-githubsponsors { --brand: #EA4AAA; }
.pmark-liberapay { --brand: #F6C915; }
.pmark-linkedin { --brand: #0A66C2; }
.pmark-mastodon { --brand: #6364FF; }
.pmark-peertube { --brand: #F1680D; }
.pmark-pinterest { --brand: #BD081C; }
.pmark-pixelfed { --brand: #6366F1; }
.pmark-reddit { --brand: #FF4500; }
.pmark-rss { --brand: #FFA500; }
.pmark-signal { --brand: #3B45FD; }
.pmark-soundcloud { --brand: #FF5500; }
.pmark-spotify { --brand: #1ED760; }
.pmark-substack { --brand: #FF6719; }
.pmark-telegram { --brand: #26A5E4; }
.pmark-tumblr { --brand: #36465D; }
.pmark-twitch { --brand: #9146FF; }
.pmark-vimeo { --brand: #1AB7EA; }
.pmark-youtube { --brand: #FF0000; }


/* Site footer: a profile card and up to two lines of text. A line split
   with | sits left, middle, and right; the second line is the small print. */
.site-foot { border-top: 1px solid var(--border); margin-top: 48px; }
.pcard { max-width: var(--page-width, 1100px); margin: 0 auto; padding: 26px 28px; box-sizing: border-box; }
.pcard-h { font-weight: 600; color: var(--accent); margin-bottom: 12px; }
.pcard-row { display: flex; align-items: center; gap: 18px; }
.pcard-av { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; padding: 3px; box-sizing: border-box; background: conic-gradient(#ef4444, #f97316, #facc15, #4ade80, #60a5fa, #818cf8, #a78bfa, #ef4444); }
.pcard-markdown .pcard-av { flex-basis: 52px; width: 52px; height: 52px; }
.pcard-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.pcard-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pcard-name { font-weight: 600; color: var(--fg-strong, var(--fg)); font-size: 16px; }
.pcard-line { color: var(--fg-muted); font-size: 14px; line-height: 1.55; }
.pcard-markdown .pcard-line { color: var(--fg); }
.pcard-social, .ft-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.social { display: inline-flex; align-items: center; color: var(--fg-muted) !important; text-decoration: none !important; }
.social:hover { color: var(--fg-strong, var(--fg)) !important; }
.social .pmark { width: 16px; height: 16px; }
.social:hover .pmark { color: var(--brand, currentColor); }
.pcard-btn { flex: 0 0 auto; align-self: center; background: var(--accent); color: var(--bg) !important; font-weight: 600; font-size: 14px; padding: 8px 14px; text-decoration: none !important; }
.pcard-btn:hover { filter: brightness(1.12); }
.ft-line { max-width: var(--page-width, 1100px); margin: 0 auto; box-sizing: border-box; padding: 12px 28px; font-size: 13px; color: var(--fg-muted); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ft-line.cols { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.ft-line.cols .ft-cell:nth-child(2) { justify-content: center; }
.ft-line.cols .ft-cell:nth-child(3) { justify-content: flex-end; }
.ft-line.small { border-top: 0; padding-top: 0; font-size: 12px; justify-content: center; opacity: .8; }
.ft-line.small.cols .ft-cell { justify-content: center; }
@media (max-width: 700px) {
  .pcard-row { flex-wrap: wrap; }
  .pcard-btn { width: 100%; text-align: center; }
  .ft-line.cols { display: flex; flex-direction: column; align-items: flex-start; }
  .ft-line.cols .ft-cell { justify-content: flex-start !important; }
}

/* Buy buttons: the provider's own page takes the payment. */
.buy-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; background: var(--accent); color: var(--bg) !important; font-weight: 600; font-size: 14px; text-decoration: none !important; border-radius: var(--radius, 4px); white-space: nowrap; }
.buy-btn:hover { filter: brightness(1.1); }
.buy-btn .pmark { width: 1em; height: 1em; fill: currentColor; }
.buy-line { margin: 1.4em 0; }
.buy-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 18px 0 6px; }
.buy-box .price { font-size: 22px; font-weight: 600; color: var(--fg-strong, var(--fg)); }
.also-pay { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-muted, var(--fg)); }
.also-pay a { display: inline-flex; color: var(--fg) !important; }
.also-pay .pmark { width: 1.25em; height: 1.25em; color: var(--brand, currentColor); fill: var(--brand, currentColor); }
.via-pay { font-size: 12px; color: var(--fg-dim, var(--fg-muted)); }
.buy-end { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 6px; }

/* Giving: the end-of-post line, the ways to give, and their QR codes. */
.give-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 36px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--fg-muted, var(--fg)); }
.give-main { display: inline-flex; align-items: center; padding: 6px 13px; border: 1px solid var(--accent); color: var(--accent) !important; font-weight: 600; text-decoration: none !important; border-radius: var(--radius, 4px); }
.give-main:hover { background: var(--accent); color: var(--bg) !important; }
.give-marks { display: inline-flex; gap: 10px; align-items: center; }
.give-marks a { display: inline-flex; }
.give-marks .pmark, .gw-head .pmark { width: 1.2em; height: 1.2em; fill: var(--brand, currentColor); }
.give-ways { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.give-ways.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.give-way { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius, 4px); }
.gw-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.gw-id { font-size: 12.5px; word-break: break-all; }
.gw-qr svg, .gw-qr img { display: block; width: 150px; height: 150px; image-rendering: pixelated; }
.gw-go { font-size: 13px; }
.give-lead { margin: 0 0 10px; }

/* ── Layout blocks ──
   Every theme loads these; a theme restyles them by overriding. One color,
   --tone, drives each block: the accent unless a kind or color= sets it. */
.tone-blue { --tone: #3b82f6; }
.tone-green { --tone: #22c55e; }
.tone-amber, .tone-yellow { --tone: #f59e0b; }
.tone-red { --tone: #ef4444; }
.tone-violet, .tone-purple { --tone: #8b5cf6; }
.tone-teal { --tone: #14b8a6; }
.tone-gray, .tone-grey { --tone: var(--fg-dim); }
.zi { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: 0 0 auto; }

/* Callout kinds */
.web-callout { --tone: var(--accent); border-left-color: var(--tone); }
.web-callout .callout-title { color: var(--tone); }
.callout-note, .callout-info { --tone: var(--link, #60a5fa); }
.callout-tip, .callout-success, .callout-check { --tone: #22c55e; }
.callout-warning, .callout-caution, .callout-attention { --tone: #f59e0b; }
.callout-danger, .callout-error, .callout-bug { --tone: #ef4444; }
.callout-example, .callout-quote { --tone: #8b5cf6; }
.callout-definition, .callout-proof, .callout-theorem { --tone: var(--fg-muted); }
.web-callout > :last-child { margin-bottom: 0; }
details.web-callout > summary { cursor: pointer; margin-bottom: 0; }
details.web-callout[open] > summary { margin-bottom: 8px; }

/* Section: a labeled frame that holds other blocks */
.web-section { --tone: var(--accent); margin: 32px 0; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius, 10px); }
.web-section.style-tint { background: color-mix(in srgb, var(--tone) 7%, var(--bg)); border-color: color-mix(in srgb, var(--tone) 22%, var(--bg)); }
.web-section.style-plain { border: 0; padding: 0; }
.web-section.frame-narrow { margin-left: 4%; margin-right: 4%; }
.web-section.frame-wide { margin-left: -6%; margin-right: -6%; }
.section-label { display: flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tone); margin-bottom: 6px; }
.web-section > h2:first-of-type, .web-section > .section-label + h2 { margin-top: 0; }
.web-section > :last-child { margin-bottom: 0; }

/* Summary */
.web-summary { margin: 24px 0; padding: 14px 18px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius, 8px); }
.summary-label { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--link, var(--accent)); margin-bottom: 4px; }
.web-summary > :last-child { margin-bottom: 0; }

/* Steps with ### headings: a numbered list */
.prose ol.web-steps, ol.web-steps { list-style: none; padding: 0; counter-reset: step; }
ol.web-steps > li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 16px; }
ol.web-steps > li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--bg); font-family: var(--font-sans); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-title { display: block; color: var(--fg); }
ol.web-steps > li > p { margin: 2px 0 0; }

/* Cards: icons and columns */
.web-card-grid.per-1 { grid-template-columns: 1fr; }
.web-card-grid.per-2 { grid-template-columns: repeat(2, 1fr); }
.web-card-grid.per-3 { grid-template-columns: repeat(3, 1fr); }
.web-card-grid.per-4 { grid-template-columns: repeat(4, 1fr); }
.card-icon { display: block; color: var(--accent); margin-bottom: 8px; }
.card-icon .zi, .card-icon img { width: 28px; height: 28px; display: block; }
.web-card > :last-child { margin-bottom: 0; }
.web-card-grid.style-photo .web-card { padding-top: 0; overflow: hidden; }
.web-card-grid.style-photo .card-icon { margin: 0 -16px 12px; }
.web-card-grid.style-photo .card-icon img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.web-card-grid.style-photo h4 a { text-decoration: none; }

/* Terms */
.web-terms { margin: 16px 0; }
.web-terms .term { padding: 12px 0; border-bottom: 1px solid var(--border); }
.web-terms .term:last-child { border-bottom: 0; }
.web-terms dt { font-weight: 700; color: var(--fg); }
.web-terms .pos { font-weight: 400; font-style: italic; color: var(--fg-dim); font-size: 0.9em; }
.web-terms dd { margin: 2px 0 0; }
.web-terms .syn { color: var(--tone, #16a34a); font-size: 0.92em; }
.web-terms .ex { font-style: italic; color: var(--fg-muted); }

/* Checklist: shown, not ticked */
.prose .web-checklist, .web-checklist { list-style: none; padding-left: 0; }
.prose .web-checklist > li::marker { content: none; }
.web-checklist > li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.web-checklist > li::before { content: "✓"; position: absolute; left: 4px; color: #22c55e; font-weight: 700; }

/* Timeline */
.prose .web-timeline, .web-timeline { list-style: none; margin: 24px 0; padding: 0 0 0 16px; border-left: 2px solid var(--border); }
.web-timeline > li { position: relative; padding: 0 0 18px 18px; }
.web-timeline > li::before { content: ""; position: absolute; left: -22px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.tl-when { display: block; font-family: var(--font-sans); font-size: 13px; font-weight: 700; color: var(--accent); }
.tl-what > :first-child { margin-top: 0; }
.tl-what > :last-child { margin-bottom: 0; }

/* Compare */
.web-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius, 8px); overflow: hidden; }
.cmp-col { padding: 16px 18px; }
.cmp-col + .cmp-col { border-left: 1px solid var(--border); }
.cmp-col.pick { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.cmp-col h4 { margin: 0 0 8px; }
.cmp-col.pick h4 { color: var(--accent); }
.cmp-col > :last-child { margin-bottom: 0; }

/* FAQ */
.web-faq { margin: 24px 0; border-top: 1px solid var(--border); }
.web-faq details { border-bottom: 1px solid var(--border); padding: 10px 0; }
.web-faq summary { cursor: pointer; font-weight: 600; color: var(--fg); }
.web-faq details[open] summary { margin-bottom: 8px; }
.web-faq details > :last-child { margin-bottom: 0; }

/* Question */
.web-question { margin: 24px 0; }
.q-title { font-weight: 700; margin-bottom: 6px; }
.q-stem p { margin: 0 0 10px; }
.q-options { list-style: upper-alpha; padding-left: 0; margin: 0 0 8px; list-style-position: inside; }
.q-options li { padding: 7px 12px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: var(--radius, 6px); background: var(--bg); }
.q-options li::marker { font-weight: 700; color: var(--accent); }
.q-answer summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.q-answer[open] summary { margin-bottom: 8px; }
.q-answer > :not(summary) { border-left: 3px solid var(--accent); padding-left: 12px; }
.q-answer ul { margin-top: 4px; }

/* Audio */
.web-audio { margin: 20px 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius, 10px); background: var(--bg-secondary); }
.audio-title { text-align: left; font-weight: 600; color: var(--fg); margin-bottom: 8px; }
.web-audio audio { width: 100%; display: block; }
.audio-chapters { list-style: none; padding: 0; margin: 8px 0 0; font-size: 14px; color: var(--fg-muted); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.audio-chapters .t { color: var(--link, var(--accent)); font-variant-numeric: tabular-nums; }
.audio-transcript { margin-top: 8px; }
.audio-transcript summary, .audio-dl { cursor: pointer; font-size: 14px; color: var(--link, var(--accent)); }
.audio-transcript[open] summary { margin-bottom: 8px; }
.audio-dl { display: inline-block; margin-top: 8px; text-decoration: none; }

/* Video, gallery, link cards */
.web-video { margin: 20px 0; }
.web-video video { width: 100%; display: block; border-radius: var(--radius, 8px); background: #000; }
.web-video figcaption { font-size: 14px; color: var(--fg-muted); margin-top: 6px; }
.web-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; margin: 20px 0; }
.gal-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: var(--radius, 4px); margin: 0; }
.web-linkcard { display: flex; flex-direction: column; gap: 2px; margin: 16px 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius, 8px); text-decoration: none; color: var(--fg); background: var(--bg-secondary); }
.web-linkcard:hover { border-color: var(--accent); }
.lc-title { font-weight: 600; color: var(--fg); }
.lc-desc { font-size: 14px; color: var(--fg-muted); }
.lc-site { font-size: 12px; color: var(--fg-dim); }

/* Buttons, statement, subscribe */
.web-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.btn { display: inline-block; padding: 8px 16px; border: 1px solid var(--accent); border-radius: var(--radius, 8px); color: var(--accent); text-decoration: none; font-family: var(--font-sans); font-size: 15px; font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--bg); }
.web-cta .web-buttons, .web-cta p:has(> a:only-child) { justify-content: center; }
.web-cta.style-dark { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.web-cta.style-dark h2, .web-cta.style-dark a { color: var(--bg); }
.web-cta > :first-child { margin-top: 0; }
.web-cta > :last-child { margin-bottom: 0; }
.web-subscribe { margin: 24px 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius, 10px); text-align: center; }
.sub-title { font-weight: 600; margin: 0 0 10px; }
.sub-line { margin: 0; }

.prose .q-options, .prose .audio-chapters { padding-left: 0; }
.prose .q-options { list-style-position: inside; }
.prose .sub-line, .prose .sub-title:last-child { margin-bottom: 0; }

/* Showcase: the top of a project, product, or art page. */
.web-showcase { margin: 0 0 32px; }
.web-showcase img { margin: 0; display: block; }
.web-showcase .sc-media { margin: 0 0 20px; }
.web-showcase .sc-stage { position: relative; }
.web-showcase .sc-lead { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius, 8px); border: 1px solid var(--border); }
.web-showcase .sc-thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.web-showcase .sc-thumb img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.web-showcase .sc-thumb:hover img { border-color: var(--accent); }
.web-showcase .sc-kind { margin: 0 0 4px; font-size: 0.78em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.web-showcase .sc-title { margin: 0 0 8px; font-size: 2em; line-height: 1.15; }
.web-showcase .sc-lede { margin: 0 0 16px; color: var(--fg-muted); font-size: 1.05em; }
.web-showcase .sc-side { display: flex; flex-direction: column; gap: 12px; }
.web-showcase .sc-price { margin: 0; font-size: 1.8em; font-weight: 600; color: var(--fg); }
.web-showcase .sc-buttons, .web-showcase .sc-also { display: flex; flex-wrap: wrap; gap: 8px; }
.web-showcase .sc-also .btn { font-size: 0.85em; padding: 4px 12px; }
.web-showcase .sc-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius, 6px); overflow: hidden; }
.web-showcase .sc-facts > div { padding: 8px 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-right: -1px; margin-bottom: -1px; }
.web-showcase .sc-facts dt { font-size: 0.72em; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); margin: 0; }
.web-showcase .sc-facts dd { margin: 2px 0 0; color: var(--fg); font-weight: 500; }
.web-showcase .sc-status.st-active { color: #22c55e; }
.web-showcase .sc-status.st-paused { color: #f59e0b; }
.web-showcase .sc-status.st-shipped { color: var(--accent); }
.web-showcase .sc-status.st-archived { color: var(--fg-muted); }
.web-showcase .sc-avail { margin: 0; font-size: 0.9em; color: var(--fg-muted); }
.web-showcase .sc-avail.av-available { color: #16a34a; }
.web-showcase .sc-avail::before { content: "● "; }
/* Product: images beside the words. */
.web-showcase.layout-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.web-showcase.layout-split .sc-media { margin: 0; }
.web-showcase.layout-split .sc-lead { aspect-ratio: 4 / 3; }
.web-showcase.layout-split .sc-title { font-size: 1.8em; }
.web-showcase.layout-split .sc-buttons .btn.primary { flex: 1 1 100%; text-align: center; }
.web-showcase.layout-split .sc-facts { display: block; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.web-showcase.layout-split .sc-facts > div { display: flex; justify-content: space-between; border: 0; border-bottom: 1px solid var(--border); padding: 6px 0; margin: 0; }
.web-showcase.layout-split .sc-facts dt { font-size: 0.85em; letter-spacing: 0; text-transform: none; }
.web-showcase.layout-split .sc-facts dd { margin: 0; text-align: right; }
.web-showcase.layout-split .sc-facts > div, .web-showcase.layout-wall .sc-facts > div { gap: 16px; }
.web-showcase.layout-split .sc-facts dt, .web-showcase.layout-wall .sc-facts dt { flex: 0 0 auto; }
/* A book shows its whole cover. */
.web-showcase.kind-book .sc-lead { width: auto; max-width: 100%; aspect-ratio: auto; max-height: 460px; object-fit: contain; border: 0; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2); margin: 0 auto; }
.web-showcase.kind-book .sc-stage { display: flex; justify-content: center; }
/* Art: the piece on a wall, words and facts side by side below. */
.web-showcase.layout-wall .sc-stage { background: color-mix(in srgb, var(--fg) 6%, var(--bg)); padding: 40px; border-radius: var(--radius, 8px); display: flex; justify-content: center; }
.web-showcase.layout-wall .sc-lead { width: auto; max-width: 100%; max-height: 480px; object-fit: contain; border: 0; border-radius: 0; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22); }
.web-showcase.layout-wall .sc-info { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
.web-showcase.layout-wall .sc-title { font-style: italic; font-weight: 400; }
.web-showcase.layout-wall .sc-facts { display: block; border: 0; border-radius: 0; }
.web-showcase.layout-wall .sc-facts > div { display: flex; justify-content: space-between; border: 0; border-bottom: 1px solid var(--border); padding: 6px 0; margin: 0; }
.web-showcase.layout-wall .sc-facts dt { font-size: 0.85em; letter-spacing: 0; text-transform: none; }
.web-showcase.layout-wall .sc-facts dd { margin: 0; text-align: right; }
.web-showcase.layout-wall .sc-buttons { order: 3; flex-direction: column; }
.web-showcase.layout-wall .sc-buttons .btn { text-align: center; }
.web-showcase .sc-prev, .web-showcase .sc-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 28px; line-height: 1; padding: 8px; color: var(--fg-muted); text-decoration: none; }
.web-showcase .sc-prev { left: 8px; }
.web-showcase .sc-next { right: 8px; }
.web-showcase .sc-prev:hover, .web-showcase .sc-next:hover { color: var(--fg); }
.web-showcase .sc-count { position: absolute; right: 14px; bottom: 10px; font-size: 0.75em; color: var(--fg-muted); }
/* Local business: hours, ways to reach you, and a map. */
.web-hours, .web-contact, .web-map { margin: 20px 0; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius, 8px); background: var(--bg-secondary); }
.web-hours .bk-h, .web-contact .bk-h, .web-map .bk-h { margin: 0 0 10px; font-weight: 700; font-size: 0.8em; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.web-hours dl { margin: 0; }
.web-hours dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.web-hours dl > div:last-child { border-bottom: 0; }
.web-hours dt { margin: 0; color: var(--fg-muted); }
.web-hours dd { margin: 0; font-weight: 500; text-align: right; }
.web-hours .hours-note { margin: 8px 0 0; font-size: 0.9em; color: var(--fg-muted); }
.web-contact .ct-ways, .web-map .map-links { display: flex; flex-wrap: wrap; gap: 8px; }
.web-contact p { margin: 0 0 10px; }
.web-contact .ct-ways + p { margin-top: 10px; }
.web-contact a.btn, .web-map a.btn { text-decoration: none; }
.web-contact .ct-address, .web-map .map-addr { color: var(--fg-muted); }
.web-map .map-pic { width: 100%; max-height: 360px; object-fit: cover; border-radius: 6px; margin: 0 0 10px; display: block; }
.web-map .map-addr { margin: 0 0 10px; }
.web-map .map-links .btn { font-size: 0.85em; padding: 4px 12px; }
.badge { display: inline-block; font-size: 0.75em; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--fg-muted); white-space: nowrap; }
.web-gallery.gal-details { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.web-gallery.gal-details .gal-item img { aspect-ratio: 1; }
.web-series { margin: 32px 0 0; }
.web-series .series-h { margin: 0 0 8px; font-size: 0.75em; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-muted); }
.web-series .series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.web-series .series-item { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--fg); font-size: 0.85em; }
.web-series .series-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin: 0; border-radius: 4px; border: 1px solid var(--border); }
.web-series .series-item:hover span { color: var(--accent); }

@media (max-width: 640px) {
  .web-showcase.layout-split, .web-showcase.layout-wall .sc-info { grid-template-columns: 1fr; gap: 16px; }
  .web-showcase.layout-wall .sc-stage { padding: 20px; }
  .web-card-grid.per-2, .web-card-grid.per-3, .web-card-grid.per-4 { grid-template-columns: 1fr; }
  .web-section, .web-section.frame-narrow, .web-section.frame-wide { margin-left: 0; margin-right: 0; padding: 16px; }
  .cmp-col + .cmp-col { border-left: 0; border-top: 1px solid var(--border); }
}
