:root {
  --paper: #f5f0e6;
  --paper-surface: #ece5d6;
  --paper-raised: #faf6ee;
  --ink: #1c1b18;
  --ink-soft: #2e2b25;
  --muted: #665f54;
  --line: #dfd7c7;
  --line-strong: #c8bea9;
  --accent: #2f4b34;
  --seal: #994130;
  --code-surface: #ede6d8;
  --code-header: #e6decd;
  --code-key: #284b73;
  --code-string: #335c38;
  --code-comment: #6e675b;
  --code-number: #8d4d2a;
  --serif: "Newsreader", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --serif-jp: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Newsreader", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --paper-grain: url("/img/paper-cotton-light.webp");
  --paper-grain-opacity: 0.95;
  --paper-grain-blend: multiply;
  --paper-glow: radial-gradient(ellipse 95% 75% at 50% 0%, rgba(255, 253, 248, 0.48) 0%, rgba(255, 253, 248, 0) 72%);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
  font-optical-sizing: auto;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #171614;
  --paper-surface: #201e1b;
  --paper-raised: #26231f;
  --ink: #ede7db;
  --ink-soft: #dbd4c6;
  --muted: #9a9285;
  --line: #2d2a25;
  --line-strong: #3f3b34;
  --accent: #b0c69c;
  --seal: #c9735e;
  --code-surface: #1e1c19;
  --code-header: #24221e;
  --code-key: #99bcde;
  --code-string: #a9c797;
  --code-comment: #8e8679;
  --code-number: #d8a77e;
  --paper-grain: url("/img/paper-cotton-dark.webp");
  --paper-grain-opacity: 0.38;
  --paper-grain-blend: soft-light;
  --paper-glow: radial-gradient(ellipse 90% 65% at 50% 0%, rgba(255, 246, 228, 0.025) 0%, transparent 68%);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171614;
    --paper-surface: #201e1b;
    --paper-raised: #26231f;
    --ink: #ede7db;
    --ink-soft: #dbd4c6;
    --muted: #9a9285;
    --line: #2d2a25;
    --line-strong: #3f3b34;
    --accent: #b0c69c;
    --seal: #c9735e;
    --code-surface: #1e1c19;
    --code-header: #24221e;
    --code-key: #99bcde;
    --code-string: #a9c797;
    --code-comment: #8e8679;
    --code-number: #d8a77e;
    --paper-grain: url("/img/paper-cotton-dark.webp");
    --paper-grain-opacity: 0.38;
    --paper-grain-blend: soft-light;
    --paper-glow: radial-gradient(ellipse 90% 65% at 50% 0%, rgba(255, 246, 228, 0.025) 0%, transparent 68%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  max-width: 820px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

main { flex: 1 0 auto; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: var(--paper-glow);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--paper-grain);
  background-size: 320px 320px;
  background-repeat: repeat;
  opacity: var(--paper-grain-opacity);
  mix-blend-mode: var(--paper-grain-blend);
}

a {
  color: inherit;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

a:hover { color: var(--accent); }

a:focus-visible,
pre:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--ink);
}

.skip {
  position: absolute;
  top: 8px;
  left: 16px;
  transform: translateY(-200%);
  padding: 10px 14px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 12px;
  z-index: 20;
}

.skip:focus { transform: none; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
  padding-top: 12px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  transition: color 0.18s ease;
}

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

.wordmark-dot {
  color: var(--seal);
  margin-left: 0.5px;
}

nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.005em;
}

nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 6px;
}

nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 6px;
}

.ext-arrow {
  font-size: 11px;
  opacity: 0.72;
}

.theme-control {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.theme-control[hidden] { display: none; }
.theme-control svg { pointer-events: none; }

.theme-control:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}

.theme-icon-light,
.theme-icon-dark { display: none; }

:root[data-theme="light"] .theme-icon-device,
:root[data-theme="dark"] .theme-icon-device { display: none; }

:root[data-theme="light"] .theme-icon-light,
:root[data-theme="dark"] .theme-icon-dark { display: inline; }

/* Landing Page Intro */
.intro {
  padding: 76px 0 68px;
}

