:root {
  --document-paper: #ffffff;
  --document-ink: #1f1d1a;
  --document-muted: #6d675f;
  --document-soft: #8a8378;
  --document-rule: #d9d3c8;
  --document-rule-strong: #b9ad9d;
  --document-accent: #8f2f28;
  --document-accent-soft: #f3e8e4;
  --document-green: #2f6b58;
  --document-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --document-serif: Georgia, "Times New Roman", "Noto Serif CJK SC", "Songti SC", serif;
  --document-garamond: Garamond, "Adobe Garamond Pro", "EB Garamond", "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --document-mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --essay-text-width: 44rem;
}

html {
  background: var(--document-paper);
  scroll-padding-top: 4.5rem;
}

* {
  min-width: 0;
}

body.site-body {
  background: var(--document-paper);
  color: var(--document-ink);
  font-family: var(--document-ui);
  letter-spacing: 0;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

.site-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

.site-frame__header,
.site-frame__main,
.site-frame__aside,
.site-frame__footer {
  width: 100%;
  max-width: 46rem;
  margin-right: auto;
  margin-left: auto;
}

.site-frame__header {
  max-width: 62rem;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--document-rule);
}

.site-frame__footer,
.site-frame__aside {
  margin-top: 2.5rem;
}

.site-frame__main:has(.essay-page) + .site-frame__footer {
  display: none;
  margin-top: 0;
}

.site-frame__main:has(.essay-page) ~ .site-frame__aside {
  margin-top: 1.25rem;
}

.site-masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-wordmark {
  flex: 0 1 auto;
  color: var(--document-ink);
  font-family: var(--document-serif);
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1.15;
}

.site-wordmark:hover,
.site-wordmark:focus {
  color: var(--document-accent);
}

.site-nav-toggle {
  display: none;
}

.site-masthead .site-nav-list {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 0;
  color: var(--document-muted);
  font-family: var(--document-garamond);
  font-size: 0.96rem;
  line-height: 1.2;
  list-style: none;
}

.site-masthead .site-nav-list li {
  padding: 0;
}

.site-masthead .site-nav-list a,
.site-search input {
  color: var(--document-muted);
}

.site-masthead .site-nav-list a:hover,
.site-masthead .site-nav-list a:focus {
  color: var(--document-ink);
}

.site-search {
  display: none !important;
}

