:root {
  --ink: #0d0c0a;
  --ink-2: #16140f;
  --bone: #ece5d6;
  --bone-dim: #c8c1b1;
  --ash: #9a948a;          /* WCAG: lightened from #6b665d (3.4:1 → 5.0:1) */
  --blood: #cc3a2e;        /* used for large UI elements only (≥18px) */
  --blood-bright: #e8584a; /* WCAG: for small text on ink (≥4.5:1) */
  --blood-soft: #c5524a;   /* WCAG: for borders/dimmed text on ink-2 (≥4.5:1) */
  --acid: #e8d44a;

  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --unit: 8px;
  --hairline: rgba(236, 229, 214, 0.12);
  --hairline-strong: rgba(236, 229, 214, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

.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;
}

html { scrollbar-color: var(--ash) var(--ink); scrollbar-gutter: stable; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "SOFT" 50, "wght" 400;
  line-height: 1.5;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(at 100% 0%, rgba(204, 58, 46, 0.06), transparent 55%),
    radial-gradient(at 0% 100%, rgba(232, 212, 74, 0.04), transparent 55%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

::selection { background: var(--blood); color: var(--bone); }

:focus-visible {
  outline: 2px solid var(--blood);
  outline-offset: 3px;
}
.surprise:focus-visible,
#picked-link:focus-visible {
  outline-color: var(--bone);
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: calc(var(--unit) * 1.5) calc(var(--unit) * 2);
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 200;
  transform: translateY(-120%);
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translateY(0); }

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--unit) * 6) calc(var(--unit) * 4);
}

/* MASTHEAD */
.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: calc(var(--unit) * 4);
  align-items: end;
  padding-bottom: calc(var(--unit) * 4);
  border-bottom: 1px solid var(--bone);
  margin-bottom: calc(var(--unit) * 6);
}

.issue {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding-bottom: 8px;
}
.issue__label { color: var(--ash); }
.issue__number { color: var(--blood); font-weight: 700; font-size: 14px; }

.title {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.035em;
}
.title__line { display: block; }
.title__line--top {
  font-size: clamp(36px, 6vw, 86px);
  font-variation-settings: "opsz" 120, "SOFT" 30, "wght" 300;
  font-style: italic;
  color: var(--bone);
  padding-left: 0;
}
.title__line--mid {
  font-size: clamp(56px, 10vw, 144px);
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 600;
  color: var(--bone);
  margin-top: -0.05em;
}
.title__line--bot {
  font-size: clamp(48px, 8vw, 116px);
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 400;
  font-style: italic;
  color: var(--blood);
  margin-top: -0.05em;
  padding-left: 0.15em;
}
.title__qmark {
  display: inline-block;
  font-variation-settings: "opsz" 144, "SOFT" 30, "wght" 700;
  margin-left: 0.05em;
}

.dateline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
  text-align: right;
  white-space: nowrap;
  padding-bottom: 8px;
}

/* LAYOUT */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: calc(var(--unit) * 8);
  align-items: start;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: calc(var(--unit) * 4); }
}

/* FILTERS */
.filters {
  position: sticky;
  top: calc(var(--unit) * 2);
  display: flex;
  flex-direction: column;
  gap: calc(var(--unit) * 4);
  padding-right: calc(var(--unit) * 3);
  border-right: 1px solid var(--hairline);
  max-height: calc(100vh - var(--unit) * 4);
  overflow-y: auto;
}
.filters::-webkit-scrollbar { width: 4px; }
.filters::-webkit-scrollbar-thumb { background: var(--ash); }

@media (max-width: 900px) {
  .filters {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--hairline);
    padding-right: 0;
    padding-bottom: calc(var(--unit) * 4);
    max-height: none;
  }
}

.filters__section {
  display: flex;
  flex-direction: column;
  gap: calc(var(--unit) * 1.5);
}

.section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}

