/* Phage Directory on the Prague `phage` theme (D26). /vendor/prague-styles/theme.css (vendored, loaded first) supplies the
   theme's role tokens and base type; this file is page composition only: the baseline rhythm, the column grid, and the
   site's pieces. No raw colors here: every color is a theme token (brief: /DESIGN.md).
   Rules are scoped to .theme-scope so they beat Prague's same-specificity base rules by coming later.
   Vertical: editorial roles use the consolidated type/rhythm block at the end; --b remains the outer site spacing.
   Horizontal: bands (header, hero, footer) run full width; their content and main share one wide column, and main
   puts a text column (the measure) inside it. .wide spans the wide column. */
/* Type: a system UI font stack everywhere (Jan, 2026-09-26: "lets just use a system ui font stack"); code stays monospace.
   Same specificity as Prague's theme block, later in order. */
.theme-scope[data-theme="phage"] {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-display: var(--font-sans);
  --font-marketing: var(--font-sans);
  --font-role-body: var(--font-sans);
  --font-role-heading: var(--font-sans);
  --font-role-display: var(--font-sans);
  --font-role-label: var(--font-sans);
  --font-role-control: var(--font-sans);
}

/* Shared light-mode reading ink; muted metadata and explicit CTA colors retain their roles. */
html:not([data-variant="dark"]) .theme-scope[data-theme="phage"] {
  --color-text-primary: var(--color-pdv3-brand-100);
  --color-text-secondary: var(--color-pdv3-brand-100);
  --color-text-heading: var(--color-pdv3-brand-100);
  --color-text-neutral: var(--color-pdv3-brand-100);
  --color-link: var(--color-pdv3-brand-100);
}

/* Dark mode: the phage theme's dark variant (theme.json → variants.dark) supplies the colors; Layout.astro sets
   data-variant="dark" on <html> from the saved choice or the OS preference. Only site-level remaps live here. */
[data-variant="dark"] { color-scheme: dark; }
/* transparent PNGs in posts (logos, diagrams) are drawn for white pages */
[data-variant="dark"] .theme-scope :is(.prose, .digest) img { background: var(--color-pdv3-purewhite); }
/* image pairs drawn for a light or a dark background (logos): show the one that matches the mode */
.theme-scope .on-dark, [data-variant="dark"] .theme-scope .on-light { display: none; }
[data-variant="dark"] .theme-scope .on-dark { display: inline-block; }
.theme-scope {
  --b: 1.625rem;
  --g: 1rem;
  --text: 38rem;
  --wide: 60rem;
  --article-width: 44rem;
  --meta: var(--color-text-muted);
  --rule: var(--color-border);
  font: 400 1.0625rem/var(--b) var(--font-role-body);
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  height: auto;
  -webkit-text-size-adjust: 100%;
}

/* ---------- type: one scale (0.875 / 1.0625 / 1.25 / 1.5 / 2.5), line-heights on the baseline */
.theme-scope :is(h1, h2, h3, h4, p, ol, ul, dl, figure, blockquote, pre, table, details, hr) { margin: 0 0 var(--b); }
.theme-scope h1 { font: 700 2.5rem/calc(2 * var(--b)) var(--font-role-display); letter-spacing: -0.02em; color: var(--color-text-heading); }
.theme-scope h2 { font: 650 1.5rem/calc(1.5 * var(--b)) var(--font-role-heading); margin-top: calc(2 * var(--b)); color: var(--color-text-heading); }
.theme-scope :is(h3, h4) { font: 650 1.0625rem/var(--b) var(--font-role-heading); margin: 0; color: var(--color-text-heading); }
.theme-scope :is(p, ul, ol, li, td, dd) { color: inherit; }
.theme-scope li { margin: 0; }
.theme-scope :is(ul, ol) { padding-left: 1.25em; }
.theme-scope :is(small, .kicker, .meta, .tags, figcaption, .byline, time, .count, .num) { font-size: 0.875rem; color: var(--meta); }
.theme-scope .eyebrow, .theme-scope .label { font: 600 0.8125rem/var(--b) var(--font-role-label); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-secondary); margin: 0; }
.theme-scope .lede { font-size: 1.25rem; line-height: calc(1.25 * var(--b)); color: var(--color-text-secondary); }

/* links: the phage theme's link blue with its pink underline, as on the old site */
.theme-scope a { color: var(--color-link); text-decoration: underline 1px var(--color-link-underline); text-underline-offset: 0.2em; }
.theme-scope a:hover { color: var(--color-link-hover); text-decoration-thickness: 2px; }
.theme-scope :focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }

.theme-scope :is(img, video, iframe) { max-width: 100%; height: auto; }
.theme-scope hr { border: 0; border-top: 1px solid var(--rule); }
.theme-scope blockquote { padding-left: var(--g); border-left: 2px solid var(--rule); margin-left: 0; color: var(--color-text-secondary); font-size: inherit; font-style: normal; }
.theme-scope :is(pre, code) { font-family: var(--font-role-code); font-size: 0.875em; }
.theme-scope pre { overflow-x: auto; padding: var(--g); border-radius: var(--radius-md); background: var(--color-bg-code); color: var(--color-text-primary); }
.theme-scope table { display: table; width: 100%; border-collapse: collapse; }
.table-scroll { width: 100%; overflow-x: auto; margin-bottom: var(--b); }
.theme-scope .table-scroll > table { margin-bottom: 0; }
.theme-scope :is(td, th) { padding: 0 var(--g) 0 0; text-align: left; vertical-align: top; border: 0; }