a:not(.icon) {
  color: var(--document-accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  text-decoration: none;
  transition: color 160ms ease, background-size 160ms ease;
}

a:not(.icon):hover,
a:not(.icon):focus {
  color: #5f201b;
  background-size: 100% 2px;
}

.essay-page {
  font-family: var(--document-serif);
}

.essay-hero {
  max-width: var(--essay-text-width);
  margin-bottom: 2rem;
  margin-right: auto;
  margin-left: auto;
}

.essay-kicker {
  margin-bottom: 0.65rem;
  color: var(--document-green);
  font-family: var(--document-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.essay-title {
  margin: 0;
  color: var(--document-ink);
  font-family: var(--document-serif);
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  font-weight: 400;
  line-height: 1.12;
}

.essay-description {
  max-width: 38rem;
  margin: 1rem 0 0;
  color: var(--document-muted);
  font-family: var(--document-garamond);
  font-size: 0.96rem;
  line-height: 1.55;
}

.essay-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 1.1rem;
  color: var(--document-soft);
  font-family: var(--document-garamond);
  font-size: 0.9rem;
  line-height: 1.5;
}

.reading-shell {
  max-width: 46rem;
  margin-right: auto;
  margin-left: auto;
}

.reading-progress {
  height: 2px;
  margin: 0 0 1.85rem;
  background: rgba(185, 173, 157, 0.35);
}

.reading-progress__bar {
  background: var(--document-accent);
}

.c-rich-text {
  color: var(--document-ink);
  font-family: var(--document-garamond);
  font-size: 0.96rem;
  line-height: 1.72;
  text-wrap: pretty;
}

.c-rich-text > * + * {
  margin-top: 1.25rem;
}

.c-rich-text h1,
.c-rich-text h2,
.c-rich-text h3,
.c-rich-text h4,
.c-rich-text h5,
.c-rich-text h6 {
  margin-top: 2.6rem;
  color: var(--document-ink);
  font-family: var(--document-serif);
  font-weight: 700;
  line-height: 1.18;
}

.c-rich-text h2 {
  font-size: 1.7rem;
}

.c-rich-text h3 {
  font-size: 1.32rem;
}

.c-rich-text p,
.c-rich-text li {
  max-width: var(--essay-text-width);
}

.c-rich-text > p,
.c-rich-text > h1,
.c-rich-text > h2,
.c-rich-text > h3,
.c-rich-text > h4,
.c-rich-text > h5,
.c-rich-text > h6,
.c-rich-text > ul,
.c-rich-text > ol,
.c-rich-text > blockquote,
.c-rich-text > pre,
.c-rich-text > table,
.c-rich-text > .highlight,
.c-rich-text > .footnotes {
  max-width: var(--essay-text-width);
  margin-right: auto;
  margin-left: auto;
}

.c-rich-text ul,
.c-rich-text ol {
  padding-left: 1.45rem;
  list-style-position: outside;
}

.c-rich-text ul {
  list-style-type: disc;
}

.c-rich-text ol {
  list-style-type: decimal;
}

.c-rich-text li {
  margin-bottom: 0.25rem;
}

.c-rich-text li p {
  display: block;
}

.c-rich-text blockquote {
  margin: 2rem 0 2rem 1.1rem;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 3px solid var(--document-accent);
  color: #4d4842;
  font-size: 1.04em;
}

.c-rich-text blockquote p {
  margin: 0;
}

.c-rich-text hr {
  height: 0;
  margin: 2.6rem 0;
  border: 0;
  border-top: 1px solid var(--document-rule);
}

.c-rich-text strong,
.c-rich-text b {
  color: var(--document-ink);
  font-weight: 700;
}

.c-rich-text img {
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
}

.c-rich-text figcaption {
  color: var(--document-muted);
  font-family: var(--document-ui);
}

.c-rich-text code,
.c-rich-text pre tt,
.c-rich-text kbd {
  border: 1px solid rgba(185, 173, 157, 0.6);
  background: #f3efe8;
  color: var(--document-ink);
  font-family: var(--document-mono);
}

.c-rich-text pre {
  border: 1px solid var(--document-rule);
  border-radius: 0;
  background: #f5f2ec;
  color: var(--document-ink);
  font-family: var(--document-mono);
  line-height: 1.55;
}

.c-rich-text table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--document-ui);
  font-size: 0.92rem;
}

.c-rich-text th,
.c-rich-text td {
  border-bottom: 1px solid var(--document-rule);
}

.c-rich-text th {
  background: #f3efe8;
  color: var(--document-ink);
}

.c-rich-text .footnotes {
  margin-top: 3rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-top: 1px solid var(--document-rule);
  border-bottom: 3px double var(--document-rule);
  color: var(--document-muted);
  font-family: var(--document-ui);
  font-size: 0.88rem;
  line-height: 1.55;
}

.c-rich-text .footnotes hr {
  display: none;
}

.footnote-popover {
  border: 1px solid var(--document-rule-strong);
  border-radius: 0;
  background: var(--document-paper);
  box-shadow: 0 12px 30px rgba(31, 29, 26, 0.16);
  color: var(--document-ink);
  font-family: var(--document-ui);
}

.essay-aside,
.site-aside {
  padding-top: 1.25rem;
  border-top: 1px solid var(--document-rule);
  color: var(--document-muted);
  font-family: var(--document-ui);
  line-height: 1.55;
}

.essay-aside {
  padding-top: 0;
  border-top: 0;
  font-size: 0.72rem;
  text-align: center;
}