.field { display: flex; flex-direction: column; gap: calc(var(--unit) * 0.5); }
.field__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kbd {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--bone-dim);
  border: 1px solid var(--hairline-strong);
  padding: 1px 5px;
  letter-spacing: 0;
  border-radius: 2px;
}

input[type="search"] {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--bone);
  padding: calc(var(--unit) * 1) 0;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 20px;
  font-variation-settings: "opsz" 24, "SOFT" 60;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}
input[type="search"]::placeholder { color: var(--ash); font-style: italic; }
input[type="search"]:focus { border-color: var(--blood); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.toggle {
  display: flex;
  align-items: center;
  gap: calc(var(--unit) * 1.5);
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  font-variation-settings: "opsz" 16, "SOFT" 50;
  padding: 4px 0;
}
.toggle {
  min-height: 28px; /* WCAG 2.5.8 target size */
}
.toggle input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--bone);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
  margin: 0;
}
.toggle input:checked { background: var(--blood); border-color: var(--blood); }
.toggle input:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--bone);
}
.toggle:hover input:not(:checked) { border-color: var(--blood); }

/* details/checklist */
.checklist { display: contents; }
.checklist__summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--unit);
  list-style: none;
  position: relative;
  padding: 6px 14px 6px 0;
  min-height: 28px;
  transition: color 0.15s;
}
.checklist__summary::-webkit-details-marker { display: none; }
.checklist__summary::after {
  content: "+";
  position: absolute;
  right: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ash);
  transition: transform 0.2s;
}
.checklist[open] .checklist__summary::after { content: "−"; }
.checklist__summary:hover { color: var(--bone); }
.checklist__count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--blood-bright);
  font-weight: 700;
}
.checklist__items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: calc(var(--unit) * 1.5);
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.checklist__items::-webkit-scrollbar { width: 3px; }
.checklist__items::-webkit-scrollbar-thumb { background: var(--ash); }
.checklist__items .toggle { font-size: 13px; padding: 2px 0; }
.checklist__items .toggle span {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}
.checklist__items .toggle small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ash);
  font-variant-numeric: tabular-nums;
}

.slider { display: flex; align-items: center; gap: calc(var(--unit) * 1.5); }
.slider input {
  flex: 1;
  appearance: none;
  background: transparent;
  height: 16px;
  cursor: pointer;
  padding: 0;
}
.slider input { height: 24px; } /* WCAG 2.5.8 target size */
.slider input::-webkit-slider-runnable-track { height: 1px; background: var(--bone); }
.slider input::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--blood);
  border: 3px solid var(--ink);
  border-radius: 50%;
  margin-top: -12px;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--bone);
}
.slider input::-moz-range-track { height: 1px; background: var(--bone); }
.slider input::-moz-range-thumb {
  width: 24px; height: 24px;
  background: var(--blood);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--bone);
}
.slider output {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--bone);
  min-width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sort { display: flex; flex-direction: column; gap: 2px; }
.sort__btn {
  background: transparent;
  border: none;
  color: var(--bone);
  text-align: left;
  padding: calc(var(--unit) * 0.75) 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 17px;
  font-variation-settings: "opsz" 20, "SOFT" 60;
  position: relative;
  padding-left: 22px;
  transition: color 0.15s, padding-left 0.2s;
}
.sort__btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border: 1px solid var(--bone);
  border-radius: 50%;
  transition: background 0.15s, border-color 0.15s;
}
.sort__btn[aria-checked="true"] { color: var(--blood-bright); padding-left: 26px; }
.sort__btn[aria-checked="true"]::before { background: var(--blood-bright); border-color: var(--blood-bright); }
.sort__btn:hover { color: var(--bone); }
.sort__btn:hover::before { border-color: var(--bone); }
.sort__btn[aria-checked="true"]:hover { color: var(--blood-bright); }
.sort__btn[aria-checked="true"]:hover::before { border-color: var(--blood-bright); }