/* The site uses flat color surfaces. Keep generic Prague elevation and text effects out of every site element. */
body.theme-scope, body.theme-scope *, body.theme-scope *::before, body.theme-scope *::after {
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ---------- grid */
.bar, main { max-width: calc(var(--wide) + 2 * var(--g)); margin: 0 auto; padding: var(--b) var(--g); }
main {
  display: grid;
  grid-template-columns: [wide-start] 1fr [text-start] min(var(--text), 100%) [text-end] 1fr [wide-end];
  overflow-wrap: anywhere;
}
main > *, .issue > * { grid-column: text; min-width: 0; }
main > .wide, .issue > .wide, main > .issue { grid-column: wide; }
/* Shared text/component measure; the cover can break out on wide screens. */
.issue { display: grid; grid-template-columns: [wide-start text-start] minmax(0, 1fr) [text-end wide-end]; }
.issue > :not(.wide) { width: 100%; max-width: var(--article-width); }
.issue > .issue-header { max-width: var(--article-width); }
.issue-header :is(h1, .lede) { max-width: 100%; }
/* Section surfaces remain full bleed around the shared article column. */
main.issue-page { display: block; max-width: none; padding-inline: 0; }
.issue-page > .issue { row-gap: var(--rhythm-block); grid-template-columns: [full-start] minmax(var(--g), 1fr) [wide-start text-start] minmax(0, var(--article-width)) [text-end wide-end] minmax(var(--g), 1fr) [full-end]; }
/* The article grid owns section gaps; child margins must not accumulate. */
.theme-scope .issue-page > .issue > * { margin-block: 0; }
.issue-page .issue > :not(.wide):not(.digest-band):not(.community-digest) { margin-inline: auto; }
.issue-page .issue > .issue-header { max-width: var(--article-width); }
.issue-page .issue > :is(.digest-band, .community-digest) { grid-column: full; width: auto; max-width: none; }

/* Cover: a deliberate, centered exception to the article measure on desktop. */
.theme-scope .issue-page .issue > .cover { margin-top: var(--rhythm-tight); }
@media (min-width: 48rem) {
  .theme-scope .issue-page .issue > .cover { margin-top: var(--rhythm-body); }
}
.theme-scope .issue-page .cover img { margin-bottom: 0; }
.theme-scope .issue-page .cover figcaption { font-size: var(--type-meta); line-height: 1.428571429; max-width: var(--article-width); margin: var(--rhythm-tight) auto 0; }
@media (min-width: 64rem) {
  .theme-scope .issue-page .issue > .cover {
    grid-column: full;
    width: min(var(--wide), calc(100% - 2 * var(--g)));
    justify-self: center;
    margin-inline: 0;
  }
}

/* Home mission: align the copy with the feed and let its lines wrap naturally.
   Copy remains in home.md; the shared masthead supplies the original logo once. */
.home-header + main { padding-top: 0; }
.home-intro { padding-block: 1rem 4.5rem; }
.theme-scope .home-mission { max-width: var(--text); font: 400 1.3125rem/1.4 var(--font-role-heading); color: var(--color-text-secondary); }
.theme-scope .home-mission p { margin: 0; line-height: inherit; }
.home-mission a { font-weight: 700; }
@media (max-width: 48rem) {
  .home-intro { padding-bottom: 3rem; }
}

/* Blue CTA roles retain Prague's button geometry and state handling. */
.theme-scope[data-theme="phage"] :is(.btn-primary, .btn-secondary) {
  --color-primary: var(--color-pdv3-brand-250);
  --color-primary-hover: var(--color-pdv3-brand-90);
  --color-primary-active: var(--color-pdv3-brand-100);
  --color-primary-text: var(--color-pdv3-purewhite);
  --color-primary-light: var(--color-bg-secondary);
  --color-primary-lighter: var(--color-bg-primary);
  --color-primary-lightest: var(--color-bg-secondary);
}
[data-variant="dark"] .theme-scope[data-theme="phage"] .btn-primary {
  --color-primary: var(--color-pdv3-brand-250);
  --color-primary-hover: var(--color-pdv3-brand-60);
  --color-primary-active: var(--color-pdv3-brand-70);
  --color-primary-text: var(--color-bg-page);
}
[data-variant="dark"] .theme-scope[data-theme="phage"] .btn-secondary {
  --color-primary: var(--color-pdv3-brand-40);
  --color-primary-hover: var(--color-pdv3-brand-30);
  --color-primary-active: var(--color-pdv3-brand-50);
  --color-primary-light: var(--color-pdv3-brand-100);
  --color-primary-lighter: var(--color-pdv3-brand-90);
  --color-primary-lightest: var(--color-pdv3-brand-80);
}
.theme-scope :is(.btn-primary, .btn-secondary):focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 3px; }

/* ---------- masthead and footer */
header.site .bar { padding-block: calc(1.5 * var(--b)) calc(var(--b) / 2); }
.theme-scope .masthead { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--color-text-primary); text-decoration: none; }
.masthead img { flex: none; width: 18rem; max-width: 100%; height: auto; }
header.article-masthead .bar { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2rem); }
.article-masthead .masthead { flex: none; width: clamp(10rem, 50vw, 18rem); }
.article-masthead .masthead img { width: 100%; }
.theme-scope .article-masthead .capsid-brand { flex: none; width: 4.5rem; margin: 0 0 0 auto; }
@media (min-width: 40rem) {
  .theme-scope .article-masthead .capsid-brand { width: 6rem; }
}
header.home-header .bar { padding-block: 4rem 0; }
.home-header .masthead img { width: 15.625rem; }
/* The two original bitmaps have different wordmark insets (105/490 and 82/375).
   Hang only the symbol into the desktop gutter; narrow screens keep the whole lockup in view. */
@media (min-width: 70rem) {
  .home-header .masthead { margin-inline-start: calc(-15.625rem * 105 / 490); }
  [data-variant="dark"] .home-header .masthead { margin-inline-start: calc(-15.625rem * 82 / 375); }
}
@media (max-width: 48rem) {
  header.home-header .bar { padding-top: 3rem; }
}

/* Feed search: Prague form-input with an explicit editorial brand adaptation (DESIGN.md).
   Shared tokens size the field; local type, accent rule and icon spacing give it presence. */
