/* ═══════════════════════════════════════════════════════
   bbs.css — BBS-flavored theme for michaelharley.net
   IBM Plex Serif + Mono, self-hosted.
   ═══════════════════════════════════════════════════════ */

/* ─── Fonts ───────────────────────────────────────────── */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-serif-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-serif-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-serif-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-latin-700-normal.woff2') format('woff2');
}

/* ─── Theme variables ─────────────────────────────────── */
:root {
  --bg:      #f5f1e8;   /* warm paper */
  --bg-alt:  #ece7d5;
  --ink:     #0a1128;   /* dark navy ink */
  --muted:   #5a5d68;
  --chrome:  #0e7490;   /* cyan accent */
  --hotkey:  #b45309;   /* amber */
  --accent:  #b42318;
  --rule:    rgba(10, 17, 40, 0.15);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:     #0d1117;
    --bg-alt: #161b22;
    --ink:    #e6edf3;
    --muted:  #8b949e;
    --chrome: #39c5cf;
    --hotkey: #f5b041;
    --accent: #ff6b6b;
    --rule:   rgba(230, 237, 243, 0.13);
  }
}

:root[data-theme="dark"] {
  --bg:     #0d1117;
  --bg-alt: #161b22;
  --ink:    #e6edf3;
  --muted:  #8b949e;
  --chrome: #39c5cf;
  --hotkey: #f5b041;
  --accent: #ff6b6b;
  --rule:   rgba(230, 237, 243, 0.13);
}

/* ─── Minimal reset ───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

ul[class], ol[class] {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ─── Base ────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  font-size: 1.125rem;
  line-height: 1.55;
}

@media (min-width: 700px) {
  body { font-size: 1.25rem; }
}

.wrapper {
  max-width: 68ch;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

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

/* Email obfuscation decoy (see emailLink shortcode) */
.oe { display: none; }

/* Respect prefers-reduced-motion (WCAG 2.2 SC 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* WCAG AA contrast overrides for Prism Dracula tokens on #1c1c1c */
.page-content pre .token.comment,
.page-content pre .token.prolog,
.page-content pre .token.cdata,
.page-content pre .token.punctuation,
.page-content pre .token.variable,
.page-content pre .token.parameter,
.page-content pre .token.namespace,
.page-content pre .token.operator {
  color: #b4c3e8;
}

/* ─── Changelog ───────────────────────────────────────── */
.changelog {
  margin: 2rem 0;
}
.changelog ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
}
.changelog li {
  display: grid;
  grid-template-columns: 11ch 1fr;
  gap: 0 1.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px dotted var(--rule);
  align-items: baseline;
}
.changelog li:last-child { border-bottom: none; }
.changelog-date {
  color: var(--chrome);
  white-space: nowrap;
}
.changelog-change {
  color: var(--ink);
}
@media (max-width: 500px) {
  .changelog li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
  .changelog-date {
    font-size: 0.82rem;
    color: var(--muted);
  }
}

/* ─── Update banner / callout ─────────────────────────── */
.update-banner {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-left: 3px solid var(--hotkey);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
  color: var(--ink);
}
.update-banner p { margin: 0; }
.update-banner p + p { margin-top: 0.5rem; }
.update-banner p:first-child::before {
  content: "[!] ";
  color: var(--hotkey);
  font-weight: 700;
}
.update-banner strong { color: var(--hotkey); font-weight: 500; }
.update-banner a { color: var(--chrome); text-decoration: underline; }
.update-banner a:hover { color: var(--accent); }

/* ─── Code blocks (non-Prism concerns) ────────────────── */
.page-content pre {
  position: relative;
  margin: 1rem 0;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.45;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--foreground, #F8F8F2);
  padding: 0.25rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  line-height: 0;
  border-radius: 0;
}
.page-content pre:hover .copy-btn,
.copy-btn:focus-visible {
  opacity: 0.6;
}
.copy-btn:hover { opacity: 1; }

