/* Design tokens carried over from the Stitch concept (example.html), without the Tailwind runtime. */
:root {
  --ink: #181c23;
  --ink-soft: #564336;
  --muted: #5f5e5e;
  --rule: #ded9ce;
  --paper: #f8f6f0;
  --card: #fffefa;
  --card-foot: #f3efe8;
  --accent: #e4770a;
  --accent-deep: #944a00;
  --accent-pale: #ffb784;
  --side-accent: #f0923a; /* orange that passes 4.5:1 on the charcoal sidebar at label sizes */

  --side-bg: #2c3038;
  --side-bg-deep: #1e2229;
  --side-field: #20242b;
  --side-rule: #5f5e5a;
  --side-text: #eef0fb;
  --side-muted: #c9c6c1;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;

  --sidebar-width: clamp(270px, 23vw, 320px);
  --measure: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--accent-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 1.15em;
  line-height: 1;
  vertical-align: -0.2em;
  user-select: none;
}

.label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 16px;
  text-transform: uppercase;
}
.label-sm { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--accent-deep); color: #fff; padding: 0.5rem 1rem; }
.skip-link:focus { left: 0; }

.chip {
  display: inline-block;
  background: var(--accent-deep);
  color: #fff;
  padding: 0.15rem 0.55rem;
  text-decoration: none;
}
a.chip:hover { background: var(--accent-deep); color: #fff; }
.chip--dark { background: rgba(44, 48, 56, 0.85); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.2rem;
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(24, 28, 35, 0.8);
  transition: background 0.15s;
}
.button:hover { background: var(--accent-deep); color: #fff; }
.button--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); box-shadow: none; }
.button--ghost:hover { background: var(--ink); color: #fff; }

/* --- Layout ------------------------------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--side-bg);
  border-bottom: 1px solid var(--side-rule);
  color: var(--side-text);
}
.topbar__title { color: var(--side-text); text-decoration: none; font-family: var(--font-display); font-size: 18px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.topbar__toggle { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; background: none; border: 0; color: var(--side-text); padding: 0.25rem; cursor: pointer; font-size: 1.4rem; }
.topbar__toggle:hover { color: var(--accent); }

.sidebar {
  display: none;
  background: var(--side-bg);
  color: var(--side-text);
  border-right: 1px solid var(--side-rule);
}
.sidebar[data-open] { display: flex; }
.sidebar__inner { padding: 1.5rem; display: flex; flex-direction: column; gap: 2rem; flex: 1; }

@media (min-width: 1024px) {
  .topbar { display: none; }
  .sidebar {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--side-rule) var(--side-bg-deep);
  }
  .main { margin-left: var(--sidebar-width); }
}
.sidebar { flex-direction: column; justify-content: space-between; }

.main { min-height: 100vh; display: flex; flex-direction: column; }
.main__inner { width: 100%; max-width: 1100px; margin: 0 auto; padding: 2rem var(--gutter) 0; flex: 1; }

/* --- Sidebar --------------------------------------------------------------------------------------- */

.brand { border-bottom: 1px solid var(--side-rule); padding-bottom: 1.5rem; }
.brand__name { margin: 0; font: 600 26px/1.15 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; }
.brand__name a { color: var(--side-text); text-decoration: none; }
.brand__name a:hover { color: var(--accent-pale); }
.brand__tagline { margin: 0.35rem 0 0; color: var(--side-accent); }
.brand__photo { display: inline-block; margin: 0 0 1.1rem; border-radius: 50%; line-height: 0; }
.brand__photo img { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; }
.brand__photo:hover img { border-color: var(--accent-pale); }
.brand__photo:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.brand__bio { margin: 0.9rem 0 0; color: var(--side-muted); font-size: 15px; line-height: 1.6; }
.brand__links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0; padding: 0; }
.brand__links a { display: inline-block; padding: 0.2rem 0.55rem; border: 1px solid var(--side-rule); color: var(--side-muted); text-decoration: none; }
.brand__links a:hover { border-color: var(--side-accent); color: var(--side-accent); }

