:root {
  color-scheme: light;
  --paper: #f5ecda;
  --paper-deep: #e7d2a8;
  --ink: #111820;
  --muted: rgba(17, 24, 32, 0.68);
  --line: rgba(17, 24, 32, 0.16);
  --accent: #f05d4f;
  --green: #295c50;
  --gold: #bc8d25;
  --blue: #2e4f7b;
  --cream: rgba(255, 252, 242, 0.68);
  --shadow: 0 28px 80px rgba(17, 24, 32, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 32, 0.045) 1px, transparent 1px) 0 0 /
      72px 72px,
    linear-gradient(180deg, #f8f0df 0%, #ead9b9 48%, #f6efe2 100%);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  display: block;
  height: 14px;
  background: linear-gradient(
    90deg,
    var(--accent) 0 19%,
    var(--green) 19% 44%,
    var(--gold) 44% 62%,
    var(--blue) 62% 100%
  );
}

a {
  color: inherit;
}

.site-nav,
.archive-hero,
.archive-grid,
.article-shell,
.site-footer {
  width: min(100% - 2rem, 1240px);
  margin: 0 auto;
}

.site-nav {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 1.15rem 0;
}

.site-nav a,
.button {
  border: 1px solid rgba(17, 24, 32, 0.18);
  border-radius: 999px;
  padding: 0.55rem 0.82rem;
  text-decoration: none;
  background: rgba(255, 252, 242, 0.58);
  font-size: 0.9rem;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.site-nav a:hover,
.button:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 93, 79, 0.6);
  background: rgba(255, 252, 242, 0.86);
}

.archive-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
  padding: clamp(3.5rem, 10vw, 8.5rem) 0 clamp(2.5rem, 7vw, 5rem);
}

.kicker,
.meta,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

.archive-hero h1,
.article-hero h1 {
  margin: 0.65rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9.8rem;
  line-height: 0.78;
  max-width: 8ch;
  letter-spacing: 0;
}

.archive-hero .lede,
.article-hero .lede {
  max-width: 700px;
  margin: 0;
  color: rgba(17, 24, 32, 0.72);
  font-size: 1.34rem;
  line-height: 1.44;
}

.manifesto-note {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: end;
  border: 1px solid var(--line);
  border-top: 8px solid var(--accent);
  border-radius: 8px;
  padding: 1.2rem;
  background: rgba(255, 252, 242, 0.64);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.manifesto-note::before {
  content: "BT";
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6.5rem;
  line-height: 0.8;
  color: rgba(17, 24, 32, 0.08);
}

.manifesto-note p {
  position: relative;
  margin: 0;
  color: rgba(17, 24, 32, 0.78);
  font-size: 1.02rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.2rem);
  padding: 0 0 clamp(4rem, 10vw, 7rem);
}

.essay-card {
  position: relative;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.05rem, 2vw, 1.45rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 18px 54px rgba(17, 24, 32, 0.1);
  overflow: hidden;
  transform-origin: center bottom;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.essay-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 252, 242, 0.72), transparent 42%),
    repeating-linear-gradient(
      0deg,
      rgba(17, 24, 32, 0.045) 0,
      rgba(17, 24, 32, 0.045) 1px,
      transparent 1px,
      transparent 18px
    );
  pointer-events: none;
}

.essay-card > * {
  position: relative;
}

.essay-card:nth-child(1) {
  transform: rotate(-1.2deg);
}

.essay-card:nth-child(2) {
  transform: translateY(1.4rem) rotate(0.7deg);
}

.essay-card:nth-child(3) {
  transform: rotate(-0.4deg);
}

.essay-card:hover {
  transform: translateY(-6px) rotate(0deg);
  border-color: rgba(240, 93, 79, 0.58);
  box-shadow: 0 30px 90px rgba(17, 24, 32, 0.18);
}

.essay-card.is-red {
  background: #fff0e9;
}

.essay-card.is-green {
  background: #e5efe4;
}

.essay-card.is-blue {
  background: #e7edf8;
}

.card-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 7.6rem;
  line-height: 0.75;
  color: rgba(17, 24, 32, 0.16);
}

.essay-card h2 {
  max-width: 10ch;
  margin: 0.9rem 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.35rem;
  line-height: 0.86;
  letter-spacing: 0;
}

