/* One scale for every text size (the site's Text size setting changes it),
   and the layout widths, shared so every skin lays a page out the same. */
:root { --text-scale: 1; --content-width: 680px; --page-width: 1180px; }
/* The text steps every size below a heading uses, at the Normal text size:
   labels (capitals) 13, metadata (byline, dates, tags, footer) 14, small
   text 15, text 18, item titles 20. */
:root {
  --fs-label: calc(13px * var(--text-scale));
  --fs-meta: calc(14px * var(--text-scale));
  --fs-small: calc(15px * var(--text-scale));
  --fs-text: calc(18px * var(--text-scale));
  --fs-title: calc(20px * var(--text-scale));
}

/* 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: var(--fs-text);
  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: calc(20px * var(--text-scale));
  text-decoration: none !important;
  letter-spacing: 0.02em;
}
.header-right {
  display: flex;
  align-items: center;
}

.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: var(--fs-meta);
  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: var(--fs-small);
  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: var(--fs-label);
  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: var(--fs-small);
  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: var(--fs-small);
  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: var(--fs-label);
  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: var(--fs-small);
  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: var(--fs-small);
  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: var(--fs-label);
  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: var(--fs-small);
  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: var(--fs-label);
  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: var(--fs-label);
  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: var(--fs-small);
  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: var(--fs-small);
  line-height: 1.6;
  color: var(--fg);
}
.companion-footnote-marker {
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  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 all {
  .companion-card { background: #ffffff; border-color: #d0d0d0; }
  a.companion-card:hover { background: #f5f5f5; }
}

/* ── Article ── */
.article-header { margin-bottom: 32px; }
.article-title {
  font-size: calc(36px * var(--text-scale));
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.article-meta {
  font-family: var(--font-sans);
  font-size: var(--fs-meta);
  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); }

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

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

/* Headings sit close over their own lines, not at the body's open spacing. */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { line-height: 1.3; }

/* Body text */
.prose p { margin: 0 0 16px; }
/* The last block ends the page body; the page's padding takes over. */
.article-body > :last-child { margin-bottom: 0; }
.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: var(--fs-small);
  line-height: 1.6;
}
.prose pre code { background: none; padding: 0; color: var(--fg); font-size: var(--fs-small); }
/* 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: var(--fs-label);
  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; }
/* A profile photo inside a post keeps its round frame, not the picture spacing. */
.prose .pcard-av img { margin: 0; height: 100%; border-radius: 50%; }

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

/* Shaded grid, with a local scroll area when whole words cannot fit. */
.prose .table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; margin: 16px 0; }
.prose table { width: 100%; border: 1px solid var(--border); border-collapse: collapse; font-size: var(--fs-text); }
.prose :is(th, td) {
  padding: 6px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.prose :is(th, td):not([align]) { text-align: left; }
.prose td:first-child { background: color-mix(in srgb, var(--fg-strong) 5%, var(--bg)); color: var(--fg-strong); font-weight: 600; }
.prose :is(th, thead td) { background: color-mix(in srgb, var(--fg-strong) 9%, var(--bg)); color: var(--fg-strong); font-weight: 600; }

/* A line of three dashes (---) breaks a page into sections: a quiet rule
   in the theme's border color. Skins may draw their own. */
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  height: 0;
  margin: 36px 0;
}
/* A box already marks the break, so a rule beside one is left out. */

/* 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: var(--fs-small);
  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: var(--fs-small); 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: var(--fs-small);
  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: calc(22px * var(--text-scale));
  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: var(--fs-small); color: var(--accent); font-weight: 500; }
.author-card-name { font-family: var(--font-sans); font-size: var(--fs-small); 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 */

/* Aside / sidenote */

/* Card grid */
.prose :is(.web-section:not(.style-plain), .web-card-grid) + hr,
.prose hr:has(+ .web-section:not(.style-plain)) { display: none; }

.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: var(--fs-title);
  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: calc(32px * var(--text-scale));
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-sans);
}
.stat-label {
  font-size: var(--fs-label);
  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;
}

/* 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 */

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

/* Call to action */

