:root {
  color-scheme: light;
  --bg: #fff;
  --ink: #111;
  --muted: #5a5a5a;
  --hairline: #e0e0e0;
  --paper: #fff;
  --wash: #fafafa;
  --note-wash: #f7f9fb;
  --accent: #333;
  --edge-rgb: 0, 0, 0;
  --logo-invert: 0;
  --code-ink: #444;
  --sidenote-width: 220px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171717;
  --ink: #fff;
  --muted: #b3b3b3;
  --hairline: #333;
  --paper: #171717;
  --wash: #222;
  --note-wash: #242424;
  --accent: #fff;
  --edge-rgb: 255, 255, 255;
  --logo-invert: 1;
  --code-ink: #ddd;
}

* { box-sizing: border-box; }

html {
  font-size: 19px;
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* LINKS */
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--edge-rgb), 0.3);
  transition: border-color 0.15s;
}
a:hover { border-bottom-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* LAYOUT */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}



/* HEADER */
.site-header {
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--ink);
  border-bottom: none;
}

.brand-icon-button {
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.brand-icon-button:hover {
  transform: translateY(-1px) scale(1.02);
  opacity: 0.95;
}

.brand-icon-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.brand-mark {
  display: block;
  width: 68px;
  height: 68px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink);
  border-bottom: none;
  letter-spacing: 0.15em;
  font-size: 16px;
  text-transform: uppercase;
}
.nav a:hover { color: var(--accent); }

/* MAIN + FOOTER */
.main {
  flex: 1;
  padding: 16px 0 24px;
}

.footer {
  padding: 0 0 16px;
}

.footer-rule {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.footer-rule::before,
.footer-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}
.footer-rule-gem {
  padding: 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner p { font-size: 0.88rem; }

.hairline {
  height: 1px;
  background: var(--hairline);
  margin: 32px 0 16px;
}

/* UTILITIES */
.small { font-size: 14px; }
.subtle { color: var(--muted); }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.9em; }
.center { display: grid; place-items: center; }
.uppercase { text-transform: uppercase; letter-spacing: 0.2em; }

/* TEXT SELECTION */
::selection {
  background: rgba(var(--edge-rgb), 0.2);
  color: var(--ink);
}

/* PAGE TITLES */
.page-title {
  margin: 0 0 12px;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-align: left;
}

.page-head { margin-bottom: 24px; text-align: left; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }
h2 { font-size: 1.65rem; margin: 1.2rem 0 0.5rem; letter-spacing: 0.02em; }
h3 { font-size: 1.35rem; margin: 1rem 0 0.4rem; }
.prose h2, .prose h3 { clear: left; }

/* GLOBAL UNORDERED LIST STAR BULLET */
ul {
  list-style: none;
  padding-left: 1.3em;
  margin: 0.4em 0 0.8em 0;
}
ul > li {
  margin: 0;
  position: relative;
  line-height: 1.5;
}
ul > li::before {
  content: "✦";
  position: absolute;
  left: -1.2em;
  color: var(--ink);
  font-size: 0.65em;
  top: 0.6em;
  transform: none;
  line-height: 1;
}

/* PROSE */
.prose p {
  margin: 0 0 0.9em;
  text-align: justify;
  hyphens: auto;
  word-spacing: -0.03em;
  overflow-wrap: break-word;
}
.prose blockquote p {
  text-align: left;
  hyphens: none;
  word-spacing: normal;
}
.prose ul { margin: 0.4em 0 0.8em 0; }
.prose ol { margin: 0.4em 0 0.8em 1.5em; }
.prose li { margin: 0; position: relative; line-height: 1.5; }
.prose ul > li::before {
  content: "✦";
  position: absolute;
  left: -1.2em;
  color: var(--ink);
  font-size: 0.65em;
  top: 0.6em;
  transform: none;
  line-height: 1;
}
.prose blockquote {
  margin: 1.1em 0;
  padding: 0 0 0 1.2em;
  border-left: 3px solid var(--hairline);
  color: var(--muted);
  font-style: italic;
}

/* DROPCAP - disabled */

/* SMALLCAPS */
.sc, abbr {
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}
abbr { border-bottom: 1px dotted var(--muted); cursor: help; }

/* BLOCKS */
.block { margin: 32px 0; }
.block h2 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.tight { padding-left: 1.2em; }