.issue-search:not(.issue-search-quiet) { --color-bg-primary: var(--color-bg-search); }
.issue-search-field {
  position: relative;
  --text-input: clamp(1.5rem, 2.5vw, 1.75rem);
  --input-padding-y: 1rem;
  --input-padding-x: 1.25rem;
  --leading-normal: 1.25;
  --radius-md: var(--radius-sm);
}
.theme-scope .issue-search .form-input { font-family: var(--font-role-control); font-weight: 750; letter-spacing: -0.025em; padding-inline-start: 3.5rem; border: 0; border-bottom: 3px solid var(--color-link-underline); }
.theme-scope .issue-search .form-input::placeholder { color: var(--color-text-secondary); opacity: 1; }
.theme-scope .issue-search:not(.issue-search-quiet) .form-input::placeholder { color: color-mix(in srgb, var(--color-text-muted) 65%, var(--color-bg-search)); }
.theme-scope .issue-search .form-input:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 3px; }
.issue-search-field > svg { position: absolute; left: 1.125rem; top: 50%; width: 1.5rem; height: 1.5rem; translate: 0 -50%; fill: none; stroke: var(--color-link); stroke-width: 2.5; stroke-linecap: round; pointer-events: none; }
.issue-search-quiet .issue-search-field { --text-input: 1.125rem; --input-padding-y: 0.875rem; --input-padding-x: 1rem; }
.theme-scope[data-theme="phage"] .issue-search-quiet input.form-input { background: var(--color-bg-primary); border: 0; outline: none; padding-inline-start: 2.75rem; font-weight: 700; letter-spacing: normal; }
.theme-scope .issue-search-quiet .form-input::placeholder { color: var(--color-text-muted); }
.theme-scope[data-theme="phage"] .issue-search-quiet input.form-input:focus-visible { outline: none; background: var(--color-bg-primary); }
.issue-search-quiet .issue-search-field > svg { left: 1rem; width: 1.125rem; height: 1.125rem; stroke: var(--color-text-muted); stroke-width: 2; }

/* collaborators and supporters: a light band above the footer, as on the old site */
.thanks { background: var(--color-bg-secondary); border-top: 1px solid var(--color-border-light); margin-top: calc(2 * var(--b)); }
.thanks .bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--b) calc(2 * var(--g)); }
.theme-scope .thanks-title { margin: 0 0 calc(var(--b) / 2); color: var(--color-text-secondary); }
.thanks .logos { display: flex; flex-wrap: wrap; align-items: center; gap: var(--g) calc(2 * var(--g)); margin: 0; }
.thanks .logos img { height: 40px; width: auto; }
.thanks .logos img[src*="helmsley"] { height: 50px; }
.thanks .collab { display: flex; flex-direction: column; align-items: flex-end; margin-inline-start: auto; text-align: right; }
.thanks .collab img { display: block; width: 100px; height: auto; border-radius: var(--radius-sm); }
@media (max-width: 40rem) {
  .thanks .bar { flex-direction: column; align-items: flex-start; }
  .thanks .collab { align-items: flex-start; margin-inline-start: 0; text-align: left; }
}

.theme-scope footer.site { background: var(--color-bg-footer); color: var(--color-footer-text); --color-focus-ring: var(--color-footer-hover); }
footer.site .bar { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); align-items: start; gap: calc(1.5 * var(--b)) calc(2 * var(--g)); padding-block: calc(1.5 * var(--b)); font-size: 0.9375rem; line-height: 1.5; }
.theme-scope footer.site p { margin: 0; }
.theme-scope footer.site a { color: var(--color-footer-link); text-decoration: none; text-underline-offset: 0.2em; }
.theme-scope footer.site a:hover { text-decoration: underline 1px var(--color-link-underline); }
.theme-scope footer.site a:is(:hover, :focus-visible) { color: var(--color-footer-hover); }
footer.site .about { display: grid; justify-items: start; gap: 1rem; min-width: 0; }
footer.site .footer-brand { line-height: 0; }
footer.site .footer-contact { overflow-wrap: anywhere; }
footer.site nav { display: flex; flex-direction: column; align-items: start; gap: 0.625rem; }
.theme-scope footer.site .col-title { margin-bottom: 0.375rem; font-weight: 650; color: var(--color-footer-heading); }
footer.site .icons { display: flex; align-items: center; gap: var(--g); }
.theme-scope footer.site .icons a { text-decoration: none; }
.theme-scope footer.site .icons > :is(a, button.mode) { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; margin: 0; padding: 0; }
footer.site .icons svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.theme-scope footer.site .icons > a svg circle { fill: currentColor; stroke: none; }
.theme-scope footer.site .icons > a, .theme-scope footer.site button.mode { color: var(--color-footer-icon); }
.theme-scope footer.site button.mode { background: transparent; border: 0; border-radius: 0; line-height: 0; cursor: pointer; }
.theme-scope footer.site .icons > :is(a, button.mode):is(:hover, :focus-visible) { background: transparent; color: var(--color-footer-hover); }
.theme-scope footer.site button.mode svg { width: 1.25rem; height: 1.25rem; }
@media (max-width: 48rem) {
  footer.site .bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer.site .about { grid-column: 1 / -1; }
}