.surprise {
  background: var(--blood);
  color: var(--bone);
  border: none;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 24, "SOFT" 100, "wght" 500;
  font-size: 19px;
  font-style: italic;
  padding: calc(var(--unit) * 2) calc(var(--unit) * 2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--unit) * 1.5);
  /* keep bg constant for WCAG 1.4.3 contrast — use inset shadow as hover affordance */
  box-shadow: inset 0 0 0 0 var(--bone);
  transition: box-shadow 0.15s, transform 0.08s;
}
.surprise:hover { box-shadow: inset 0 0 0 2px var(--bone); }
.surprise:active { transform: translateY(1px); }
.surprise:disabled { background: var(--ash); cursor: not-allowed; opacity: 0.5; }
.surprise__dot {
  width: 8px;
  height: 8px;
  background: var(--bone);
  border-radius: 50%;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.surprise:hover .surprise__dot,
.surprise:focus-visible .surprise__dot {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.stats {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--bone-dim);
  padding-top: calc(var(--unit) * 2);
  border-top: 1px solid var(--hairline);
  text-transform: uppercase;
}
.stats__row {
  display: flex;
  justify-content: space-between;
  padding: calc(var(--unit) * 0.5) 0;
}
.stats__row strong {
  color: var(--bone);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stats__pair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.stats__clear {
  background: none;
  border: none;
  color: var(--bone-dim);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 8px;
  min-height: 24px;
  min-width: 24px;
}
.stats__clear:hover { color: var(--blood-bright); }

/* CATALOG */
.entries { list-style: none; }

.entry {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  column-gap: calc(var(--unit) * 3);
  row-gap: calc(var(--unit) * 1);
  align-items: baseline;
  padding: calc(var(--unit) * 3) 0;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  transition: opacity 0.2s, background 0.15s;
}

.entry:hover { background: rgba(236, 229, 214, 0.025); }
.entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blood);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}
.entry:hover::before,
.entry:focus-within::before { transform: scaleY(1); }
.entries { padding-left: 12px; }

.entry__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ash);
  align-self: start;
  padding-top: 14px;
  font-variant-numeric: tabular-nums;
}

.entry__body {
  display: flex;
  flex-direction: column;
  gap: calc(var(--unit) * 0.5);
  min-width: 0;
}

.entry__title {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 32, "SOFT" 80, "wght" 400;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.entry__title a {
  color: var(--bone);
  text-decoration: none;
  background-image: linear-gradient(var(--blood), var(--blood));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size 0.3s ease;
  padding-bottom: 2px;
}
.entry__title a:hover { background-size: 100% 1px; }

.entry__tags {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--unit) * 1);
  margin-top: 2px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tag--audio { color: var(--blood-bright); }
.tag--subs { color: var(--bone-dim); }
.tag--rating { color: var(--acid); }
.tag--rating-mature { color: var(--blood-bright); border-color: var(--blood-bright); }

.entry__genres {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  font-variation-settings: "opsz" 18, "SOFT" 80;
  color: var(--ash);
  margin-top: 4px;
}

.entry__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: calc(var(--unit) * 1);
  text-align: right;
  flex-shrink: 0;
}

