:root {
  --ink: #191815;
  --paper: #f3efe5;
  --paper-deep: #e9e2d3;
  --accent: #e84f2a;
  --accent-dark: #b73519;
  --muted: #706c63;
  --line: rgba(25, 24, 21, 0.19);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.68), transparent 22rem),
    radial-gradient(circle at 90% 82%, rgba(216, 197, 164, 0.28), transparent 28rem),
    var(--paper);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.2;
  content: "";
  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='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

::selection {
  color: #fff;
  background: var(--accent);
}

.site-frame {
  width: min(100% - 48px, 1440px);
  margin: 0 auto;
}

.masthead {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
}

a.brand:hover .brand-name {
  color: var(--accent-dark);
}

.brand-mark {
  display: grid;
  width: 24px;
  gap: 4px;
}

.brand-mark i {
  display: block;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
}

.brand-mark i:nth-child(2) {
  width: 16px;
}

.brand-mark i:nth-child(3) {
  width: 21px;
}

.brand-name {
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.brand-name em {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: lowercase;
}

.masthead-note {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  content: "";
  background: currentColor;
}

/* Home */

.home-frame {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
}

.home-main {
  display: grid;
  padding: clamp(58px, 9vh, 126px) 0 clamp(68px, 10vh, 132px);
  align-content: center;
}

.article-card {
  position: relative;
  display: grid;
  padding: clamp(28px, 4vw, 54px) 0 clamp(30px, 4vw, 58px);
  grid-template-columns: 72px minmax(0, 1fr) 64px;
  gap: 22px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  isolation: isolate;
}

.article-card::before {
  position: absolute;
  inset: 0 -24px;
  z-index: -1;
  content: "";
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.article-card:hover,
.article-card:focus-visible {
  color: var(--paper);
  outline: none;
}

.article-card:hover::before,
.article-card:focus-visible::before {
  transform: scaleY(1);
}

.article-number {
  padding-top: 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.article-card-copy {
  display: grid;
  gap: 13px;
}

.article-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.article-card:hover .article-label,
.article-card:focus-visible .article-label {
  color: #bdb6aa;
}

.article-card h1 {
  margin: 0;
  max-width: 1040px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.7vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.article-summary {
  max-width: 74ch;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(0.98rem, 1.5vw, 1.18rem);
  font-style: italic;
  line-height: 1.48;
  transition: color 180ms ease;
}

.article-card:hover .article-summary,
.article-card:focus-visible .article-summary {
  color: #d6d0c4;
}

.article-arrow {
  align-self: center;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 3.2rem;
  line-height: 1;
  transition: transform 220ms ease;
}

.article-card:hover .article-arrow,
.article-card:focus-visible .article-arrow {
  transform: translate(6px, -6px);
}

.home-footer,
.article-footer {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Article */

.reading-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  height: 3px;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.article-hero {
  padding: clamp(76px, 12vw, 174px) 0 clamp(60px, 8vw, 112px);
}

.article-hero h1 {
  max-width: 1070px;
  margin: 34px 0 32px;
  font-family: var(--serif);
  font-size: clamp(3.35rem, 8.2vw, 8.4rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.89;
}

.article-deck {
  max-width: 760px;
  margin: 0 0 0 auto;
  padding-left: 32px;
  border-left: 2px solid var(--accent);
  color: #4f4b44;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.72rem);
  font-style: italic;
  line-height: 1.5;
}

.hero-rule {
  display: flex;
  margin-top: clamp(66px, 10vw, 130px);
  align-items: center;
  gap: 18px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.hero-rule::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--ink);
}

.article-layout {
  display: grid;
  padding-bottom: clamp(80px, 12vw, 168px);
  grid-template-columns: minmax(190px, 250px) minmax(0, 780px) minmax(0, 1fr);
  column-gap: clamp(48px, 7vw, 108px);
}

.contents {
  position: sticky;
  top: 28px;
  align-self: start;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.contents > p {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contents ol,
.mobile-contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contents li + li {
  margin-top: 10px;
}

.contents a {
  display: grid;
  grid-template-columns: 27px 1fr;
  color: #79746a;
  font-size: 0.71rem;
  line-height: 1.32;
  text-decoration: none;
  transition: color 150ms ease;
}

.contents a span {
  color: #aaa398;
  font-variant-numeric: tabular-nums;
}

.contents a:hover,
.contents a.is-active {
  color: var(--accent-dark);
}

.contents a.is-active span {
  color: var(--accent);
}

.mobile-contents {
  display: none;
}

.prose {
  min-width: 0;
  counter-reset: sections;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.35vw, 1.23rem);
  line-height: 1.74;
}

.prose > p:first-child {
  margin-top: 0;
  font-size: clamp(1.32rem, 2vw, 1.62rem);
  line-height: 1.58;
}

.prose p {
  margin: 0 0 1.35em;
}

.prose h2,
.prose h3 {
  scroll-margin-top: 34px;
  text-wrap: balance;
}

.prose h2 {
  margin: 4.4em 0 1.35em;
  counter-increment: sections;
  font-size: clamp(2.2rem, 4vw, 3.75rem);
  font-weight: 400;
  letter-spacing: -0.048em;
  line-height: 1.02;
}

.prose h2:first-of-type {
  margin-top: 2.1em;
}

.prose h2::before {
  display: block;
  margin-bottom: 19px;
  color: var(--accent);
  content: counter(sections, decimal-leading-zero);
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.prose h3 {
  margin: 2.9em 0 1em;
  font-size: clamp(1.42rem, 2.3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.prose strong {
  font-weight: 700;
}

.prose em {
  text-decoration-color: rgba(232, 79, 42, 0.55);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.prose a {
  color: var(--accent-dark);
  text-decoration-color: rgba(183, 53, 25, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

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

.prose blockquote {
  position: relative;
  margin: 2.6em 0;
  padding: 1.3em 1.35em 1.35em 2.05em;
  border: 0;
  color: #292722;
  background: var(--paper-deep);
  font-size: clamp(1.3rem, 2.2vw, 1.72rem);
  font-style: italic;
  line-height: 1.47;
}

.prose blockquote::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  content: "";
  background: var(--accent);
}

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

.prose ul,
.prose ol {
  margin: 0 0 1.6em;
  padding-left: 1.4em;
}

.prose li {
  padding-left: 0.32em;
}

.prose li + li {
  margin-top: 0.55em;
}

.prose li::marker {
  color: var(--accent-dark);
  font-family: var(--sans);
  font-size: 0.84em;
  font-weight: 700;
}

.prose hr {
  width: 92px;
  height: 2px;
  margin: 4em 0;
  border: 0;
  background: var(--accent);
}

.prose table {
  display: block;
  width: 100%;
  margin: 2.4em 0 3em;
  overflow-x: auto;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  min-width: 150px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--paper);
  background: var(--ink);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose tbody tr:hover {
  background: rgba(255, 255, 255, 0.3);
}

.article-footer {
  grid-column: 1 / -1;
}

.article-footer a {
  color: var(--ink);
  text-decoration: none;
}

.article-footer a:hover {
  color: var(--accent-dark);
}

@media (max-width: 1040px) {
  .article-layout {
    grid-template-columns: minmax(165px, 210px) minmax(0, 1fr);
    column-gap: 48px;
  }
}

@media (max-width: 760px) {
  .site-frame {
    width: min(100% - 32px, 1440px);
  }

  .masthead {
    min-height: 78px;
  }

  .masthead-note {
    display: none;
  }

  .article-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 13px;
  }

  .article-arrow {
    display: none;
  }

  .article-card::before {
    right: -16px;
    left: -16px;
  }

  .article-card h1 {
    font-size: clamp(2rem, 10vw, 3.1rem);
  }

  .article-number {
    padding-top: 4px;
  }

  .home-footer,
  .article-footer {
    min-height: 72px;
  }

  .article-hero h1 {
    font-size: clamp(3.1rem, 15vw, 5.6rem);
  }

  .article-deck {
    padding-left: 20px;
  }

  .article-layout {
    display: block;
  }

  .contents {
    display: none;
  }

  .mobile-contents {
    display: block;
    margin: 0 0 60px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-family: var(--sans);
  }

  .mobile-contents summary {
    color: var(--accent-dark);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  .mobile-contents ol {
    display: grid;
    margin-top: 24px;
    gap: 12px;
  }

  .mobile-contents a {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
    text-decoration: none;
  }

  .mobile-contents a span {
    display: inline-block;
    width: 31px;
    color: #aaa398;
  }

  .prose {
    font-size: 1.07rem;
    line-height: 1.7;
  }

  .prose h2 {
    margin-top: 3.7em;
  }

  .prose blockquote {
    margin-right: -8px;
    margin-left: -8px;
    padding: 1.2em 1em 1.25em 1.5em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  body::before,
  .reading-progress,
  .contents,
  .mobile-contents,
  .article-footer,
  .hero-rule,
  .masthead-note {
    display: none !important;
  }

  .site-frame {
    width: 100%;
  }

  .article-layout {
    display: block;
  }

  .article-hero {
    padding: 48px 0;
  }

  .prose {
    max-width: none;
    font-size: 11pt;
  }
}
