* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --paper: #f7f4ea;
  --ink: #191919;
  --muted: #706c63;
  --line: rgba(25, 25, 25, 0.18);
  --strong-line: rgba(25, 25, 25, 0.36);
  --gold: #936b28;
  --display-font: "Bodoni 72", "Didot", "Baskerville", "Iowan Old Style", Georgia, serif;
  --text-font: "Iowan Old Style", "Baskerville", Georgia, "Songti SC", serif;
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text-font);
  line-height: 1.5;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.home-hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  align-content: center;
  justify-items: center;
  background: #fbfaf5;
}

.hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  transform: translateY(clamp(-34px, -3.5vh, -18px));
}

.hero-title-link {
  display: grid;
  color: #090807;
  font-family: var(--display-font);
  font-size: clamp(4.6rem, 11.8vw, 12.2rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.78;
  text-decoration: none;
  text-shadow: 0 14px 40px rgba(255, 241, 186, 0.08);
  transition: color 460ms ease, text-shadow 460ms ease, transform 700ms ease;
}

.hero-title-link:hover,
.hero-title-link:focus {
  color: #030302;
  outline: 0;
  text-shadow: 0 0 28px rgba(255, 245, 202, 0.56), 0 16px 54px rgba(32, 22, 8, 0.28);
  transform: translateY(-2px);
}

.home-choices {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 220px));
  justify-content: center;
  gap: clamp(28px, 4vw, 40px);
  width: min(480px, calc(100% - 40px));
  margin-top: clamp(8px, 1.8vh, 18px);
  transform: translateY(clamp(-26px, -2.5vh, -12px));
}

.home-choice {
  position: relative;
  min-height: 48px;
  color: rgba(25, 25, 25, 0.72);
  font-family: var(--ui-font);
  transition: opacity 220ms ease, transform 260ms ease;
}

.home-choice:hover,
.home-choice.is-open {
  z-index: 4;
}

.home-choice::after {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 18px;
  content: "";
}

.home-choices:has(.home-choice:hover) .home-choice:not(:hover) {
  opacity: 0.22;
  pointer-events: none;
  transform: translateY(18px);
}

.home-choice-trigger {
  width: 100%;
  min-height: 44px;
  padding: 0 0 13px;
  border: 0;
  background: transparent;
  appearance: none;
  color: inherit;
  font-family: var(--display-font);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: none;
  cursor: pointer;
  touch-action: manipulation;
}

.home-choice-trigger:focus-visible {
  outline: 1px solid var(--strong-line);
  outline-offset: 4px;
}

.home-choice:hover .home-choice-trigger,
.home-choice.is-open .home-choice-trigger {
  color: var(--ink);
}

.home-choice-list {
  position: absolute;
  left: 50%;
  right: auto;
  top: 100%;
  width: min(300px, calc(100vw - 52px));
  display: block;
  max-height: min(34vh, 320px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px 18px 18px;
  border: 0;
  border-radius: 18px;
  background: radial-gradient(ellipse at 50% 46%, rgba(255, 254, 248, 0.88) 0%, rgba(252, 250, 242, 0.66) 54%, rgba(252, 250, 242, 0.22) 78%, transparent 100%);
  -webkit-backdrop-filter: blur(12px) saturate(0.92);
  backdrop-filter: blur(12px) saturate(0.92);
  box-shadow: 0 24px 90px rgba(40, 30, 18, 0.04);
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(25, 25, 25, 0.32) transparent;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.home-choice-list::-webkit-scrollbar {
  width: 6px;
}

.home-choice-list::-webkit-scrollbar-track {
  background: transparent;
}

.home-choice-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(25, 25, 25, 0.24);
}

.home-choice:hover .home-choice-list,
.home-choice.is-open .home-choice-list {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.home-choice-category .home-choice-list {
  width: min(320px, calc(100vw - 52px));
  max-height: min(34vh, 320px);
  overflow-x: hidden;
  overflow-y: auto;
  transform: translate(-50%, 8px);
}

.home-choice-category:hover .home-choice-list,
.home-choice-category.is-open .home-choice-list {
  transform: translate(-50%, 0);
}

.home-choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(25, 25, 25, 0.18);
  text-decoration: none;
}

.home-choice-row span {
  color: var(--ink);
  font-family: var(--text-font);
  font-size: 15px;
}

.home-choice-row small {
  grid-column: 1;
  color: var(--muted);
  font-size: 11px;
}

.home-choice-row strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--muted);
  font-size: 11px;
}