/* ---------- lists of issues and people */
.theme-scope .cover img { display: block; width: 100%; margin-bottom: var(--b); border-radius: var(--radius-md); }
.cover figcaption { margin-top: calc(-1 * var(--b) + var(--b) / 4); }
.capsid-title { margin-top: 0; }
.theme-scope :is(.issue-list, .author-list) { list-style: none; padding: 0; }
.theme-scope .issue-list { display: grid; gap: 2rem; margin: 0 0 var(--b); }
.theme-scope .issue-row > a { display: flex; gap: calc(2 * var(--g)); align-items: start; padding-block: 0; border-bottom: 0; text-decoration: none; color: var(--color-text-primary); }
.issue-row .what { display: flex; flex: 1; flex-direction: column; gap: var(--feed-copy-gap); min-width: 0; }
.issue-row .title { font: var(--feed-title-font); color: var(--color-text-primary); }
.issue-row a:hover .title { color: var(--color-link); text-decoration: underline 3px var(--color-link-underline); text-underline-offset: 0.2em; }
.issue-row .sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--color-text-secondary); }
.issue-row .issue-meta { display: flex; flex-wrap: wrap; gap: 0.125rem 0.875rem; margin-top: 0.375rem; font-size: 0.875rem; line-height: 1.5; color: var(--meta); }
.issue-row time { flex: none; }
.issue-row .no { flex: none; }
.theme-scope .issue-row .thumb { flex: none; width: 20rem; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--color-bg-muted); }
.issue-search { margin-bottom: 1rem; }
.issue-feedback { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-gap-md); margin-top: 0.5rem; font-size: 0.875rem; }
.theme-scope .issue-count { margin: 0; font-size: inherit; color: var(--meta); }
.theme-scope .list-empty { padding-block: 2.5rem 3.5rem; color: var(--color-text-secondary); }
.theme-scope .list-empty h2 { margin: 0 0 .75rem; font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.25; font-weight: 700; color: var(--color-text-primary); }
.theme-scope .list-empty p { margin: 0; line-height: 1.6; }
/* The phage theme owns control selection colors; this scope only arranges the filters. */
.archive-filters { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
/* Control colors, spacing and states remain Prague-owned. Labels are screen-reader-only. */
.theme-scope .archive-filters :is(button, input) { font-family: var(--font-role-control); font-weight: 600; }
.archive-filters fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.theme-scope .format-options { flex-wrap: wrap; justify-content: start; }
.format-options button { gap: 0.5rem; }
.author-filter { display: flex; flex-direction: column; width: 15rem; max-width: 100%; }
.author-combobox { width: 100%; }
.theme-scope .author-trigger.form-input { border: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; text-align: left; cursor: pointer; }
.author-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-chevron, .author-check { flex: none; width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.theme-scope .author-dropdown { width: max(100%, 18rem); max-width: calc(100vw - 2rem); right: 0; left: auto; }
.author-options { max-height: min(18rem, 45vh); overflow-y: auto; overscroll-behavior: contain; }
.theme-scope .author-option { white-space: normal; }
.author-option > span { flex: 1; }
.theme-scope .author-empty { margin: 0; }
/* Preserve native hidden behavior even when shared component CSS declares display. */
.theme-scope [hidden] { display: none !important; }
.theme-scope :focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
@media (max-width: 44rem) {
  .theme-scope .issue-row > a { gap: var(--g); }
  .theme-scope .issue-row .thumb { width: 16rem; }
}
@media (max-width: 32rem) {
  header.site:not(.home-header) .bar { padding-block: var(--b) 0; }
  .theme-scope .issue-row > a { flex-direction: column; gap: 0.875rem; }
  .theme-scope .issue-row .thumb { width: 100%; max-width: none; }
  .author-filter { width: 100%; }
  .theme-scope .author-dropdown { width: 100%; }
}
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-gap-sm) var(--space-gap-lg); }
.byline-person { display: inline-flex; align-items: center; gap: var(--space-gap-sm); min-width: 0; max-width: 100%; }
.byline .avatar { flex: none; margin: 0; }
.byline a { text-decoration: none; color: var(--color-text-secondary); }
.byline a:hover { text-decoration: underline 1px var(--color-link-underline); }
.avatar { width: 32px; height: 32px; border-radius: var(--radius-full); object-fit: cover; vertical-align: middle; margin-right: 0.35em; }
span.avatar { display: inline-grid; place-items: center; background: var(--color-bg-muted); color: var(--color-text-secondary); }
.links { display: flex; flex-wrap: wrap; gap: 0 var(--g); }
.author-list a { display: grid; grid-template-columns: auto 1fr auto; gap: var(--g); align-items: center; padding-block: calc(var(--b) / 4); text-decoration: none; color: var(--color-text-primary); }
.author-list a:hover strong { text-decoration: underline 1px var(--color-link-underline); }
.author-list small { display: block; }

/* ---------- an issue */
.theme-scope .capsid-brand { display: inline-flex; width: 8.5rem; max-width: 100%; margin-bottom: 1.5rem; color: var(--color-text-primary); text-decoration: none; }
.theme-scope .capsid-brand:hover { color: var(--color-text-primary); }
.capsid-brand svg { display: block; width: 100%; height: auto; }
.theme-scope .home-page .capsid-brand { width: 6rem; margin-bottom: 1rem; }

.theme-scope .issue-header .kicker time { font: inherit; color: inherit; }

.kicker { margin: 0; display: flex; flex-wrap: wrap; gap: 0 0.75em; }
.theme-scope .note { padding: calc(var(--b) / 2) var(--g); border: 0; border-radius: var(--radius-md); background: var(--color-bg-secondary); }
.note > :last-child { margin-bottom: 0; }
.digest { margin-top: var(--b); }
.theme-scope .digest > h2 { margin: 0 0 var(--space-gap-md); padding: 0; border: 0; font: 600 0.8125rem/1.5 var(--font-role-label); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text-secondary); }
.digest#alerts h2 { color: var(--color-danger-active); }
.theme-scope .issue h2 { border-bottom: 0; padding-bottom: 0; }
.digest-band { padding-block: var(--space-gap-lg); background: var(--color-bg-secondary); }
.digest-band-inner { max-width: calc(var(--article-width) + 2 * var(--g)); margin-inline: auto; padding-inline: var(--g); }
.theme-scope .digest-band .digest { max-width: var(--article-width); margin: 0 auto; padding: 0; border: 0; }
.digest-band-alerts, .digest-band-jobs { background: var(--color-pdv3-pink--1); }
.digest-band-updates, .theme-scope .digest-disclosure-section.digest-band-updates { background: var(--color-bg-search); }
.digest-band-community, .theme-scope .digest-disclosure-section.digest-band-community { background: var(--color-pdv3-yellow-0); }
/* Subtle washes of the existing palette instead of the prototype's saturated dark bands. */
[data-variant="dark"] .digest-band-alerts, [data-variant="dark"] .digest-band-jobs { background: color-mix(in srgb, var(--color-bg-primary) 90%, var(--color-pdv3-pink-40)); }
[data-variant="dark"] .digest-band-updates { background: color-mix(in srgb, var(--color-bg-primary) 86%, var(--color-pdv3-teal)); }
[data-variant="dark"] .digest-band-community { background: color-mix(in srgb, var(--color-bg-primary) 90%, var(--color-pdv3-yellow-40)); }
.theme-scope .digest-band .digest > :last-child { margin-bottom: 0; }
.theme-scope .community-digest { margin-block: calc(2 * var(--space-gap-lg)); }
.community-digest-heading, .community-digest-tail { background: var(--color-bg-secondary); padding-block: var(--space-gap-md); }
.community-digest-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-gap-md); max-width: var(--article-width); margin-inline: auto; }
.theme-scope .community-digest-toolbar h2 { margin: 0 0 var(--space-gap-sm); font: 650 1.125rem/1.4 var(--font-role-heading); }
.theme-scope .community-digest-counts { display: flex; flex-wrap: wrap; gap: var(--space-gap-sm) var(--space-gap-lg); margin: 0; padding: 0; list-style: none; }
.theme-scope .community-digest-counts li { display: flex; align-items: baseline; gap: 0.375rem; margin: 0; padding: 0; font-size: 0.875rem; color: var(--color-text-secondary); }
.theme-scope .community-digest-counts strong { font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-text-primary); }
.community-digest-tail .digest-band-inner { max-width: calc(var(--article-width) + 2 * var(--g)); text-align: right; }
.community-digest-toolbar button { flex: none; margin-left: auto; }
@media (max-width: 40rem) { .theme-scope .community-digest { margin-block: calc(2 * var(--space-gap-md)); } }
@media (max-width: 40rem) { .digest-band { padding-block: var(--space-gap-md); } }
[data-variant="dark"] .theme-scope .tags > span { color: var(--color-pdv3-brand-copy); }
.tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.theme-scope .tags > span { display: inline-block; padding: 0.125rem 0.5rem; font-size: 0.75rem; line-height: 1.5; background: var(--color-pdv3-purewhite); color: var(--color-text-primary); border: 0; border-radius: 2px; }
details.older { margin-top: calc(-1 * var(--b) / 2); }
.digest-band details.older { margin-top: 0; }
details.older > summary { cursor: pointer; color: var(--color-link); font: 600 0.875rem/var(--b) var(--font-role-control); }
details.older[open] > summary { margin-bottom: calc(var(--b) / 2); }
.issue > footer { margin-top: calc(2 * var(--b)); }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: var(--g); }
.prev-next a { text-decoration: none; color: var(--color-text-primary); }
.prev-next a:hover span { text-decoration: underline 3px var(--color-link-underline); }
.prev-next small { display: block; }
.next { text-align: right; }
.authors { padding-top: var(--b); margin-top: var(--b); }
.authors h2 { margin-top: 0; }
.author-card { display: flex; gap: var(--g); align-items: start; margin-bottom: var(--b); }
.author-card img { border-radius: var(--radius-full); flex: none; }
.theme-scope .author-card :is(h1, .meta, .links) { margin: 0; }
.author-card h3 a { text-decoration: none; color: var(--color-text-primary); }
.author-card h3 a:hover { text-decoration: underline 1px var(--color-link-underline); }
.theme-scope .cite { margin-bottom: var(--b); }
.citation-format { display: flex; align-items: start; gap: var(--space-gap-md); }
.theme-scope .citation-format p { flex: 1; min-width: 0; margin: 0; }
.citation-format button { flex: none; }
.copy-button-content { display: inline-flex; align-items: center; gap: var(--space-gap-sm); }
.copy-button-content svg { flex: none; }
.theme-scope .citation-downloads { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-gap-md); margin-bottom: 0; }
.theme-scope .citation-feedback:not(.visually-hidden) { margin-block: var(--space-gap-md) 0; }