/* 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: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .article-title { font-size: calc(28px * var(--text-scale)); }
  .content { padding: 24px 16px; }
  .web-columns { grid-template-columns: 1fr; gap: 16px; }
  .web-stats { gap: 16px; }
  .stat-value { font-size: calc(24px * var(--text-scale)); }
  .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: var(--fs-meta); color: var(--fg-muted); }

.page-heading { font-size: calc(32px * var(--text-scale)); line-height: 1.2; margin-bottom: 8px; }
.archive-year { font-family: var(--font-sans); font-size: var(--fs-small); 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: var(--fs-meta); color: var(--fg-dim); min-width: 56px; }
.footer-links a { color: var(--fg-dim); }

.not-found { text-align: center; padding: 80px 0; }

/* 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; }
/* The profile card stands on its own above the footer, not inside it. */
/* The page's own bottom padding already stands between it and the card. */
.pcard-wrap { max-width: var(--page-width, 1100px); margin: 10px auto 0; padding: 0 28px; box-sizing: border-box; }
.pcard-wrap .pcard, .post-card .pcard { border: 1px solid var(--border); border-radius: 10px; }
/* On a post the card is its last block, spaced like any other. */
.article-body > .post-card { margin-top: 32px; }
/* In the reading column the button drops under the words, lined up with them. */
.post-card .pcard-row { flex-wrap: wrap; align-items: flex-start; }
.post-card .pcard-text { flex: 1 1 360px; }
.post-card .pcard-btn { margin-left: 82px; }
.pcard-wrap + .site-foot { margin-top: 32px; }
/* `:::profile layout=banner`: centered and stacked; sideways and tinted on a wide page. */
.pcard-banner { padding: 32px 20px 16px; text-align: center; }
.pcard-banner .pcard-row { flex-direction: column; gap: 12px; }
.pcard-banner .pcard-av { flex-basis: 96px; width: 96px; height: 96px; }
.pcard-banner .pcard-name { font-size: calc(24px * var(--text-scale)); font-family: var(--font-heading, inherit); }
.pcard-banner .pcard-line { max-width: 440px; margin: 0 auto; font-size: var(--fs-small); }
.pcard-banner .pcard-social { justify-content: center; }
@media (min-width: 900px) {
  .home-intro .pcard-banner, .prose .pcard-banner { text-align: left; border-radius: 14px; background: color-mix(in srgb, var(--accent) 8%, var(--bg)); padding: 24px 28px; }
  .home-intro .pcard-banner .pcard-row, .prose .pcard-banner .pcard-row { flex-direction: row; gap: 22px; }
  .home-intro .pcard-banner .pcard-av, .prose .pcard-banner .pcard-av { flex-basis: 120px; width: 120px; height: 120px; }
  .home-intro .pcard-banner .pcard-line, .prose .pcard-banner .pcard-line { margin: 0; max-width: none; }
  .home-intro .pcard-banner .pcard-social, .prose .pcard-banner .pcard-social { justify-content: flex-start; }
}
.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: var(--fs-title); }
.pcard-line { color: var(--fg-muted); font-size: var(--fs-small); 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: var(--fs-small); 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: var(--fs-meta); 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: var(--fs-meta); 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; }
  .post-card .pcard-btn { margin-left: 0; }
  .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: var(--fs-small); 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: calc(22px * var(--text-scale)); font-weight: 600; color: var(--fg-strong, var(--fg)); }
.also-pay { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); 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: var(--fs-small); color: var(--fg-dim, var(--fg-muted)); }
.buy-end { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 6px; }

/* Payment links: the end-of-post line, the Support button, and the ways
   all equal (design D), each its mark and name; an ID way's QR code opens
   under the row. */