.intro h1 {
  margin: 0 0 32px;
  font-family: var(--serif-jp);
  font-size: clamp(32px, 5.2vw, 50px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--ink);
}

.intro-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: end;
}

.intro-bio p {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.72;
  color: var(--muted);
}

.intro-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.intro-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.intro-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.intro-link span {
  font-size: 11px;
  opacity: 0.75;
}

/* Editorial Left-Rail Index (Home Stories Shelf, Writing by Year, Archives) */
.stories-shelf,
.writing {
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.index-group {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.index-group:last-child { border-bottom: 0; }

.index-rail {
  margin: 0;
  padding-top: 16px;
  position: sticky;
  top: 24px;
  align-self: start;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.index-group--stories .index-rail { color: var(--accent); }

.index-column { min-width: 0; }

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

.post-list li {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.post-list li:last-child { border-bottom: 0; }

.post-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  gap: 18px;
  align-items: baseline;
  padding: 22px 0;
  text-decoration: none;
}

.post-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: -0.014em;
  color: var(--ink);
  transition: color 0.18s ease;
}

.post-list--compact a {
  padding: 13px 0;
  gap: 16px;
}

.post-list--compact .post-title {
  font-size: 19.5px;
  line-height: 1.38;
  letter-spacing: -0.01em;
}

.post-list--stories .post-title {
  font-style: italic;
}

.post-list a:hover .post-title {
  color: var(--accent);
}

.post-list time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.row-arrow {
  color: var(--muted);
  font-size: 13px;
  opacity: 0.42;
  transition: opacity 0.18s ease, transform 0.2s ease, color 0.18s ease;
}

.post-list a:hover .row-arrow {
  opacity: 1;
  color: var(--accent);
  transform: translateX(3px);
}

.shelf-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.shelf-more span {
  transition: transform 0.2s ease;
}

.shelf-more:hover { color: var(--accent); }
.shelf-more:hover span { transform: translateX(3px); }

/* Section & Archive Pages */
.section-page,
.archive-main {
  padding-top: 44px;
}

.section-heading {
  margin: 0 0 40px;
}

.section-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.section-subtitle {
  margin: 14px 0 0;
  max-width: 52ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.62;
  color: var(--muted);
}

.section-page--stories .post-title {
  font-size: 23px;
}

/* Footer */
.site-footer {
  margin-top: 88px;
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
}

.site-footer > span {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}

/* Articles & Essays */
.article-main {
  width: 100%;
  max-width: 650px;
  margin-inline: auto;
  padding-top: 40px;
}

.article-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 30px;
}

.back-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  font: 12px/1 var(--mono);
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.article-heading {
  margin: 0 0 40px;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font: 11.5px/1.5 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.eyebrow-sep { opacity: 0.5; }

.article-heading h1 {
  font: 400 clamp(32px, 5vw, 46px)/1.15 var(--serif);
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}

/* Prose */
.prose {
  max-width: 650px;
  font: 400 19.5px/1.76 var(--serif);
  color: var(--ink-soft);
  letter-spacing: -0.002em;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  hanging-punctuation: first allow-end last;
}

.prose p { margin: 0 0 24px; }
.prose > :last-child { margin-bottom: 0; }

.prose h2 {
  margin: 56px 0 18px;
  font: 500 25px/1.26 var(--serif);
  letter-spacing: -0.016em;
  color: var(--ink);
}

.prose h3 {
  margin: 40px 0 14px;
  font: 500 20px/1.34 var(--serif);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.prose h4 {
  margin: 30px 0 12px;
  font: 500 16px/1.4 var(--sans);
  letter-spacing: 0.01em;
  color: var(--ink);
}

.prose strong {
  font-weight: 600;
  color: var(--ink);
}

.prose em { font-style: italic; }

.prose ul,
.prose ol {
  margin: 0 0 26px;
  padding-left: 1.35em;
}

.prose li {
  margin-bottom: 10px;
  line-height: 1.72;
}

.prose li::marker { color: var(--muted); }

.prose a {
  overflow-wrap: anywhere;
  text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.prose a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.82em;
  font-feature-settings: "liga" 0;
  letter-spacing: -0.01em;
}

.prose :not(pre) > code {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--code-surface);
  color: var(--ink);
}

.code-block {
  margin: 34px 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--code-surface);
  overflow: hidden;
}

.code-block figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 2px 8px 2px 16px;
  background: var(--code-header);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 11px/1 var(--mono);
  letter-spacing: 0.06em;
}