@media (prefers-reduced-motion: no-preference) { .theme-scope a { transition: color 0.15s; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Publication masthead uses the same edges as all article sections. */
header.article-masthead .bar { max-width: calc(var(--article-width) + 2 * var(--g)); }
/* Interior pages give the shared site masthead its own full-width band. */
header.site.interior-header { background: var(--color-bg-secondary); }
header.site.interior-header .bar { padding-block: var(--b); }

/* Citation-style Prague disclosure with edge-to-edge section backgrounds. */
.theme-scope .community-digest-disclosure { margin: 0; }
.digest-disclosure-label { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-gap-sm) var(--space-gap-md); }
.digest-disclosure-counts { display: flex; flex-wrap: wrap; gap: var(--space-gap-md); color: var(--color-text-secondary); font-weight: 400; font-size: 0.875rem; }
.digest-disclosure-counts strong { color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.theme-scope .community-digest-disclosure > .details-content { padding: 0; }
.theme-scope .sponsor-disclosure .digest > h2 { display: none; }
.theme-scope .sponsor-disclosure .digest-disclosure-section { padding-top: 0.75rem; }
.theme-scope .digest-disclosure-section { margin: 0; padding: var(--space-card-padding); border: 0; border-radius: 0; }
.theme-scope .digest-disclosure-section .digest { margin: 0; }
.theme-scope .digest-disclosure-section .digest > :last-child { margin-bottom: 0; }
.digest-disclosure-actions { padding: 0; }
.theme-scope .digest-collapse-banner { width: 100%; border: 0; border-radius: 0; text-align: left; justify-content: flex-start; font-family: inherit; }

.theme-scope .digest-disclosure-section.digest-band-community { background: var(--color-pdv3-yellow-5); }
.theme-scope .digest-disclosure-section.digest-band-jobs { background: var(--color-pdv3-pink--1); }
.theme-scope .digest-disclosure-section.digest-band-alerts { background: var(--color-pdv3-pink--1); }
[data-variant="dark"] .theme-scope .digest-disclosure-section.digest-band-alerts { background: color-mix(in srgb, var(--color-bg-primary) 90%, var(--color-pdv3-pink-40)); }
[data-variant="dark"] .theme-scope .digest-disclosure-section.digest-band-updates { background: color-mix(in srgb, var(--color-bg-primary) 86%, var(--color-pdv3-teal)); }
[data-variant="dark"] .theme-scope .digest-disclosure-section.digest-band-jobs { background: color-mix(in srgb, var(--color-bg-primary) 90%, var(--color-pdv3-pink-40)); }
[data-variant="dark"] .theme-scope .digest-disclosure-section.digest-band-community { background: color-mix(in srgb, var(--color-bg-primary) 90%, var(--color-pdv3-yellow-40)); }

/* Colored title strips belong to the contained digest variant. */
.theme-scope .digest-disclosure-section:is(.digest-band-updates, .digest-band-jobs, .digest-band-community) { overflow: hidden; }
.theme-scope .digest-disclosure-section:is(.digest-band-updates, .digest-band-jobs, .digest-band-community) .digest > h2 {
  margin: calc(-1 * var(--space-card-padding)) calc(-1 * var(--space-card-padding)) var(--space-gap-md);
  padding: var(--space-gap-sm) var(--space-card-padding);
}
.theme-scope .digest-disclosure-section.digest-band-updates .digest > h2 { background: var(--color-pdv3-brand-20); color: var(--color-pdv3-brand-100); border-left: 8px solid var(--color-pdv3-teal); padding-left: calc(var(--space-card-padding) - 8px); }
.theme-scope .digest-disclosure-section.digest-band-jobs .digest > h2 { background: var(--color-pdv3-pink-10); color: var(--color-pdv3-brand-100); border-left: 8px solid var(--color-pdv3-pink-40); padding-left: calc(var(--space-card-padding) - 8px); }

.theme-scope .digest-disclosure-section.digest-band-community .digest > h2 { background: var(--color-pdv3-yellow-20); color: var(--color-pdv3-brand-100); border-left: 8px solid var(--color-pdv3-yellow-40); padding-left: calc(var(--space-card-padding) - 8px); }

.digest-disclosure-count { display: inline-flex; align-items: baseline; gap: 0.375rem; }

/* Article end matter: explicit gaps instead of accumulated child margins. */
.theme-scope .issue > .authors { display: grid; gap: var(--space-gap-lg); padding: calc(2 * var(--space-card-padding)) var(--space-card-padding); }
.theme-scope .issue > .authors .author-card { margin: 0; }
.theme-scope .issue > .authors .author-card > div { min-width: 0; }
.theme-scope .issue > .authors .author-card h3 { margin-top: 0; }
.theme-scope .issue > .authors .author-card > div > :last-child { margin-bottom: 0; }
.theme-scope .issue > footer { display: grid; gap: var(--space-gap-lg); }
.theme-scope .issue > footer > :is(.cite, .prev-next) { margin: 0; }

/* Editorial wrapping: balance headings and discourage short last lines in prose. */
.theme-scope :is(.issue, .issue-row) :is(h1, h2, h3), .theme-scope .issue-row .title { text-wrap: balance; }
.theme-scope :is(.issue .prose, .issue .lede, .issue-row .what) p { text-wrap: pretty; }
.theme-scope .issue .lede { text-wrap: pretty; }

/* Borderless article panels: separation comes from their filled surfaces. */
.theme-scope .issue :is(.authors.app-card, .community-digest-disclosure, .cite, .citation-format.app-card) { border: 0; }

.theme-scope .digest-collapse-banner .details-icon { transform: none; }

/* Give individual digest entries more room without loosening their paragraphs. */
.theme-scope .digest-disclosure-section { --space-card-padding: 1.5rem; }
@media (max-width: 40rem) {
  .theme-scope .digest-disclosure-section { --space-card-padding: 1.25rem; }
}

.theme-scope .author-avatar { flex: none; border-radius: var(--radius-full); object-fit: cover; margin: 0; }
.theme-scope .author-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--color-bg-search); }
.theme-scope .author-avatar-fallback img { width: 65%; height: 65%; object-fit: contain; border-radius: 0; margin: 0; }

