/* Public site — shared base (uses tokens.css). Themes add palette + header chrome on top. */
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); line-height: 1.65; }
a { color: var(--accent-deep); text-decoration: none; } a:hover { text-decoration: underline; }
code { font-family: var(--font-mono); font-size: .9em; background: var(--bg-sunken); padding: 1px 6px; border-radius: var(--r-sm); }
.muted { color: var(--fg-muted); }

/* Per-page outline (pages.show_outline) — a full-width "On this page" DRAWER (native <details>) above the
   content, with a NESTED table of contents built by static/js/outline-init.js. Full width = the article
   keeps its measure (no sidebar column). */
.detail :is(h1, h2, h3, h4) { scroll-margin-top: 84px; }
.page-outline { margin: 0 0 6px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev); }
.page-outline > summary { cursor: pointer; padding: 12px 16px; list-style: none; display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-muted); }
.page-outline > summary::-webkit-details-marker { display: none; }
.page-outline > summary::before { content: "\25B8"; color: var(--accent); font-size: .9em; transition: transform var(--dur-fast, 120ms) ease; }
.page-outline[open] > summary::before { transform: rotate(90deg); }
.page-outline > summary:hover { color: var(--fg); }
.page-outline .outline-nav { padding: 2px 16px 14px; }
.outline-list { list-style: none; margin: 0; padding: 0; }
.outline-list .outline-list { margin: 2px 0 2px 10px; padding-left: 12px; border-left: 1px solid var(--border); }
.outline-link { display: block; color: var(--fg-muted); font-size: .9rem; line-height: 1.4; padding: 4px 0; }
.outline-link:hover { color: var(--fg); text-decoration: none; }
.outline-link.is-current { color: var(--accent-deep); font-weight: 600; }

/* Design showcase (editor.design_showcase) — a theme-switcher bar above the sample page. */
.showcase-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 8px;
  padding: 10px 14px; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--r-md); }
.showcase-themes { display: inline-flex; gap: 6px; }
.showcase-themes a { padding: 3px 12px; border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  color: var(--fg-muted); font-weight: 600; font-size: .85rem; text-transform: capitalize; }
.showcase-themes a:hover { text-decoration: none; color: var(--fg); }
.showcase-themes a.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.showcase-section { margin-top: .4em; }
.showcase-bar .hint { font-size: .82rem; }

/* Draft preview banner (editor /item/<id>/preview renders the real theme with preview=True). Fixed so it
   floats over the site header; :has pushes the page down so nothing is hidden behind it. */
.preview-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; background: var(--accent);
  color: #fff; text-align: center; padding: 6px 14px; font-size: .8rem; font-weight: 700; letter-spacing: .03em; }
body:has(.preview-banner) { padding-top: 30px; }

/* --- site chrome: sticky header, wordmark, nav (active = 3px accent underline) ------------------- */
header.site { border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg-elev) 90%, transparent);
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px); }
header.site .inner { max-width: 1120px; margin: 0 auto; padding: 15px 32px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
header.site .name { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; font-size: 1.28rem; color: var(--fg); }
header.site nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin-left: auto; }
header.site nav a { color: var(--fg-muted); font-weight: 500; font-size: .95rem; position: relative; padding: 4px 0; }
header.site nav a:hover { color: var(--fg); text-decoration: none; }
header.site nav a.is-active { color: var(--fg); font-weight: 600; }
header.site nav a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px;
  background: var(--accent); border-radius: 2px; }