/* HERO */
.hero { margin: 0 0 20px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  grid-template-areas:
    "image identity"
    "image quote";
  column-gap: 32px;
  row-gap: 6px;
  align-items: start;
}
.hero-quote .pullquote { margin-top: 0; }
.hero-image {
  grid-area: image;
  position: relative;
  overflow: hidden;
}
.hero-identity { grid-area: identity; }
.hero-quote    { grid-area: quote; }
.hero-image img { display: block; width: 100%; height: auto; filter: invert(var(--logo-invert)); }
.hero-email { margin: -6px 0 12px; font-size: 0.95rem; }
.lead { margin: 0 0 12px; font-size: 1.1rem; }
.pullquote {
  margin: 20px 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--hairline);
  color: var(--muted);
  font-style: italic;
}


/* TAGS OVERLAY WINDOW */
#tags-overlay {
  position: fixed;
  width: 340px;
  background: var(--bg);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.15);
  z-index: 9999;
  display: none;
  font-family: "Crimson Text", Georgia, serif;
  transition: opacity 0.15s;
}
#tags-overlay.tov-unfocused {
  opacity: 0.45;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.08);
}
.tov-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg);
  cursor: move;
  user-select: none;
}
.tov-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.tov-close {
  background: none;
  border: none;
  color: var(--bg);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}
.tov-close:hover { opacity: 0.7; }
.tov-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  max-height: 260px;
  overflow-y: auto;
  border-bottom: 1px solid var(--hairline);
}
.tov-item {
  padding: 0;
  position: relative;
  line-height: 1.5;
}
.tov-item::before { content: none; }
.tov-item a {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 12px 5px 28px;
  color: var(--ink);
  border-bottom: none;
  font-size: 1rem;
  position: relative;
}
.tov-item a::before {
  content: "✦";
  position: absolute;
  left: 12px;
  color: var(--muted);
  font-size: 0.6em;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
}
.tov-item a:hover { color: var(--accent); background: var(--wash); }
.tov-tag-name { flex: 1; }
.tov-count { color: var(--muted); font-size: 0.82em; margin-left: auto; }
.tov-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
.tov-search-icon { flex-shrink: 0; }
.tov-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
}
.tov-input::placeholder { color: var(--muted); }

/* MANIFESTO (About page) */
.manifesto { margin: 48px 0; }
.manifesto-grid {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 40px;
  align-items: start;
}
.manifesto-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0 0 48px;
  text-decoration: underline;
  text-underline-offset: 6px;
}
.manifesto-art img { width: 100%; height: auto; display: block; }
.manifesto-copy p { text-align: justify; hyphens: auto; margin: 0 0 0.85em; }
.manifesto-copy p:first-of-type { font-variant: small-caps; }
.manifesto-latin { font-weight: 700; margin-top: 1.5em; }
.manifesto-latin-sub { font-style: italic; color: var(--muted); }

/* 404 PAGE */
.denied-page {
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}
.denied-content {
  min-height: 100vh;
  width: min(1200px, 100%);
  margin: 0 auto;
  position: relative;
}
.denied-art {
  position: absolute;
  left: clamp(20px, 8vw, 110px);
  top: 50%;
  transform: translateY(-50%);
}
.denied-art img {
  display: block;
  width: min(40vw, 420px);
  min-width: 220px;
  height: auto;
}
.denied-word {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-35%, -50%);
  margin: 0;
  font-size: clamp(0.8rem, 1.3vw, 1.05rem);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--ink);
}
.denied-redirect {
  position: fixed;
  bottom: 18px;
  right: 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--ink);
  border-bottom: none;
}

.denied-redirect:hover { color: var(--ink); }