/* ---------- Editorial typography: one hierarchy, three reading rhythms ----------
   Article paragraphs: 16px. Digest interiors: 8px. Author notes: 12px.
   Space before a heading belongs to its section; space after keeps its copy close.
   These are publication roles, separate from Prague's compact component labels. */
.theme-scope {
  --type-title: clamp(2.5rem, 5vw, 2.75rem);
  --type-h2: 1.75rem;
  --type-h3: 1.3125rem;
  --type-h4: 1.125rem;
  --type-h5: 1rem;
  --type-h6: 0.875rem;
  --type-article: 1.0625rem;
  --type-supporting: 1rem;
  --type-meta: 0.875rem;
  --rhythm-tight: var(--space-gap-sm); /* 8px */
  --rhythm-note: 0.75rem; /* 12px */
  --rhythm-body: var(--space-gap-md); /* 16px */
  --rhythm-block: var(--space-gap-lg); /* 24px */
  --rhythm-subsection: 2rem;
  --rhythm-entry: 2.5rem;
  --rhythm-section: 3rem;
}

/* All prose owns only its inter-block gaps, with no trailing paragraph margin. */
.theme-scope :is(.issue .prose, .author-card .prose) {
  --flow-space: var(--rhythm-note);
  display: flow-root;
  font-size: var(--type-supporting);
  line-height: 1.5;
}
.theme-scope .issue > .prose {
  --flow-space: var(--rhythm-body);
  font-size: var(--type-article);
  line-height: 1.647058824; /* 17/28 */
}
.theme-scope :is(.issue .prose, .author-card .prose) :where(p, ul, ol, dl, blockquote, pre, figure, table, hr, h1, h2, h3, h4, h5, h6, .table-scroll) { margin-block: 0; }
.theme-scope :is(.issue .prose, .author-card .prose) :where(p, li, dd) { font-size: inherit; line-height: inherit; }
.theme-scope :is(.issue .prose, .author-card .prose) > * + *,
.theme-scope :is(.issue .prose, .author-card .prose) :where(section, blockquote, li) > * + * { margin-block-start: var(--flow-space); }

/* The article title and masthead metadata form a single predictable stack. */
.theme-scope .issue-header { display: grid; gap: var(--rhythm-subsection); }
.theme-scope .issue-header > :is(h1, p) { margin: 0; }
.theme-scope .issue-header > h1 {
  font: 700 var(--type-title)/1.12 var(--font-role-display);
  letter-spacing: -0.02em;
}
.theme-scope .issue-header .kicker { font-size: 1.125rem; line-height: 1.333333333; color: var(--color-text-secondary); }
.theme-scope .issue-header .byline { font-size: var(--type-supporting); line-height: 1.5; }
.theme-scope .issue-header .lede { font-size: 1.25rem; line-height: 1.5; }

/* H1–H6 in long-form articles. Component headings have their own rules below. */
.theme-scope .issue > .prose :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-role-heading);
  font-weight: 650;
  color: var(--color-text-heading);
  padding: 0;
  border: 0;
  text-wrap: balance;
  letter-spacing: -0.015em;
}
.theme-scope .issue > .prose h1 { font-size: var(--type-title); line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.theme-scope .issue > .prose h2 { font-size: var(--type-h2); line-height: 1.214285714; }
.theme-scope .issue > .prose h3 { font-size: var(--type-h3); line-height: 1.333333333; }
.theme-scope .issue > .prose h4 { font-size: var(--type-h4); line-height: 1.333333333; }
.theme-scope .issue > .prose h5 { font-size: var(--type-h5); line-height: 1.5; letter-spacing: 0; }
.theme-scope .issue > .prose h6 { font-size: var(--type-h6); line-height: 1.428571429; letter-spacing: 0; }
.theme-scope .issue > .prose :is(* + h1, * + h2) { margin-block-start: var(--rhythm-section); }
.theme-scope .issue > .prose * + h3 { margin-block-start: var(--rhythm-subsection); }
.theme-scope .issue > .prose :is(* + h4, * + h5, * + h6) { margin-block-start: var(--rhythm-block); }
.theme-scope .issue > .prose :is(h1, h2) + * { margin-block-start: var(--rhythm-note); }
.theme-scope .issue > .prose :is(h3, h4, h5, h6) + * { margin-block-start: var(--rhythm-tight); }
.theme-scope .issue > .prose :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) { margin-block-start: var(--rhythm-note); }

