/* =============================================================================
   rt20 — an alternate theme for Notes from Classy's Kitchen.

   The page is laid out like the front panel of a 1961 table radio: a white
   enamelled face, a speaker grille, small lowercase control labels, and one
   red pointer on a tuning scale. The scale is the only loud element and it is
   real navigation — every tick tunes the search page to that year.
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */

/* Sampled off a photograph of the object. The enamelled front is white with
   only a trace of warmth in it — the cream the museums describe lives in the
   recessed areas, so --panel is the white face and --panel-lift is everything
   set into it: the dial, the chips, code blocks, the mat behind a cover. */
:root {
  --panel:      #f2f1ed;  /* enamelled front panel */
  --panel-lift: #e9e7e0;  /* recessed: dial glass, insets */
  --ink:        #201f1d;  /* grille black */
  --ink-2:      #4b4d45;
  --ink-3:      #686b61;
  --line:       #d5d2ca;
  --line-soft:  #e3e0d8;
  --sage:       #a7a98d;  /* laurel green, the knobs */
  --sage-deep:  #676b4e;
  --teak:       #cf9760;  /* honey-toned ash */
  --teak-deep:  #8f5e2b;
  --pointer:    #cc3b26;  /* the red line on the scale */

  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --cabinet: 64rem;       /* full width of the front panel */
  --column: 53rem;        /* the reading panel */
  --measure: 34em;        /* reading column */
  --rail: 10.5rem;        /* the controls column */

  --face: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  color-scheme: light dark;
}

/* Braun made the same cabinet in black: the face goes graphite, the ash and
   the pointer stay exactly where they were. */
@media (prefers-color-scheme: dark) {
  :root {
    --panel:      #1b1c19;
    --panel-lift: #24261f;
    --ink:        #eae8e0;
    --ink-2:      #b6b8ac;
    --ink-3:      #8b8e81;
    --line:       #3c3e35;
    --line-soft:  #2d2f28;
    --sage:       #b0b295;
    --sage-deep:  #c6c8ab;
    --teak:       #cf9760;
    --teak-deep:  #dda05a;
    --pointer:    #e4513a;
  }
}

/* --- Reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--face);
  font-size: 1.0625rem;
  font-variation-settings: 'wdth' 100;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--pointer); }

:focus-visible {
  outline: 2px solid var(--pointer);
  outline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; }

.rt-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--panel);
  padding: 0.6rem 1rem;
  z-index: 50;
}
.rt-skip:focus { left: 0; }

/* --- The cabinet ---------------------------------------------------------- */

.rt-cabinet {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-top: 7px solid var(--teak);
}

.rt-main { flex: 1 0 auto; }

/* --- Panel: grille, wordmark, controls ------------------------------------ */

.rt-panel {
  position: relative;
  z-index: 20;
}

.rt-panel__inner {
  width: min(100% - 2 * var(--gutter), var(--cabinet));
  margin-inline: auto;
  padding: 1.6rem 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.rt-brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  margin-right: auto;
}

.rt-grille {
  color: var(--ink);
  display: block;
  flex: none;
  transition: color 120ms linear;
}
.rt-grille svg { display: block; }
.rt-brand:hover .rt-grille { color: var(--sage-deep); }

.rt-wordmark {
  font-size: 1.0625rem;
  font-weight: 600;
  font-variation-settings: 'wdth' 118;
  letter-spacing: -0.005em;
  line-height: 1.15;
}
@media (min-width: 34rem) {
  .rt-wordmark { white-space: nowrap; }
}

.rt-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Two-position language switch */
.rt-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: var(--panel-lift);
}

.rt-switch__pos {
  padding: 0.3rem 0.62rem 0.26rem;
  font-size: 0.75rem;
  font-variation-settings: 'wdth' 88;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  text-decoration: none;
  border-right: 1px solid var(--line);
}
.rt-switch__pos:last-child { border-right: 0; }
.rt-switch__pos.is-on {
  background: var(--sage);
  color: #1b1c19;
  font-weight: 600;
}