.home-choice-row:hover,
.home-choice-row:focus {
  outline: 0;
  border-bottom-color: rgba(25, 25, 25, 0.48);
}

.page-header,
.archive-shell,
.detail-page {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  box-sizing: border-box;
}

.page-header {
  padding: 42px 0 18px;
}

.site-nav {
  display: flex;
  gap: 18px;
  margin-bottom: 68px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  outline: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-header h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(3.6rem, 9vw, 7.2rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.9;
}

.lede {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: baseline;
  margin-top: 28px;
  color: var(--muted);
  font-family: var(--ui-font);
}

.summary strong {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 2rem;
  font-weight: 400;
}

.archive-shell {
  padding: 48px 0 84px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(34px, 8vw, 96px);
}

.filter-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.filter-heading p {
  margin: 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 1.65rem;
  font-weight: 400;
}

.filter-heading span {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 13px;
}

.index-list,
.filter-chips,
.article-list {
  display: grid;
}

.index-row,
.filter-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.index-row small {
  grid-column: 1;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
}

.index-row strong,
.filter-chip strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
}

.index-row:hover,
.index-row:focus,
.filter-chip:hover,
.filter-chip:focus,
.filter-chip.is-active {
  color: var(--ink);
  outline: 0;
  border-bottom-color: var(--strong-line);
}

.floating-reader-tools {
  position: fixed;
  top: 50%;
  left: clamp(14px, 2vw, 28px);
  z-index: 20;
  display: grid;
  gap: 18px;
  justify-items: center;
  transform: translateY(-50%);
}

.scroll-progress-dots {
  display: grid;
  gap: 10px;
  padding: 8px 4px;
}