.rating {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 48, "SOFT" 40, "wght" 500;
  font-size: 30px;
  color: var(--bone);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.rating__star { font-size: 16px; color: var(--blood); transform: translateY(-2px); }
.rating__votes {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ash);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.btn-watched {
  background: transparent;
  border: 1px solid var(--bone-dim);
  color: var(--bone-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
  min-width: 116px;
  text-align: center;
}
.btn-watched:hover { border-color: var(--blood); color: var(--blood); }

/* Fade the row content but keep the watched-button fully readable */
.entry--watched .entry__num,
.entry--watched .entry__body,
.entry--watched .rating,
.entry--watched .rating__votes { opacity: 0.45; }
.entry--watched:hover .entry__num,
.entry--watched:hover .entry__body,
.entry--watched:hover .rating,
.entry--watched:hover .rating__votes { opacity: 0.75; }
.entry--watched .entry__title a {
  text-decoration: line-through;
  text-decoration-color: var(--blood-bright);
  text-decoration-thickness: 2px;
  text-underline-offset: 0;
}
.entry--watched .btn-watched {
  border-color: var(--blood);
  color: var(--bone);
  background: var(--blood);
}

/* picked modal */
.picked {
  position: fixed;
  inset: 0;
  background: rgba(13, 12, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: calc(var(--unit) * 3);
  animation: fade-in 0.25s ease-out;
}
.picked__inner {
  background: var(--ink-2);
  border: 1px solid var(--blood);
  padding: calc(var(--unit) * 6);
  max-width: 640px;
  width: 100%;
  text-align: center;
  position: relative;
}
.picked__inner::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--blood);
}
.picked__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin-bottom: calc(var(--unit) * 3);
}
.picked__title {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 96, "SOFT" 100, "wght" 500;
  font-style: italic;
  font-size: clamp(32px, 5.5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: calc(var(--unit) * 3);
  color: var(--bone);
}
.picked__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: calc(var(--unit) * 3);
}
.picked__desc {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 18, "SOFT" 60;
  font-size: 16px;
  line-height: 1.55;
  color: var(--bone-dim);
  margin-bottom: calc(var(--unit) * 3);
  text-align: left;
  max-height: 6.5em;
  overflow-y: auto;
  padding-right: 8px;
}
.picked__desc::-webkit-scrollbar { width: 3px; }
.picked__desc::-webkit-scrollbar-thumb { background: var(--ash); }
.picked__warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: calc(var(--unit) * 4);
}
.picked__warning {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--blood-bright);
  color: var(--blood-bright);
}
.picked__actions {
  display: flex;
  gap: calc(var(--unit) * 2);
  justify-content: center;
  flex-wrap: wrap;
}
.picked__actions a, .picked__actions button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  padding: calc(var(--unit) * 1.5) calc(var(--unit) * 3);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
#picked-link { background: var(--blood); color: var(--bone); }
#picked-link:hover { background: var(--blood-bright); }
#picked-again { background: transparent; color: var(--bone); border-color: var(--bone); }
#picked-again:hover { background: var(--bone); color: var(--ink); }
#picked-close { background: transparent; color: var(--ash); }
#picked-close:hover { color: var(--bone); }

/* empty */
.empty {
  text-align: center;
  padding: calc(var(--unit) * 12) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-variation-settings: "opsz" 32, "SOFT" 80;
  color: var(--bone-dim);
  display: flex;
  flex-direction: column;
  gap: calc(var(--unit) * 2);
  align-items: center;
}
.link {
  background: none;
  border: none;
  color: var(--blood-bright);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  font-variation-settings: "opsz" 24, "SOFT" 80;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  padding: 8px 12px;
  min-height: 28px;
}
.link:hover { color: var(--bone); }

