:root {
  --bg: #f7f6f2;
  --surface: #efede7;
  --text: #24241f;
  --muted: #74736c;
  --faint: #9b9990;
  --line: #dcdbd4;
  --strong-line: #b8b6ad;
  --accent: #b7442d;
  --code: #eeece5;
  --max: 720px;
  --reading: 640px;
  --serif: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Geist Mono", "SFMono-Regular", Consolas, monospace;
  --mono: "Geist Mono", "SFMono-Regular", Consolas, monospace;
}

:root.dark {
  --bg: #171815;
  --surface: #20211d;
  --text: #e9e6dc;
  --muted: #aaa89f;
  --faint: #77766f;
  --line: #34352f;
  --strong-line: #55564e;
  --accent: #df7154;
  --code: #20211d;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: inherit;
  text-decoration-color: var(--strong-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover { text-decoration-color: var(--accent); }
::selection { background: #e8c7bc; color: #24241f; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 7px 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

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

.site-shell {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 32px;
  gap: 30px;
  align-items: center;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
}

.site-name {
  width: max-content;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  position: relative;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active { color: var(--text); }

.site-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--accent);
}

.theme-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}

.theme-toggle:hover { color: var(--text); }

.home-content {
  max-width: var(--reading);
  padding: 96px 0 110px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 400; }

.home-content h1,
.page-heading h1,
.article-header h1 {
  font-family: var(--serif);
  letter-spacing: -0.035em;
}

.home-content h1 {
  margin-bottom: 42px;
  font-size: clamp(2.9rem, 9vw, 4.6rem);
  line-height: 0.98;
}

.prose p {
  margin-bottom: 21px;
  color: var(--muted);
}

.intro-prose p:first-child {
  color: var(--text);
  font-size: 26px;
  line-height: 1.65;
}

.small-section { margin-top: 54px; }
.small-section h2 { margin-bottom: 18px; font-size: 14px; font-weight: 600; }

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

.plain-list li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 18px;
  color: var(--muted);
}

.plain-list li::before {
  position: absolute;
  left: 0;
  content: "•";
  color: var(--accent);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 48px;
}

.social-links a {
  font-family: var(--mono);
  font-size: 11px;
}

.archive-page { padding: 88px 0 115px; }

.page-heading {
  max-width: 570px;
  margin-bottom: 64px;
}

.page-heading h1 {
  margin-bottom: 12px;
  font-size: clamp(2.9rem, 9vw, 4.5rem);
  line-height: 1;
}

.page-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.post-list,
.observation-list { border-top: 1px solid var(--strong-line); }

.post-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 22px;
  padding: 25px 0 27px;
  border-bottom: 1px solid var(--line);
}

