/* ChemShorts — minimalist academic design. Light/dark via prefers-color-scheme + manual toggle. */
:root {
  --bg: #ffffff;
  --surface: #f6f6f3;
  --surface-2: #efefea;
  --ink: #15171a;
  --ink-2: #33373d;
  --muted: #5f6670;
  --line: #e4e4de;
  --accent: #0d6b66;
  --accent-ink: #094c48;
  --accent-soft: #e4f2f0;
  --warn: #9c3a24;
  --warn-soft: #fbece7;
  --focus: #1f6feb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 22, 25, .04), 0 6px 24px -12px rgba(20, 22, 25, .14);
  --serif: ui-serif, "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1113; --surface: #16191c; --surface-2: #1d2124; --ink: #ebecee; --ink-2: #cfd2d6; --muted: #9da3ab; --line: #272b30;
    --accent: #55c2b9; --accent-ink: #8fe0d8; --accent-soft: #13302d; --warn: #f08c73; --warn-soft: #3a1f19; --focus: #6aa6ff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px -14px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1113; --surface: #16191c; --surface-2: #1d2124; --ink: #ebecee; --ink-2: #cfd2d6; --muted: #9da3ab; --line: #272b30;
  --accent: #55c2b9; --accent-ink: #8fe0d8; --accent-soft: #13302d; --warn: #f08c73; --warn-soft: #3a1f19; --focus: #6aa6ff;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px -14px rgba(0,0,0,.6); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.22; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); margin: .2em 0 .4em; }
h2 { font-size: 1.3rem; margin: 1.6em 0 .6em; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .05em .35em; border-radius: 4px; }
.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font: 600 1.18rem/1 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo-mark { width: 26px; height: 26px; color: var(--accent); }
.main-nav { margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.main-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: .5rem .8rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .94rem; white-space: nowrap; }
.main-nav a:hover { background: var(--surface); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.badge { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px; background: var(--accent); color: var(--bg); font-size: .72rem; line-height: 1.35; text-align: center; font-weight: 700; }
.icon-btn { border: 1px solid var(--line); background: transparent; color: var(--ink-2); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--surface); }

main { padding: 2rem 0 4rem; min-height: 60vh; }

/* Buttons & inputs */
.btn, .btn-ghost { display: inline-flex; align-items: center; gap: .4rem; font: 500 .92rem/1 var(--sans); padding: .62rem 1rem; border-radius: 999px; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.btn { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn { color: #06201e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #06201e; } }
.btn:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); color: var(--ink); }
.btn-ghost svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.btn-ghost[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.btn-ghost[aria-pressed="true"] svg { fill: currentColor; }
.btn-ghost.small, .small.btn-ghost { padding: .35rem .65rem; font-size: .8rem; }
input[type="text"], input[type="search"], input[type="date"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; font: inherit; font-size: .94rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
label { font-size: .9rem; color: var(--ink-2); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 1rem; height: 1rem; vertical-align: -2px; }

/* Hero */
.hero { padding: 1.5rem 0 1.5rem; max-width: 820px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 600; color: var(--accent); margin: 0; }
.eyebrow a { text-decoration: none; }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 70ch; margin-top: 0; }
.hero-search { display: flex; gap: .5rem; margin-top: 1.4rem; max-width: 680px; }
.hero-search input { border-radius: 999px; padding: .75rem 1.1rem; font-size: 1rem; }
.stats { font-size: .86rem; margin-top: .8rem; }
.notice { background: var(--accent-soft); color: var(--ink-2); border-radius: 10px; padding: .75rem 1rem; font-size: .92rem; }
.notice-error { background: var(--warn-soft); color: var(--warn); }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { margin-bottom: .2em; }

/* Cards */
.top10 { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: 1.1rem; }
.feed { display: grid; gap: 1rem; }
.card { position: relative; display: grid; grid-template-columns: 232px 1fr; gap: 1.4rem; padding: 1.25rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--line) 50%, var(--muted)); }
.card-ranked { grid-template-columns: 56px 232px 1fr; }
.rank { font: 600 2.4rem/1 var(--serif); color: var(--accent); text-align: center; padding-top: .2rem; font-variant-numeric: lining-nums; }
.card-title { font-size: 1.2rem; margin: .15rem 0 .35rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); text-decoration: underline; }
.meta { margin: 0; font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .1rem .4rem; align-items: baseline; }
.meta .journal { font-weight: 600; color: var(--ink-2); font-style: italic; }
.dot { color: var(--line); }
.authors { margin: 0 0 .5rem; font-size: .88rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: .35rem 0 .6rem; }
.tag { display: inline-block; font-size: .74rem; padding: .2rem .6rem; border-radius: 999px; background: var(--surface); color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); line-height: 1.5; }
a.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag-field { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); font-weight: 500; }
.tag-preprint { background: #fff5dc; border-color: #f1e1b0; color: #6c5410; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag-preprint { background: #2d2614; border-color: #4a3d1a; color: #e9cf85; } }
:root[data-theme="dark"] .tag-preprint { background: #2d2614; border-color: #4a3d1a; color: #e9cf85; }
.tag-oa { color: var(--accent-ink); }
.tag-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.summary { margin: .4rem 0 .7rem; }
.summary p { margin: .2rem 0 0; color: var(--ink-2); font-size: .95rem; line-height: 1.6; }
.summary-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--accent); }
.summary-status { font-size: .85rem; color: var(--muted); font-style: italic; margin: .4rem 0 .7rem; }
.actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .3rem; }
.why { margin: .2rem 0 .6rem; font-size: .86rem; }
.why summary { cursor: pointer; color: var(--muted); }
.why ul { margin: .4rem 0; padding-left: 1.2rem; color: var(--ink-2); }