.search { display: flex; align-items: center; position: relative; }
.search .material-symbols-outlined { position: absolute; left: 0.6rem; color: var(--side-muted); pointer-events: none; }
.search input {
  width: 100%;
  background: var(--side-field);
  border: 1px solid var(--side-rule);
  border-radius: 0;
  color: var(--side-text);
  padding: 0.55rem 0.75rem 0.55rem 2.2rem;
  font: 500 13px var(--font-display);
  letter-spacing: 0.08em;
}
.search input::placeholder { color: var(--side-muted); text-transform: uppercase; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.search__meta { margin-top: 0.4rem; color: var(--side-muted); }

.widget__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.3rem;
  color: var(--side-accent);
}
.widget__title span:first-child { display: inline-flex; align-items: center; gap: 0.4rem; }
.widget__count { color: var(--side-muted); }
.widget { border-top: 1px solid var(--side-rule); padding-top: 1.5rem; }

.nav { display: flex; flex-direction: column; gap: 0.15rem; }
.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem;
  border-left: 2px solid transparent;
  color: var(--side-muted);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.nav a span:first-child { display: inline-flex; align-items: center; gap: 0.55rem; }
.nav a:hover { color: var(--side-text); border-left-color: var(--side-rule); }
.nav a[aria-current] { background: rgba(228, 119, 10, 0.1); color: var(--accent-pale); border-left-color: var(--accent); font-weight: 600; }
.nav__badge { color: var(--side-muted); } /* solid color, not opacity: keeps 4.5:1 contrast on the dark sidebar */
.nav a[aria-current] .nav__badge { color: var(--accent-pale); }

/* Photo (in color) sits beside the name; the bio runs full width underneath so it wraps naturally at any length. */

.index-list { list-style: none; margin: 0; padding: 0; }
.index-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(95, 94, 90, 0.35);
  color: var(--side-muted);
  text-decoration: none;
}
.index-list li:last-child a { border-bottom: 0; }
.index-list a:hover { color: var(--side-text); }
.index-list a:hover .index-list__count { border-color: var(--accent); }
.index-list__count { padding: 0 0.4rem; background: var(--side-field); border: 1px solid var(--side-rule); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-cloud a {
  padding: 0.15rem 0.5rem;
  background: var(--side-field);
  border: 1px solid var(--side-rule);
  color: var(--side-muted);
  text-decoration: none;
}
.tag-cloud a:hover { border-color: var(--side-accent); color: var(--side-accent); }

.sidebar__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  background: var(--side-bg-deep);
  border-top: 1px solid var(--side-rule);
}
.sidebar__foot a { color: var(--side-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.sidebar__foot a:hover { color: var(--side-accent); }

/* --- Home ------------------------------------------------------------------------------------------ */

.masthead {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}
.masthead__left { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--ink); }
.masthead__left::before { content: ""; width: 10px; height: 10px; background: var(--accent); }
@media (min-width: 1024px) { .masthead { display: flex; } }

.hero { margin-bottom: 3.5rem; border: 1px solid var(--rule); background: var(--card); }
.hero__media { position: relative; display: flex; align-items: flex-end; min-height: 430px; overflow: hidden; background: var(--side-bg); }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.95); transition: transform 0.7s; }
.hero:hover .hero__media img { transform: scale(1.03); }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(24, 28, 35, 0.92), rgba(24, 28, 35, 0.45) 55%, transparent); }
.hero__chips { position: absolute; top: 1.5rem; left: 1.5rem; z-index: 1; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero__body { position: relative; padding: 6rem 2rem 2rem; z-index: 1; max-width: 760px; color: #fff; }
.hero__date { color: var(--accent-pale); margin-bottom: 0.3rem; }
.hero__title { margin: 0 0 0.75rem; font: 600 clamp(28px, 3.4vw, 42px)/1.15 var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; }
.hero__title a { color: #fff; text-decoration: none; }
.hero__title a:hover { color: var(--accent-pale); }
.hero__intro { margin: 0 0 1rem; color: #e5e8f3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero__actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hero__actions .label-sm { color: var(--rule); }
.hero__foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 1.5rem; background: var(--card-foot); border-top: 1px solid var(--rule); color: var(--muted); }
.hero__foot strong { color: var(--accent-deep); font-weight: 600; }

.feed-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--ink);
}
.feed-head h1, .feed-head h2 { margin: 0; font: 600 24px/1.25 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; }
.feed-head p { margin: 0.25rem 0 0; color: var(--muted); font-size: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.filters a { padding: 0.25rem 0.6rem; background: #ebeef8; color: var(--ink); text-decoration: none; }
.filters a:hover { background: var(--rule); }
.filters a[aria-current] { background: var(--ink); color: #fff; }

.cards { display: grid; gap: 1.5rem; margin-bottom: 3.5rem; }
.card {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--card);
  box-shadow: 0 3px 16px rgba(24, 28, 35, 0.035);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover, .card:focus-within { border-color: #b4a48d; box-shadow: 0 8px 24px rgba(24, 28, 35, 0.07); }
@media (min-width: 768px) { .card { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } .card--noimage { grid-template-columns: 1fr; } }
.card__media { min-height: 200px; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--rule); background: #ebeef8; }
.card__media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8); transition: transform 0.5s, filter 0.5s; }
.card:hover .card__media img { transform: scale(1.04); filter: saturate(1); }
.card__body { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; color: var(--muted); }
.card__title { margin: 0 0 0.75rem; font: 600 22px/1.3 var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--accent-deep); text-decoration: underline; text-decoration-thickness: 2px; }
.card__intro { margin: 0 0 1rem; color: var(--ink-soft); max-width: var(--measure); }
.card__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); color: var(--muted); }
.card__more { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--accent-deep); font-weight: 600; text-decoration: none; }
.card__more:hover { color: var(--accent-deep); }
.card__more .material-symbols-outlined { transition: transform 0.15s; }
.card__more:hover .material-symbols-outlined { transform: translateX(3px); }