.post-row time,
.observation time,
.article-meta,
.back-link,
.draft-note {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.post-row time { padding-top: 5px; }
.post-row h2 { margin-bottom: 7px; font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.post-row h2 a { text-decoration: none; }
.post-row h2 a:hover { color: var(--accent); }
.post-row p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.observation {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 22px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.observation time { padding-top: 2px; }
.observation p { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.48; }

.list-collection { border-top: 1px solid var(--strong-line); }

.curated-list {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 30px;
  padding: 34px 0 42px;
  border-bottom: 1px solid var(--line);
}

.curated-list h2 { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.curated-list ul { margin: 0; padding: 0; list-style: none; }

.curated-list li {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(180px, 1.2fr);
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px dotted var(--line);
}

.curated-list li:first-child { padding-top: 0; }
.curated-list li:last-child { border-bottom: 0; }
.curated-list span { font-size: 13px; }
.curated-list small { color: var(--muted); font-size: 11px; line-height: 1.55; }

.article-page {
  width: min(100%, var(--reading));
  margin: 0 auto;
  padding: 58px 0 110px;
}

.back-link { display: inline-block; margin-bottom: 50px; text-decoration: none; font-size: 12px; color: var(--muted); font-weight: 500; }
.back-link:hover { color: var(--accent); }

.article-header { margin-bottom: 38px; }

.article-header h1 {
  margin-bottom: 20px;
  font-size: clamp(2.8rem, 8vw, 4.3rem);
  line-height: 0.99;
  text-wrap: balance;
}

.article-deck {
  max-width: 590px;
  margin-bottom: 23px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.42;
}

.article-meta { display: flex; gap: 16px; text-transform: uppercase; }
.article-meta span::before { margin-right: 16px; content: "·"; }

.draft-note {
  margin-bottom: 48px;
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  color: var(--muted);
  line-height: 1.55;
}

.draft-note strong { color: var(--text); font-weight: 500; }

.article-body {
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.72;
}

.article-body p { margin-bottom: 26px; }

.article-body h2 {
  margin: 55px 0 17px;
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.drop-cap::first-letter {
  float: left;
  margin: 10px 8px 0 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 63px;
  line-height: 0.65;
}

.article-body blockquote {
  margin: 40px 0;
  padding: 4px 0 4px 24px;
  border-left: 1px solid var(--accent);
  color: var(--muted);
  font-size: 24px;
  font-style: italic;
  line-height: 1.45;
}

.article-body pre {
  margin: 34px 0;
  overflow-x: auto;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--code);
  font: 12px/1.75 var(--mono);
}

.code-block {
  position: relative;
  margin: 34px 0;
}

.code-block .article-code {
  margin: 0;
  padding-top: 22px;
  padding-bottom: 50px;
}

.code-copy-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font: 500 10px/1.3 var(--mono);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.code-copy-button:hover,
.code-copy-button:focus-visible {
  border-color: var(--strong-line);
  color: var(--text);
}

.code-copy-button.is-copied {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--accent);
}

.article-figure { margin: 42px 0; }

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.article-body img.lightbox-trigger {
  cursor: zoom-in;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.article-body img.lightbox-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 9px 11px 0 color-mix(in srgb, var(--accent) 14%, transparent);
}

.article-body img.lightbox-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  width: calc(100% - 32px);
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  background: transparent;
  color: #f7f6f2;
}

.image-lightbox[open] {
  display: grid;
  place-items: center;
  animation: lightbox-in 220ms ease both;
}

.image-lightbox::backdrop {
  background: rgb(9 10 8 / 0.9);
  backdrop-filter: blur(9px);
  animation: lightbox-backdrop-in 220ms ease both;
}

.image-lightbox__frame {
  display: grid;
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 34px 16px 12px;
  align-content: center;
  justify-items: center;
  grid-template-rows: auto auto;
  gap: 14px;
}

.image-lightbox__image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 130px);
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.48);
}

.image-lightbox__caption {
  max-width: 720px;
  margin: 0;
  color: rgb(247 246 242 / 0.72);
  font: 11px/1.6 var(--mono);
  text-align: center;
}

.image-lightbox__close {
  position: fixed;
  top: 18px;
  right: 20px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0 0 2px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 50%;
  background: rgb(20 20 18 / 0.72);
  color: #f7f6f2;
  font: 300 25px/1 var(--sans);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.image-lightbox__close:hover,
.image-lightbox__close:focus-visible {
  border-color: rgb(255 255 255 / 0.5);
  background: rgb(35 35 32 / 0.9);
  transform: rotate(8deg);
  outline: none;
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes lightbox-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 680px) {
  .image-lightbox {
    width: calc(100% - 16px);
    height: calc(100dvh - 16px);
  }

  .image-lightbox__frame {
    padding: 48px 4px 12px;
  }

  .image-lightbox__image {
    max-height: calc(100dvh - 150px);
  }

  .image-lightbox__close {
    top: 12px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-body img.lightbox-trigger,
  .image-lightbox[open],
  .image-lightbox::backdrop,
  .image-lightbox__close {
    animation: none;
    transition: none;
  }
}

.article-figure figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--faint);
  font: 10px/1.55 var(--mono);
}

.wide-figure {
  width: calc(100% + 80px);
  margin-left: -40px;
}

.portrait-figure {
  width: min(100%, 470px);
  margin-right: auto;
  margin-left: auto;
}

.article-body .robot-laws {
  margin: 30px 0 32px;
  padding: 0;
  counter-reset: robot-law;
  list-style: none;
}

.article-body .robot-laws li {
  position: relative;
  margin: 0;
  padding: 15px 0 15px 42px;
  border-top: 1px solid var(--line);
  counter-increment: robot-law;
}

.article-body .robot-laws li:last-child {
  border-bottom: 1px solid var(--line);
}

.article-body .robot-laws li::before {
  position: absolute;
  top: 17px;
  left: 4px;
  color: var(--accent);
  content: counter(robot-law, decimal-leading-zero);
  font: 500 10px/1.7 var(--mono);
}

.article-table-wrap { margin: 34px 0; overflow-x: auto; }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 12px;
}