/* Lists, quotes, code and tables fit the same flow, without nested margin piles. */
.theme-scope :is(.issue .prose, .author-card .prose) li + li { margin-block-start: 0.25rem; }
.theme-scope :is(.issue .prose, .author-card .prose) li > :is(ul, ol) { margin-block-start: var(--rhythm-tight); }
.theme-scope .issue > .prose > :is(blockquote, pre, .code-block, figure, .table-block, .table-contained, hr),
.theme-scope .issue > .prose > :is(blockquote, pre, .code-block, figure, .table-block, .table-contained, hr) + :not(h1, h2, h3, h4, h5, h6) { margin-block-start: var(--rhythm-block); }
.theme-scope .issue > .prose > :is(blockquote, pre, .code-block, figure, .table-block, .table-contained, hr):first-child { margin-block-start: 0; }
.theme-scope .issue .prose blockquote { font-size: inherit; line-height: inherit; font-style: normal; }
.theme-scope .issue .prose blockquote p::before,
.theme-scope .issue .prose blockquote p::after { content: none; }
.theme-scope .issue .prose pre { font-size: var(--type-meta); line-height: 1.571428571; }
.theme-scope .issue .prose pre code { font-size: inherit; line-height: inherit; }
.theme-scope .issue .prose :is(th, td) { font-size: var(--type-meta); line-height: 1.428571429; padding: 0.5rem 0.625rem; }
.theme-scope .issue .prose thead th { padding-block: 0.375rem; }

/* Digest: compact labels and titles, grouped copy, clear separation between entries. */
.theme-scope .digest-item { font-size: var(--type-supporting); line-height: 1.5; margin: 0; }
.theme-scope .digest-item + .digest-item { margin-block-start: var(--rhythm-entry); }
.theme-scope .digest-item > * { margin-block: 0; }
.theme-scope .digest-item > * + * { margin-block-start: var(--rhythm-tight); }
.theme-scope .digest-item .prose { --flow-space: var(--rhythm-tight); }
.theme-scope .digest-item > h3 { font: 650 var(--type-h4)/1.333333333 var(--font-role-heading); }
.theme-scope .digest-item > :is(.meta, .tags) { font-size: var(--type-meta); line-height: 1.428571429; }
.theme-scope .digest-item > * + .tags { margin-block-start: var(--rhythm-body); }

/* Authors: compact identity, then an evenly spaced note and issue link. */
.theme-scope .author-card h3 { font: 650 var(--type-h4)/1.333333333 var(--font-role-heading); margin: 0; }
.theme-scope .author-card :is(.meta, .links) { font-size: var(--type-meta); line-height: 1.428571429; }
.theme-scope .author-card .links { margin-top: 0.25rem; row-gap: 0.25rem; }
.theme-scope .author-card .prose { --flow-space: var(--rhythm-note); margin-top: var(--rhythm-note); }
.theme-scope .author-card .author-issues { margin: var(--rhythm-note) 0 0; font-size: var(--type-supporting); line-height: 1.5; }

/* Standalone profiles use a wider, more relaxed version of the article card. */
.theme-scope .author-profile { gap: 2rem; margin-block: 1rem 3rem; }
.theme-scope .author-profile > div { flex: 1; min-width: 0; max-width: var(--article-width); }
.theme-scope .author-profile h1 { line-height: 1.15; text-wrap: balance; }
.theme-scope .author-profile h1 + .meta { margin-top: 0.75rem; font-size: 1rem; line-height: 1.5; }
.theme-scope .author-profile .links { margin-top: 0.75rem; row-gap: 0.5rem; }
.theme-scope .author-profile .prose { --flow-space: 1.25rem; margin-top: 1.5rem; font-size: var(--type-article); line-height: 1.647058824; }
@media (max-width: 40rem) {
  .theme-scope .author-profile { flex-direction: column; gap: 1.25rem; margin-block: 0.5rem 2rem; }
}

/* Code tools reuse the citation copy control; the toolbar never scrolls with code. */
.theme-scope .prose .code-block { position: relative; border-radius: var(--radius-md); background: var(--color-bg-code); overflow: hidden; }
.code-toolbar { position: absolute; z-index: 1; top: 0.25rem; right: 0.25rem; display: flex; }
.theme-scope .code-toolbar .btn-ghost { background-color: transparent; }
.theme-scope .prose .code-block > pre { margin: 0; padding-right: 3rem; border: 0; border-radius: 0; background: transparent; }
.theme-scope .prose .code-feedback:not(.visually-hidden) { margin: 0; padding: 0 var(--g) var(--g); font-size: var(--type-meta); }

/* Wide tables retain readable columns; only the scroll region can overflow. */
.table-block { width: 100%; min-width: 0; }
.theme-scope .table-block > .table-scroll { margin: 0; }
.theme-scope .table-wide table { min-width: calc(var(--table-columns) * 7rem); overflow-wrap: normal; }
.theme-scope .table-wide :is(th, td) { min-width: 5.5rem; }
.theme-scope .table-wide :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--color-bg-primary); }
.theme-scope .table-wide th:first-child { background: var(--color-bg-secondary); }
.theme-scope .table-wide tbody :is(th, td):first-child { transition: background-color 0.15s; }
.theme-scope .table-wide tbody tr:hover > :is(th, td):first-child { background-color: var(--color-bg-hover); }
.theme-scope .prose .table-scroll-hint { margin: var(--rhythm-tight) 0 0; font-size: var(--type-meta); line-height: 1.428571429; color: var(--color-text-muted); }
@media (min-width: 64rem) {
  .theme-scope .issue > .prose > .table-wide {
    width: min(var(--wide), calc(100vw - 2 * var(--g)));
    max-width: none;
    margin-inline: calc((100% - min(var(--wide), calc(100vw - 2 * var(--g)))) / 2);
  }
}