/* Nav buttons (Design → Nav buttons): link | outline | primary — pills sitting after the nav items. */
header.site nav a.nav-btn { padding: 7px 15px; border-radius: var(--r-pill); font-weight: 600; font-size: .9rem; line-height: 1; }
header.site nav a.nav-btn:hover { text-decoration: none; }
header.site nav a.nav-btn.is-active::after, header.site nav a.nav-btn::after { display: none; }
a.nav-btn--primary { background: var(--accent); color: #fff; }
a.nav-btn--primary:hover { background: var(--accent-deep); color: #fff; }
a.nav-btn--outline { border: 1.5px solid var(--accent); color: var(--accent-deep); }
a.nav-btn--outline:hover { background: var(--accent-soft); }
a.nav-btn--link { color: var(--fg-muted); }
.navitem { position: relative; }
.navitem.has-children:hover .navmenu, .navitem.has-children:focus-within .navmenu { display: block; }
.navmenu { display: none; position: absolute; left: 0; top: 100%; padding: 8px 0; min-width: 172px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); z-index: 30; }
.navmenu a { display: block; padding: 7px 16px; white-space: nowrap; color: var(--fg-muted); }
.navmenu a:hover { color: var(--fg); background: var(--bg-sunken); text-decoration: none; }

/* logo-header mode (site config: branding.use_logo_header). Logo height = --logo-h (header.height_pct
   vh, default 72px). Nav BELOW (centered/left/right) or to the RIGHT of the logo; optional separator. */
.site--logo .site-logo-inner { max-width: 1120px; margin: 0 auto; padding: 16px 32px; display: flex; align-items: center; gap: 24px; }
.site--logo .brand-logo { flex: 0 0 auto; line-height: 0; }
.site--logo .brand-logo img { height: var(--logo-h, 72px); width: auto; max-width: 100%; display: block; }
.site--logo .nav-row .inner { max-width: 1120px; margin: 0 auto; padding: 10px 32px; display: flex; }
.site--logo .nav-row nav { margin-left: 0; flex-wrap: wrap; }
.site--logo.nav-below .site-logo-inner { justify-content: center; }
.site--logo.nav-below.align-center .nav-row .inner { justify-content: center; }
.site--logo.nav-below.align-right  .nav-row .inner { justify-content: flex-end; }
.site--logo.nav-below.align-left   .nav-row .inner { justify-content: flex-start; }
.site--logo.nav-right .site-logo-inner nav { margin-left: auto; flex-wrap: wrap; }
.site--logo.nav-right.align-center .site-logo-inner nav { margin: 0 auto; }
.site--logo.nav-right.align-left   .site-logo-inner nav { margin: 0 auto 0 0; }
.site--logo.has-sep .site-logo-inner { border-bottom: 2px solid var(--accent); }
/* logo position (nav-below): centered (default) or left */
.site--logo.nav-below.logo-left .site-logo-inner { justify-content: flex-start; }
/* header background album — a media layer (images / muted-looping videos) sits behind the LOGO BAND
   only (never the navbar row). `refresh` shows one asset; `rotate` cross-fades all of them (blocks-init.js
   toggles .is-active). An optional gradient (.hdr-bg-grad) fades the media toward a palette color. In
   nav-below the nav-row stays on the normal page background; in nav-right a fade keeps the nav side clean. */
.site--logo.has-bg .site-logo-inner { position: relative; overflow: hidden; }
.hdr-bg-layer { position: absolute; inset: 0; z-index: 0; }
.hdr-bg-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* refresh (static): the single media is always shown. rotate: only .is-active is shown, cross-faded. */
.hdr-bg-layer:not(.is-rotating) .hdr-bg-media { opacity: 1; }
.hdr-bg-layer.is-rotating .hdr-bg-media { opacity: 0; transition: opacity 1s ease; }
.hdr-bg-layer.is-rotating .hdr-bg-media.is-active { opacity: 1; }
.hdr-bg-grad { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.site--logo.has-bg .site-logo-inner > .brand-logo,
.site--logo.has-bg .site-logo-inner > nav { position: relative; z-index: 2; }

/* --- page shell + three-tier header (eyebrow=nav title · header=big · subheader=small) ----------- */
main { max-width: 1120px; margin: 0 auto; padding: 56px 32px 96px; display: flex; flex-direction: column; gap: var(--content-gap, 34px); }
main > article { display: flex; flex-direction: column; gap: 26px; }
.page-header-block { display: flex; flex-direction: column; }
.eyebrow { font-family: var(--font-display); font-weight: 600; font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-deep); margin: 0 0 12px; }
.page-header { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.05;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem); color: var(--fg); margin: 0; max-width: 20ch; }
.page-subheader { font-size: 1.14rem; color: var(--fg-muted); margin: 16px 0 0; max-width: 58ch; line-height: 1.5; }
.title-underline { position: relative; display: inline-block; white-space: nowrap; }
.title-underline::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
  background: var(--accent); border-radius: 2px; }
