/* plinth presentation (SPEC PRES area). Self-hosted, system fonts,
   zero external requests (PRIV-01). Mobile-first (PRES-01). */

:root {
  --bg: #101014;
  --fg: #f2f2f0;
  --muted: #b9b9b4;
  --scrim: linear-gradient(to top, rgba(8, 8, 10, 0.88) 0%,
                           rgba(8, 8, 10, 0.55) 55%, rgba(8, 8, 10, 0) 100%);
  --accent: #d8c9a3;
  /* PRES-18: surfaces are tokens too — :palette overrides append
     after this block, so the cascade takes the owner's values */
  --surface: #1b1b22;
  --surface-2: #22222b;
  --hairline: rgba(255, 255, 255, 0.08);
  --card-backdrop: rgba(10, 10, 13, 0.78);
  /* chrome halo for floating arrows over media — palettes with light
     grounds override it light (2026-08-13) */
  --halo: rgba(0, 0, 0, 0.9);
  /* info-card backdrop blur — configurable via :palette :card-blur
     (per Andrew, 2026-08-13) */
  --card-blur: 12px;
  /* pills + boxed chrome: rectangular with subtle rounding by default
     (the card-tile look, per Andrew); :pill-shape :round → 999px */
  --pill-radius: 6px;
  /* one size for the whole arrow family — ← → ↑ ↓ read as a set only
     if they are drawn at the same size (Andrew, 2026-08-11: the nav
     arrows were 22.4px against the card's 14.7px) */
  --arrow-size: 1.25rem;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { max-width: 100%; height: auto; }

/* ---- full-viewport item presentation (PRES-01) ---- */
main.item { min-height: 100svh; position: relative; }
main.item > h1 { position: absolute; left: -9999px; } /* title lives on the card */
main.item figure {
  margin: 0; height: 100svh; display: grid; place-items: center;
  background: var(--bg);
}
/* PRES-01: :cover (default) fills the entire visible viewport;
   :contain letterboxes on the canvas — selectable per portfolio. */
main.m-cover figure img {
  width: 100vw; height: 100svh; object-fit: cover; display: block;
}
main.m-contain figure img {
  max-height: 100svh; max-width: 100vw; width: auto; height: auto;
  object-fit: contain; display: block;
}
main.item video, main.item audio { width: min(92vw, 60rem); }
main.item pre {
  width: min(92vw, 46rem); margin: 4rem auto; padding: 1.5rem;
  overflow-x: auto; background: var(--surface); border-radius: 6px;
  font-size: 0.9rem;
}

/* ---- info card: native details/summary overlay (PRES-04/05).
   No JS: open by default, the summary is the unobtrusive toggle;
   scrim keeps WCAG AA contrast without hiding the media. ---- */
details.card {
  position: fixed; inset: auto 0 0 0; z-index: 2;
  padding: 1.1rem 1.25rem;
  /* distinct backdrop: AA-legible over ANY media (PRES-04) — solid
     enough alone; blur adds separation where supported */
  background: var(--card-backdrop);
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
details.card summary {
  cursor: pointer; list-style: none; display: inline-block;
  /* 0.49.0: the title is the page's most important information on a
     lander — :palette {:summary-size "1.7rem"} grows it */
  font-size: var(--summary-size, 1.15rem);
  font-weight: 600; letter-spacing: 0.01em;
}
details.card summary::-webkit-details-marker { display: none; }
/* bottom-sheet grammar (Andrew, 2026-08-10): closed shows ↑ (pull up
   to reveal), open shows ↓ (tuck away) — arrows match the card's
   actual motion, where the carets read ambiguously */
details.card summary::after {
  content: " ↓"; color: var(--muted); font-size: var(--arrow-size);
}
details.card:not([open]) summary::after { content: " ↑"; }
/* 0.49.0 top-attached card (:presentation {:card-edge :top}): the
   bottom-sheet grammar flips — closed shows ↓ (pull down to reveal),
   open shows ↑ (tuck away upward) */
details.card.card-top {
  /* IN FLOW at the top, not a fixed overlay — an overlay swallows
     whatever scrolls beneath (the feed stream taught us); the
     branding pill carries the always-visible name. BAND layout
     (Andrew's review: floating centered panels read loose): the
     band runs full-bleed, its CONTENT aligns to one shared column */
  position: relative; z-index: 1;
  border-top: none; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
/* :band-align :center — every band's content on one shared column;
   the default stays LEFT from the edge padding (Andrew's review) */
main.item.bands-center details.card.card-top,
main.item.bands-center section.feed {
  padding-left: max(1.25rem, calc((100vw - 46rem) / 2));
  padding-right: max(1.25rem, calc((100vw - 46rem) / 2));
}
/* the lander background: the first image FIXED behind everything —
   in-flow media moved when the card toggled (Andrew's review) */
main.item figure.bg {
  position: fixed; inset: 0; margin: 0; z-index: 0; height: 100svh;
}
main.item figure.bg figure { margin: 0; height: 100svh; }
main.item figure.bg img {
  width: 100vw; height: 100svh; object-fit: cover; display: block;
}
/* the feed is a full-bleed BAND on the same column as the card,
   separated by a strip of the photograph — bands, not floating
   panels (Andrew's review) */
main.item section.feed {
  background: var(--card-backdrop);
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0;
}
/* the lead viewport: card band up top, the photograph owns the rest
   of the FIRST SCREEN; whatever follows begins at the fold — the
   viewport is the boundary, never an arbitrary gap */
main.item div.lead { min-height: 100svh; position: relative; z-index: 1; }
/* the scroll cue: the arrow family's ↓ at the foot of the lead — a
   quiet, working link to what lies below the fold */
a.scroll-cue {
  position: absolute; bottom: 1.1rem; left: 50%; transform: translateX(-50%);
  width: 2.8rem; height: 2.8rem; display: grid; place-items: center;
  font-size: calc(var(--arrow-size) * 1.25); color: var(--fg);
  text-decoration: none;
  background: var(--card-backdrop); border: 1px solid var(--hairline);
  border-radius: 50%;
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
}
a.scroll-cue:hover, a.scroll-cue:focus-visible {
  border-color: var(--accent); color: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  a.scroll-cue { animation: plinth-cue 2.2s ease-in-out infinite; }
  @keyframes plinth-cue {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 0.35rem); }
  }
  html { scroll-behavior: smooth; }
}

details.card.card-top summary::after { content: " ↑"; }
details.card.card-top:not([open]) summary::after { content: " ↓"; }
details.card .text, details.card .phase-text { max-width: 46rem; }
/* 0.48.0 mobile card: an OPEN card never swallows the small frame —
   its content scrolls inside a cap while the summary stays pinned.
   ::details-content is progressive enhancement: without support the
   card simply grows, exactly as before */
@media (max-width: 40rem) {
  details.card[open]::details-content {
    display: block; max-height: 55vh;
    overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}
details.card .text p, details.card .meta { color: var(--muted); }
details.card .meta { font-size: 0.85rem; margin: 0.5rem 0 0; }
details.card .meta a { color: var(--fg); }
p.cta { margin: 0.75rem 0 0; }
p.cta a {
  display: inline-block; padding: 0.45rem 1.1rem; border: 1px solid var(--accent);
  border-radius: 3px; color: var(--accent); text-decoration: none;
}
p.cta .price { margin-left: 0.75rem; color: var(--muted); }
p.cta .price s { opacity: 0.6; margin-right: 0.4rem; }
code.coupon {
  margin-left: 0.75rem; padding: 0.15rem 0.5rem;
  border: 1px dashed var(--muted); border-radius: 3px;
}
p.ended { color: var(--accent); font-size: 0.9rem; margin: 0.4rem 0 0; }
footer.rights { color: var(--muted); font-size: 0.75rem; margin-top: 0.6rem; }

/* ---- 0.48.0 commerce metadata: quiet lines under the card body ---- */
p.notice { color: var(--accent); font-size: 0.9rem; margin: 0.5rem 0 0; }
ul.quotes { list-style: none; padding: 0; margin: 0.6rem 0 0; }
ul.quotes li { font-size: 0.9rem; color: var(--muted); margin: 0.25rem 0 0; }
ul.quotes q { font-style: italic; }
ul.quotes .source a { color: var(--fg); }
ul.links { list-style: none; padding: 0; margin: 0.6rem 0 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; }
ul.links li { font-size: 0.85rem; }
ul.links a { color: var(--fg); }
/* CONTACT-02: the obfuscated address link; without JS the anchor has
   no href and the noscript words form speaks instead */
p.contact { margin: 0.75rem 0 0; }
p.contact a.contact-mail {
  display: inline-block; padding: 0.45rem 1.1rem;
  border: 1px solid var(--muted); border-radius: 3px;
  color: var(--fg); text-decoration: none; cursor: pointer;
}
p.contact a.contact-mail:hover { border-color: var(--accent); color: var(--accent); }
p.contact .contact-words { color: var(--muted); margin-left: 0.6rem; font-size: 0.9rem; }
main.linkspage p.contact { margin-top: 1.2rem; }
p.maker, p.seller { color: var(--muted); font-size: 0.8rem; margin: 0.5rem 0 0; }
p.maker a, p.seller a { color: var(--fg); }

/* ---- PRES-20 links mode: one page of outbound buttons ---- */
main.linkspage {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.4rem;
  padding: 3rem 1.25rem; max-width: 30rem; margin: 0 auto;
  text-align: center; position: relative;
}
/* PRES-20 background photograph: full viewport behind the buttons,
   pipeline-derived; scrim via the palette token */
main.linkspage figure.bg {
  position: fixed; inset: 0; margin: 0; z-index: 0;
}
/* media-el wraps in its own inner <figure>: default figure margins
   (1em/40px) shrank the backdrop into a bordered box (Andrew's
   report) — zero it and let it fill */
main.linkspage figure.bg figure { margin: 0; height: 100svh; }
main.linkspage figure.bg img {
  width: 100vw; height: 100svh; object-fit: cover; display: block;
}
main.linkspage figure.bg.scrimmed::after {
  content: ""; position: absolute; inset: 0; background: var(--scrim);
}
main.linkspage > *:not(figure.bg) { position: relative; z-index: 1; }
main.linkspage figure.bg ~ h1, main.linkspage figure.bg ~ p.tagline {
  text-shadow: 0 0 10px var(--halo);
}
main.linkspage img.avatar {
  width: 6rem; height: 6rem; object-fit: cover;
  border-radius: 50%; border: 1px solid var(--hairline);
  margin-bottom: 0.6rem;
}
main.linkspage h1 { margin: 0; font-size: 1.4rem; letter-spacing: 0.01em; }
main.linkspage p.tagline { margin: 0 0 1.2rem; color: var(--muted); }
ul.linklist { list-style: none; margin: 0; padding: 0; width: 100%; }
ul.linklist li { margin: 0.7rem 0; }
a.link-button {
  display: block; padding: 0.85rem 1.2rem; text-decoration: none;
  border: 1px solid var(--accent); border-radius: var(--pill-radius);
  background: var(--surface); color: var(--fg);
  /* subtle hover feedback (Andrew, 2026-08-16): a breath of lift,
     a brighter edge, a soft shadow — never garish */
  transition: background 0.15s ease, border-color 0.15s ease,
              transform 0.15s ease, box-shadow 0.15s ease;
}
a.link-button:hover, a.link-button:focus-visible {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--fg));
  transform: translateY(-1px);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
}
@media (prefers-reduced-motion: reduce) {
  a.link-button:hover, a.link-button:focus-visible { transform: none; }
}
a.link-button .note { display: block; font-size: 0.8rem; color: var(--accent); margin-top: 0.2rem; }