.scroll-dot,
.refine-trigger-dot span {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border: 1px solid rgba(25, 25, 25, 0.42);
  border-radius: 50%;
  background: transparent;
  appearance: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.scroll-dot {
  cursor: pointer;
}

.scroll-dot:hover,
.scroll-dot:focus {
  border-color: rgba(25, 25, 25, 0.72);
  transform: scale(1.18);
}

.scroll-dot.is-active {
  border-color: rgba(25, 25, 25, 0.92);
  background: rgba(25, 25, 25, 0.82);
  transform: scale(1.18);
}

.scroll-dot:focus {
  outline: 0;
}

.floating-page-switch,
.floating-refine {
  position: relative;
}

.floating-page-switch::after,
.floating-refine::after {
  position: absolute;
  top: -18px;
  left: 12px;
  width: 26px;
  height: 56px;
  content: "";
}

.refine-trigger-dot {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.refine-trigger-dot:hover span,
.refine-trigger-dot:focus span,
.floating-page-switch.is-open .refine-trigger-dot span,
.floating-refine.is-open .refine-trigger-dot span {
  border-color: rgba(25, 25, 25, 0.92);
  background: rgba(25, 25, 25, 0.82);
  transform: scale(1.18);
}

.refine-trigger-dot:focus {
  outline: 0;
}

.floating-refine-panel {
  position: absolute;
  top: 50%;
  left: 20px;
  width: min(360px, calc(100vw - 86px));
  max-height: 76vh;
  overflow: auto;
  padding: 22px;
  border: 0;
  border-radius: 18px;
  background: radial-gradient(ellipse at 38% 24%, rgba(255, 254, 248, 0.94) 0%, rgba(252, 250, 242, 0.8) 54%, rgba(252, 250, 242, 0.34) 82%, transparent 100%);
  -webkit-backdrop-filter: blur(12px) saturate(0.92);
  backdrop-filter: blur(12px) saturate(0.92);
  box-shadow: 0 24px 86px rgba(40, 30, 18, 0.05), 0 0 80px rgba(255, 254, 248, 0.36);
  scrollbar-width: none;
  opacity: 0;
  pointer-events: none;
  transform: translate(-8px, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.floating-refine-panel::-webkit-scrollbar {
  display: none;
}

.floating-page-switch .page-switch-panel {
  top: 0;
  transform: translate(-8px, 0);
}

.refine-trigger-dot:hover + .floating-refine-panel,
.floating-refine-panel:hover,
.floating-refine:hover .floating-refine-panel,
.floating-refine:focus-within .floating-refine-panel,
.floating-refine.is-open .floating-refine-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.floating-page-switch:hover .page-switch-panel,
.floating-page-switch:focus-within .page-switch-panel,
.floating-page-switch.is-open .page-switch-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, 0);
}

.filter-chips {
  grid-template-columns: 1fr;
  gap: 0;
}

.filter-chip {
  font-family: var(--text-font);
}

.filter-chip.is-active span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.search-panel {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
}

.search-panel label {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-panel input {
  width: 100%;
  min-height: 54px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.25rem;
}

.search-panel input:focus {
  border-color: rgba(25, 25, 25, 0.72);
  outline: 0;
}

.empty-state,
.pending-note {
  margin: 0;
  color: var(--muted);
}

.article-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 180ms ease;
}

.article-card.is-read {
  opacity: 0.58;
}

.article-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
}

.article-kicker span + span::before {
  margin-right: 8px;
  color: var(--line);
  content: "/";
}

.article-main h3 {
  max-width: 880px;
  margin: 0 0 9px;
  font-family: var(--display-font);
  font-size: 2.05rem;
  font-weight: 400;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.article-main h3 a {
  text-decoration: none;
}

.article-main h3 a:hover,
.article-main h3 a:focus {
  outline: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.article-main p {
  max-width: 760px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.article-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: baseline;
  margin-top: 12px;
}

.tags,
.article-actions,
.detail-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.tag {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
}

.tag::before {
  content: "#";
}

.state-label,
.state-button,
.detail-link,
.personal-note-label,
.personal-note-status {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
}

.state-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.state-button:hover,
.state-button:focus,
.state-button.is-active {
  color: var(--ink);
  outline: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.detail-link {
  display: inline-flex;
  margin-top: 12px;
  font-weight: 600;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.detail-topbar {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 52px;
  border-bottom: 1px solid var(--line);
}

.detail-heading h1 {
  max-width: 1000px;
  margin: 28px 0 0;
  font-family: var(--display-font);
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 400;
  line-height: 0.92;
  overflow-wrap: anywhere;
}

.detail-home-link {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 13px;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
}

.detail-meta-chips {
  margin-top: 18px;
}

.detail-chip {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 12px;
}

.detail-attachment {
  max-width: 760px;
  margin-top: 28px;
}

.detail-attachment p {
  margin: 0;
  color: rgba(25, 25, 25, 0.62);
  font-size: 1.08rem;
  line-height: 1.72;
}

.detail-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: clamp(28px, 7vw, 78px);
  align-items: start;
  padding: 54px 0 84px;
}

.detail-card {
  display: grid;
  gap: 32px;
}

.detail-section {
  display: grid;
  gap: 12px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-section h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 1.85rem;
  font-weight: 400;
}

.detail-section p,
.detail-section li {
  color: rgba(25, 25, 25, 0.64);
}

.detail-section ul {
  max-width: 760px;
  margin: 0;
  padding-left: 1.1em;
  font-size: 1.08rem;
  line-height: 1.72;
}

.detail-summary {
  max-width: 760px;
  margin: 0;
  color: rgba(25, 25, 25, 0.64);
  font-size: 1.2rem;
  line-height: 1.72;
}

.personal-note-panel {
  display: grid;
  gap: 14px;
}

.personal-note-panel summary {
  color: var(--ink);
  cursor: pointer;
  font-family: var(--display-font);
  font-size: 1.85rem;
  font-weight: 400;
  list-style: none;
}

.personal-note-panel summary::-webkit-details-marker {
  display: none;
}

.personal-note-panel[open] {
  gap: 12px;
}

.personal-note-input {
  width: 100%;
  min-height: 96px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: rgba(25, 25, 25, 0.68);
  font: inherit;
  resize: vertical;
}

.personal-note-input:focus {
  border-color: rgba(25, 25, 25, 0.72);
  outline: 0;
}

.personal-note-status:empty {
  display: none;
}

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

.detail-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 26px;
}

.sidebar-panel {
  display: grid;
  gap: 13px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.sidebar-label {
  margin: 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.original-link {
  justify-self: start;
  color: var(--ink);
  font-family: var(--ui-font);
  font-size: 13px;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (max-width: 1100px) {
  .listing-page .page-header,
  .listing-page .archive-shell {
    padding-left: clamp(34px, 4vw, 44px);
  }
}

@media (max-width: 920px) {
  .index-grid,
  .detail-page {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .home-choice-list {
    position: absolute;
    max-height: 34vh;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    padding-top: 18px;
  }

  .home-choice-category .home-choice-list {
    transform: translate(-50%, 8px);
  }

  .home-choice-category:hover .home-choice-list,
  .home-choice-category.is-open .home-choice-list {
    transform: translate(-50%, 0);
  }

  .floating-reader-tools {
    top: auto;
    bottom: 16px;
    left: 14px;
    transform: none;
  }

  .floating-refine-panel {
    top: auto;
    bottom: 0;
    left: 20px;
    max-height: 58vh;
    transform: translateX(-8px);
  }

  .floating-page-switch .page-switch-panel {
    top: auto;
    bottom: 0;
    transform: translateX(-8px);
  }

  .refine-trigger-dot:hover + .floating-refine-panel,
  .floating-refine-panel:hover,
  .floating-page-switch:hover .page-switch-panel,
  .floating-page-switch:focus-within .page-switch-panel,
  .floating-page-switch.is-open .page-switch-panel,
  .floating-refine:hover .floating-refine-panel,
  .floating-refine:focus-within .floating-refine-panel,
  .floating-refine.is-open .floating-refine-panel {
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  .page-header,
  .archive-shell,
  .detail-page,
  .detail-topbar {
    width: min(100% - 30px, 1040px);
  }

  .site-nav {
    margin-bottom: 46px;
  }

  .home-choices {
    grid-template-columns: 1fr;
    gap: 14px;
    width: min(420px, calc(100% - 34px));
    margin-top: 14px;
    transform: translateY(-24px);
  }

  .home-choice-list,
  .home-choice-category .home-choice-list {
    left: 0;
    right: 0;
    width: auto;
    max-height: 34vh;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateY(8px);
  }

  .home-choice:hover .home-choice-list,
  .home-choice-category:hover .home-choice-list,
  .home-choice.is-open .home-choice-list,
  .home-choice-category.is-open .home-choice-list {
    transform: translateY(0);
  }

  .listing-page .page-header,
  .listing-page .archive-shell {
    padding-left: 0;
  }

  .listing-page .scroll-progress-dots {
    display: none;
  }

  .archive-shell {
    padding-top: 36px;
  }

  .article-main h3 {
    font-size: 1.55rem;
  }

  .article-card-footer {
    display: grid;
  }
}

@media (hover: none), (pointer: coarse) {
  .home-hero {
    overflow: visible;
    align-content: safe center;
    padding: 36px 0 56px;
  }

  .home-choices {
    align-items: start;
  }

  .home-choice::after {
    display: none;
  }

  .home-choices:has(.home-choice:hover) .home-choice:not(:hover) {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .home-choice-list,
  .home-choice-category .home-choice-list {
    position: static;
    display: none;
    width: 100%;
    max-height: min(42vh, 360px);
    margin-top: 4px;
    padding-top: 16px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .home-choice.is-open .home-choice-list,
  .home-choice-category.is-open .home-choice-list {
    display: block;
    transform: none;
  }
}