main h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; font-size: 1.7rem; margin: 1.3em 0 .4em; color: var(--fg); }
main h3 { font-family: var(--font-display); font-weight: 600; color: var(--fg); }
main p { text-wrap: pretty; }
/* prose (markdown body) fills the content column — no reading measure. Long lines are the trade for using
   the full width; that was a deliberate call. (Was `max-width: 68ch`.) */
.prose { max-width: none; } .prose > :first-child { margin-top: 0; }
/* detail-page article bodies (news/events/bios) read as long-form SERIF, like the old CMS — headings
   stay in the display font; page bodies keep the sans body font. */
.detail:not(.is-page) .prose { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.78; }
.detail:not(.is-page) .prose :is(h1, h2, h3, h4) { font-family: var(--font-display); }
.detail:not(.is-page) .prose :is(code, pre) { font-family: var(--font-mono); }
.fieldblock { margin: 0; }
.fname { color: var(--fg-subtle); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 4px; }

/* --- footer ------------------------------------------------------------------------------------- */
footer { border-top: 1px solid var(--border); color: var(--fg-muted); font-size: .9rem; margin-top: 72px; background: var(--bg); }
footer .inner { max-width: 1120px; margin: 0 auto; padding: 40px 32px 34px; display: flex; flex-wrap: wrap;
  gap: 20px 48px; align-items: flex-start; justify-content: space-between; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--fg); letter-spacing: -.01em; }
.footer-logo img { height: 42px; width: auto; display: block; margin-bottom: 4px; }
.footer-tagline { margin: 6px 0 0; max-width: 34ch; }
.footer-addr { margin: 8px 0 0; font-size: .85rem; color: var(--fg-subtle); line-height: 1.5; }
.footer-contact { text-align: right; line-height: 1.7; }
.footer-contact a { color: var(--fg-muted); } .footer-contact a:hover { color: var(--accent-deep); }
.footer-socials { margin-top: 4px; } .footer-socials a { margin-left: 12px; }
.footer-legal { flex: 1 0 100%; text-align: center; font-size: .82rem; color: var(--fg-subtle);
  border-top: 1px solid var(--divider); padding-top: 18px; margin-top: 6px; }