/* LISTS */
.list { margin-top: 16px; }
.list-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--hairline);
}
.list-title {
  display: inline-block;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.list-title:hover { border-bottom-color: var(--accent); }
.list-teaser { margin-top: 6px; font-size: 0.95rem; }
.list-teaser p { margin: 0; }
.tagline { margin-top: 8px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }

/* TAGS */
.tags-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tag-pill {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid rgba(var(--edge-rgb), 0.2);
  background: var(--paper);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tag-pill::before { content: "#"; }
.tag-pill:hover { background: var(--wash); border-color: var(--accent); }

/* Tags page list */
.tag-list {
  list-style: none;
  padding-left: 1.3em;
  margin: 0;
}
.tag-list li {
  margin: 0;
  position: relative;
  line-height: 1.5;
}
.tag-list li::before {
  content: "✦";
  position: absolute;
  left: -1.2em;
  color: var(--ink);
  font-size: 0.65em;
  top: 0.6em;
  transform: none;
  line-height: 1;
}
.tag-list a {
  color: var(--ink);
  border-bottom: 1px solid rgba(var(--edge-rgb), 0.25);
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
}
.tag-list a::before { content: "#"; color: var(--muted); }
.tag-list a:hover { border-bottom-color: var(--ink); }
.tag-count { color: var(--muted); font-size: 0.85em; }

/* Tags inline in post header and post list */
.post-tags a,
.tagline a {
  color: var(--accent);
  border-bottom: none;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}
.post-tags a::before,
.tagline a::before { content: "#"; }

/* MUSIC SERVICE LINKS (inline text + logo) */
.music-links {
  margin: 0.5em 0 1em;
}
.music-links a {
  border-bottom: none;
  white-space: nowrap;
}
.music-links a + a {
  margin-left: 1.5em;
}
.service-logo {
  display: inline-block;
  width: 15px;
  height: 15px;
  vertical-align: middle;
  margin-left: 3px;
  position: relative;
  top: -1px;
}
/* Suppress external link icon on music service links */
a.profile-link::after {
  content: none !important;
  display: none !important;
}

/* ABOUT PAGE PHOTO */
.about-photo {
  float: left;
  width: 270px;
  height: auto;
  margin: 0 28px 16px 0;
  display: block;
}

/* PREREQUISITES */
.prerequisites {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--note-wash);
  border-left: 3px solid var(--accent);
}
.prerequisites-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: var(--accent);
}
.prerequisites ul { margin: 0; padding-left: 1.2em; }
.prerequisites li { margin: 4px 0; }

/* SIDENOTES - see full definition below */