/* ---- PRIV-10 legal links: the permanent, quiet path to privacy/
   and terms/ on Tier-3 portfolios — the banner disappears once
   answered, this never does ---- */
nav.legal {
  position: fixed; right: 0.9rem; bottom: 0.5rem; z-index: 3;
  font-size: 0.72rem; opacity: 0.55;
}
nav.legal:hover, nav.legal:focus-within { opacity: 1; }
nav.legal a { color: var(--muted); text-decoration: none; }
nav.legal a:hover, nav.legal a:focus-visible { color: var(--fg); text-decoration: underline; }

/* ---- FEED-02: the excerpt panel — tight editorial cards on the
   site's tile grammar (Andrew's review: the loose list read janky) ---- */
section.feed {
  position: relative; z-index: 1;
  padding: 1.5rem 1.25rem 2rem;
}
section.feed h2 {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin: 0 0 0.9rem;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--hairline); padding-bottom: 0.5rem;
}
section.feed h2 .asof {
  font-weight: 400; letter-spacing: 0.02em; text-transform: none;
  font-size: 0.75rem; opacity: 0.8;
}
ul.feed-entries {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
ul.feed-entries li {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 6px; padding: 0.9rem 1rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}
a.feed-title {
  font-weight: 600; text-decoration: none; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
a.feed-title:hover { color: var(--accent); }
p.feed-meta {
  margin: 0; font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
p.feed-summary {
  margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- PRIV-09 consent banner: plain, quiet, dismissible — shown only
   when a consent-gated provider exists and no choice is stored ---- */
div.consent {
  position: fixed; inset: auto 0 0 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center;
  padding: 0.8rem 1.25rem;
  background: var(--card-backdrop);
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  border-top: 1px solid var(--hairline);
  font-size: 0.9rem;
}
div.consent p { margin: 0; color: var(--muted); }
div.consent a { color: var(--fg); }
div.consent button {
  background: none; border: 1px solid var(--accent); border-radius: 3px;
  color: var(--accent); padding: 0.35rem 1rem; cursor: pointer;
  font: inherit;
}
div.consent button.consent-no { border-color: var(--muted); color: var(--muted); }
ul.providers { padding-left: 1.2rem; max-width: 46rem; }
ul.providers li { margin: 0.5rem 0; }
div.consent-manage { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--hairline); }
div.consent-manage .status { color: var(--muted); }
div.consent-manage button {
  background: none; border: 1px solid var(--accent); border-radius: 3px;
  color: var(--accent); padding: 0.35rem 1rem; cursor: pointer;
  font: inherit; margin-right: 0.6rem;
}
div.consent-manage button.consent-no { border-color: var(--muted); color: var(--muted); }

/* ---- 0.48.0 brand logo in the home pill: cap to the pill's line ---- */
nav.home img.brand {
  height: 1.1em; width: auto; vertical-align: -0.18em; margin-right: 0.45em;
}

/* ---- 0.48.0 category :effect :sparkle (CON-05): tiny twinkling
   marks either side of the label. CSS-only; without motion consent
   they hold as faint static marks — the effect still reads, nothing
   moves ---- */
.fx-sparkle { position: relative; }
/* block-level hosts (the category page h1) must hug their text or
   the right-hand mark lands at the far page edge */
h1.fx-sparkle { display: inline-block; }
.fx-sparkle::before, .fx-sparkle::after {
  content: "\2726"; position: absolute; font-size: 0.45em; line-height: 1;
  opacity: 0.35; pointer-events: none; text-decoration: none;
}
.fx-sparkle::before { top: -0.5em; right: -0.7em; }
.fx-sparkle::after { bottom: -0.35em; left: -0.8em; }
@media (prefers-reduced-motion: no-preference) {
  .fx-sparkle::before { animation: plinth-twinkle 2.6s ease-in-out infinite; }
  .fx-sparkle::after { animation: plinth-twinkle 2.6s ease-in-out 1.3s infinite; }
}
@keyframes plinth-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 0.9; transform: scale(1); }
}

/* ---- in-place slideshow home (PRES-10 :slideshow, ruled 2026-08-10):
   URL constant; first slide is the no-JS content; crossfade honours
   prefers-reduced-motion via the animation kill below ---- */
div.slides section.slide { display: none; }
div.slides section.slide.active { display: block; animation: 0.6s ease both slide-fade; }
@keyframes slide-fade { from { opacity: 0; } }
nav.slides-nav { display: none; } /* JS-only controls */
html.js nav.slides-nav { display: block; }
nav.slides-nav button {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 3;
  background: none; border: none; cursor: pointer;
  padding: 0.6rem 0.8rem; font-size: var(--arrow-size); color: var(--fg); opacity: 0.7;
  text-shadow: 0 0 8px var(--halo), 0 0 2px var(--halo);
}
nav.slides-nav button:hover, nav.slides-nav button:focus-visible { opacity: 1; }
nav.slides-nav .prev { left: 0.25rem; }
nav.slides-nav .next { right: 0.25rem; }
details.card summary a { text-decoration: none; }
details.card summary a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  div.slides section.slide.active { animation: none; }
}