/* The menu knob */
.rt-knob {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--ink-2);
}

.rt-knob__cap {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  position: relative;
  transition: transform 180ms cubic-bezier(.4, 0, .2, 1);
}
.rt-knob__cap::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0.16rem;
  width: 1px;
  height: 0.42rem;
  margin-left: -0.5px;
  background: rgba(0, 0, 0, 0.45);
}
.rt-knob[aria-expanded="true"] .rt-knob__cap { transform: rotate(90deg); }

.rt-knob__label {
  font-size: 0.8125rem;
  font-variation-settings: 'wdth' 90;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rt-knob__cap { transition: none; }
}

/* Menu drawer */
.rt-menu {
  flex-basis: 100%;
  border-top: 1px solid var(--line);
  margin-top: 1.1rem;
  padding-top: 1rem;
}
.rt-menu[hidden] { display: none; }

.rt-menu__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
}
.rt-menu__list a {
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.rt-menu__list a:hover { color: var(--ink); border-bottom-color: var(--pointer); }

/* --- The tuning scale ----------------------------------------------------- */

.rt-dial {
  width: min(100% - 2 * var(--gutter), var(--cabinet));
  margin: 0 auto 2.75rem;
  background: var(--panel-lift);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.045);
  padding: 0.55rem 0.7rem 0.3rem;
}

.rt-dial__scale {
  position: relative;
  display: flex;
  align-items: flex-end;
}

.rt-dial__year {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  text-decoration: none;
  padding-bottom: 0.15rem;
}

.rt-dial__tick {
  display: block;
  width: 1px;
  height: 0.5rem;
  background: var(--line);
}
.rt-dial__year.is-live .rt-dial__tick {
  height: 0.95rem;
  background: var(--ink-2);
}

.rt-dial__num,
.rt-dial__full {
  font-size: 0.625rem;
  font-variation-settings: 'wdth' 72;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  color: var(--ink-3);
  line-height: 1;
}

/* Label every fourth year, plus whatever the pointer is on. */
.rt-dial__num { visibility: hidden; }
.rt-dial__year:nth-child(4n + 1) .rt-dial__num { visibility: visible; }
.rt-dial__full { display: none; }

.rt-dial__year.is-tuned .rt-dial__num { display: none; }
.rt-dial__year.is-tuned .rt-dial__full {
  display: block;
  color: var(--pointer);
  font-weight: 600;
  font-variation-settings: 'wdth' 78;
}
.rt-dial__year.is-tuned .rt-dial__tick { background: var(--pointer); }

.rt-dial__year:hover .rt-dial__tick { background: var(--sage-deep); }
.rt-dial__year:hover .rt-dial__num { visibility: visible; color: var(--ink); }

.rt-dial__pointer {
  position: absolute;
  top: -0.2rem;
  bottom: 0.95rem;
  width: 2px;
  margin-left: -1px;
  background: var(--pointer);
  pointer-events: none;
}

@media (max-width: 40rem) {
  .rt-dial { padding-inline: 0.5rem; }
  .rt-dial__year:nth-child(4n + 1) .rt-dial__num { visibility: hidden; }
  .rt-dial__year:nth-child(8n + 1) .rt-dial__num { visibility: visible; }
}

/* --- Content column ------------------------------------------------------- */

.rt-content {
  width: min(100% - 2 * var(--gutter), var(--column));
  margin-inline: auto;
  padding-bottom: 5rem;
}

/* --- Screens (cover images) ----------------------------------------------- */

.rt-screen {
  display: block;
  margin: 0;
  background: var(--panel-lift);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 5px;
  overflow: hidden;
}
.rt-screen img {
  width: 100%;
  border-radius: 1px;
}

/* Covers are shown whole, never cropped: a diagram loses its top row of
   labels if you crop it. The glass sits behind whatever shape the image is. */