/* Figure / placeholder */
.ga { margin: 0; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); aspect-ratio: 4 / 3; display: block; }
.ga img { width: 100%; height: 100%; object-fit: contain; }
.ga-large { aspect-ratio: auto; }
.ga-large img { height: auto; }
.ga figcaption { font-size: .76rem; color: var(--muted); padding: .5rem .7rem; background: var(--surface); }
.ga-placeholder { --ph-hue: 170; position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: .8rem; text-decoration: none; color: hsl(var(--ph-hue) 30% 35%);
  background: radial-gradient(120% 90% at 85% 10%, hsl(var(--ph-hue) 45% 94%), transparent 60%), linear-gradient(160deg, hsl(var(--ph-hue) 25% 97%), hsl(var(--ph-hue) 20% 92%)); }
.ga-large.ga-placeholder { aspect-ratio: 4 / 3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ga-placeholder { color: hsl(var(--ph-hue) 35% 72%); background: radial-gradient(120% 90% at 85% 10%, hsl(var(--ph-hue) 30% 18%), transparent 60%), linear-gradient(160deg, hsl(var(--ph-hue) 15% 13%), hsl(var(--ph-hue) 15% 10%)); } }
:root[data-theme="dark"] .ga-placeholder { color: hsl(var(--ph-hue) 35% 72%); background: radial-gradient(120% 90% at 85% 10%, hsl(var(--ph-hue) 30% 18%), transparent 60%), linear-gradient(160deg, hsl(var(--ph-hue) 15% 13%), hsl(var(--ph-hue) 15% 10%)); }
.ph-art { position: absolute; inset: 12% 10% 30%; width: 80%; height: 58%; }
.ph-field { position: relative; font: 600 .92rem/1.25 var(--serif); }
.ph-note { position: relative; font-size: .7rem; opacity: .8; margin-top: .15rem; }

/* Feed layout & filters */
.feed-layout { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: start; }
.sidebar { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding-right: .3rem; scrollbar-width: thin; }
.filters-toggle > summary { display: none; }
.filters fieldset { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: .9rem 0; display: grid; gap: .5rem; }
.filters legend { font-weight: 600; font-size: .86rem; color: var(--ink); padding: 0; margin-bottom: .45rem; }
.filters .row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.filters .row label { display: inline-flex; gap: .35rem; align-items: center; }
.help { font-size: .78rem; color: var(--muted); margin: 0; }
.checklist { display: grid; gap: .3rem; }
.checklist label { display: flex; gap: .45rem; align-items: flex-start; font-size: .88rem; }
.checklist.scroll { max-height: 220px; overflow: auto; padding-right: .3rem; }
.checklist .group { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: .5rem 0 .1rem; }
.checklist.cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.checklist .sub { padding-left: 1rem; }
.multi-selected { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.filter-actions { display: flex; gap: .5rem; padding: 1rem 0; position: sticky; bottom: 0; background: var(--bg); }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .5rem; flex-wrap: wrap; }
.count { margin: 0; }
.sort-form { display: flex; gap: .5rem; align-items: center; }
.sort-form select { width: auto; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .3rem 0 1rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .82rem; }
.chip:hover { border-color: var(--warn); color: var(--warn); }
.chip-reset { background: transparent; }
label.chip { cursor: pointer; }
label.chip:hover { border-color: var(--line); color: var(--ink-2); }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2rem 0 0; flex-wrap: wrap; font-size: .92rem; }
.pager ol { display: flex; gap: .25rem; list-style: none; padding: 0; margin: 0; }
.pager a, .pager span { display: inline-block; min-width: 2.2rem; text-align: center; padding: .35rem .55rem; border-radius: 8px; text-decoration: none; }
.pager a:hover { background: var(--surface); }
.pager [aria-current="page"] { background: var(--ink); color: var(--bg); }
.pager .disabled { color: var(--muted); opacity: .5; }

/* Empty, skeleton */
.empty { text-align: center; padding: 3.5rem 1rem; max-width: 520px; margin: 0 auto; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: var(--accent); opacity: .7; margin: 0 auto 1rem; }
.empty h2 { margin: 0 0 .5rem; }
.skeleton-card { height: 170px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skeleton-card { animation: none; } * { transition: none !important; } }