/* ─── 404 page ────────────────────────────────────────── */
.four-oh-four {
  text-align: center;
  padding: 2rem 0 1rem;
}
.four-oh-four h1 {
  margin: 0.5rem 0 0.5rem;
}
.four-oh-four .lede {
  margin: 0 auto 1rem;
}
.four-oh-four-cat {
  display: inline-block;
  margin-bottom: 1rem;
  cursor: pointer;
  outline-offset: 4px;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.four-oh-four-cat img {
  display: block;
  filter: grayscale(0.3);
}
.four-oh-four-cat:hover,
.four-oh-four-cat:focus-visible {
  transform: scale(1.08);
}
.four-oh-four-cat:hover img,
.four-oh-four-cat:focus-visible img {
  filter: grayscale(0) hue-rotate(160deg) brightness(1.2);
}
.skip-link:focus {
  position: static;
  display: inline-block;
  padding: 0.4rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
  margin-bottom: 1rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  text-decoration: none;
}

a {
  color: var(--chrome);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }

em { font-style: italic; }
strong { font-weight: 600; }

.mono, code, kbd, samp {
  font-family: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
}

/* ─── Site header ─────────────────────────────────────── */
.bbs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.bbs-brand-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.bbs-brand {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--chrome);
  letter-spacing: 0.02em;
  margin: 0;
  padding: 0;
}
.bbs-brand::before { content: "░▒▓█ "; opacity: 0.85; }
.bbs-brand::after  { content: " █▓▒░"; opacity: 0.85; }
.bbs-brand a {
  color: inherit;
  text-decoration: none;
}
.bbs-brand a:hover { color: var(--accent); }

.bbs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.bbs-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.15rem 0;
  border-bottom: 1px dotted transparent;
}
.bbs-nav a:hover {
  color: var(--chrome);
  border-bottom-color: var(--chrome);
}
.bbs-nav .k { color: var(--hotkey); font-weight: 700; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--muted);
  padding: 0.35rem 0.5rem;
  line-height: 0;
  cursor: pointer;
  border-radius: 0;
  flex: 0 0 auto;
  align-self: flex-start;
}
.theme-toggle:hover {
  color: var(--chrome);
  border-color: var(--chrome);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline-block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ─── Headings ────────────────────────────────────────── */
h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 0.25rem 0 0.75rem;
  letter-spacing: -0.01em;
}

h2 {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--chrome);
  margin: 2.75rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
h2::before { content: "──"; flex: 0 0 auto; }
h2::after  {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid currentColor;
  opacity: 0.35;
}

/* ─── Prose ───────────────────────────────────────────── */
p { margin: 0.85rem 0; }
.lede { font-size: 1.08rem; }

/* ─── Entry list ──────────────────────────────────────── */
.entries {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}
.entries li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted var(--rule);
}
.entries li:last-child { border-bottom: none; }
.entries .when {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.3em;
}
.entries a.title {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.entries a.title:hover {
  color: var(--chrome);
  text-decoration: underline;
}
.entries .summary {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.25rem 0 0;
}
.entries .link-source {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  margin-left: 0.6rem;
  white-space: nowrap;
}

/* ─── Listening (/listening/) ─────────────────────────── */
.scrobble-count {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.75rem 0 1.5rem;
}
.scrobble-count strong {
  color: var(--chrome);
  font-weight: 500;
}
.scrobble-count a { color: var(--chrome); text-decoration: none; }
.scrobble-count a:hover { color: var(--accent); text-decoration: underline; }

.listening-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
}
.listening-toggle button {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  border-radius: 0;
}
.listening-toggle button:hover {
  color: var(--chrome);
  border-color: var(--chrome);
}
.listening-toggle button[aria-selected="true"] {
  color: var(--ink);
  background: var(--bg-alt);
  border-color: var(--chrome);
}