.rt-screen--lead img,
.rt-screen--post img {
  aspect-ratio: 16 / 9;
  max-height: 30rem;
  object-fit: contain;
  background: var(--panel-lift);  /* a mat behind anything that isn't 16:9 */
}

.rt-screen--band img { aspect-ratio: 5 / 1; object-fit: cover; }

.rt-screen--chip {
  width: 100%;
  padding: 3px;
}
.rt-screen--chip img { aspect-ratio: 3 / 2; object-fit: cover; }

/* --- Post list ------------------------------------------------------------ */

.rt-list { display: flex; flex-direction: column; }

.rt-stamp {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  font-variation-settings: 'wdth' 86;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.rt-stamp__cat { color: var(--sage-deep); text-decoration: none; }
.rt-stamp__cat:hover { text-decoration: underline; }

.rt-lead { padding-bottom: 2.75rem; }
.rt-lead .rt-screen--lead { margin-bottom: 1.5rem; }
.rt-lead .rt-stamp { margin-bottom: 0.7rem; }

.rt-lead__title {
  font-size: clamp(1.9rem, 1.1rem + 3vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
  font-variation-settings: 'wdth' 106;
  font-weight: 600;
  margin-bottom: 0.85rem;
}
.rt-lead__title a { text-decoration: none; }
.rt-lead__title a:hover { text-decoration: underline; text-decoration-color: var(--pointer); }

.rt-lead__summary {
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.rt-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  column-gap: 2.5rem;
  padding: 1.9rem 0;
  border-top: 1px solid var(--line-soft);
}

.rt-entry__date {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.75rem;
  font-variation-settings: 'wdth' 86;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  padding-top: 0.35rem;
  white-space: nowrap;
}

.rt-entry__text { grid-column: 1; grid-row: 1 / span 2; }

.rt-entry__title {
  font-size: 1.3125rem;
  line-height: 1.22;
  letter-spacing: -0.012em;
  font-variation-settings: 'wdth' 102;
  margin-bottom: 0.4rem;
}
.rt-entry__title a { text-decoration: none; }
.rt-entry__title a:hover { text-decoration: underline; text-decoration-color: var(--pointer); }

.rt-entry__summary {
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.rt-entry .rt-screen--chip {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin-top: 0.9rem;
}

.rt-empty { color: var(--ink-3); padding: 3rem 0; }

@media (max-width: 46rem) {
  .rt-entry {
    grid-template-columns: 1fr;
    row-gap: 0.45rem;
  }
  .rt-entry__date { grid-column: 1; grid-row: 1; padding-top: 0; }
  .rt-entry__text { grid-column: 1; grid-row: 2; }
  .rt-entry .rt-screen--chip {
    grid-column: 1;
    grid-row: 3;
    max-width: 14rem;
    margin-top: 1rem;
  }
}

/* --- Pagination ----------------------------------------------------------- */

.rt-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

.rt-pager__link {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.rt-pager__link:hover { border-bottom-color: var(--pointer); }
.rt-pager__link.is-off { color: var(--ink-3); opacity: 0.45; border-bottom-color: transparent; }

.rt-pager__count {
  font-size: 0.75rem;
  font-variation-settings: 'wdth' 80;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.rt-pager__slash { margin: 0 0.15em; }

/* --- List headings -------------------------------------------------------- */

.rt-listhead {
  padding-bottom: 1.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.rt-listhead .rt-screen--band { margin-bottom: 1.5rem; }

.rt-listhead__title {
  font-size: clamp(1.6rem, 1rem + 2vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
  font-variation-settings: 'wdth' 104;
}

.rt-listhead__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  font-variation-settings: 'wdth' 86;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 0.45rem;
}

.rt-listhead__count {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

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

.rt-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 30;
  pointer-events: none;
}
.rt-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--pointer);
}

.rt-post__head { margin-bottom: 2.5rem; }
.rt-post__head .rt-screen--post { margin-bottom: 2rem; }

.rt-post__title {
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.25rem);
  line-height: 1.03;
  letter-spacing: -0.026em;
  font-variation-settings: 'wdth' 104;
  font-weight: 600;
  text-wrap: balance;
}

.rt-post__headline {
  margin-top: 1rem;
  max-width: var(--measure);
  font-size: 1.1875rem;
  line-height: 1.45;
  color: var(--ink-2);
}

/* Labelled readouts, the way the knobs are labelled on the panel */
.rt-readouts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.25rem;
  margin-top: 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.rt-readout { display: flex; flex-direction: column; gap: 0.2rem; }

.rt-readout__label {
  font-size: 0.6875rem;
  font-variation-settings: 'wdth' 84;
  letter-spacing: 0.09em;
  color: var(--ink-3);
}

.rt-readout__value {
  font-size: 0.875rem;
  font-variation-settings: 'wdth' 94;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.rt-readout__value a { text-decoration: none; border-bottom: 1px solid var(--line); }
.rt-readout__value a:hover { border-bottom-color: var(--pointer); }

/* On a wide panel the readouts move into their own column beside the text,
   the way the controls sit beside the speaker. */
@media (min-width: 62rem) {
  .rt-post {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--rail);
    column-gap: 3rem;
    align-items: start;
  }
  .rt-post__head  { grid-column: 1 / -1; grid-row: 1; margin-bottom: 2rem; }
  .rt-post__foot  { grid-column: 1; grid-row: 3; }
  .rt-post .rt-prose { grid-column: 1; grid-row: 2; }
  .rt-post .rt-author { grid-column: 1; grid-row: 4; }

  .rt-post .rt-readouts {
    grid-column: 2;
    grid-row: 2;
    flex-direction: column;
    gap: 1.15rem;
    position: sticky;
    top: 2rem;
    margin: 0.35rem 0 0;
    padding-top: 0;
    border-top: 0;
  }
}

/* --- Prose ---------------------------------------------------------------- */

.rt-prose {
  max-width: var(--measure);
  font-size: 1.125rem;
  line-height: 1.68;
  color: var(--ink);
}

.rt-prose > * + * { margin-top: 1.3em; }

.rt-prose p { hyphens: auto; }

.rt-prose h2,
.rt-prose h3,
.rt-prose h4 {
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin-top: 2.4em;
  margin-bottom: -0.55em; /* collapsed into the > * + * rhythm */
}
.rt-prose h2 { font-size: 1.4375rem; font-variation-settings: 'wdth' 104; }
.rt-prose h3 { font-size: 1.1875rem; }
.rt-prose h4 { font-size: 1rem; font-variation-settings: 'wdth' 92; letter-spacing: 0.02em; }

.rt-prose a { color: var(--ink); text-decoration-color: var(--sage-deep); }
.rt-prose a:hover { text-decoration-color: var(--pointer); }

.rt-prose ul, .rt-prose ol { padding-left: 1.25rem; }
.rt-prose li + li { margin-top: 0.4em; }
.rt-prose li::marker { color: var(--sage-deep); }

.rt-prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--sage);
  color: var(--ink-2);
}

.rt-prose img,
.rt-prose video {
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 5px;
  background: var(--panel-lift);
}

.rt-prose figure { margin-inline: 0; }
.rt-prose figcaption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.rt-prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 2.5em;
}