.article-body th,
.article-body td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.article-body th { border-top: 1px solid var(--strong-line); font: 500 10px var(--mono); text-transform: uppercase; }
.article-body td:first-child { white-space: nowrap; color: var(--text); }
.article-body td:last-child { color: var(--muted); }

.article-footer {
  margin-top: 72px;
  text-align: right;
}

.article-footer a { font-family: var(--mono); font-size: 11px; text-decoration: none; }
.article-footer a:hover { color: var(--accent); }

.site-footer {
  display: flex;
  justify-content: center;
  padding: 30px 0 38px;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 680px) {
  .site-shell { width: min(calc(100% - 30px), var(--max)); }
  .site-header { grid-template-columns: 1fr 28px; gap: 12px; padding: 15px 0; }
  .site-name { font-size: 16px; }
  .site-nav { grid-row: 2; grid-column: 1 / -1; gap: clamp(14px, 5vw, 24px); overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .theme-toggle { grid-row: 1; grid-column: 2; }
  .home-content, .archive-page { padding: 68px 0 86px; }
  .page-heading { margin-bottom: 48px; }
  .post-row, .observation { grid-template-columns: 1fr; gap: 8px; }
  .post-row time, .observation time { padding-top: 0; }
  .observation p { font-size: 20px; }
  .curated-list { grid-template-columns: 1fr; gap: 18px; }
  .curated-list li { grid-template-columns: 1fr; gap: 3px; }
  .article-page { padding: 42px 0 86px; }
  .back-link { margin-bottom: 38px; }
  .article-body { font-size: 18px; }
  .wide-figure { width: 100%; margin-left: 0; }
  .article-body blockquote { font-size: 21px; }
}

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

/* Polished editorial layer shared by every page */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 82% 0%, color-mix(in srgb, var(--accent) 8%, transparent) 0, transparent 32rem);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site-shell {
  width: min(calc(100% - 48px), 768px);
}

.site-header {
  grid-template-columns: 1fr auto 1fr;
  min-height: 80px;
}

.site-name {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
}

.site-name::before {
  width: 8px;
  height: 8px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  content: "";
}

.theme-toggle {
  justify-self: end;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform 180ms ease, background-color 180ms ease;
}

.theme-toggle:hover {
  background: var(--surface);
  transform: rotate(18deg);
}

.home-content {
  max-width: none;
  padding: 108px 0 122px;
}

.home-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-content h1 {
  margin: 4px 0 58px;
  font-size: clamp(4.4rem, 10vw, 7rem);
  line-height: 0.9;
}

.title-mark { color: var(--accent); }

.home-grid {
  max-width: 610px;
}

.intro-prose p:first-child {
  font-size: 19px;
  line-height: 1.6;
}

.social-links {
  gap: 12px 25px;
  margin-top: 36px;
}

.social-links a { text-transform: uppercase; text-decoration: none; }
.social-links a span { display: inline-block; transition: transform 180ms ease; }
.social-links a:hover { color: var(--accent); }
.social-links a:hover span { transform: translate(2px, -2px); }

.archive-page {
  padding: 102px 0 125px;
}

.page-heading {
  max-width: 700px;
  margin-bottom: 68px;
}