.essay-card p {
  margin: 0;
  color: rgba(17, 24, 32, 0.7);
  font-size: 1rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.tag-row span {
  border: 1px solid rgba(17, 24, 32, 0.16);
  border-radius: 999px;
  padding: 0.32rem 0.55rem;
  color: rgba(17, 24, 32, 0.72);
  background: rgba(255, 252, 242, 0.4);
  font-size: 0.76rem;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
  padding: 3rem 0 6rem;
}

.article-hero {
  position: sticky;
  top: 1rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.1rem;
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  border-radius: 8px;
  padding: 1.35rem 1.45rem 1.55rem;
  background: #fff0e9;
  box-shadow: 0 18px 54px rgba(17, 24, 32, 0.11);
  overflow: hidden;
}

.article-hero::before {
  content: attr(data-issue);
  position: absolute;
  right: -0.15em;
  bottom: -0.18em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9rem;
  line-height: 0.72;
  color: rgba(17, 24, 32, 0.11);
  pointer-events: none;
}

.article-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(17, 24, 32, 0.05) 0,
    rgba(17, 24, 32, 0.05) 1px,
    transparent 1px,
    transparent 19px
  );
  pointer-events: none;
}

.article-hero > * {
  position: relative;
  z-index: 1;
}

.issue-02 .article-hero {
  background: #e5efe4;
  border-top-color: var(--green);
}

.issue-03 .article-hero {
  background: #e7edf8;
  border-top-color: var(--blue);
}

.article-hero h1 {
  max-width: 9ch;
  margin: 0;
  font-size: 3.75rem;
  line-height: 0.9;
  letter-spacing: 0;
}

.article-hero .meta {
  margin-top: 0;
}

.article-hero .lede {
  max-width: 34rem;
  font-size: 1.03rem;
  line-height: 1.45;
}

.article-body {
  position: relative;
  padding: 2.2rem 3rem 3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 242, 0.78);
  box-shadow: 0 22px 70px rgba(17, 24, 32, 0.1);
}

.article-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(1.25rem, 3vw, 3rem);
  right: clamp(1.25rem, 3vw, 3rem);
  height: 8px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--gold),
    var(--green),
    var(--blue)
  );
}

.article-body h2 {
  margin: 2.6rem 0 0.7rem;
  color: var(--accent);
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: 0;
}

.issue-02 .article-body h2 {
  color: var(--green);
}

.issue-03 .article-body h2 {
  color: var(--blue);
}

.article-body p {
  max-width: 64ch;
  margin: 0.95rem auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.13rem;
  line-height: 1.68;
}

.article-body > p:first-of-type {
  max-width: 48ch;
  margin-top: 1.2rem;
  margin-bottom: 1.25rem;
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1.28;
  letter-spacing: 0;
}

.article-body > p:first-of-type::first-letter {
  float: left;
  margin: 0.05em 0.12em 0 0;
  font-size: 4.1em;
  line-height: 0.72;
  color: var(--accent);
}

.issue-02 .article-body > p:first-of-type::first-letter {
  color: var(--green);
}

.issue-03 .article-body > p:first-of-type::first-letter {
  color: var(--blue);
}

.article-body hr {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 1.55rem auto;
  max-width: 66ch;
}

.button {
  display: inline-flex;
  width: fit-content;
  margin-top: 1.3rem;
  background: var(--ink);
  color: var(--paper);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 940px) {
  .archive-hero,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }

  .essay-card,
  .essay-card:nth-child(1),
  .essay-card:nth-child(2),
  .essay-card:nth-child(3) {
    min-height: 300px;
    transform: none;
  }

  .article-hero {
    position: relative;
    min-height: 0;
  }

  .archive-hero h1 {
    font-size: 6.4rem;
  }

  .article-hero h1 {
    font-size: 3.4rem;
  }

  .archive-hero .lede,
  .article-hero .lede {
    font-size: 1.16rem;
  }

  .essay-card h2 {
    font-size: 2.75rem;
  }

  .article-hero::before {
    font-size: 7rem;
  }
}

@media (max-width: 560px) {
  .site-nav,
  .archive-hero,
  .archive-grid,
  .article-shell,
  .site-footer {
    width: min(100% - 1rem, 1240px);
  }

  .archive-hero h1,
  .article-hero h1 {
    font-size: 4rem;
  }

  .article-body {
    padding: 1rem;
  }

  .article-body::before {
    left: 1rem;
    right: 1rem;
  }
}