.artist-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.5rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
.artist-list li {
  display: grid;
  grid-template-columns: 2.5ch 1fr auto;
  gap: 0 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 0.9rem;
  align-items: baseline;
}
.artist-list li:last-child { border-bottom: none; }
.artist-rank {
  color: var(--muted);
}
.artist-link {
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artist-link:hover {
  color: var(--chrome);
  text-decoration: underline;
}
.artist-playcount {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ─── Sitemap / slash pages directory ─────────────────── */
.slash-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
}
.slash-list li {
  display: grid;
  grid-template-columns: minmax(auto, 18ch) 1fr;
  gap: 0 1.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--rule);
}
.slash-list li:last-child { border-bottom: none; }
.slash-name {
  color: var(--chrome);
  text-decoration: none;
}
.slash-name:hover {
  color: var(--accent);
  text-decoration: underline;
}
.slash-desc {
  color: var(--muted);
}
@media (max-width: 500px) {
  .slash-list li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

/* ─── Contact list ────────────────────────────────────── */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.95rem;
}
.contact-list li {
  display: grid;
  grid-template-columns: 11ch 1fr;
  gap: 0 1.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px dotted var(--rule);
  align-items: baseline;
}
.contact-list li:last-child { border-bottom: none; }
.contact-method {
  color: var(--muted);
}
.contact-handle {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.contact-handle a {
  color: var(--chrome);
  text-decoration: none;
}
.contact-handle a:hover {
  color: var(--accent);
  text-decoration: underline;
}
@media (max-width: 500px) {
  .contact-list li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

/* ─── Feed list (subscribe/rss) ───────────────────────── */
.feed-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.95rem;
}
.feed-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 1.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px dotted var(--rule);
  align-items: baseline;
}
.feed-list li:last-child { border-bottom: none; }
.feed-name {
  color: var(--ink);
}
.feed-links {
  display: flex;
  gap: 0.6rem;
}
.feed-links a {
  color: var(--chrome);
  text-decoration: none;
  font-size: 0.85rem;
}
.feed-links a::before { content: "["; color: var(--muted); }
.feed-links a::after { content: "]"; color: var(--muted); }
.feed-links a:hover {
  color: var(--accent);
}
.feed-links a:hover::before,
.feed-links a:hover::after {
  color: var(--accent);
}

/* ─── Subscribe form ──────────────────────────────────── */
.subscribe-form {
  margin: 1.5rem 0;
  max-width: 32em;
  background: var(--bg-alt);
  padding: 1.25rem;
}
.subscribe-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.subscribe-field label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--muted);
}
.subscribe-field input[type="email"] {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--chrome);
  background: var(--bg-alt);
  color: var(--ink);
  border-radius: 0;
}
.subscribe-field input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}
.subscribe-btn {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--chrome);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 0;
}
.subscribe-btn:hover {
  background: var(--bg-alt);
  border-color: var(--accent);
  color: var(--accent);
}
.subscribe-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Photo grid ──────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 1rem;
  margin: 2rem 0;
}
@media (max-width: 700px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

.photo-grid-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
}

.photo-grid-frame {
  aspect-ratio: 1;
  border: 1px solid var(--chrome);
  background: var(--bg-alt);
  overflow: hidden;
}
.photo-grid-frame img,
.photo-grid-frame picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}

.photo-grid-caption {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.3;
}
.photo-grid-location {
  color: var(--ink);
}
.photo-grid-caption time {
  color: var(--muted);
}

.photo-grid-item:hover .photo-grid-frame {
  border-color: var(--accent);
}