.give-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 36px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); font-size: var(--fs-small); color: var(--fg-muted); }
.give-social { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; }
.give { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.give-open { flex-direction: column; align-items: flex-start; gap: 6px; }
.give-words { font-weight: 600; color: var(--fg); }
.give-btn { 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-btn:hover { background: var(--accent); color: var(--bg) !important; }
.give-icons { display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.give-icon { display: inline-flex; color: var(--fg-muted) !important; text-decoration: none !important; }
.give-icon .pmark, .gd-mark .pmark { width: 1.2em; height: 1.2em; fill: var(--brand, currentColor); }
.gd-badge { display: inline-block; padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; font-size: var(--fs-meta); font-weight: 600; color: var(--fg-muted); }
.give-d { text-align: center; margin: 20px 0; }
.gd-ways { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 28px; }
.gd-way { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gd-go { display: inline-flex; align-items: center; gap: 8px; color: var(--fg) !important; text-decoration: none !important; font-weight: 600; }
.gd-go .gd-mark .pmark { width: 1.6em; height: 1.6em; }
.gd-show { font-size: var(--fs-meta); color: var(--accent); cursor: pointer; }
.gd-t { display: none; }
.gd-qr { display: none; margin: 16px auto 0; }
.gd-t:checked + .gd-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.gd-qr svg, .gd-qr img { display: block; width: 170px; height: 170px; image-rendering: pixelated; }
.gd-scan { margin: 0; font-size: var(--fs-small); color: var(--fg-muted); }
.gd-copy { font: inherit; font-size: var(--fs-small); padding: 4px 12px; border: 1px solid var(--border); border-radius: 4px; background: none; color: var(--fg); cursor: pointer; }
/* A phone cannot scan its own screen: its icon opens the payment app. */
@media (pointer: coarse) { .gd-show, .gd-qr { display: none !important; } }
.support-page { text-align: center; padding: 12px 0 24px; }
.support-h { margin: 0 0 18px; }
.give-lead { margin: 0 0 10px; }
.pcard-give { flex: 0 0 auto; align-self: center; }

/* ── 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 > summary::before { content: "▸ "; }
details.web-callout[open] > summary::before { content: "▾ "; }
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; }
/* A box's first line starts at its top edge, whatever the heading spacing. */
.u .prose .web-section > :first-child, .web-section > :first-child { margin-top: 0; }
.web-section.frame-narrow { margin-left: 4%; margin-right: 4%; }
.web-section.frame-wide { margin-left: -6%; margin-right: -6%; }
/* An eyebrow (a short bold line above a heading) looks like a section label. */
.eyebrow { font-family: var(--font-sans); font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.eyebrow + h1, .eyebrow + h2, .eyebrow + h3 { margin-top: 0 !important; }
.prose .eyebrow { margin-bottom: 4px; }
/* A post's own typed line (`above:`) stands above its title in the eyebrow
   style, in place of the topic path, in every skin. */
.article-label { margin: 0 0 8px; }
.path:has(+ .article-label) { display: none; }
.section-label { display: flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-size: var(--fs-label); 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: var(--fs-label); 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: var(--fs-small); 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:first-child { padding-top: 0; }
.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 */

/* 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: var(--fs-meta); 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 h4 { margin: 0 0 8px; }
/* The picked column says so with a badge, not a color of its own. */
.cmp-badge { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: var(--radius, 6px); font-size: var(--fs-label); font-weight: 700; letter-spacing: .01em; white-space: nowrap; line-height: 1.4; vertical-align: middle; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.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; }

/* Testimonials */

/* Question sets: a test screen. Check answers is a checkbox the CSS reads,
   so marks, feedback, and the score need no script; Start over resets the form. */
.web-quiz { --ok: #15803d; --no: #b91c1c; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius, 10px); overflow: hidden; background: var(--bg); counter-reset: q-right; }
@media not all { .web-quiz { --ok: #4ade80; --no: #f87171; } }
.q-head { padding: 10px 24px; background: var(--bg-secondary); border-bottom: 1px solid var(--border); font-size: var(--fs-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted); }
.q-item + .q-item .q-head { border-top: 1px solid var(--border); }
.q-body { padding: 18px 24px 20px; }
.q-title { font-weight: 700; margin-bottom: 6px; }
.q-stem { font-weight: 600; color: var(--fg-strong); margin-bottom: 10px; }
.q-stem p { margin: 0 0 8px; }
.q-stem p:last-child { margin-bottom: 0; }
.q-options { display: flex; flex-direction: column; gap: 2px; }
.q-opt { display: flex; gap: 12px; align-items: flex-start; padding: 8px; border-radius: 6px; cursor: pointer; line-height: 1.5; }
.q-opt input { flex: 0 0 auto; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--accent); cursor: pointer; }
.q-opt:hover { background: var(--bg-secondary); }
.q-opt:has(input:checked) { background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.q-letter { color: var(--fg-strong); }
.q-feedback, .q-why { display: none; }
.q-feedback { margin: 10px 0 0 8px; font-size: var(--fs-small); font-weight: 600; }
.q-good { color: var(--ok); }
.q-bad { color: var(--no); }
.q-none { color: var(--fg-muted); }
.q-why { margin: 10px 0 0 8px; color: var(--fg-muted); }
.q-why > :last-child { margin-bottom: 0; }
.q-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 24px; border-top: 1px solid var(--border); }
.q-check { position: relative; cursor: pointer; }
.q-check-box { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.q-check:has(.q-check-box:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.q-hide { display: none; }
.q-reset { background: transparent; border: 0; color: var(--link, var(--accent)); font: inherit; font-weight: 600; cursor: pointer; padding: 8px 4px; }
.q-score { font-weight: 600; color: var(--fg-strong); }
.q-opt.is-right:has(input:checked) { counter-increment: q-right; }
/* Checked: the right answer in green, a wrong pick in red, the feedback, the score. */
.web-quiz:has(.q-check-box:checked) .q-show { display: none; }
.web-quiz:has(.q-check-box:checked) .q-hide { display: inline; }
.web-quiz:has(.q-check-box:checked) .q-opt.is-right { background: color-mix(in srgb, var(--ok) 12%, var(--bg)); }
.web-quiz:has(.q-check-box:checked) .q-opt.is-right input { accent-color: var(--ok); }
.web-quiz:has(.q-check-box:checked) .q-opt:not(.is-right):has(input:checked) { background: color-mix(in srgb, var(--no) 12%, var(--bg)); }
.web-quiz:has(.q-check-box:checked) .q-opt:not(.is-right) input:checked { accent-color: var(--no); }
.web-quiz:has(.q-check-box:checked) .q-item:has(.is-right input:checked) .q-good,
.web-quiz:has(.q-check-box:checked) .q-item:has(input:checked):not(:has(.is-right input:checked)) .q-bad,
.web-quiz:has(.q-check-box:checked) .q-item:has(.is-right):not(:has(input:checked)) .q-none,
.web-quiz:has(.q-check-box:checked) .q-why { display: block; }
.web-quiz:has(.q-check-box:checked) .q-score::after { content: counter(q-right) " of " attr(data-total) " correct"; }

/* Columns: `wide` reaches the page width, `sticky` keeps the first column in
   view, `flow` runs one text through two columns. */
/* Wide columns stop at 1000px: room for a passage and its questions, not so wide that lines run long. */
.web-columns.is-wide { --cols-w: min(1000px, calc(100vw - 32px)); width: var(--cols-w); margin-left: calc((100% - var(--cols-w)) / 2); margin-right: calc((100% - var(--cols-w)) / 2); gap: 56px; }
.web-columns.is-sticky > .web-col:first-child { position: sticky; top: calc(var(--hd-h, 75px) + 16px); max-height: calc(100vh - var(--hd-h, 75px) - 32px); overflow-y: auto; align-self: start; }
.web-columns.is-flow { display: block; columns: 2 320px; column-gap: 48px; column-rule: 1px solid var(--border); }
.web-columns.is-flow > :first-child { margin-top: 0; }
.web-columns.is-flow :is(h2, h3, h4) { break-after: avoid; }
.web-columns.is-flow p { orphans: 3; widows: 3; }
@media (max-width: 860px) {
  .web-columns.is-wide { width: auto; margin-left: 0; margin-right: 0; grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .web-columns.is-sticky > .web-col:first-child { position: static; max-height: none; overflow: visible; }
}

/* Numbered paragraphs: a small number in the margin beside each. */
.numbered { counter-reset: para; }
/* A numbered column keeps its numbers inside it (a column can scroll and clip). */
.web-col.numbered { padding-left: 2.4em; }
.numbered > p:not(.eyebrow) { counter-increment: para; position: relative; }
.numbered > p:not(.eyebrow)::before { content: counter(para); position: absolute; left: -2.4em; width: 1.6em; top: .35em; text-align: right; font-size: var(--fs-label); font-weight: 700; line-height: 1.4; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .numbered > p:not(.eyebrow)::before { position: static; display: inline-block; width: auto; margin-right: .6em; }
  .web-col.numbered { padding-left: 0; }
}

/* Audio */
.web-audio { margin: 20px 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius, 10px); background: var(--bg-secondary); }
/* The title reads as a heading over the player. */
.web-audio .audio-title { text-align: left; font-family: var(--font-heading); font-size: calc(20px * var(--text-scale)); font-weight: 600; line-height: 1.3; color: var(--fg); margin: 0 0 12px; }
.web-audio audio { width: 100%; display: block; }
.audio-chapters { list-style: none; padding: 0; margin: 14px 0 0; font-size: var(--fs-small); 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: var(--fs-small); color: var(--link, var(--accent)); }
.audio-transcript[open] summary { margin-bottom: 8px; }
.audio-dl { display: inline-block; margin-top: 8px; text-decoration: none; }
/* `style=dark`: the player on a dark ground, like a dark statement band. */

/* 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: var(--fs-small); 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: var(--fs-small); color: var(--fg-muted); }
.lc-site { font-size: var(--fs-small); color: var(--fg-dim); }
/* A link card with a picture: the picture beside its words. */
.web-linkcard.has-pic { display: grid; grid-template-columns: 96px 1fr; column-gap: 14px; align-items: center; }
.web-linkcard.has-pic .lc-pic { grid-row: 1 / span 3; }
.web-linkcard.has-pic .lc-pic img { display: block; width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius, 6px); }

/* Buttons, statement, subscribe */
.web-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.web-buttons.stack { flex-direction: column; align-items: stretch; max-width: 520px; }
.web-buttons.stack .btn { justify-content: center; text-align: center; padding: 14px 18px; font-size: var(--fs-text); }
.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: var(--fs-small); font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--bg); }

/* Subscribe: the words on the left, the button on the right; stacked on phones. */
.web-subscribe { margin: 24px 0; padding: 24px 28px; border: 1px solid var(--border); border-radius: var(--radius, 10px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.web-subscribe .sub-text { flex: 999 1 320px; min-width: 0; }
.web-subscribe .sub-text > * { margin: 0; }
.web-subscribe .sub-text > * + * { margin-top: 8px; }
.sub-title { font-weight: 600; font-size: calc(20px * var(--text-scale)); color: var(--fg-strong); }
.web-subscribe .sub-text > p:not(.sub-title):not(.eyebrow) { color: var(--fg-muted); }
.sub-line { margin: 0; flex: 0 0 auto; }

.prose .q-options, .prose .audio-chapters { padding-left: 0; }
.prose .q-options { list-style-position: inside; }
.prose .sub-line { 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: calc(28px * var(--text-scale)); 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-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-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-map .map-links { display: flex; flex-wrap: wrap; gap: 8px; }

.web-map a.btn { text-decoration: none; }
.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; }

@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); }
}

/* Buttons are never underlined; weight, not a line, marks them. */
a.btn, .web-buttons a, a.hm-btn, a.pcard-btn, a.buy-btn, .prose a.btn, .prose .web-buttons a { text-decoration: none !important; font-weight: 700; }
a.btn:hover, .web-buttons a:hover, a.hm-btn:hover, a.pcard-btn:hover, a.buy-btn:hover { text-decoration: none !important; filter: brightness(1.1); }

/* Quote: always in its marks, a large “ in the accent, the words in
   italics and the name under them; `large` sets it apart as a pull quote. */
.web-quote { position: relative; margin: 28px 0; padding: 0 0 0 44px; }
.web-quote::before { content: "\201C"; position: absolute; left: 0; top: -12px; font-family: Georgia, serif; font-size: 64px; line-height: 1; color: var(--accent); }
.prose figure.web-quote > blockquote { margin: 0; padding: 0; border: 0; font-style: italic; color: var(--fg); }
.web-quote blockquote > :last-child { margin-bottom: 0; }
.web-quote figcaption { margin-top: 8px; font-size: var(--fs-small); color: var(--fg-muted); font-style: normal; }
.web-quote figcaption::before { content: "— "; }
.web-quote.is-large { padding-left: 56px; }
.web-quote.is-large::before { font-size: 88px; top: -18px; }
.web-quote.is-large blockquote { font-size: calc(24px * var(--text-scale)); line-height: 1.4; }

/* A task list is drawn with ticks, never form checkboxes: ✓ for done, ○
   for open (a skin may draw its own marks, as Unicode's [x] and [ ]). */
.prose li > input[type="checkbox"], .prose li > p > input[type="checkbox"] { display: none; }
.prose li:has(> input[type="checkbox"])::before, .prose li > p:first-child:has(> input[type="checkbox"])::before { content: "○"; color: var(--fg-dim); margin-right: 8px; }
.prose li:has(> input[type="checkbox"]:checked)::before, .prose li > p:first-child:has(> input[type="checkbox"]:checked)::before { content: "✓"; color: #22c55e; font-weight: 700; }