/* Detail */
.detail h1 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.3rem); max-width: 30ch; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.crumbs a { color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2.5rem; margin-top: 1.5rem; }
.abstract { font-size: 1rem; line-height: 1.72; color: var(--ink-2); max-width: 72ch; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .88rem; margin-top: 1.2rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; word-break: break-word; }
.related { padding-left: 1.1rem; }

/* Saved */
.saved-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.saved-controls input[type="search"] { flex: 1 1 260px; width: auto; }
.saved-controls select { width: auto; }
.saved-controls .spacer { flex: 1; }
.file-btn { cursor: pointer; }

/* Careers */
.coming-soon { text-align: center; max-width: 640px; margin: 2rem auto; padding: 2.5rem 1.5rem; border: 1px dashed var(--line); border-radius: 18px; background: var(--surface); }
.cs-art svg { width: 180px; color: var(--accent); margin: 0 auto; }
.cs-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.cs-list li { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.listing { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.listing h3 { margin: .3rem 0; font-size: 1.1rem; }

/* Archive / prose */
.archive-days { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.archive-days a { display: inline-block; padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-size: .9rem; }
.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); font-size: .85rem; color: var(--muted); }
.footer-inner { padding: 1.8rem 0; }
.footer-links a { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: .6rem 1.1rem; border-radius: 999px; font-size: .9rem; box-shadow: var(--shadow); z-index: 20; }

/* Admin */
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; padding: 1.5rem 0 4rem; }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; position: sticky; top: 84px; align-self: start; }
.admin-nav a { padding: .45rem .7rem; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .92rem; }
.admin-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.admin-main h1 { margin-top: 0; font-size: 1.8rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; display: grid; gap: .15rem; }
.kpi span { font-size: .78rem; color: var(--muted); }
.kpi strong { font: 600 1.45rem/1.2 var(--serif); }
.kpi small { color: var(--muted); font-size: .75rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--surface); font-size: .8rem; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: .72rem; padding: .1rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill-ok { background: var(--accent-soft); color: var(--accent-ink); }
.pill-bad { background: var(--warn-soft); color: var(--warn); }
form.inline { display: inline; }
.toolbar { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: end; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 200px; }
.stack { display: grid; gap: .8rem; max-width: 900px; }
.stack label { display: grid; gap: .25rem; }
.stack label.check { display: flex; gap: .5rem; align-items: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.settings-section { border: 1px solid var(--line); border-radius: 12px; padding: 0 1.2rem 1.2rem; margin-bottom: 1.2rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; align-items: center; }
.admin-actions input { width: auto; }
.dup { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.dup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dup-side { background: var(--surface); border-radius: 8px; padding: .8rem; }
.admin-top10 { padding-left: 0; list-style: none; display: grid; gap: .6rem; }
.admin-top10 li { border: 1px solid var(--line); border-radius: 10px; padding: .7rem 1rem; }
.topic-group { border: 1px solid var(--line); border-radius: 10px; padding: .6rem; margin-bottom: .8rem; display: grid; gap: .3rem; }
.topic-row { display: grid; grid-template-columns: 220px 1fr auto auto; gap: .5rem; align-items: center; }
.topic-row.sub { padding-left: 1.5rem; }
.topic-row.add { opacity: .85; }
.inline-stats { display: flex; gap: 1.2rem; list-style: none; padding: 0; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1020px) {
  .feed-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; overflow: visible; }
  .filters-toggle > summary { display: inline-flex; list-style: none; cursor: pointer; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; }
  .filters-toggle > summary::-webkit-details-marker { display: none; }
  .filters-toggle[open] > summary { margin-bottom: .5rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid aside { order: -1; max-width: 520px; }
}
@media (max-width: 760px) {
  .wrap { width: min(1200px, 100% - 1.5rem); }
  .header-inner { gap: .6rem; flex-wrap: wrap; padding: .5rem 0; }
  .main-nav { order: 3; width: 100%; margin-left: 0; }
  .theme-toggle { margin-left: auto; }
  .card, .card-ranked { grid-template-columns: 1fr; gap: .9rem; padding: 1rem; }
  .card-ranked .rank { position: absolute; top: .7rem; left: .7rem; z-index: 1; background: var(--bg); border-radius: 10px; padding: .3rem .55rem; font-size: 1.4rem; box-shadow: var(--shadow); }
  .ga { aspect-ratio: 16 / 9; }
  .hero-search { flex-direction: column; }
  .two-col, .dup-grid, .grid3 { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .topic-row { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .site-footer, .actions, .sidebar, .pager { display: none; }
  .card { break-inside: avoid; border: 0; }
}
.summary-label-abstract { color: var(--muted); }
.summary .more { white-space: nowrap; font-size: .88rem; }
.ga { position: relative; }
.ga .ga-credit { position: absolute; right: 0; bottom: 0; padding: .1rem .45rem; font-size: .66rem; background: rgba(255,255,255,.85); color: #444; border-top-left-radius: 6px; }
.ga.ga-broken { display: none; }
.ga-fallback-link { display: grid; place-items: center; height: 100%; text-decoration: none; }
.ga-fallback { padding: 1rem; text-align: center; font-size: .8rem; color: var(--muted); }