/* ─── Photo entry page (hero image) ───────────────────── */
.photo-hero {
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--chrome);
  background: var(--bg-alt);
  overflow: hidden;
}
.photo-hero img,
.photo-hero picture {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.entries-more {
  margin-top: 0.75rem;
  text-align: right;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
}
.entries-more a {
  text-decoration: none;
  color: var(--ink);
}
.entries-more a:hover {
  color: var(--chrome);
}
.entries-more .prompt {
  color: var(--chrome);
  margin-right: 0.25em;
}

/* ─── Pagination / cross-nav ──────────────────────────── */
.pagination-nav {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.pagination-nav a {
  color: var(--ink);
  text-decoration: none;
}
.pagination-nav a:hover { color: var(--chrome); }
.pagination-nav .prompt {
  color: var(--chrome);
  margin-right: 0.25em;
}

.content-type-icon {
  color: var(--muted);
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.18em;
  margin-right: 0.4em;
  flex-shrink: 0;
}

/* ─── Reading challenge (ASCII progress) ──────────────── */
.reading-challenge {
  background: var(--bg-alt);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
}
.reading-challenge h2 {
  margin: 0 0 0.5rem;
}
.challenge-meta {
  margin: 0.25rem 0;
  color: var(--ink);
}
.challenge-meta .challenge-sep {
  color: var(--muted);
  margin: 0 0.5em;
}
.challenge-bar {
  color: var(--chrome);
  margin: 0.5rem 0 0;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

/* ─── Book / watching / photo grid ────────────────────── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 1rem;
  margin: 2rem 0;
}
@media (max-width: 700px) {
  .book-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 400px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); }
}

.book-grid-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.book-grid-cover {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--chrome);
  background: var(--bg-alt);
  overflow: hidden;
}
.book-grid-cover img,
.book-grid-cover picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}

.book-grid-nocover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.book-grid-caption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.3;
}

.book-grid-title {
  color: var(--ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.book-grid-author {
  color: var(--muted);
}
.book-grid-rating {
  color: var(--hotkey);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  line-height: 1;
  margin-top: 0.15rem;
}
.book-grid-fav {
  font-size: 0.9em;
  margin-left: 0.2em;
  vertical-align: 0.05em;
}
.book-grid-seq {
  color: var(--muted);
  font-weight: 400;
}
.book-grid-status {
  color: var(--chrome);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.book-grid-series {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ─── Link entry attribution ──────────────────────────── */
.link-attribution {
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 2px solid var(--chrome);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
}
.link-attribution a {
  color: var(--chrome);
  text-decoration: none;
  word-break: break-word;
}
.link-attribution a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ─── Breadcrumb ──────────────────────────────────────── */
.breadcrumb {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--chrome);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.breadcrumb .prompt {
  color: var(--chrome);
  margin-right: 0.2em;
}
.breadcrumb-sep {
  margin: 0 0.4em;
  color: var(--muted);
}
.breadcrumb-current {
  color: var(--ink);
}

/* ─── Book / watch entry page ─────────────────────────── */
.book-entry .section-header,
.watch-entry .section-header { margin-bottom: 0.5rem; }

.book-detail,
.watch-detail {
  display: grid;
  gap: 1.5rem 2rem;
  margin: 1.5rem 0 2rem;
}
.book-detail.has-poster,
.watch-detail.has-poster {
  grid-template-columns: minmax(160px, 200px) 1fr;
}
@media (max-width: 700px) {
  .book-detail.has-poster,
  .watch-detail.has-poster {
    grid-template-columns: 1fr;
    max-width: 220px;
  }
}

.book-poster,
.watch-poster {
  margin: 0;
  border: 1px solid var(--chrome);
  background: var(--bg-alt);
  aspect-ratio: 2 / 3;
  overflow: hidden;
}
.book-poster img, .book-poster picture,
.watch-poster img, .watch-poster picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-info > *,
.watch-info > * { margin: 0 0 0.65rem; }

.book-byline {
  font-size: 1rem;
  color: var(--muted);
}
.book-byline a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.book-byline a:hover {
  color: var(--chrome);
  border-bottom-color: var(--chrome);
}

.book-tagline,
.watch-tagline {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--muted);
}
.book-tagline a,
.watch-tagline a {
  color: var(--chrome);
  text-decoration: none;
}
.book-tagline a:hover,
.watch-tagline a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.book-overview,
.watch-overview {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

.book-source-attribution,
.tmdb-attribution {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
}
.book-source-attribution a,
.tmdb-attribution a { color: var(--chrome); text-decoration: none; }
.book-source-attribution a:hover,
.tmdb-attribution a:hover { color: var(--accent); text-decoration: underline; }

/* Watch-specific extras */
.watch-year {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.7em;
}
.watch-cert {
  color: var(--hotkey);
  font-weight: 500;
}
.watch-cert::before { content: "["; color: var(--muted); }
.watch-cert::after { content: "]"; color: var(--muted); }
.watch-quote {
  color: var(--muted);
  font-size: 0.98rem;
  border-left: 2px solid var(--chrome);
  padding-left: 1rem;
  margin: 0.75rem 0;
}
.watch-quote em { font-style: italic; }
.watch-crew { margin: 0.75rem 0; }
.watch-crew-name {
  color: var(--ink);
  margin: 0 0 0.1rem;
}
.watch-crew-roles {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}
.tmdb-logo {
  height: 14px;
  vertical-align: middle;
}

/* ─── Book review card ────────────────────────────────── */
.book-review-card {
  background: var(--bg-alt);
  padding: 1rem 1.25rem 1.25rem;
  margin: 1.5rem 0;
}
.book-review-card h2 { margin: 0 0 0.5rem; }

.book-review-date {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.book-review-card .entry-comment { margin-top: 0.25rem; }

.book-review-stars {
  color: var(--hotkey);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  line-height: 1;
  margin: 0.75rem 0 0;
}
.book-review-fav {
  font-size: 0.85em;
  margin-left: 0.25em;
  vertical-align: 0.05em;
}

.book-grid-item:hover .book-grid-cover {
  border-color: var(--accent);
}
.book-grid-item:hover .book-grid-title {
  color: var(--chrome);
}

/* ─── Menu block ──────────────────────────────────────── */
.menu {
  background: var(--bg-alt);
  padding: 1rem 1.25rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
}
.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
.menu a {
  color: var(--ink);
  text-decoration: none;
}
.menu a:hover { color: var(--chrome); }
.menu .hk { color: var(--hotkey); font-weight: 700; }
.menu .desc { color: var(--muted); margin-left: 0.4rem; }

/* ─── Site footer ─────────────────────────────────────── */
.site-footer {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer p { margin: 0.35rem 0; }
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}
.site-footer a:hover {
  color: var(--ink);
  border-bottom-color: var(--muted);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-top: 0.5rem;
}
.site-footer .rss-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.site-footer .rss-icon {
  vertical-align: middle;
  flex-shrink: 0;
}

/* ─── Page title block ────────────────────────────────── */
.section-header {
  margin-bottom: 2rem;
}
.section-header h1 {
  margin: 0.25rem 0 0.3rem;
}
.post-subhead {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.post-subhead time {
  color: var(--ink);
}

/* ─── Prose (page.njk content) ────────────────────────── */
.page-content h2 {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 1.3rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--chrome);
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.page-content h2::before { content: "──"; flex: 0 0 auto; }
.page-content h2::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid currentColor;
  opacity: 0.35;
}

.page-content h3 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 2rem 0 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}
.page-content h3::before {
  content: "»";
  color: var(--chrome);
  font-size: 1.1em;
  flex-shrink: 0;
}
.page-content h4 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1.08rem;
  font-weight: 600;
  margin: 1.5rem 0 0.35rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.page-content h4::before {
  content: "·";
  color: var(--chrome);
  font-size: 1.2em;
  flex-shrink: 0;
}

.page-content ul,
.page-content ol {
  padding-left: 1.5rem;
  margin: 0.9rem 0;
}
.page-content li { margin: 0.3rem 0; }
.page-content li > ul,
.page-content li > ol { margin: 0.3rem 0; }

.page-content blockquote {
  margin: 1.25rem 0;
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 2px solid var(--chrome);
  color: var(--muted);
  font-style: italic;
}
.page-content blockquote p:first-child { margin-top: 0; }
.page-content blockquote p:last-child { margin-bottom: 0; }

.page-content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.25rem auto;
  width: 100%;
}

.page-content code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 0.1em 0.35em;
}

.page-content img,
.page-content picture {
  max-width: 100%;
  height: auto;
}

.page-content figure {
  margin: 1.75rem 0;
}
.page-content figure img,
.page-content figure picture {
  display: block;
  margin: 0 auto;
}
.page-content figcaption {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: center;
}
.page-content .constrained-img {
  max-width: 40em;
  margin-left: auto;
  margin-right: auto;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95em;
}
.page-content th,
.page-content td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.page-content th {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--chrome);
}