/* toast — kept in DOM (not hidden) so SR can announce changes */
.toast {
  position: fixed;
  bottom: calc(var(--unit) * 3);
  left: 50%;
  background: var(--ink-2);
  color: var(--bone);
  border: 1px solid var(--blood);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: calc(var(--unit) * 1.5) calc(var(--unit) * 3);
  z-index: 60;
  max-width: 90vw;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast[data-visible="true"] {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* colophon */
.colophon {
  margin-top: calc(var(--unit) * 10);
  padding-top: calc(var(--unit) * 3);
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ash);
  text-transform: uppercase;
  display: flex;
  gap: calc(var(--unit) * 2);
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}
.colophon code { color: var(--bone-dim); font-family: inherit; }
.colophon em { color: var(--blood-bright); font-style: normal; }
.colophon__link { color: var(--bone-dim); text-decoration: underline; text-underline-offset: 3px; }
.colophon__link:hover { color: var(--blood-bright); }

/* row entry animation — only on first render (controlled via class) */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.entries--first-paint .entry {
  animation: slide-up 0.35s ease-out backwards;
}
.entries--first-paint .entry:nth-child(1) { animation-delay: 0.02s; }
.entries--first-paint .entry:nth-child(2) { animation-delay: 0.05s; }
.entries--first-paint .entry:nth-child(3) { animation-delay: 0.08s; }
.entries--first-paint .entry:nth-child(4) { animation-delay: 0.11s; }
.entries--first-paint .entry:nth-child(5) { animation-delay: 0.14s; }
.entries--first-paint .entry:nth-child(6) { animation-delay: 0.17s; }
.entries--first-paint .entry:nth-child(7) { animation-delay: 0.20s; }
.entries--first-paint .entry:nth-child(8) { animation-delay: 0.23s; }

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

/* Sidebar focusables: prevent the inner scroll container from clipping the focus ring. */
.filters .toggle input,
.filters .sort__btn,
.filters .checklist__summary,
.filters input[type="range"],
.filters input[type="search"],
.filters .surprise,
.filters .stats__clear {
  scroll-margin-block: 16px;
}

/* Windows High Contrast Mode — keep the UI usable without our palette. */
@media (forced-colors: active) {
  .toggle input { appearance: auto; }
  .sort__btn::before { forced-color-adjust: none; }
  :focus-visible { outline: 2px solid CanvasText; }
  .surprise,
  .btn-watched,
  #picked-link { border: 1px solid ButtonText; }
  .tag { border-color: ButtonText; }
}

/* Bookmarklet install page (/bookmarklet) */
.install {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--unit) * 6) calc(var(--unit) * 4);
}
.install h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(40px, 6vw, 72px);
  font-variation-settings: "opsz" 96, "SOFT" 100, "wght" 500;
  line-height: 1;
  margin-bottom: calc(var(--unit) * 3);
  color: var(--bone);
}
.install p { margin-bottom: calc(var(--unit) * 2); line-height: 1.6; }
.install code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--bone-dim);
  background: var(--ink-2);
  padding: 1px 6px;
}
.install ol { padding-left: 24px; margin: calc(var(--unit) * 2) 0 calc(var(--unit) * 4); }
.install ol li { margin-bottom: calc(var(--unit) * 1); line-height: 1.6; }
.bookmarklet {
  display: inline-block;
  padding: calc(var(--unit) * 2) calc(var(--unit) * 3);
  background: var(--blood);
  color: var(--bone);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-variation-settings: "opsz" 32, "SOFT" 100, "wght" 500;
  text-decoration: none;
  margin: calc(var(--unit) * 2) 0;
  cursor: grab;
  user-select: none;
  box-shadow: inset 0 0 0 0 var(--bone);
  transition: box-shadow 0.15s;
}
.bookmarklet::before { content: "⌬ "; }
.bookmarklet:hover { box-shadow: inset 0 0 0 2px var(--bone); }
.install .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: calc(var(--unit) * 6);
}
.back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  margin-bottom: calc(var(--unit) * 4);
}
.back:hover { color: var(--blood-bright); }

/* responsive entry */
@media (max-width: 640px) {
  .page { padding: calc(var(--unit) * 4) calc(var(--unit) * 2); }
  .masthead {
    grid-template-columns: 1fr;
    grid-template-areas: "issue" "dateline" "title";
    gap: var(--unit);
  }
  .issue { grid-area: issue; }
  .dateline {
    grid-area: dateline;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-align: left;
    padding-bottom: 0;
    white-space: normal;
  }
  .title { grid-area: title; padding-top: calc(var(--unit) * 2); }

  .entry {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: calc(var(--unit) * 1.5);
  }
  .entry__num { padding-top: 0; }
  .entry__right {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: calc(var(--unit) * 2);
    text-align: left;
  }
  .entries { padding-left: 8px; }
}