/* ---- home affordance: minimal chrome back to the tree root ---- */
/* chrome hangs on the SAME column grid as page content (Andrew,
   2026-08-13: the title pill's left edge must align with the
   elements below): the 80rem container's content edge, or 1.25rem
   on narrow viewports — identical on every page type. Known nuance:
   100vw counts a CLASSIC scrollbar, so on non-overlay-scrollbar OSes
   a scrolling page shifts chrome ~7px; exact under macOS/iOS overlay
   scrollbars */
nav.home {
  position: fixed; top: 0.6rem; z-index: 3;
  left: calc(max((100vw - 80rem) / 2, 0rem) + 1.25rem);
}
/* card-edge :top (0.49.0, Andrew's review): the card's title owns the
   top-left, so the pill mirrors to the BOTTOM with the same spacing —
   a stable identity anchor balancing the legal links' corner */
main.item:has(details.card.card-top) nav.home {
  top: auto; bottom: 0.6rem;
}
/* the top-right control cluster: Browse, and — when exhibitions
   exist — the way into /x/ (Andrew's placement, 2026-08-13) */
nav.browse {
  position: fixed; top: 0.6rem; z-index: 3;
  right: calc(max((100vw - 80rem) / 2, 0rem) + 1.25rem);
  display: flex; gap: 0.4rem;
}
/* boxed chrome (per Andrew, 2026-08-13): the site name and the
   cluster links sit in pill boxes — the category-pill style — so they
   are legible over any media under any palette, no contrast tricks */