/* COLLAPSIBLE */
details {
  margin: 0.6em 0;
  border: none;
  border-bottom: 1px solid var(--hairline);
}
details:first-of-type { border-top: 1px solid var(--hairline); }
details summary {
  padding: 10px 0;
  cursor: pointer;
  font-weight: 600;
  background: transparent;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  user-select: none;
}
details summary::before {
  content: "▶";
  font-size: 0.6em;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
details[open] summary::before { transform: rotate(90deg); }
details summary::-webkit-details-marker { display: none; }
details > *:not(summary) { padding: 4px 0 12px 1em; }

/* INFOBOX */
.infobox {
  float: right;
  width: 280px;
  margin: 0 0 20px 24px;
  border: 1px solid var(--hairline);
  background: var(--note-wash);
  font-size: 0.9rem;
}
.infobox-title {
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.05em;
}
.infobox-image { text-align: center; padding: 12px; }
.infobox-image img { max-width: 100%; height: auto; }
.infobox-content { padding: 12px 14px; }
.infobox-row { display: flex; border-top: 1px solid var(--hairline); padding: 6px 0; }
.infobox-label { width: 90px; font-weight: 600; flex-shrink: 0; }
.infobox-value { flex: 1; }

/* REFERENCES */
.refs { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.refs-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.refs-body { color: var(--muted); font-size: 0.95rem; }

/* 404 PAGE - HIDE HEADER/FOOTER */
body.page-404 {
  background: var(--bg);
}
body.page-404 .site-header,
body.page-404 .footer {
  display: none;
}
body.page-404 .main {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}
body.page-404 .denied-page {
  min-height: 100vh;
}

/* MOBILE */
@media (max-width: 1100px) {
  .sidenote {
    float: none;
    display: block;
    width: 100%;
    margin: 12px 0;
    padding: 12px 16px;
    background: var(--note-wash);
    border-left: 2px solid var(--accent);
  }
}

@media (max-width: 768px) {
  html { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .main { padding-top: 16px; }
  .page-title { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }

  /* Hero: 2-col on mobile — logo + name side by side, quote full width below */
  .hero-grid {
    grid-template-columns: 110px 1fr;
    grid-template-areas:
      "image identity"
      "quote  quote";
    column-gap: 16px;
    row-gap: 12px;
    align-items: start;
  }
  .hero-image { align-self: start; padding-top: 0.6em; }
  .hero-identity { align-self: start; }
  .hero-quote { margin-top: 0; }
  .hero-quote .pullquote { margin-top: 0; }
  .lead { font-size: 1rem; }

  .manifesto-grid { grid-template-columns: 1fr; gap: 24px; }
  .manifesto-art { max-width: 180px; }
  .denied-content { min-height: 100vh; }
  .denied-art {
    left: 16px;
    top: 45%;
    transform: translateY(-50%);
  }
  .denied-art img {
    width: min(58vw, 240px);
    min-width: 150px;
  }
  .denied-word {
    left: 56%;
    top: 60%;
    transform: translate(-50%, -50%);
    letter-spacing: 0.3em;
  }
  .list-item { grid-template-columns: 1fr; gap: 8px; }
  .infobox { float: none; width: 100%; margin: 20px 0; }

  /* Header stays on one row — just tighten it */
  .header-inner { padding: 0 12px; }
  .nav { gap: 10px; }
  .nav a { font-size: 14px; }
  .brand-mark { width: 50px; height: 50px; }

  /* About photo: keep float on mobile so text flows beside it */
  .about-photo {
    float: left;
    width: 150px;
    margin: 4px 16px 8px 0;
  }
}

@media (max-width: 480px) {
  .hero-grid {
    grid-template-columns: 90px 1fr;
    gap: 8px 12px;
  }
  .about-photo { width: 120px; }
  .block h2 { font-size: 0.9rem; letter-spacing: 0.2em; }
  .denied-word {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
  }
  .denied-redirect {
    bottom: 12px;
    right: 12px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }
}

@media print {
  .site-header, .footer, .nav { display: none; }
  .main { padding: 0; }
  a { color: var(--ink); border-bottom: none; }
}

/* ==========================================================================
   SIDENOTES (Tufte-style margin notes via JS conversion)
   ========================================================================== */

/* Hide the toggle checkbox */
.sidenote-toggle {
  display: none;
}

/* Sidenote number marker */
.sidenote-number {
  counter-increment: sidenote-counter;
  cursor: pointer;
}

.sidenote-number::after {
  content: attr(data-note-number);
  font-size: 0.7em;
  vertical-align: super;
  color: var(--accent);
  margin-left: 1px;
}

/* Sidenote content */
.sidenote {
  float: right;
  clear: right;
  width: var(--sidenote-width);
  margin-right: calc(-1 * var(--sidenote-width) - 40px);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
  position: relative;
}

.sidenote::before {
  content: attr(data-note-number) ". ";
  font-weight: 600;
  color: var(--accent);
}

/* Keep code blocks from being affected by sidenotes - clear floats */
.prose pre,
.prose .sourceCode {
  clear: both;
}

/* Collapse sidenotes to inline on narrow screens */
@media (max-width: 1100px) {
  .sidenote-number::after {
    cursor: default;
  }
  
  .sidenote {
    display: block;
    float: none;
    width: 100%;
    max-width: none;
    margin: 0.5rem 0 1rem;
    padding: 12px 16px;
    background: var(--note-wash);
    border-left: 2px solid var(--accent);
  }
}

/* ==========================================================================
   FIGURE STYLING (First-class figures with captions)
   ========================================================================== */

figure {
  margin: 2rem 0;
  padding: 0;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

figcaption code {
  font-style: normal;
}

/* ==========================================================================
   BACKLINKS SECTION
   ========================================================================== */

.backlinks {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.backlinks-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.backlinks-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.backlinks-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}

.backlinks-list li:last-child {
  border-bottom: none;
}

.backlinks-list a {
  color: var(--ink);
}

/* ==========================================================================
   RELATED CONTENT / SEE ALSO
   ========================================================================== */

.related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.related-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-list li {
  padding: 6px 0;
}

.related-list li + li {
  border-top: 1px solid var(--hairline);
}

.related-list a {
  color: var(--ink);
}

/* ==========================================================================
   HOVER HIGHLIGHT (for references)
   ========================================================================== */

.highlight-target {
  background: rgba(var(--edge-rgb), 0.06);
  outline: 2px solid rgba(var(--edge-rgb), 0.2);
  transition: background 0.2s, outline 0.2s;
}


/* Compact, monochrome navigation. */
.page-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.page-navigation nav { display: flex; gap: 24px; }
.page-navigation a {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 0;
}
.page-navigation a[aria-current="page"],
.page-navigation a:hover { color: var(--ink); }
.theme-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  white-space: nowrap;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.theme-toggle[hidden] { display: none; }
@media print { .page-navigation { display: none; } }

/* Plain error page: no artwork and no timed navigation. */
.error-page { min-height: 100vh; display: grid; place-items: center; }
.error-page h1 { margin: 0; font-size: clamp(3rem, 12vw, 7rem); }