/* occasion banner */
.occasion-banner { background: var(--accent); color: #fff; text-align: center; padding: 9px 16px; font-weight: 600; font-size: .92rem; }
.occasion-banner p { margin: 0; display: inline; } .occasion-banner a { color: #fff; text-decoration: underline; }

/* page blocks
   Vertical rhythm: every block is wrapped in .pblock, which OWNS the top/bottom spacing via --block-pad.
   The wrapper zeroes its child's own outer margins (each .pblock has exactly one child), so padding and
   margin can't stack into unpredictable gaps and one control ("dense / normal / spacious", set per blocks
   field, overridable per block) governs the whole page. Only the DIRECT child is zeroed — margins INSIDE
   a .prose body are untouched. --block-pad is set on .blocks-root and defaults if a block renders alone. */
.blocks-root { --block-pad: clamp(.5rem, 1.2vw, 1rem); }
.pblock { padding-top: var(--block-pad); padding-bottom: var(--block-pad); }
.pblock > :first-child { margin-top: 0; }
.pblock > :last-child { margin-bottom: 0; }

.block-image .asset-ph { border: 1px dashed var(--border-strong); border-radius: var(--r-lg); padding: 22px; text-align: center; color: var(--fg-muted); background: var(--bg-sunken); font-size: .9rem; }
.block-image figcaption { color: var(--fg-subtle); font-size: .85rem; margin-top: 6px; text-align: center; }
/* PDF / document embed (iframe) + download button */
.block-document { margin: 1.4em 0; }
.block-document .doc-frame { width: 100%; min-height: 320px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev); display: block; }
.block-document figcaption { color: var(--fg-subtle); font-size: .85rem; margin-top: 6px; }
.block-download { margin: 1.2em 0; }
.download-btn .dl-icon { font-size: 1.05em; margin-right: 2px; }
.download-btn .dl-ext { opacity: .75; font-size: .82em; text-transform: uppercase; letter-spacing: .03em; }
/* A p5.js sketch is sandboxed and sizes itself — give it a plain surface, no document chrome. */
.block-document .doc-frame--sketch { background: var(--bg); }
/* stl/obj have no in-browser viewer (model-viewer is glTF-only) — an honest fallback, not a blank canvas */
.model-fallback { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px; }
.model-fallback p { margin: 0; color: var(--fg-subtle); }
/* print_profile (.fcfg) — no viewer exists, so it renders as a labelled download card */
.block-profile { display: flex; align-items: center; gap: 14px; margin: 1.2em 0; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev); }
.block-profile .profile-icon { font-size: 1.5rem; line-height: 1; color: var(--accent); }
.block-profile .profile-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.block-profile .profile-sub { color: var(--fg-subtle); font-size: .85rem; }
/* Columns block — a row of block-columns (even, or per-column fr weights via inline style); stacks on mobile */
.block-columns { display: grid; gap: var(--content-gap, 28px); margin: 1.4em 0; align-items: start; }
.block-columns.cols-2 { grid-template-columns: repeat(2, 1fr); }
.block-columns.cols-3 { grid-template-columns: repeat(3, 1fr); }
.block-col > :first-child { margin-top: 0; }
.block-col > :last-child { margin-bottom: 0; }
@media (max-width: 720px) { .block-columns { grid-template-columns: 1fr !important; } }
/* Breadcrumbs — above the page/detail header */
.breadcrumbs { margin: 0 0 14px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: .82rem; }
.breadcrumbs li { display: flex; gap: 6px; }
.breadcrumbs li:not(:first-child)::before { content: "/"; color: var(--fg-subtle); opacity: .6; }
.breadcrumbs a { color: var(--fg-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--fg); font-weight: 600; }
/* Sequential prev/next nav (tutorials / ordered items) at the bottom of a page */
.page-seq { display: flex; justify-content: space-between; gap: 16px; margin: 34px 0 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.page-seq .seq-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--r-md); max-width: 48%; transition: border-color .15s, background .15s; }
.page-seq .seq-link:hover { border-color: var(--accent); background: var(--bg-elev); }
.page-seq .seq-next { text-align: right; margin-left: auto; align-items: flex-end; }
.page-seq .seq-dir { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-subtle); }
.page-seq .seq-title { color: var(--fg); font-weight: 600; }
.page-seq .seq-spacer { flex: 1; }
@media (max-width: 560px) { .page-seq .seq-link { max-width: none; } }
/* Tutorial stepper — a sticky step sidebar beside the content (stacks on mobile) */
.tutorial-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.tutorial-steps { position: sticky; top: 84px; align-self: start; font-size: .9rem; }
.tutorial-steps .ts-title { font-family: var(--font-display); font-weight: 700; margin: 0 0 4px; }
.tutorial-steps .ts-progress { color: var(--fg-subtle); font-size: .8rem; margin: 0 0 12px; }
.tutorial-steps .ts-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.tutorial-steps .ts-list a, .tutorial-steps .ts-list span { display: block; padding: 6px 0 6px 14px; margin-left: -2px;
  border-left: 2px solid transparent; color: var(--fg-muted); text-decoration: none; line-height: 1.35; }