nav.home a, nav.browse a, nav.home > span, nav.browse > span {
  display: inline-block; padding: 0.35rem 0.8rem; text-decoration: none;
  font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg); background: var(--card-backdrop);
  border: 1px solid var(--hairline); border-radius: var(--pill-radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  /* quiet by default, distinct on hover/focus (Andrew, 2026-08-13):
     present without disrupting the page. A bare span = the CURRENT
     location: same slot, no link, no hover raise (2026-08-14) */
  opacity: 0.55; transition: opacity 0.15s;
}
nav.home a:hover, nav.home a:focus-visible,
nav.browse a:hover, nav.browse a:focus-visible { opacity: 1; }
/* small screens: the pills collided side-by-side (Andrew's mobile
   screenshot) — stack them in one left-aligned column, smaller and
   quieter still, so photographs keep the frame */
@media (max-width: 40rem) {
  nav.browse {
    right: auto; left: 1.25rem; top: 3rem;
    flex-direction: column; align-items: flex-start; gap: 0.3rem;
  }
  nav.home a, nav.browse a, nav.home > span, nav.browse > span {
    font-size: 0.72rem; padding: 0.25rem 0.6rem; opacity: 0.4;
  }
  nav.home > span, nav.browse > span { opacity: 0.25; }
  main.item nav.home a, main.item nav.browse a { opacity: 0.2; }
  main.item nav.home > span, main.item nav.browse > span { opacity: 0.17; }
}
/* an INACTIVE pill (the you-are-here state) reads as such: fainter
   than the links beside it, muted text, and deliberately NO hover
   response (Andrew, 2026-08-14) */