.rt-prose code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--panel-lift);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 0.1em 0.32em;
}

.rt-prose pre {
  background: var(--panel-lift);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}
.rt-prose pre code { background: none; border: 0; padding: 0; font-size: 1em; }

.rt-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.rt-prose th, .rt-prose td {
  text-align: left;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.rt-prose th { font-weight: 600; color: var(--ink-2); }

/* Pygments, kept to four hues so code stays part of the panel */
.highlight .c, .highlight .c1, .highlight .cm { color: var(--ink-3); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kt { color: var(--sage-deep); font-weight: 600; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb { color: var(--teak-deep); }
.highlight .m, .highlight .mi, .highlight .mf { color: var(--teak-deep); }
.highlight .nf, .highlight .nc { color: var(--ink); font-weight: 600; }
.highlight .o, .highlight .p { color: var(--ink-2); }
.highlight .err { color: var(--pointer); }

/* --- Post footer: tags, share, author ------------------------------------- */

.rt-post__foot {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  max-width: var(--measure);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.rt-tags, .rt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* The little push-buttons in the row under the dial */
.rt-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.24rem 0.6rem;
  border: 1px solid var(--line);
  border-top-color: var(--line-soft);
  border-radius: 2px;
  background: var(--panel-lift);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-variation-settings: 'wdth' 90;
  text-decoration: none;
}
.rt-tag:hover {
  background: var(--sage);
  border-color: var(--sage-deep);
  color: #1b1c19;
}
.rt-tag__count {
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.rt-tag:hover .rt-tag__count { color: rgba(0, 0, 0, 0.55); }

.rt-buttons .rt-tag--w2 { font-size: 0.9375rem; padding-inline: 0.7rem; }
.rt-buttons .rt-tag--w3 { font-size: 1.0625rem; padding-inline: 0.8rem; font-weight: 600; }

.rt-share {
  display: flex;
  gap: 1.1rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.rt-share a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.rt-share a:hover { border-bottom-color: var(--pointer); color: var(--ink); }

.rt-author {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  margin-top: 2.5rem;
  padding: 1.25rem;
  max-width: var(--measure);
  background: var(--panel-lift);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.rt-author__portrait {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.rt-author__name { font-weight: 600; font-size: 0.9375rem; }
.rt-author__name a { text-decoration: none; }
.rt-author__bio { font-size: 0.875rem; color: var(--ink-2); margin-top: 0.15rem; }
.rt-author__links {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-3);
}
.rt-author__links a { text-decoration: none; border-bottom: 1px solid var(--line); }
.rt-author__links a:hover { border-bottom-color: var(--pointer); }

/* --- Next / previous ------------------------------------------------------ */

.rt-nextprev {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-top: 3.5rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.rt-nextprev__item {
  background: var(--panel);
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.rt-nextprev__item:hover { background: var(--panel-lift); }
.rt-nextprev__item--prev { text-align: right; }

.rt-nextprev__dir {
  font-size: 0.6875rem;
  font-variation-settings: 'wdth' 84;
  letter-spacing: 0.09em;
  color: var(--ink-3);
}
.rt-nextprev__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* --- Archive & plain lists ------------------------------------------------ */

.rt-year {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.rt-year__num {
  font-size: 1.125rem;
  font-variation-settings: 'wdth' 74;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  position: sticky;
  top: 1.5rem;
  align-self: start;
}

.rt-year__list { list-style: none; padding: 0; max-width: 38rem; }
.rt-year__list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.3rem 0;
}
.rt-year__list a { text-decoration: none; }
.rt-year__list a:hover { text-decoration: underline; text-decoration-color: var(--pointer); }
.rt-year__list time {
  flex: none;
  font-size: 0.75rem;
  font-variation-settings: 'wdth' 84;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  padding-top: 0.28rem;
}

.rt-plainlist { list-style: none; padding: 0; }
.rt-plainlist li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.rt-plainlist a { text-decoration: none; }
.rt-plainlist a:hover { text-decoration: underline; text-decoration-color: var(--pointer); }
.rt-plainlist__count {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

@media (max-width: 40rem) {
  .rt-year { grid-template-columns: 1fr; gap: 0.5rem; }
  .rt-year__num { position: static; }
}

/* --- Search --------------------------------------------------------------- */

.rt-search__intro {
  margin-top: 1.25rem;
  color: var(--ink-2);
  max-width: var(--measure);
}

.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 1.75rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--panel-lift);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.filter-group { display: flex; flex-direction: column; gap: 0.3rem; }

.filter-group label {
  font-size: 0.6875rem;
  font-variation-settings: 'wdth' 84;
  letter-spacing: 0.09em;
  color: var(--ink-3);
}

.filter-group select {
  font: inherit;
  font-size: 0.875rem;
  padding: 0.35rem 0.5rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.filter-group--actions { flex-direction: row; align-items: flex-end; gap: 0.5rem; }

.search-filters button {
  font: inherit;
  font-size: 0.8125rem;
  font-variation-settings: 'wdth' 90;
  padding: 0.4rem 0.8rem;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  cursor: pointer;
}
.search-filters button:hover { background: var(--sage); border-color: var(--sage-deep); color: #1b1c19; }
.search-filters #on-this-day-btn.active {
  background: var(--pointer);
  border-color: var(--pointer);
  color: #fff;
}

.search-unavailable {
  margin: 0;
  padding: 1rem 1.25rem;
  background: var(--panel-lift);
  border: 1px solid var(--line);
  border-left: 3px solid var(--pointer);
  border-radius: 2px;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

#filter-results { display: none; }
#filter-results.active { display: block; }

#filter-results .results-count,
.loading {
  font-size: 0.8125rem;
  color: var(--ink-3);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.loading { border: 0; }

#filter-results .result-item { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
#filter-results .result-title { font-size: 1.0625rem; line-height: 1.3; }
#filter-results .result-title a { text-decoration: none; }
#filter-results .result-title a:hover { text-decoration: underline; text-decoration-color: var(--pointer); }
#filter-results .result-meta { font-size: 0.75rem; color: var(--ink-3); margin: 0.3rem 0; font-variant-numeric: tabular-nums; }
#filter-results .result-excerpt { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.55; }
#filter-results .result-note { font-size: 0.8125rem; color: var(--ink-3); padding: 1rem 0; }

.archive-badge {
  display: inline-block;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem;
  margin-right: 0.4rem;
  border: 1px solid var(--teak);
  border-radius: 2px;
  color: var(--teak-deep);
  vertical-align: middle;
}

.pagefind-ui {
  --pagefind-ui-scale: 0.9;
  --pagefind-ui-primary: var(--ink);
  --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--panel);
  --pagefind-ui-border: var(--line);
  --pagefind-ui-tag: var(--panel-lift);
  --pagefind-ui-border-radius: 2px;
  --pagefind-ui-font: var(--face);
}

/* --- Comments ------------------------------------------------------------- */

.post-comments-snack {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  max-width: var(--measure);
  font: 400 1rem/1.6 var(--face);

  --snack-font: var(--face);
  --snack-font-size: 16px;
  --snack-accent: var(--sage-deep);
  --snack-accent-soft: var(--panel-lift);
  --snack-on-accent: #fff;
  --snack-ink: var(--ink);
  --snack-muted: var(--ink-3);
  --snack-line: var(--line);
  --snack-field-bg: var(--panel-lift);
  --snack-radius: 2px;
}

.rt-disqus { margin-top: 3rem; max-width: var(--measure); }
.rt-disqus__toggle { cursor: pointer; font-size: 0.875rem; border-bottom: 1px solid var(--line); }

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

.rt-foot {
  border-top: 7px solid var(--teak);
  background: var(--panel);
}

.rt-foot__inner {
  width: min(100% - 2 * var(--gutter), var(--cabinet));
  margin-inline: auto;
  padding: 1.75rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  justify-content: space-between;
  align-items: baseline;
}

.rt-foot__name {
  font-size: 0.875rem;
  font-weight: 600;
  font-variation-settings: 'wdth' 112;
}

.rt-foot__lines {
  font-size: 0.75rem;
  color: var(--ink-3);
}
.rt-foot__lines a { text-decoration: none; border-bottom: 1px solid var(--line); }
.rt-foot__lines a:hover { border-bottom-color: var(--pointer); color: var(--ink); }