.epigraph { margin: 3rem 0; padding: 2rem; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--accent); }
.epigraph blockquote { margin: 0 0 0.75rem; font-size: 20px; line-height: 1.6; font-style: italic; }
.epigraph cite { font-style: normal; color: var(--muted); }

.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem 0; border-top: 2px solid var(--ink); margin-bottom: 4rem; color: var(--muted); }
.pager__spacer { min-width: 1px; }

.empty { padding: 3rem 1.5rem; text-align: center; border: 1px dashed var(--rule); color: var(--muted); }

/* --- Article --------------------------------------------------------------------------------------- */

/* A size container, so a "wide" figure can stretch to the article's full width from inside the text column. */
.article { max-width: 820px; margin: 0 auto 4rem; container-type: inline-size; }
.article__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; color: var(--muted); margin-bottom: 1rem; }
.article__title { margin: 0 0 1rem; font: 700 clamp(32px, 5vw, 48px)/1.1 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.article__lead { margin: 0 0 2rem; font-size: 20px; line-height: 1.6; color: var(--ink-soft); max-width: var(--measure); }
/* The lead image lines up with the text column and is never enlarged past its own size (keeps covers sharp). */
.article__image { width: fit-content; max-width: var(--measure); margin: 0 0 2.5rem; border: 1px solid var(--rule); }
.article__image--small { max-width: min(var(--measure), 300px); }
.article__image img { width: auto; max-width: 100%; height: auto; }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.25em; }
.prose p { margin: 0; }
.prose p + p, .prose p + ul, .prose p + ol, .prose ul + p, .prose ol + p { margin-top: 1.1em; }
.prose h2, .prose .block-heading { margin: 2.2em 0 0.6em; font: 600 24px/1.3 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; }
.prose h3 { margin: 1.8em 0 0.5em; font: 500 19px/1.35 var(--font-display); letter-spacing: 0.05em; text-transform: uppercase; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.25rem; border-left: 3px solid var(--accent); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }

.figure { margin: 2rem 0; }
.figure--full { width: 100cqw; max-width: none; } /* full article width, past the text column */
.figure--medium { width: 65%; }
.figure--small { width: 40%; }
.figure--align-center { margin-inline: auto; }
@media (min-width: 640px) {
  .figure--align-left { float: left; margin: 0.35rem 1.5rem 1rem 0; }
  .figure--align-right { float: right; margin: 0.35rem 0 1rem 1.5rem; }
}
@media (max-width: 639px) {
  .figure--small { width: 60%; margin-inline: auto; }
  .figure--medium { width: 100%; }
}
/* Wide blocks start below any wrapped image. No effect when nothing is floated. */
.prose > :is(h2, h3, .block-heading, .video, .pdf, .gallery, .data-table, .pullquote, .doc-link, .recommendation, .figure--text, .figure--full, .figure--align-center) { clear: both; }
.prose::after { content: ""; display: block; clear: both; }
.figure img { width: 100%; border: 1px solid var(--rule); }
.figure figcaption { margin-top: 0.5rem; font-size: 14px; color: var(--muted); }
.figure figcaption .label-sm { margin-left: 0.4rem; }

.video { margin: 2rem 0; }
.video .responsive-object, .video__frame { position: relative; overflow: hidden; background: var(--ink); }
.video .responsive-object iframe, .video .responsive-object object, .video .responsive-object embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { margin-top: 0.5rem; font-size: 14px; color: var(--muted); }