.tutorial-steps .ts-list a:hover { color: var(--accent); border-left-color: var(--border-strong); }
.tutorial-steps .ts-list li.is-current > span { border-left-color: var(--accent); color: var(--fg); font-weight: 600; }
.tutorial-main { min-width: 0; }
@media (max-width: 820px) {
  .tutorial-layout { grid-template-columns: 1fr; gap: 18px; }
  .tutorial-steps { position: static; border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; }
}
/* Accordion block — native <details> */
.block-accordion { margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.block-accordion .acc-item { border-top: 1px solid var(--border); }
.block-accordion .acc-item:first-child { border-top: none; }
.block-accordion summary { cursor: pointer; padding: 13px 18px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; background: var(--bg-elev); }
.block-accordion summary::-webkit-details-marker { display: none; }
.block-accordion summary::after { content: "＋"; color: var(--fg-subtle); font-weight: 400; }
.block-accordion .acc-item[open] > summary::after { content: "－"; }
.block-accordion .acc-body { padding: 4px 18px 16px; }
.block-accordion .acc-body > :first-child { margin-top: 0; }
.block-accordion .acc-body > :last-child { margin-bottom: 0; }
/* Audio block */
.block-audio { margin: 1.4em 0; }
.block-audio .cms-audio { width: 100%; display: block; }
.block-audio figcaption { color: var(--fg-subtle); font-size: .85rem; margin-top: 6px; }
/* Button + modal block (blocks-init.js toggles [hidden]) */
.block-button { margin: 1.3em 0; }
.cms-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 16px; background: rgba(11,14,20,.55); overflow-y: auto; }
.cms-modal[hidden] { display: none; }
.cms-modal-box { position: relative; width: 100%; max-width: 640px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px 30px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.cms-modal-close { position: absolute; top: 12px; right: 14px; border: none; background: transparent;
  font-size: 1.5rem; line-height: 1; color: var(--fg-muted); cursor: pointer; }
.cms-modal-close:hover { color: var(--fg); }
.cms-modal-title { margin: 0 0 12px; }
.cms-modal-body > :first-child { margin-top: 0; }
.cms-modal-body > :last-child { margin-bottom: 0; }
body.cms-modal-open-body { overflow: hidden; }
/* Callout block — note / tip / warning / danger */
.block-callout { margin: 1.4em 0; padding: 14px 18px; border: 1px solid var(--border); border-left-width: 4px;
  border-radius: var(--r-md); background: var(--bg-elev); }
.block-callout .callout-title { margin: 0 0 6px; font-weight: 700; font-family: var(--font-display); font-size: .95rem; }
.block-callout .callout-body > :first-child { margin-top: 0; } .block-callout .callout-body > :last-child { margin-bottom: 0; }
.callout-note    { border-left-color: var(--accent); }
.callout-tip     { border-left-color: #16a34a; }
.callout-warning { border-left-color: #ca8a04; }
.callout-danger  { border-left-color: #dc2626; }
.callout-tip .callout-title    { color: #16a34a; }
.callout-warning .callout-title { color: #ca8a04; }
.callout-danger .callout-title  { color: #dc2626; }
.callout-note .callout-title    { color: var(--accent-deep); }
/* Code block — copy button + language/filename label */
.block-code { margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--bg-sunken); }
.block-code .code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px;
  border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.block-code .code-lang { font-family: var(--font-mono); font-size: .78rem; color: var(--fg-muted); }
.block-code .code-copy { border: 1px solid var(--border-strong); background: var(--bg); color: var(--fg-muted);
  border-radius: var(--r-sm); font-size: .74rem; padding: 3px 10px; cursor: pointer; }
.block-code .code-copy:hover { color: var(--fg); border-color: var(--accent); }
.block-code .code-pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.block-code .code-pre code { font-family: var(--font-mono); font-size: .86rem; line-height: 1.55; background: none; padding: 0; white-space: pre; }
/* Markdown tables — render.py wraps every <table> in .table-wrap so wide ones scroll (never the page). */
.table-wrap { overflow-x: auto; margin: 1.3em 0; border: 1px solid var(--border); border-radius: var(--r-md); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table-wrap th, .table-wrap td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap thead th { background: var(--bg-sunken); font-family: var(--font-display); font-weight: 700;
  font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; color: var(--fg-muted); }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg-sunken) 40%, transparent); }
.table-wrap td + td, .table-wrap th + th { border-left: 1px solid var(--divider); }

/* Detail extras — a spec list (label → value / linked relations) + a photo gallery beneath the body. */
.detail-extras { margin-top: 2em; display: flex; flex-direction: column; gap: 22px; }
.detail-specs { margin: 0; border-top: 1px solid var(--border); }
/* Spec sheet rendered ABOVE the body (robots/apps/teams…) — a stat block before the write-up. */
.detail-specs-top { margin: 1.5em 0 2em; border-bottom: 1px solid var(--border); }
.detail-specs .spec-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 16px;
  padding: 11px 2px; border-bottom: 1px solid var(--border); }
.detail-specs dt { font-family: var(--font-display); font-weight: 600; font-size: .82rem; letter-spacing: .02em;
  text-transform: uppercase; color: var(--fg-muted); margin: 0; }
.detail-specs dd { margin: 0; color: var(--fg); }
.detail-specs dd a { color: var(--accent-deep); }
@media (max-width: 560px) { .detail-specs .spec-row { grid-template-columns: 1fr; gap: 2px; } }
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.detail-gallery img { width: 100%; height: 130px; object-fit: cover; border-radius: var(--r-md); display: block; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 1.2em 0; }
/* content cards — restyled per site config (cards.*) via --card-* vars (set on <body> by card_style) */
.content-card { display: block; background: var(--card-bg, var(--bg-elev)); border: var(--card-border, 1px solid var(--border));
  border-radius: var(--r-xl); padding: 0; overflow: hidden; box-shadow: var(--card-shadow, var(--shadow-xs));
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.content-card:hover { box-shadow: var(--card-hover-shadow, var(--shadow-md)); transform: var(--card-hover-transform, translateY(-2px)); text-decoration: none; }
.content-card .card-hero { width: 100%; height: 150px; object-fit: var(--card-img-fit, cover); display: block; }
/* per-type fallback icon (card_icon) when an item has no hero image */
.content-card .card-hero--icon { display: flex; align-items: center; justify-content: center;
  font-size: 3rem; line-height: 1; background: var(--accent-soft); color: var(--accent-deep); }
.content-card .card-hero--icon svg { width: 46px; height: 46px; }  /* lucide line-icon size */
.content-card h3 { font-family: var(--font-display); font-size: 1.05rem; margin: 14px 18px 4px; color: var(--fg); }
.content-card p { margin: 0 18px 16px; color: var(--fg-muted); font-size: .92rem; }
.content-card:not(:has(.card-hero)) h3 { margin-top: 16px; }
.content-img { max-width: 100%; border-radius: var(--r-lg); }
.content-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 1em 0; }
.content-gallery img { width: 100%; border-radius: var(--r-lg); }
.block-image img { max-width: 100%; border-radius: var(--r-lg); display: block; }
.block-image.align-left { text-align: left; } .block-image.align-right { text-align: right; }
.block-image.align-full img { width: 100%; }

/* --- rich blocks (hero · cta · chart · map · model_viewer · video · youtube) --------------------- */
.btn { display: inline-block; background: var(--accent); color: #fff; border: none; border-radius: var(--r-md, 8px);
  padding: 10px 20px; font-weight: 600; font-family: var(--font-body); cursor: pointer; }
.btn:hover { background: var(--accent-deep); text-decoration: none; }
/* Inline markdown buttons — `[Label](/url){.btn-muted}` / `{.btn-outlined}` (standalone classes, see
   render.py). Same sizing as .btn; muted = neutral surface, outlined = accent border. */
.btn-muted, .btn-outlined { display: inline-block; border-radius: var(--r-md, 8px); padding: 10px 20px;
  font-weight: 600; font-family: var(--font-body); cursor: pointer; }
.btn-muted { background: var(--bg-elev); color: var(--fg); border: 1px solid var(--border-strong); }
.btn-muted:hover { background: var(--bg-sunken); text-decoration: none; }
.btn-outlined { background: transparent; color: var(--accent-deep); border: 1.5px solid var(--accent); }
.btn-outlined:hover { background: var(--accent-soft); text-decoration: none; }

.block-hero { position: relative; border-radius: var(--r-xl); overflow: hidden; margin: 1.4em 0;
  min-height: 300px; display: flex; align-items: center; background: var(--bg-sunken); }
.block-hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.block-hero .hero-inner { position: relative; z-index: 1; padding: 40px; width: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15)); color: #fff; }
.block-hero.align-center { text-align: center; } .block-hero.align-center .hero-inner { background: rgba(0,0,0,.4); }
.block-hero .hero-headline { font-family: var(--font-display); font-size: 2.2rem; margin: 0 0 .3em; color: #fff; }
.block-hero .hero-sub { font-size: 1.15rem; opacity: .95; margin: 0 0 1em; }

.block-cta { border: 1px solid var(--border); border-radius: var(--r-xl); padding: 28px 32px; margin: 1.4em 0;
  text-align: center; background: var(--bg-elev); }
.block-cta.cta-primary { background: var(--accent-soft, var(--bg-elev)); border-color: var(--accent); }
.block-cta.cta-outlined { background: transparent; border-width: 2px; border-color: var(--accent); }
.block-cta .cta-heading { font-family: var(--font-display); margin: 0 0 .4em; }
.block-cta .cta-body { color: var(--fg-muted); margin-bottom: 1em; }

.block-chart { margin: 1.4em 0; }
.block-chart canvas { max-width: 100%; }
.block-chart figcaption { color: var(--fg-subtle); font-size: .85rem; margin-top: 6px; text-align: center; }

.block-model { margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(160deg, var(--bg-elev), var(--bg-sunken)); }
.block-model model-viewer { width: 100%; height: 440px; background: transparent; display: block; --poster-color: transparent; }
.block-model figcaption { padding: 10px 16px; border-top: 1px solid var(--border); color: var(--fg-muted);
  font-size: .85rem; background: var(--bg-elev); }

.block-video { margin: 1.4em 0; }
.block-video .cms-video { width: 100%; max-height: 560px; border-radius: var(--r-lg); background: #000; display: block; }

.block-youtube { margin: 1.4em 0; }
.block-youtube iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-lg); display: block; }
.block-youtube.ar-4x3 iframe { aspect-ratio: 4 / 3; }
.block-youtube.ar-1x1 iframe { aspect-ratio: 1 / 1; }
.block-youtube figcaption { color: var(--fg-subtle); font-size: .85rem; margin-top: 6px; text-align: center; }

/* carousel = ADB album slideshow (blocks-init.js cross-fades slides; arrows/dots optional) */
.block-carousel { position: relative; margin: 1.4em 0; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-sunken); }
.carousel-track { position: relative; aspect-ratio: 16 / 9; }
.carousel-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease-out); }
.carousel-slide.is-active { opacity: 1; }
.carousel-prev, .carousel-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.carousel-prev:hover, .carousel-next:hover { background: rgba(0,0,0,.65); }
.carousel-prev { left: 12px; } .carousel-next { right: 12px; }
.carousel-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 7px; justify-content: center; z-index: 2; }
.carousel-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: rgba(255,255,255,.55); }
.carousel-dot.is-active { background: #fff; }
.block-carousel figcaption { padding: 8px 14px; color: var(--fg-muted); font-size: .85rem; text-align: center; }

.asset-ph { border: 1px dashed var(--border-strong); border-radius: var(--r-lg); padding: 22px; text-align: center;
  color: var(--fg-muted); background: var(--bg-sunken); font-size: .9rem; }

/* --- detail pages (news/events/programs/people): article-width, hero, meta, lead, prose ---------- */
.detail { display: flex; flex-direction: column; gap: 22px; }
/* non-page detail (news/events/people) now uses the full content column, like pages do — the old 760px cap
   is gone. Everything still sits inside `main`'s centered 1120px shell, so text never reaches the window
   edge. (Was `max-width: 760px; align-self: center`.) */
.detail:not(.is-page) { width: 100%; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px;
  font-family: var(--font-mono); font-size: .82rem; color: var(--fg-muted); }
.detail-date, .detail-loc, .detail-role { white-space: nowrap; }
.tag-pill { display: inline-block; background: var(--accent-soft); color: var(--accent-deep); font-weight: 600;
  font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: var(--r-sm); }
.detail-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-xl); display: block; }
.detail-hero--portrait { max-width: 300px; aspect-ratio: 4 / 5; border-radius: var(--r-lg); }
/* the summary blurb sits directly above the body, so it tracks the body's full width now (was 68ch). */
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--fg); margin: 0; }
.detail-actions { margin: 6px 0 0; }