.site-aside {
  font-size: 0.86rem;
}

.essay-aside__meta {
  margin-top: 0;
}

.site-aside__meta {
  margin-top: 0.9rem;
}

.essay-aside .icon,
.site-aside .icon {
  color: var(--document-muted);
}

.essay-aside .icon:hover,
.essay-aside .icon:focus,
.site-aside .icon:hover,
.site-aside .icon:focus {
  color: var(--document-accent);
}

.toc {
  margin: 0 0 2rem;
  border: 1px solid var(--document-rule);
  border-radius: 8px;
  background: #ffffff;
  font-family: var(--document-garamond);
  text-align: left;
  overflow: hidden;
}

.toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 2.6rem;
  padding: 0.72rem 0.9rem;
  border: 0;
  background: transparent;
  color: var(--document-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  list-style: none;
  text-transform: none;
}

.toc__summary:hover,
.toc__summary:focus {
  color: var(--document-ink);
  outline: none;
}

.toc__summary::after {
  content: "+";
  color: var(--document-muted);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.toc.is-open .toc__summary {
  border-bottom: 1px solid var(--document-rule);
}

.toc.is-open .toc__summary::after {
  content: "-";
}

.toc__body {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    height 220ms ease,
    opacity 180ms ease;
}

.toc.is-open .toc__body {
  opacity: 1;
}

.toc-content {
  padding: 0.7rem 0.9rem 0.85rem;
}

.toc nav ul {
  list-style: none !important;
  margin: 0;
  padding-left: 0;
}

.toc nav li {
  list-style: none !important;
  margin: 0.22rem 0;
  color: var(--document-muted);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.35;
}

.toc nav li::marker {
  content: "";
}

.toc nav ul ul {
  margin-top: 0.22rem;
  padding-left: 0.85rem;
}

.toc nav a,
.toc nav ul ul a {
  display: inline-block;
  padding: 0.08rem 0 0.08rem 0.45rem;
  color: var(--document-muted);
  background-image: none;
  border-left: 1px solid transparent;
  font-weight: 400;
}

.toc strong,
.toc b {
  font-weight: 400;
}

.toc nav a:hover,
.toc nav a:focus,
.toc nav a.is-active {
  color: var(--document-ink);
  border-left-color: var(--document-accent);
}

.post-nav {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--document-rule);
  font-family: var(--document-ui);
}

.post-nav__links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.post-nav__link {
  display: block;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--document-rule);
  color: var(--document-ink);
  background-image: none !important;
}

.post-nav__link:hover,
.post-nav__link:focus {
  color: var(--document-accent);
  transform: none;
}

.post-nav__label,
.post-related__label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--document-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-related {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--document-rule);
  font-family: var(--document-ui);
  font-size: 0.9rem;
  line-height: 1.6;
}

.home-document {
  font-family: var(--document-serif);
}

@keyframes home-seq-in {
  from {
    opacity: 0;
    transform: translateY(0.85rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-seq {
  opacity: 0;
  animation: home-seq-in 760ms ease forwards;
}

.home-seq--quote {
  animation-delay: 120ms;
}

.home-seq--blurb {
  animation-delay: 760ms;
}

.home-seq--carousel {
  animation-delay: 1360ms;
}

.home-document__lede {
  color: var(--document-green);
  font-size: 1.32rem;
  line-height: 1.55;
}

.home-document__lede em {
  color: inherit;
}

.home-document__note {
  margin-top: 2rem;
}

.home-document__note.c-rich-text > p {
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

.home-carousel {
  margin-top: 1.45rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--document-rule);
  color: var(--document-ink);
  font-family: var(--document-garamond);
}

.home-carousel__viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--document-rule);
  border-radius: 8px;
  background: var(--document-paper);
}

.home-carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.home-carousel__track::-webkit-scrollbar {
  display: none;
}

.home-carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}