nav.home > span, nav.browse > span {
  opacity: 0.35; color: var(--muted); cursor: default;
}
/* over full-bleed media the chrome fades further — clearly present,
   very much diminished, until hover (Andrew, 2026-08-14) */
main.item nav.home a, main.item nav.browse a { opacity: 0.3; }
/* inactive pills stay LEGIBLE over media — 0.18 vanished entirely
   (Andrew's water-page screenshot); the muted colour still marks
   them quieter than the links beside them */
main.item nav.home > span, main.item nav.browse > span { opacity: 0.25; }
main.item nav.home a:hover, main.item nav.home a:focus-visible,
main.item nav.browse a:hover, main.item nav.browse a:focus-visible { opacity: 1; }


/* ---- prev/next (PRES-03 static half; keyboard/swipe arrive with the viewer) */
nav.seq a {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 3;
  padding: 0.6rem 0.8rem; text-decoration: none; font-size: var(--arrow-size);
  color: var(--fg); opacity: 0.7; transition: opacity 0.2s;
  /* legible over any media, including pure white (PRES-04 spirit) */
  text-shadow: 0 0 8px var(--halo), 0 0 2px var(--halo);
}
nav.seq a:hover, nav.seq a:focus-visible { opacity: 1; }
nav.seq a[rel="prev"] { left: 0.25rem; }
nav.seq a[rel="next"] { right: 0.25rem; }

/* ---- index & category: media-first grid ---- */
main.browse {
  /* top padding clears the fixed chrome row (0.6rem + pill height) —
     the same pill position on EVERY page type (Andrew, 2026-08-13) */
  padding: 3.6rem 1.25rem 1.25rem; max-width: 80rem; margin: 0 auto;
}
/* the mobile chrome STACK is taller — content clears it (must sit
   after the base rule: same specificity, cascade decides) */
@media (max-width: 40rem) {
  main.browse { padding-top: 7rem; }
}
main.browse h1 { font-weight: 600; letter-spacing: 0.01em; }
ul.grid {
  list-style: none; margin: 1.5rem 0; padding: 0;
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(46vw, 15rem), 1fr));
}
ul.grid a { text-decoration: none; display: block; }
/* THE grid tile is the framed card (per Andrew, 2026-08-13, adopted
   portfolio-wide): SQUARE photograph bordered with the title beneath,
   separated from the background */