.pullquote { margin: 2.5rem 0; padding: 1.5rem 1.75rem; background: var(--card); border-left: 4px solid var(--accent); }
.pullquote p { margin: 0 0 0.5rem; font-size: 21px; line-height: 1.55; font-style: italic; }
.pullquote footer { color: var(--muted); }

.doc-link { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; border: 1px solid var(--rule); background: var(--card); text-decoration: none; color: var(--ink); }
.doc-link:hover { border-color: var(--accent); color: var(--ink); }
.doc-link .material-symbols-outlined { color: var(--accent); font-size: 1.6rem; }

.book {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  margin: 0 0 2.5rem;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  max-width: var(--measure);
}
.book img { width: 96px; border: 1px solid var(--rule); box-shadow: 3px 3px 0 rgba(24, 28, 35, 0.15); }
.book__placeholder { width: 96px; aspect-ratio: 2 / 3; display: grid; place-items: center; background: var(--side-bg); color: var(--side-muted); font-size: 2rem; }
.book__title { margin: 0.25rem 0 0.2rem; font: 600 20px/1.3 var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; }
.book__by { margin: 0; }
.book__pub { margin: 0.25rem 0 0; color: var(--muted); font-size: 14px; }

.external { margin: 2rem 0; }

.article__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 2.5rem 0 0; }
.article__tags a { padding: 0.2rem 0.55rem; border: 1px solid var(--rule); color: var(--muted); text-decoration: none; }
.article__tags a:hover { border-color: var(--accent-deep); color: var(--accent-deep); }