/* ─── End-of-article marker (post.njk only) ───────────── */
.end-of-article {
  margin-top: 3rem;
  margin-bottom: 2.5rem;
  text-align: center;
}
.end-of-article::before {
  content: "⁂";
  display: inline-block;
  font-size: 1.5rem;
  color: var(--muted);
  opacity: 0.8;
}

/* ─── Footnotes (markdown-it-footnote) ────────────────── */
.footnotes-sep {
  margin: 3rem 0 1.5rem;
  border: 0;
  border-top: 1px solid var(--rule);
}
.footnotes {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--muted);
}
.footnotes ol {
  list-style: decimal;
  padding-left: 1.75rem;
  margin: 0.5rem 0;
}
.footnotes li + li { margin-top: 0.5rem; }
.footnotes li p { margin: 0; }
.footnotes a { color: var(--chrome); text-decoration: none; }
.footnotes a:hover { color: var(--accent); text-decoration: underline; }

.footnote-ref a {
  color: var(--chrome);
  text-decoration: none;
  padding: 0 0.15rem;
}
.footnote-ref a:hover { color: var(--accent); }

.footnote-backref {
  color: var(--chrome);
  text-decoration: none;
  margin-left: 0.25rem;
}
.footnote-backref:hover { color: var(--accent); }