ul.grid li {
  background: var(--surface); border-radius: 6px; overflow: hidden;
  border: 1px solid var(--hairline);
  /* a browse page may hold thousands of tiles: skip layout and paint
     for off-screen ones while keeping their reserved height exact, so
     scrollbars and anchors stay stable (13a) */
  content-visibility: auto; contain-intrinsic-size: auto 15rem;
}
ul.grid img, ul.grid .ph {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  background: var(--surface);
}
ul.grid .ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--muted); font-size: 1.9rem;
}
ul.grid .label {
  display: block; color: var(--fg); font-size: 0.85rem;
  padding: 0.5rem 0.65rem 0.5rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
ul.grid .sub {
  display: block; margin-top: -0.45rem; padding: 0 0.65rem 0.55rem;
  color: var(--muted); font-size: 0.8rem;
}
ul.grid a:hover .label { color: var(--accent); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
p.crumb { margin: 0 0 0.2rem; }
p.crumb a { color: var(--muted); font-size: 0.9rem; }
p.crumb a::before { content: "\2190\00a0"; }
ul.categories { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
ul.categories a {
  display: inline-block; padding: 0.25rem 0.9rem;
  border: 1px solid var(--hairline); background: var(--surface);
  border-radius: var(--pill-radius); text-decoration: none;
  color: var(--muted); font-size: 0.9rem;
}
ul.categories a:hover { color: var(--fg); border-color: var(--muted); }
/* the taxonomy marks (\u00a7 categories, # tags) read as marks, not
   words: dimmer than the text they prefix (Andrew, 2026-08-14) */
span.pfx { opacity: 0.5; }
div.definition { max-width: 46rem; color: var(--muted); }
p.hero a { color: var(--accent); }

/* ---- cross-document view transitions (PRES-02 registry, static half).
   Progressive: browsers without the API navigate normally. ---- */
@view-transition { navigation: auto; }
html.t-slide-h::view-transition-old(root) {
  animation: 0.28s ease both slide-out-l;
}
html.t-slide-h::view-transition-new(root) {
  animation: 0.28s ease both slide-in-r;
}
html.t-zoom::view-transition-old(root) { animation: 0.3s ease both fade-out; }
html.t-zoom::view-transition-new(root) { animation: 0.3s ease both zoom-in; }
/* t-crossfade: the API's default cross-fade — no extra rules needed */
@keyframes slide-out-l { to { transform: translateX(-6%); opacity: 0; } }
@keyframes slide-in-r { from { transform: translateX(6%); opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes zoom-in { from { transform: scale(1.03); opacity: 0; } }

/* ---- accessibility: motion (PRES-03, TEST-09) ---- */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
  nav.seq a { transition: none; }
}

/* ---- print (PRES-12): ink-legible, flattened, no chrome ---- */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  main.item { min-height: 0; }
  main.item figure { height: auto; }
  main.item figure img { max-height: 60vh; }
  details.card { position: static; background: none; padding: 0.5rem 0;
                 backdrop-filter: none; border-top: none; }
  details.card:not([open]) { display: block; }
  details.card .text p, details.card .meta { color: #222; }
  nav.seq, nav.home, ul.categories { display: none; }
  p.cta a { border: none; padding: 0; color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  footer.rights { color: #444; }
}

/* ---- dictionary-entry category header (CON-05) ---- */
header.dict h1 { display: inline-block; margin-bottom: 0.2rem; }
p.when {
  color: var(--muted); font-size: 0.9rem; letter-spacing: 0.04em;
  font-feature-settings: "tnum" 1; margin: 0.1rem 0 0.4rem;
}
header.dict .phon {
  margin-left: 0.8rem; color: var(--muted); font-size: 1.05rem;
}
header.dict .def { max-width: 46rem; color: var(--fg); margin: 0.3rem 0 0.4rem; }
header.dict .related { color: var(--muted); font-size: 0.9rem; }
header.dict .related a { color: var(--fg); }

/* ---- deck mode (PRES-14): slides application ---- */
main.deck figure.bg { position: absolute; inset: 0; z-index: 0; height: 100svh; }
main.deck figure.bg figure { height: 100svh; }
/* :background {:scrim true} — dim an image backdrop for legibility */
main.deck figure.bg.scrimmed::after {
  content: ""; position: absolute; inset: 0;
  /* the palette's --scrim token: dark-to-transparent by default;
     dark-text palettes override it light */
  background: var(--scrim);
}
main.deck .slide-content {
  position: relative; z-index: 1; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 58rem; margin: 0 auto; padding: 8vh 8vw;
}
/* the legibility glow exists FOR photographs — a solid-colour slide
   without one must stay sharp (Andrew, 2026-08-16: "janky") */
main.deck figure.bg ~ .slide-content {
  text-shadow: 0 0 10px rgba(8, 8, 10, 0.7);
}
main.deck > h1 { position: static; left: auto; }
main.deck .slide-content h1 {
  position: static; font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1.12; margin: 0.2em 0 0.4em;
}
main.deck .slide-content .text { max-width: none; font-size: 1.15rem; }
main.deck .slide-content .text li { margin: 0.35em 0; }
/* inline media on a slide: contained, never the full-bleed treatment */
main.deck .slide-content figure {
  height: auto; margin: 1.2rem 0; background: transparent;
  justify-items: start;
}
main.m-cover .slide-content figure img, main.m-contain .slide-content figure img {
  width: auto; height: auto; max-width: 100%; max-height: 52svh;
  object-fit: contain; border-radius: 6px;
}
p.kicker {
  color: var(--accent); text-transform: uppercase; font-size: 0.8rem;
  letter-spacing: 0.12em; margin: 0 0 0.2em;
}
aside.notes { display: none; }
html.show-notes aside.notes {
  display: block; position: fixed; inset: 0 0 auto 0; z-index: 6;
  background: rgba(10, 10, 13, 0.93); color: var(--muted);
  padding: 1rem 1.4rem; font-size: 0.95rem; border-bottom: 1px solid #33333c;
}
div.progress { position: fixed; bottom: 0.55rem; right: 0.9rem; z-index: 3; }
div.progress a {
  color: var(--muted); font-size: 0.8rem; text-decoration: none;
  text-shadow: 0 0 8px var(--halo);
}
div.progress a:hover { color: var(--fg); }
nav.vert a {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 3;
  padding: 0.4rem 0.9rem; text-decoration: none; font-size: var(--arrow-size);
  color: var(--fg); opacity: 0.7;
  text-shadow: 0 0 8px var(--halo), 0 0 2px var(--halo);
}
nav.vert a:hover, nav.vert a:focus-visible { opacity: 1; }
nav.vert a.up { top: 0.15rem; }
nav.vert a.down { bottom: 0.15rem; }
/* fragments: stepwise reveal, JS only; full content without JS/print */
html.js main.deck[data-fragments] .slide-content li {
  opacity: 0.15; transition: opacity 0.25s;
}
html.js main.deck[data-fragments] .slide-content li.revealed { opacity: 1; }
/* overview: spatial map whose axes MATCH the keys — sections as
   columns (←/→), slides stacked within a column (↑/↓). Shared by the
   browse/ page and the in-slide popup. */
div.ov-map {
  display: flex; gap: 1.1rem; align-items: flex-start;
  /* horizontal padding ≥ outline width + offset (2px + 3px): the
     scroll box clips at its content edge, which was cutting the
     selection outline off the leftmost column (Andrew's screenshot) */
  overflow-x: auto; padding: 0.5rem 6px 1rem;
  /* keep the outline visible when the viewer scrolls a tile to the
     edge (scrollIntoView would otherwise consume the padding) */
  scroll-padding: 8px;
}
div.ov-map section.ov {
  flex: 0 0 clamp(9rem, 20vw, 13rem);
  /* flex items floor at min-content by default (min-width: auto) — a
     long nowrap label was widening its whole column past the basis,
     so the ellipsis never engaged (Andrew's catch, F-002) */
  min-width: 0; width: clamp(9rem, 20vw, 13rem);
}
div.ov-map section.ov h2 {
  font-size: 0.95rem; color: var(--muted); margin: 0 0 0.5rem;
}
div.ov-map ul.col {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.6rem;
}
div.ov-map ul.col li {
  background: var(--surface); border-radius: 6px; overflow: hidden;
  border: 1px solid var(--hairline);
}
div.ov-map ul.col a { display: block; text-decoration: none; }
/* every tile the same size: image thumb or placeholder glyph */
div.ov-map ul.col img, div.ov-map ul.col .ph {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
}
div.ov-map ul.col .ph {
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--muted); font-size: 1.9rem;
}
div.ov-map ul.col .label {
  display: block; padding: 0.45rem 0.6rem;
  color: var(--fg); font-size: 0.85rem;
  /* one line, clipped with an ellipsis — tiles stay aligned; the
     full title is the anchor's :title hover pop-over */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
div.ov-map ul.col a:hover li, div.ov-map ul.col a:hover .label { color: var(--accent); }
/* CURRENT slide (arrived-from: the URL fragment on the browse page,
   or .current in the fetched popup, where no fragment exists): solid
   accent. SELECTED (the arrow-key cursor): dashed fg. A bg-coloured
   ring sits under each outline so both read on any ground — the
   popup backdrop included (Andrew's review, 2026-08-16) */
div.ov-map li:target, div.ov-map li.current {
  outline: 2px solid var(--accent); outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--bg);
}
div.ov-map li.selected {
  outline: 2px dashed var(--fg); outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--bg);
}
/* 2D spatial indicator: bottom edge = sections (←/→), right edge =
   slides within the current section (↑/↓). Subtle but clear. */
div.pos { pointer-events: none; --pos-size: 3px; }
div.pos-h {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; gap: 4px; height: var(--pos-size);
}
div.pos-v {
  position: fixed; top: 0; bottom: var(--pos-size); right: 0; z-index: 4;
  display: flex; flex-direction: column; gap: 4px; width: var(--pos-size);
}
/* palette-aware bars: fg-mixed so light palettes read dark marks on
   light grounds (Andrew, 2026-08-16: white-on-white lost them) */
div.pos-h span, div.pos-v span {
  flex: 1; background: color-mix(in srgb, var(--fg) 18%, transparent);
}
div.pos-h span.on, div.pos-v span.on { background: var(--accent); }
/* :contrast :strong — heavier fg bars with a bg ring, legible over
   any slide ground, photographs and solid colours alike */
div.pos.strong span {
  background: color-mix(in srgb, var(--fg) 42%, transparent);
  box-shadow: 0 0 0 1px var(--bg);
}
div.pos.strong span.on { background: var(--fg); box-shadow: 0 0 0 1px var(--bg); }

/* PRES-17 (evaluation): body-prose justification. Scoped to direct
   paragraphs of .text blocks — lists, verse blockquotes and headings
   stay ragged by design. The CSS is the no-JS/native fallback; the
   vendored justif module upgrades exactly these paragraphs. */
html[data-justify] .text > p { text-align: justify; }
html[data-justify="native"] .text > p { hyphens: auto; }

/* handout: the whole deck as one printable document (PRES-14) */
main.handout { padding: 1.25rem; max-width: 46rem; margin: 0 auto; }
main.handout nav.home a {
  position: static; padding: 0; text-shadow: none; color: var(--muted);
}
main.handout h2 { color: var(--muted); font-size: 1.1rem; margin: 2.2rem 0 0.4rem; }
main.handout article.handout-slide {
  border-top: 1px solid #26262e; padding: 1rem 0 0.5rem; margin-top: 1rem;
}
main.handout h3 { margin: 0 0 0.5rem; }
main.handout figure { margin: 1rem 0; }
main.handout img {
  width: auto; height: auto; max-width: 100%; max-height: 40svh;
  border-radius: 6px;
}
main.handout aside.notes {
  display: block; position: static; inset: auto; background: none;
  border: none; border-left: 3px solid var(--accent);
  padding: 0.25rem 0.9rem; margin-top: 0.8rem;
  color: var(--muted); font-size: 0.95rem;
}
main.handout aside.notes::before { content: "Notes: "; font-weight: 600; }
p.tools a { color: var(--accent); font-size: 0.9rem; }
@media print {
  /* one ⌘P → one page per slide (Andrew's ruling): the h1 is the
     cover page; each section opens a fresh page with its heading on
     its first slide's page; every further slide breaks to a new page */
  main.handout section.handout-section { break-before: page; }
  main.handout article.handout-slide + article.handout-slide { break-before: page; }
  main.handout article.handout-slide { break-inside: avoid; border-top: none; }
  main.handout h2 { break-after: avoid; }
  main.handout aside.notes { color: #333; border-left-color: #999; }
}

/* popup overview on slide pages (JS-only; browse/ stays the no-JS path) */
div.ov-popup {
  display: none; position: fixed; inset: 0; z-index: 7;
  /* legibility over any slide: near-opaque scrim + blur separation,
     congruent with the info card's backdrop treatment */
  background: rgba(10, 10, 13, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: auto; padding: 1.75rem;
}
html.show-ov div.ov-popup { display: block; }
div.ov-popup p.tools { margin: 0 0 1rem; }
html.show-ov { overflow: hidden; }
@media print {
  /* the background is stage dressing, not handout content — printing
     it produced a page of image before the slide (Andrew's report).
     :background {:print true} opts a slide's backdrop back in, flowed
     as a contained image above the content, never its own page. */
  main.deck figure.bg { display: none; }
  main.deck figure.bg.print-keep { display: block; position: static; height: auto; }
  main.deck figure.bg.print-keep figure { height: auto; }
  main.deck figure.bg.print-keep img {
    width: auto; height: auto; max-width: 100%; max-height: 9cm;
    object-fit: contain;
  }
  main.deck figure.bg.print-keep::after { content: none; }
  main.deck .slide-content { min-height: 0; text-shadow: none; padding: 0.5rem 0; }
  aside.notes { display: block; border-top: 1px solid #999; color: #333;
                margin-top: 0.8rem; padding-top: 0.4rem; }
  aside.notes::before { content: "Notes: "; font-weight: 600; }
  div.progress, nav.vert, div.pos { display: none; }
  html.js main.deck[data-fragments] .slide-content li { opacity: 1; }
}

/* PRES-18 palette overrides (portfolio :palette) */
:root { --accent: #a05c3b; --bg: #f5f1ec; --card-backdrop: rgba(250, 246, 240, 0.9); --fg: #241f1a; --hairline: rgba(40, 30, 20, 0.12); --halo: rgba(255, 253, 250, 0.92); --muted: #6b6259; --summary-size: 1.7rem; --surface: #fbf8f4; --surface-2: #f1ebe3; }