.copy-code {
  min-height: 28px;
  padding: 3px 10px;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--muted);
  font: 11px var(--mono);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.copy-code:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.copy-code:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.prose pre {
  max-width: 100%;
  margin: 0;
  overflow: auto;
  padding: 18px 20px 20px;
  font: 13px/1.68 var(--mono);
  tab-size: 2;
  overscroll-behavior-inline: contain;
  font-feature-settings: "liga" 0;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.prose pre:focus-visible { outline-offset: -3px; }
.prose pre code { font-size: inherit; }

.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr, .chroma .kt, .chroma .nt, .chroma .nf, .chroma .nb, .chroma .na { color: var(--code-key); }
.chroma .s, .chroma .s1, .chroma .s2, .chroma .sb, .chroma .sc, .chroma .sd, .chroma .se, .chroma .sh, .chroma .si, .chroma .sr, .chroma .ss, .chroma .sx { color: var(--code-string); }
.chroma .c, .chroma .c1, .chroma .cm, .chroma .cp, .chroma .cs { color: var(--code-comment); font-style: italic; }
.chroma .m, .chroma .mi, .chroma .mf, .chroma .mh, .chroma .mo, .chroma .il { color: var(--code-number); }
.code-block .fu, .code-block .kw, .code-block .bu { color: var(--code-key); }
.code-block .st, .code-block .ch { color: var(--code-string); }
.code-block .co { color: var(--code-comment); font-style: italic; }
.code-block .dv, .code-block .fl, .code-block .cn { color: var(--code-number); }

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 40px auto;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.prose img.in-text {
  display: inline;
  margin: 0;
  height: 1em;
  border: 0;
}

.prose figure:not(.code-block) { margin: 38px 0; }

.prose figcaption {
  font: 13px/1.6 var(--sans);
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

.prose blockquote {
  margin: 36px 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
  font-style: italic;
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose table {
  width: 100%;
  margin: 36px 0;
  border-collapse: collapse;
  font: 14.5px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
}

.prose thead th {
  font-weight: 500;
  color: var(--ink);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.prose th,
.prose td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.prose th:first-child,
.prose td:first-child { padding-left: 0; }

.prose iframe { max-width: 100%; }

.prose hr {
  margin: 52px auto;
  border: 0;
  height: 1px;
  width: 44px;
  background: var(--line-strong);
}

/* Short Stories — Quiet Book-Like Reading Layout */
.article-main--story {
  max-width: 580px;
  padding-top: 44px;
}

.article-main--story .article-top {
  margin-bottom: 36px;
}

.article-main--story .article-heading {
  text-align: center;
  margin: 0 0 48px;
}

.article-main--story .eyebrow {
  justify-content: center;
  margin-bottom: 18px;
}

.article-main--story .article-heading h1 {
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.article-main--story .article-heading::after {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  background: var(--line-strong);
  margin: 32px auto 0;
}

.article-main--story .prose {
  max-width: 580px;
  font-size: 20px;
  line-height: 1.84;
}

.article-main--story .prose p { margin-bottom: 24px; }

.article-main--story .prose blockquote {
  margin: 34px 0;
  padding: 6px 0 6px 24px;
  border-left: 1.5px solid var(--line-strong);
  color: var(--ink-soft);
  opacity: 0.88;
}

.article-main--story .prose img {
  margin: 44px auto;
}

.article-main--story .prose hr {
  height: auto;
  width: auto;
  background: none;
  text-align: center;
  margin: 52px auto;
}

.article-main--story .prose hr::after {
  content: "·   ·   ·";
  color: var(--muted);
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.3em;
}

.article-main--story .prose::after {
  content: "◇";
  display: block;
  text-align: center;
  margin-top: 52px;
  font-size: 11px;
  line-height: 1;
  color: var(--seal);
  opacity: 0.72;
}

/* Labs Index */
.article-main--labs {
  max-width: none;
  padding-top: 44px;
}

.article-main--labs .article-heading { margin-bottom: 18px; }

.labs-intro {
  max-width: 56ch;
  margin: 0 0 40px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
}

.lab-index ul,
.lab-index ol {
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  counter-reset: lab;
}

.lab-index li {
  border-bottom: 1px solid var(--line);
  counter-increment: lab;
}

.lab-index a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 20px 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.38;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.18s ease;
}

.lab-index a::before {
  content: counter(lab, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lab-index a:hover { color: var(--accent); }

/* Search */
.search-input {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 16px 0 18px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--paper-surface);
  color: var(--ink);
  font: 16px var(--sans);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.search-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  background: var(--paper-raised);
}

#search-results { margin-top: 24px; }

#search-results a {
  display: block;
  padding: 16px 0;
  font: 400 21px/1.38 var(--serif);
  color: var(--ink);
  text-decoration: none;
  transition: color 0.18s ease;
}

#search-results a:hover { color: var(--accent); }

/* Article End Navigation & Comments */
.article-end {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
  align-items: start;
}

.article-end a {
  display: block;
  max-width: 100%;
  text-decoration: none;
}

.article-end .prev-link {
  grid-column: 1;
  text-align: left;
}

.article-end .next-link {
  grid-column: 2;
  text-align: right;
  justify-self: end;
}

.nav-label {
  display: block;
  margin-bottom: 6px;
  font: 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.18s ease;
}

.nav-title {
  display: block;
  font: 400 17px/1.38 var(--serif);
  color: var(--ink);
  transition: color 0.18s ease;
}

.article-end a:hover .nav-label,
.article-end a:hover .nav-title {
  color: var(--accent);
}

.post-comments {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.post-comments noscript {
  color: var(--muted);
  font-size: 13px;
}

.article-main + .site-footer { margin-top: 64px; }

/* Mobile */
@media (max-width: 640px) {
  body { padding-inline: 22px; }

  .site-header {
    min-height: 72px;
    gap: 6px 16px;
    flex-wrap: wrap;
    padding-block: 14px 8px;
  }

  nav {
    gap: 2px 16px;
    font-size: 12.5px;
    flex-wrap: wrap;
  }

  nav a { min-height: 36px; }

  .theme-control {
    width: 36px;
    height: 36px;
    margin-right: -6px;
  }

  .intro { padding: 48px 0 44px; }
  .intro h1 { margin-bottom: 24px; }

  .intro-body {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .intro-links {
    align-items: flex-start;
    gap: 6px;
  }

  .index-group {
    grid-template-columns: 1fr;
    padding: 22px 0;
  }

  .index-rail {
    position: static;
    padding: 0 0 10px;
  }

  .post-list a,
  .post-list--compact a {
    grid-template-columns: minmax(0, 1fr) 14px;
    gap: 4px 12px;
    padding-block: 14px;
  }

  .post-title { font-size: 20px; }
  .post-list--compact .post-title { font-size: 19px; }

  .post-list time { grid-row: 2; }
  .row-arrow { grid-column: 2; grid-row: 1; }

  .section-page,
  .archive-main { padding-top: 28px; }

  .section-heading { margin-bottom: 28px; }

  .article-main,
  .article-main--story { padding-top: 24px; }

  .article-top { margin-bottom: 22px; }
  .article-heading { margin-bottom: 30px; }
  .article-main--story .article-heading { margin-bottom: 36px; }
  .article-heading h1 { font-size: 31px; }

  .prose {
    font-size: 18px;
    line-height: 1.76;
  }

  .article-main--story .prose {
    font-size: 18.5px;
    line-height: 1.82;
  }

  .prose pre { padding: 14px 16px; }
  .code-block figcaption { padding-left: 14px; }
  .prose table { display: block; max-width: 100%; overflow-x: auto; }

  .article-end {
    margin-top: 48px;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .article-end .prev-link,
  .article-end .next-link {
    grid-column: 1;
    text-align: left;
    justify-self: start;
  }

  .site-footer {
    margin-top: 60px;
    flex-direction: column;
    gap: 6px;
  }

  .site-footer div { gap: 14px; }
  .article-main + .site-footer { margin-top: 48px; }
}

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