/* --- list header + card category pills ---------------------------------------------------------- */
.list-header { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.content-card .tag-pill { margin: 14px 18px 0; }
.content-card .card-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 18px 0; }
.content-card .card-pills .tag-pill { margin: 0; }
.content-card .card-pills + h3 { margin-top: 8px; }
.content-card .tag-pill + h3 { margin-top: 6px; }

/* --- archive: search/filter form + pagination --------------------------------------------------- */
.list-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 18px;
  padding: 14px 16px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg); }
.list-filters input[type=search] { flex: 1 1 220px; } .list-filters select.input { flex: 0 1 auto; min-width: 160px; }
.archive-count { font-size: .85rem; margin: 0 0 14px; }
.input { font-family: var(--font-body); font-size: .95rem; padding: 8px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--r-md); background: var(--bg-elev); color: var(--fg); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }
.btn.ghost { background: transparent; color: var(--fg-muted); border: 1px solid var(--border-strong); }
.btn.ghost:hover { color: var(--fg); background: var(--bg-elev); }
.btn.secondary { background: var(--bg-elev); color: var(--fg); border: 1px solid var(--border-strong); }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 28px 0 0; }
.pagination-link { display: inline-block; min-width: 38px; text-align: center; padding: 7px 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); color: var(--fg-muted); font-size: .9rem; }
.pagination-link:hover { color: var(--fg); border-color: var(--border-strong); text-decoration: none; }
.pagination-link.is-current { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* --- responsive: fluid padding, wrapping nav, single-column footer/filters ----------------------- */
@media (max-width: 900px) {
  header.site .inner, main, footer .inner { padding-left: 20px; padding-right: 20px; }
  main { padding-top: 40px; padding-bottom: 64px; gap: 26px; }
}
@media (max-width: 640px) {
  header.site .inner { gap: 12px; }
  header.site nav { gap: 14px; font-size: .9rem; width: 100%; margin-left: 0; }
  header.site nav a.is-active::after { bottom: -3px; }
  main, header.site .inner, footer .inner { padding-left: 16px; padding-right: 16px; }
  main { padding-top: 32px; }
  .page-header { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  footer .inner { flex-direction: column; } .footer-contact { text-align: left; }
  .list-filters { flex-direction: column; align-items: stretch; }
  .list-filters input[type=search], .list-filters select.input { min-width: 0; width: 100%; }
  .list-header { flex-direction: column; align-items: flex-start; }
  .site--logo .brand-logo img { height: 56px; }
  .site--logo .logo-row, .site--logo .nav-row .inner { padding-left: 16px; padding-right: 16px; }
}