/* Additive issue topic tags, shared by archive and author feeds. */
.theme-scope .tag-filter { position: relative; margin: 0 0 0 auto; }
.theme-scope .tag-filter > summary.form-input { color: var(--color-text-primary); font-weight: 600; border: 0; cursor: pointer; min-width: 6rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.theme-scope .tag-menu.dropdown-menu { left: auto; right: 0; width: 18rem; max-width: calc(100vw - 2rem); box-shadow: none; }
.tag-options { display: grid; gap: 0; max-height: min(18rem, 45vh); overflow-y: auto; overscroll-behavior: contain; }
.tag-menu [data-tag-empty] { margin: 0; padding: .5rem 1rem; font-size: .875rem; }
.selected-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem; }
.theme-scope .selected-tags button { border: 0; border-radius: 2px; padding: .25rem .5rem; background: #fff; color: #204065; font: inherit; font-size: .875rem; cursor: pointer; }
@media (max-width: 32rem) {
  .theme-scope .tag-filter { margin-left: 0; width: 100%; }
  .tag-menu { left: 0; right: auto; width: 100%; box-sizing: border-box; }
}

/* Jan's Capsid control refinement: white field, pale-blue selection in light mode. */
html:not([data-variant="dark"]) .theme-scope[data-theme="phage"] .issue-search {
  --color-bg-primary: var(--color-pdv3-purewhite);
}
html:not([data-variant="dark"]) .theme-scope[data-theme="phage"] .issues .format-options {
  --color-control-active-bg: var(--color-bg-search);
}

/* Checkbox-style tag buttons avoid native checkbox painting in embedded browsers. */
.theme-scope .tag-options button[data-tag] { display: flex; align-items: center; gap: .5rem; width: 100%; margin: 0; padding: .5rem 1rem; border: 0; background: transparent; color: var(--color-text-primary); font: inherit; font-size: .875rem; font-weight: 600; line-height: 1.5; text-align: left; white-space: normal; cursor: pointer; }
.theme-scope .tag-options button[data-tag]:focus-visible { outline: 2px solid var(--color-control-checked); outline-offset: 2px; }
.tag-check { display: grid; place-items: center; flex: none; width: 1rem; height: 1rem; border: 0; background: transparent; }
[aria-checked="true"] > .tag-check { border-color: var(--color-text-primary); }
[aria-checked="true"] > .tag-check::after { content: ""; width: .3rem; height: .55rem; border: solid var(--color-text-primary); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }

.theme-scope .tag-options button[data-tag]:hover { background: var(--color-bg-secondary); }
.theme-scope .tag-options button[data-tag][aria-checked="true"] { background: var(--color-control-active-bg); }

.theme-scope .tag-filter [data-tag-count] { color: var(--color-link-underline); font-weight: 700; }

/* Shared tag surfaces in dark mode. */
[data-variant="dark"] .theme-scope :is(.listing-tag, .tags > span, .selected-tags button) { background: var(--color-bg-secondary); color: var(--color-text-primary); }
[data-variant="dark"] .theme-scope :is(.listing-tag:is(:hover, [aria-pressed="true"]), .selected-tags button) { background: var(--color-control-active-bg); color: var(--color-control-active-text); }

html:not([data-variant="dark"]) .theme-scope[data-theme="phage"] input[type="search"].form-input { background-color: var(--color-pdv3-purewhite); }

/* Compact shared header: brand and navigation share one row. */
header.site .header-inner { max-width: calc(var(--wide) + 2 * var(--g)); margin: 0 auto; padding: 1.5rem var(--g); display: flex; align-items: center; gap: 2rem; }
header.site .header-inner .bar { padding: 0; margin: 0; flex: none; }
header.site .header-inner .masthead { margin: 0; width: auto; }
header.site .header-inner .masthead img { width: 13rem; transform: translateY(2px); }
header.article-masthead .header-inner .bar { gap: 1rem; }
header.article-masthead .header-inner .capsid-brand { width: 3rem; }
@media (max-width: 62rem) { header.site .header-inner { padding-block: 1rem; gap: 1rem; } header.site .header-inner .masthead img { width: clamp(11rem, 48vw, 16rem); } }

/* One shared toolbar rhythm and type treatment for every searchable list. */
.theme-scope :is(.issues, .listing-feed) { font-family: var(--font-role-body); }
.theme-scope .list-controls { display: grid; gap: .5rem; margin-bottom: 1.5rem; }
.theme-scope .list-controls:empty { display: none; }
.theme-scope .list-controls > .issue-search { margin: 0 0 .5rem; }
.theme-scope .list-controls > :is(.archive-filters, .selected-tags, .list-feedback) { margin: 0; }
.theme-scope .list-controls .archive-filters { align-items: baseline; gap: .5rem 1rem; }
.theme-scope .list-controls :is(button, input, select, summary) { font-family: var(--font-role-control); }
.theme-scope .list-controls :is(.toggle-group-item, .author-trigger, .tag-filter > summary, .selected-tags button) { font-size: .875rem; line-height: 1.5; font-weight: 600; }
.theme-scope .list-feedback { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 1rem; min-height: 0; font: 400 .875rem/1.5 var(--font-role-control); }
.theme-scope .list-feedback p { margin: 0; font: inherit; color: var(--color-text-muted); }
.theme-scope .list-feedback .btn-ghost { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--color-text-primary); font: 600 .875rem/1.5 var(--font-role-control); text-decoration: none; }
.theme-scope .list-feedback .btn-ghost:is(:hover, :focus-visible) { color: var(--color-link); text-decoration: underline; text-decoration-color: var(--color-link-underline); }
.theme-scope .issue-list > .issue-row { margin: 0; border: 0; }

/* Shared editorial list rhythm: Capsid and Community. */
.theme-scope { --feed-title-font: 750 1.375rem/1.3 var(--font-role-heading); --feed-meta-size: .875rem; --feed-copy-gap: .375rem; --feed-row-gap: 2rem; }

/* Layered profile elevation: shared by standalone cards and their embedded shell. */
:root { --profile-card-shadow: 0 2px 5px rgb(30 55 90 / .04), 0 12px 28px -8px rgb(30 55 90 / .12), 0 28px 60px -18px rgb(30 55 90 / .14); }
[data-variant="dark"] { --profile-card-shadow: 0 2px 6px rgb(0 0 0 / .12), 0 12px 28px -8px rgb(0 0 0 / .3), 0 28px 60px -18px rgb(0 0 0 / .38); }
/* Jan's explicit profile-card exception to the flat-surface reset above. */
body.theme-scope :is([data-profile-preview], .profile-landscape) { box-shadow: var(--profile-card-shadow) !important; }
html[data-profile-preview] body.theme-scope .profile-landscape { box-shadow: none !important; }