/* ─── Post tags (c-tags) ──────────────────────────────── */
.c-tags {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 1.5rem 0 0;
}
.c-tags-label {
  margin-right: 0.75rem;
}
.c-tags a {
  color: var(--chrome);
  text-decoration: none;
  margin-right: 0.6rem;
}
.c-tags a::before { content: "#"; }
.c-tags a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.c-tags a:last-child { margin-right: 0; }

/* ─── Webmentions ─────────────────────────────────────── */
.webmentions { margin-top: 1rem; }

.wm-counts {
  background: var(--bg-alt);
  padding: 1rem 1.25rem;
  margin: 0.5rem 0 1rem;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.9rem;
}
.wm-count { margin: 0.25rem 0; }
.wm-count summary {
  cursor: pointer;
  color: var(--ink);
  list-style: none;
  padding: 0.2rem 0;
}
.wm-count summary::-webkit-details-marker { display: none; }
.wm-count summary::before {
  content: "[+] ";
  color: var(--hotkey);
  font-weight: 700;
}
.wm-count[open] summary::before { content: "[-] "; }
.wm-count summary:hover { color: var(--chrome); }

.wm-faces {
  list-style: none;
  padding: 0 0 0 2ch;
  margin: 0.4rem 0 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.wm-faces li { margin: 0; }
.wm-faces img,
.wm-faces .wm-no-photo {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 0;
  object-fit: cover;
}
.wm-no-photo {
  background: var(--bg-alt);
  color: var(--muted);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wm-name-list {
  list-style: none;
  padding: 0 0 0 2ch;
  margin: 0.4rem 0 0.6rem;
}
.wm-name-list li { margin: 0.15rem 0; }
.wm-name-list a {
  color: var(--ink);
  text-decoration: none;
}
.wm-name-list a:hover {
  color: var(--chrome);
  text-decoration: underline;
}

.wm-replies { margin-top: 1.5rem; }

.wm-reply {
  padding: 1rem 0;
  border-bottom: 1px dashed var(--rule);
}
.wm-reply:last-child { border-bottom: none; }

.wm-reply-meta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.wm-reply-name {
  display: block;
  color: var(--chrome);
  text-decoration: none;
}
.wm-reply-name::before {
  content: "From:  ";
  color: var(--muted);
  font-weight: 400;
}
.wm-reply-name:hover {
  color: var(--accent);
  text-decoration: underline;
}
.wm-reply-meta time {
  display: block;
  color: var(--ink);
}
.wm-reply-meta time::before {
  content: "Date:  ";
  color: var(--muted);
}

.wm-reply-content {
  padding-left: 2ch;
  color: var(--ink);
  font-size: 0.95rem;
}
.wm-reply-content p { margin: 0.45rem 0; }
.wm-reply-content p:first-child { margin-top: 0; }
.wm-reply-content p:last-child { margin-bottom: 0; }