.home-carousel__slide img {
  display: block;
  width: 100%;
  aspect-ratio: 10 / 7;
  height: auto;
  object-fit: cover;
}

.home-carousel__button {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(31, 29, 26, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--document-ink);
  cursor: pointer;
  font-family: var(--document-ui);
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.home-carousel__viewport:hover .home-carousel__button,
.home-carousel__viewport:focus-within .home-carousel__button {
  opacity: 1;
}

.home-carousel__button:hover,
.home-carousel__button:focus {
  border-color: var(--document-accent);
  background: var(--document-accent);
  color: #ffffff;
  outline: none;
}

.home-carousel__button--prev {
  left: 0.7rem;
}

.home-carousel__button--next {
  right: 0.7rem;
}

.home-carousel__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
  margin-top: 0.75rem;
}

.home-carousel__caption {
  min-height: 2.8rem;
  margin: 0;
  color: var(--document-muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.home-carousel__counter {
  color: var(--document-soft);
  font-family: var(--document-ui);
  font-size: 0.72rem;
  line-height: 1.7;
}

.home-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.home-carousel__dot {
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: var(--document-rule-strong);
  cursor: pointer;
  opacity: 0.62;
  transition:
    background-color 160ms ease,
    opacity 160ms ease,
    width 160ms ease;
}

.home-carousel__dot:hover,
.home-carousel__dot:focus,
.home-carousel__dot.is-active {
  background: var(--document-accent);
  opacity: 1;
  outline: none;
}

.home-carousel__dot.is-active {
  width: 1.4rem;
}

@media (prefers-reduced-motion: reduce) {
  .home-seq {
    opacity: 1;
    animation: none;
    transform: none;
  }
}

.home-document__section {
  margin-top: 3rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--document-rule);
}

.home-document__section h2 {
  margin: 0 0 1rem;
  color: var(--document-ink);
  font-family: var(--document-ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.home-post-list__item,
.archive-list .archive-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--document-rule);
}

.home-post-list__item a,
.archive-title {
  color: var(--document-ink);
  font-family: var(--document-serif);
  font-size: 1.22rem;
  background-image: none !important;
}

.home-post-list__item a:hover,
.home-post-list__item a:focus,
.archive-title:hover,
.archive-title:focus {
  color: var(--document-accent);
}

.home-post-list__item p,
.archive-description {
  margin: 0.28rem 0 0;
  color: var(--document-muted);
  font-family: var(--document-ui);
  font-size: 0.92rem;
  line-height: 1.45;
}

.home-post-list__item time,
.archive-date {
  display: block;
  margin-top: 0.35rem;
  color: var(--document-soft);
  font-family: var(--document-ui);
  font-size: 0.78rem;
}

.archive-list .archive-item {
  border-radius: 0;
  transition: none;
}

.archive-list .archive-item:hover {
  background: transparent;
  transform: none;
}

.archive-list .archive-year h2 {
  color: var(--document-soft);
  font-family: var(--document-ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-taxonomy-category,
.post-taxonomy-tag {
  color: var(--document-muted) !important;
}

@media (min-width: 768px) {
  .site-frame {
    padding-top: 2rem;
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .site-frame__header {
    margin-bottom: 4rem;
  }

  .essay-title {
    font-size: clamp(1.75rem, 2.5vw, 2rem);
  }

  .c-rich-text {
    font-size: 0.98rem;
  }

  .essay-description {
    font-size: 0.98rem;
  }

  .post-nav__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.6rem;
  }
}

@media (max-width: 640px) {
  .site-frame,
  .site-frame__header,
  .site-frame__main,
  .site-frame__aside,
  .site-frame__footer,
  .essay-page,
  .reading-shell,
  .c-rich-text {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .site-masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .site-masthead .site-nav-list {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .essay-title {
    font-size: 1.55rem;
  }

  .essay-description {
    font-size: 0.96rem;
  }

  .home-document__lede {
    font-size: 1.12rem;
  }

}