.cite { margin: 3rem 0 0; padding: 1.25rem 1.5rem; border: 1px solid var(--rule); background: var(--card-foot); max-width: var(--measure); }
.cite__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.6rem; }
.cite__text { margin: 0; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.cite button { background: none; border: 1px solid var(--ink); color: var(--ink); padding: 0.25rem 0.6rem; cursor: pointer; }
.cite button:hover { background: var(--ink); color: #fff; }

.neighbours { display: grid; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
@media (min-width: 640px) { .neighbours { grid-template-columns: 1fr 1fr; } }
.neighbours a { display: block; padding: 1rem; border: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.neighbours a:hover { border-color: var(--ink); }
.neighbours .label-sm { display: block; color: var(--muted); margin-bottom: 0.3rem; }
.neighbours__title { font: 500 17px/1.35 var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; }
.neighbours__next { text-align: right; }

.book__blurb { margin-top: 0.75rem; }
.book__blurb summary { cursor: pointer; color: var(--accent-deep); }
.book__blurb p { margin: 0.5rem 0 0; font-size: 15px; color: var(--ink-soft); }

.related { margin-top: 3rem; max-width: var(--measure); }
.related h2 { margin: 0 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ink); }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.related a { color: var(--ink); text-decoration: none; font-weight: 600; }
.related a:hover { color: var(--accent-deep); text-decoration: underline; }
.related .label-sm { color: var(--muted); }

/* --- Publications ---------------------------------------------------------------------------------- */

.pubs h2 { margin: 2.5rem 0 1rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ink); font: 600 20px/1.3 var(--font-display); letter-spacing: 0.05em; text-transform: uppercase; }
.pubs ol { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.pub__year { color: var(--accent-deep); padding-top: 0.2rem; }
.pub__title { font-weight: 600; }
.pub__links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.4rem; }
.pub__links .doi { text-transform: none; letter-spacing: 0.02em; }
.pub details { margin-top: 0.4rem; }
.pub summary { cursor: pointer; color: var(--muted); }
.pub details p { margin: 0.5rem 0 0; font-size: 15px; color: var(--ink-soft); }

.az { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1rem; }
.az a { min-width: 2rem; padding: 0.3rem 0.5rem; text-align: center; background: #ebeef8; color: var(--ink); text-decoration: none; }
.az a:hover { background: var(--ink); color: #fff; }
.review-index { list-style: none; margin: 0; padding: 0; }
.review-index li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.review-index__venue { display: block; margin-top: 0.15rem; color: var(--muted); }

/* --- Footer ---------------------------------------------------------------------------------------- */

.footer { border-top: 1px solid var(--rule); }
.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--muted);
}
.footer__name { color: var(--ink); font-weight: 600; }
.footer p { margin: 0.3rem 0 0; font-size: 14px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }
.footer__links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.footer__links a:hover { color: var(--ink); border-bottom-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* --- Editor sign-in -------------------------------------------------------------------------------- */

.signin { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--side-bg); }
.signin__card { width: 100%; max-width: 420px; padding: 2rem; background: var(--paper); border-top: 4px solid var(--accent); box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35); }
.signin__kicker { margin: 0 0 0.5rem; color: var(--accent-deep); }
.signin__title { margin: 0 0 0.5rem; font: 600 30px/1.15 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; }
.signin__help { margin: 0 0 1.5rem; color: var(--ink-soft); font-size: 16px; }
.signin form { display: grid; gap: 0.5rem; }
.signin input[type="email"], .signin input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--muted);
  border-radius: 0;
  font: 400 18px var(--font-body);
}
.signin input[name="code"] { font: 600 28px/1 var(--font-display); letter-spacing: 0.4em; text-align: center; }
.signin input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.signin .button { justify-content: center; margin-top: 0.75rem; }
.signin__error { margin: 0; color: #ba1a1a; font-size: 15px; }
.signin__alt { margin: 1.5rem 0 0; }

/* Editorial welcome and discovery */
.welcome { padding: 0.25rem 0 2.75rem; max-width: 800px; }
.eyebrow { color: var(--accent-deep); margin: 0 0 1rem; }
/* The home page's heading: the "collected work" line, at the size Justin settled on. */
.welcome .eyebrow { font-size: clamp(12px, 1.3vw, 18px); line-height: 1.2; letter-spacing: 0.06em; }
.article__title--medium { font-size: clamp(28px, 3.8vw, 40px); }
.article__title--long { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.hero__title--long { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
.welcome__intro { max-width: 56ch; margin: 1.2rem 0; font-size: 19px; color: var(--ink-soft); }
.welcome__links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; }
.welcome__links a { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; text-decoration: none; border-bottom: 1px solid var(--accent-deep); }
.card__title, .article__title, .hero__title { overflow-wrap: anywhere; text-wrap: balance; }
.card__foot { flex-wrap: wrap; }
.filters a, .az a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.filters a { border: 1px solid var(--rule); background: var(--card); padding-inline: 0.85rem; }
.filters a[aria-current] { border-color: var(--ink); }
.archive-search { padding: clamp(1rem, 3vw, 2rem); margin: 0 0 2rem; background: var(--card-foot); border: 1px solid var(--rule); border-top: 3px solid var(--accent-deep); }
.archive-search label { display: block; margin-bottom: 0.75rem; }
.archive-search__row { display: flex; gap: 0.75rem; }
.archive-search input { min-width: 0; flex: 1; border: 1px solid #918775; background: var(--card); border-radius: 0; padding: 0.85rem; font: inherit; }
.archive-search p { margin: 0.75rem 0; font-size: 15px; color: var(--muted); }
.topbar__actions { display: flex; align-items: center; gap: 1rem; }
.topbar__search { display: inline-flex; align-items: center; min-height: 44px; color: var(--side-text); }
.main { min-width: 0; }
.prose, .pub { overflow-wrap: anywhere; }
.search input { min-height: 44px; font-size: 16px; }
.nav a { min-height: 44px; }
.no-js .topbar__toggle { display: none; }
@media (max-width: 1023px) {
  .js .sidebar { position: fixed; z-index: 40; top: 70px; bottom: 0; left: 0; width: min(380px, 100%); overflow-y: auto; box-shadow: 12px 12px 32px rgba(0, 0, 0, 0.25); overscroll-behavior: contain; }
  .no-js .sidebar { display: flex; }
  .topbar { min-height: 70px; }
  .topbar__title { font-size: 16px; letter-spacing: 0.06em; }
  .main__inner { padding-top: 1.5rem; }
}
@media (max-width: 540px) {
  .hero__media { min-height: 390px; }
  .hero__body { padding: 5rem 1.25rem 1.5rem; }
  .hero__chips { top: 1rem; left: 1.25rem; }
  .hero__intro { display: block; }
  .welcome { padding-bottom: 2rem; }
  .card { padding: 1rem; gap: 1rem; }
  .card__media { max-height: 240px; }
  .archive-search__row { flex-direction: column; }
  .archive-search .button { justify-content: center; }
  .book { grid-template-columns: 64px minmax(0, 1fr); gap: 0.8rem; padding: 1rem; }
  .book img, .book__placeholder { width: 64px; }
}

/* --- Embedded PDF reader --------------------------------------------------------------------------- */

.pdf { margin: 2rem 0; border: 1px solid var(--rule); background: var(--card); }
.pdf__frame { height: min(80vh, 900px); background: #525659; }
.pdf__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.pdf__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; padding: 0.75rem 1rem; border-top: 1px solid var(--rule); font-size: 15px; }
.pdf__links { display: flex; flex-wrap: wrap; gap: 1rem; }
.pdf__links a { display: inline-flex; align-items: center; gap: 0.3rem; }
/* Phones can't show PDFs inside a page; lead with the buttons instead of an empty frame. */
@media (max-width: 640px) { .pdf__frame { display: none; } .pdf__bar { border-top: 0; } }

/* --- Lightbox (native <dialog>) ---------------------------------------------------------------------- */

a[data-lightbox] { display: block; cursor: zoom-in; }
.book__cover[data-lightbox] { display: inline-block; }
a[data-lightbox]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.lightbox { max-width: none; max-height: none; width: 100vw; height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; }
.lightbox::backdrop { background: rgba(14, 16, 20, 0.9); }
.lightbox__inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; width: 100%; height: 100%; padding: 3.5rem 1rem 1.5rem; }
.lightbox__img { max-width: min(92vw, 1600px); max-height: calc(100vh - 8rem); width: auto; height: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); background: #fff; }
.lightbox__caption { margin: 0; max-width: 70ch; color: #eef0fb; text-align: center; font-size: 15px; }
.lightbox__close {
  position: fixed; top: 0.75rem; right: 0.75rem;
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); cursor: pointer; font-size: 1.4rem;
}
.lightbox__close:hover, .lightbox__close:focus-visible { background: var(--accent-deep); outline: none; }

/* --- Gallery and table blocks (only appear where Justin adds them) --------------------------------- */

.gallery { margin: 2rem 0; }
.gallery__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; }
.gallery__grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--rule); }
.gallery__item-caption { display: block; margin-top: 0.3rem; font-size: 13px; color: var(--muted); }
.gallery > figcaption, .data-table > figcaption { margin-top: 0.6rem; font-size: 14px; color: var(--muted); }