.page-heading::before {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font: 10px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.archive-page:has(.post-list) .page-heading::before { content: "01 / Long-form"; }
.archive-page:has(.observation-list) .page-heading::before { content: "02 / Short-form"; }
.archive-page:has(.list-collection) .page-heading::before { content: "03 / Collections"; }

.page-heading h1 {
  font-size: clamp(4.2rem, 10vw, 6.6rem);
  line-height: 0.9;
}

.page-heading p {
  max-width: 570px;
  margin-top: 22px;
  font-size: 17px;
}

.post-list,
.observation-list,
.list-collection {
  border-top: 1px solid var(--text);
}

.post-row {
  grid-template-columns: 125px 1fr 28px;
  padding: 30px 12px 31px 0;
  transition: padding 180ms ease, background-color 180ms ease;
}

.post-row::after {
  align-self: center;
  content: "↗";
  color: var(--faint);
  font-family: var(--mono);
  transition: transform 180ms ease, color 180ms ease;
}

.post-row:hover {
  padding-right: 18px;
  padding-left: 12px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}

.post-row:hover::after { color: var(--accent); transform: translate(2px, -2px); }
.post-row h2 { font-size: 28px; }
.post-row p { max-width: 610px; }

.observation {
  grid-template-columns: 125px 1fr;
  padding: 30px 18px 31px 0;
  transition: padding 180ms ease, background-color 180ms ease;
}

.observation:hover {
  padding-right: 18px;
  padding-left: 12px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}

.observation p { max-width: 680px; font-size: 23px; }

.curated-list {
  grid-template-columns: 215px 1fr;
  padding: 40px 20px 44px 0;
  transition: padding 180ms ease, background-color 180ms ease;
}

.curated-list:hover {
  padding-right: 20px;
  padding-left: 14px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
}

.curated-list h2 { font-size: 27px; }

.article-page {
  width: min(100%, 660px);
  padding-top: 66px;
}

.article-header h1 { font-size: clamp(3.5rem, 8vw, 5.4rem); }

.draft-note,
.article-body pre,
.article-figure img {
  box-shadow: 7px 7px 0 color-mix(in srgb, var(--accent) 10%, transparent);
}

.article-figure img { border-color: var(--strong-line); }

.site-footer {
  padding: 30px 0 38px;
}

@media (max-width: 680px) {
  .site-shell { width: min(calc(100% - 30px), 920px); }
  .site-header { grid-template-columns: 1fr 34px; min-height: auto; }
  .home-content, .archive-page { padding: 70px 0 90px; }
  .home-kicker-row { display: block; }
  .home-content h1 { margin-top: 18px; margin-bottom: 44px; font-size: clamp(4rem, 20vw, 6rem); }
  .page-heading { margin-bottom: 50px; }
  .page-heading h1 { font-size: clamp(4rem, 19vw, 5.8rem); }
  .post-row { grid-template-columns: 1fr 24px; gap: 8px; }
  .post-row time { grid-column: 1 / -1; }
  .post-row div { grid-column: 1; }
  .post-row::after { grid-column: 2; grid-row: 2; }
  .observation { grid-template-columns: 1fr; }
  .curated-list { grid-template-columns: 1fr; }
  .article-header h1 { font-size: clamp(3.25rem, 16vw, 4.7rem); }
}

/* Observations are a plain description followed by quick jottings. */
.observation-page {
  width: min(100%, 680px);
  margin-right: auto;
  margin-left: 0;
  padding-top: 80px;
}

.observation-page .page-heading {
  margin-bottom: 34px;
}

.observation-page .page-heading::before {
  display: none;
}

.observation-page .page-heading h1 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.observation-page .page-heading p {
  max-width: 650px;
  margin-top: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
}

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

.jottings-list li {
  position: relative;
  margin-bottom: 14px;
  padding-left: 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.jottings-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  content: "•";
  color: var(--faint);
}

@media (max-width: 680px) {
  .observation-page {
    width: 100%;
    padding-top: 64px;
  }

  .observation-page .page-heading h1 {
    font-size: 32px;
  }
}

/* The blog index uses the same compact rhythm as Observations. */
.blog-page {
  width: min(100%, 680px);
  margin-right: auto;
  margin-left: 0;
  padding-top: 88px;
}

.blog-page .page-heading {
  margin-bottom: 38px;
}

.blog-page .page-heading::before {
  display: none;
}

.blog-page .page-heading h1 {
  margin-bottom: 10px;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.blog-page .page-heading p {
  max-width: 540px;
  margin-top: 0;
  font-size: 15px;
  line-height: 1.65;
}

.blog-page .post-list {
  border-top: 0;
}

.blog-page .post-row {
  display: block;
  margin: 0 0 30px;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.blog-page .post-row:last-child {
  margin-bottom: 0;
}

.blog-page .post-row time {
  display: block;
  margin-bottom: 6px;
  padding-top: 0;
}

.blog-page .post-row::after {
  display: none;
}

.blog-page .post-row:hover {
  padding-right: 0;
  padding-left: 0;
  background: transparent;
}

.blog-page .post-row h2 {
  margin-bottom: 7px;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.blog-page .post-row h2 a {
  text-decoration: underline;
  text-decoration-color: transparent;
}

.blog-page .post-row h2 a:hover {
  color: var(--text);
  text-decoration-color: var(--strong-line);
}

.blog-page .post-row p {
  max-width: 640px;
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 680px) {
  .blog-page {
    width: 100%;
    margin-left: 0;
    padding-top: 64px;
  }

  .blog-page .page-heading h1 {
    font-size: 34px;
  }

  .blog-page .post-row {
    display: block;
    margin-bottom: 34px;
  }

  .blog-page .post-row time {
    display: block;
    margin-bottom: 6px;
  }
}

/* Lists use the same simple, text-first treatment. */
.list-page {
  width: min(100%, 650px);
  margin-right: auto;
  margin-left: 0;
  padding-top: 88px;
}

.list-page .page-heading {
  margin-bottom: 38px;
}

.list-page .page-heading::before {
  display: none;
}

.list-page .page-heading h1 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.list-page .page-heading p {
  max-width: 540px;
  margin-top: 0;
  font-size: 14px;
  line-height: 1.65;
}

.list-page .list-collection {
  border-top-color: var(--line);
}

.list-page .curated-list {
  display: block;
  padding: 25px 0 27px;
  background: transparent;
}

.list-page .curated-list:hover {
  padding-right: 0;
  padding-left: 0;
  background: transparent;
}

.list-page .curated-list h2 {
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.list-page .curated-list li {
  display: block;
  position: relative;
  padding: 5px 0 5px 17px;
  border: 0;
}

.list-page .curated-list li::before {
  position: absolute;
  left: 0;
  content: "•";
  color: var(--text);
}

.list-page .curated-list span {
  margin-right: 6px;
  color: var(--text);
  font-size: 13px;
}

.list-page .curated-list small {
  color: var(--muted);
  font-size: 12px;
}

.list-page .curated-list small::before {
  margin-right: 6px;
  content: "—";
}

@media (max-width: 680px) {
  .list-page {
    width: 100%;
    padding-top: 64px;
  }

  .list-page .page-heading h1 {
    font-size: 32px;
  }

  .list-page .curated-list small {
    display: block;
    margin-top: 1px;
  }

  .list-page .curated-list small::before {
    display: none;
  }
}

/* Image previews for selected places, inspired by the reference hover detail. */
.list-page .curated-list .spot-preview-item {
  position: relative;
  width: max-content;
  max-width: 100%;
}

.list-page .curated-list .spot-trigger,
.list-page .curated-list li > a.spot-trigger {
  display: inline-block;
  border-bottom: 1px dotted color-mix(in srgb, var(--muted) 65%, transparent);
  color: var(--text);
  cursor: default;
  outline: none;
  text-decoration: none;
}

.list-page .curated-list a.spot-trigger {
  cursor: pointer;
}

.list-page .curated-list .spot-trigger:focus-visible {
  border-bottom-color: var(--accent);
}

.list-page .curated-list .spot-image-preview,
.list-page .curated-list li > span.spot-image-preview {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  z-index: 10;
  display: block;
  width: min(384px, calc(100vw - 48px));
  margin: 0;
  padding: 6px;
  border: 1px solid #dedbd2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(24, 23, 19, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(7px) scale(0.985);
  transform-origin: bottom left;
  transition: opacity 160ms ease, transform 160ms ease;
}

.spot-image-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 1.85 / 1;
  border-radius: 8px;
  object-fit: cover;
}

.list-page .curated-list .spot-preview-item:hover .spot-image-preview,
.list-page .curated-list .spot-preview-item:focus-within .spot-image-preview {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 680px) {
  .list-page .curated-list .spot-image-preview,
  .list-page .curated-list li > span.spot-image-preview {
    width: min(320px, calc(100vw - 42px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .list-page .curated-list .spot-image-preview {
    transition: none;
  }
}

/* Compact long-form typography, matching the reference article rhythm. */
.article-page {
  width: min(100%, 768px);
  padding-top: 80px;
}

.article-page .article-header {
  margin-bottom: 32px;
}

.article-page .article-header h1 {
  margin-bottom: 16px;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.article-page .article-deck {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.65;
}

.article-page .article-meta {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.article-page .draft-note {
  margin-bottom: 42px;
  font-size: 11px;
}

.article-page .article-body {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.article-page .article-body p {
  margin-bottom: 24px;
}

.article-page .article-body h2 {
  margin: 32px 0 16px;
  color: var(--text);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
}

.article-page .article-body h3 {
  margin: 26px 0 12px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.4;
}

.article-page .drop-cap::first-letter {
  float: none;
  margin: 0;
  color: inherit;
  font: inherit;
}

.article-page .article-body blockquote {
  margin: 32px 0;
  font-size: 17px;
  line-height: 1.65;
}

.article-page .wide-figure {
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}

@media (max-width: 680px) {
  .article-page {
    padding-top: 54px;
  }

  .article-page .article-header h1 {
    font-size: 32px;
    line-height: 1.28;
  }

  .article-page .article-body {
    font-size: 15px;
  }
}

/* Compact homepage typography based on the reference proportions. */
.home-content {
  max-width: 768px;
  padding-top: 80px;
  padding-bottom: 104px;
}

.home-content .home-kicker-row {
  display: block;
  margin-bottom: 12px;
}

.wave {
  display: inline-block;
  margin-left: 3px;
  font-size: 18px;
  transform-origin: 72% 72%;
  animation: friendly-wave 2.8s ease-in-out 0.6s infinite;
}

@keyframes friendly-wave {
  0%, 48%, 100% { transform: rotate(0deg); }
  8% { transform: rotate(17deg); }
  16% { transform: rotate(-9deg); }
  24% { transform: rotate(16deg); }
  32% { transform: rotate(-5deg); }
  40% { transform: rotate(9deg); }
}

.home-content h1 {
  margin: 0 0 32px;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.home-content .home-grid {
  max-width: 680px;
}

.home-content .intro-prose p,
.home-content .intro-prose p:first-child {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0;
}

.home-content .social-links {
  gap: 20px;
  margin-top: 34px;
}

.home-content .social-links a {
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.home-content .social-links a:hover {
  color: var(--text);
}

@media (max-width: 680px) {
  .home-content {
    padding-top: 64px;
    padding-bottom: 84px;
  }

  .home-content h1 {
    margin-top: 0;
    margin-bottom: 28px;
    font-size: 30px;
  }

  .home-content .intro-prose p,
  .home-content .intro-prose p:first-child,
  .home-content .social-links a {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wave { animation: none; }
}

/* Running collections, following the reference Lists page structure. */
.list-page {
  width: min(100%, 768px);
  padding-top: 48px;
}

.lists-intro {
  margin: 0 0 48px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
}

.list-page .list-collection {
  border: 0;
}

.list-page .curated-list,
.list-page .curated-list:hover {
  display: block;
  margin: 0 0 48px;
  padding: 0;
  border: 0;
  background: transparent;
}

.list-page .curated-list:last-child {
  margin-bottom: 0;
}

.list-page .curated-list h2 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
}

.list-page .curated-list ul {
  margin: 0;
  padding: 0;
}

.list-page .curated-list li,
.list-page .curated-list li:first-child,
.list-page .curated-list li:last-child {
  display: block;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

.list-page .curated-list li::before {
  display: none;
}

.list-page .curated-list li > span,
.list-page .curated-list li > a {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.list-page .curated-list li > a {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  transition: border-color 150ms ease;
}

.list-page .curated-list li > a:hover {
  border-color: var(--text);
}

.list-page .curated-list small {
  display: inline;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: inherit;
}

.list-page .curated-list small::before {
  display: inline;
  margin: 0 7px;
  content: "—";
}

@media (max-width: 680px) {
  .list-page {
    width: 100%;
    padding-top: 44px;
  }

  .lists-intro {
    margin-bottom: 42px;
    font-size: 15px;
  }

  .list-page .curated-list,
  .list-page .curated-list:hover {
    margin-bottom: 42px;
  }

  .list-page .curated-list h2 {
    font-size: 19px;
  }

  .list-page .curated-list li,
  .list-page .curated-list li > span,
  .list-page .curated-list li > a,
  .list-page .curated-list small {
    font-size: 15px;
  }

  .list-page .curated-list small {
    display: inline;
  }

  .list-page .curated-list small::before {
    display: inline;
  }
}

/* Apply the theme fade only while the toggle is being used. This keeps
   everyday hover interactions crisp and avoids animating the initial load. */
html.theme-transitioning,
html.theme-transitioning body,
html.theme-transitioning body *,
html.theme-transitioning body *::before,
html.theme-transitioning body *::after {
  transition-property: color, background-color, border-color, text-decoration-color, box-shadow, fill, stroke !important;
  transition-duration: 300ms !important;
  transition-timing-function: ease !important;
}

@media (prefers-reduced-motion: reduce) {
  html.theme-transitioning,
  html.theme-transitioning body,
  html.theme-transitioning body *,
  html.theme-transitioning body *::before,
  html.theme-transitioning body *::after {
    transition-duration: 0.01ms !important;
  }
}