.data-table { margin: 2rem 0; }
.data-table__scroll { overflow-x: auto; border: 1px solid var(--rule); background: var(--card); }
.data-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; } /* keep words whole; wide tables scroll sideways inside their box */
.data-table th { font: 600 13px var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; background: var(--card-foot); }
.data-table tr:last-child td { border-bottom: 0; }

/* --- Recommendation card ---------------------------------------------------------------------------- */

.recommendation { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr); gap: 1.25rem; margin: 2rem 0; padding: 1.25rem; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--accent-deep); }
.recommendation--noimage { grid-template-columns: minmax(0, 1fr); }
.recommendation__image { display: block; align-self: start; line-height: 0; }
.recommendation__image img { width: 100%; height: auto; border: 1px solid var(--rule); box-shadow: 3px 3px 0 rgba(24, 28, 35, 0.12); }
.recommendation__kind { display: block; color: var(--accent-deep); margin-bottom: 0.25rem; }
.recommendation__title { margin: 0; font: 600 20px/1.3 var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; }
.prose .recommendation__title { margin: 0; clear: none; }
.recommendation__by { margin: 0.3rem 0 0; color: var(--muted); }
.recommendation__text { margin-top: 0.6rem; font-size: 16px; }
.recommendation__text p { margin: 0; }
.recommendation__text p + p { margin-top: 0.8em; }
.recommendation__links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 0; padding: 0; }
@media (max-width: 520px) { .recommendation { grid-template-columns: minmax(0, 1fr); } .recommendation__image { max-width: 160px; } }

/* --- Footnotes -------------------------------------------------------------------------------------- */

.prose a[href^="#footnote-"] { text-decoration: underline; text-underline-offset: 0.15em; }
.prose a[href^="#footnote-"] sup { font-size: 0.72em; line-height: 0; }
.notes { margin-top: 2.5rem; max-width: var(--measure); padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 15px; }
.notes h2 { margin: 0 0 0.75rem; color: var(--muted); }
.notes ol { margin: 0; padding-left: 1.5rem; }
.notes li { margin-bottom: 0.6rem; scroll-margin-top: 5rem; }
.notes li p { display: inline; margin: 0; }
.notes__back { margin-left: 0.35rem; text-decoration: underline; text-underline-offset: 0.15em; }
.prose a.footnote-ref { text-decoration: underline; text-underline-offset: 0.15em; color: var(--accent-deep); font-weight: 600; }
.prose [id^="footnote-source-"] { scroll-margin-top: 5rem; }
