:root {
  color-scheme: light;
  --paper: #ffffff;
  --soft: #f3f5f4;
  --ink: #171a18;
  --muted: #626963;
  --forest: #203f33;
  --deep: #17231e;
  --gold: #ad8b4a;
  --gold-pale: #d5ba82;
  --red: #8b4338;
  --rule: #d9ddd9;
  --width: 1160px;
  --gutter: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.notes-header,
.notes-shell,
.article-shell,
.notes-footer {
  width: min(var(--width), calc(100% - var(--gutter)));
  margin: 0 auto;
}

.notes-header {
  position: relative;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}

.notes-wordmark {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.notes-wordmark span {
  color: var(--forest);
}

.notes-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.notes-nav a:hover,
.notes-nav a:focus-visible {
  color: var(--forest);
  outline: none;
}

.notes-nav [aria-current="page"] {
  color: var(--ink);
}

.notes-menu-toggle {
  display: none;
}

.notes-kicker,
.article-kicker,
.entry-meta,
.article-meta,
.source-label {
  margin: 0;
  color: var(--gold);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.9rem;
  font-style: italic;
}

.notes-hero {
  padding: 84px 0 72px;
  border-bottom: 1px solid var(--rule);
}

.notes-hero h1,
.article-hero h1,
.entry h2 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 500;
}

.notes-hero h1 {
  max-width: 760px;
  margin-top: 14px;
  font-size: 4.2rem;
  line-height: 1;
}

.notes-intro {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.6;
}

.entries {
  padding: 0 0 90px;
}

.entry {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(300px, 1.28fr);
  gap: 72px;
  padding: 44px 0 48px;
  border-bottom: 1px solid var(--ink);
}

.entry h2 {
  margin-top: 12px;
  font-size: 2.6rem;
  line-height: 1.08;
}

.entry-summary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.entry-link {
  width: fit-content;
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 4px;
}

.entry-link:hover,
.entry-link:focus-visible {
  color: var(--red);
  outline: none;
}

.article-hero {
  padding: 76px 0 68px;
  border-bottom: 1px solid var(--rule);
}

.article-hero-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1.66fr);
  gap: 64px;
  align-items: start;
}

.article-meta {
  color: var(--muted);
  line-height: 1.65;
}

.article-meta span {
  display: block;
}

.article-hero h1 {
  max-width: 920px;
  font-size: 4.35rem;
  line-height: 1.02;
}

.article-dek {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--muted);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.6;
}

.article-body {
  width: min(760px, calc(100% - var(--gutter)));
  margin: 0 auto;
  padding: 70px 0 92px;
}

.article-body p,
.article-body li {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.82;
}

.article-body p {
  margin: 0;
}

.article-body p + p,
.article-body ul + p,
.article-body p + ul {
  margin-top: 26px;
}

.article-body .article-lead {
  color: var(--deep);
  font-size: 1.32rem;
  line-height: 1.72;
}

.working-paper-body {
  width: min(1040px, calc(100% - var(--gutter)));
}

.working-paper-body > .article-lead {
  width: min(760px, 100%);
  margin-inline: auto;
}

.periodical-study {
  margin: 72px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: end;
}

.periodical-study figure {
  margin: 0;
}

.periodical-study img {
  width: 100%;
  height: 430px;
  display: block;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--rule);
  filter: saturate(0.78) contrast(1.04);
}

.periodical-study figure:nth-child(2) img {
  height: 390px;
}

.periodical-study figure:nth-child(3) img {
  height: 410px;
}

.periodical-study figcaption {
  padding-top: 12px;
  display: grid;
  gap: 3px;
  font-size: 0.68rem;
  line-height: 1.45;
}

.periodical-study figcaption strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
}

.periodical-study figcaption span {
  color: var(--muted);
}

.article-body .working-paper-note {
  width: min(760px, 100%);
  margin: 68px auto 0;
  padding-top: 24px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .periodical-study {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .periodical-study img,
  .periodical-study figure:nth-child(2) img,
  .periodical-study figure:nth-child(3) img {
    height: auto;
    max-height: 560px;
  }
}

.article-body a {
  color: var(--forest);
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.article-principle {
  margin: 42px 0;
  padding: 30px 34px;
  color: var(--paper);
  background: var(--deep);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.35;
}

.direction-list {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.direction-list li {
  position: relative;
  padding: 18px 0 18px 34px;
  border-bottom: 1px solid var(--rule);
}

.direction-list li::before {
  content: "";
  position: absolute;
  top: 29px;
  left: 2px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.article-close {
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px solid var(--ink);
  color: var(--forest);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.55;
}

.article-sources {
  margin-top: 58px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.article-sources ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.article-sources li {
  color: var(--muted);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  line-height: 1.65;
}

.article-sources li + li {
  margin-top: 8px;
}

.notes-footer {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
}

footer {
  border-top: 3px solid var(--gold);
  background: var(--deep);
}

.notes-footer a {
  color: var(--paper);
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  :root {
    --gutter: 36px;
  }

  .notes-header {
    min-height: 62px;
  }

  .notes-nav {
    display: none;
  }

  .notes-header.menu-open .notes-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: -18px;
    left: -18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 18px 16px;
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
  }

  .notes-nav a,
  .notes-nav span {
    display: flex;
    min-height: 43px;
    align-items: center;
    border-bottom: 1px solid var(--rule);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1rem;
    font-weight: 500;
  }

  .notes-nav > :last-child {
    border-bottom: 0;
  }

  .notes-menu-toggle {
    display: inline-grid;
    width: 36px;
    height: 34px;
    padding: 0;
    place-content: center;
    gap: 6px;
    color: var(--ink);
    border: 1px solid var(--rule);
    background: transparent;
    cursor: pointer;
  }

  .notes-menu-toggle span {
    display: block;
    width: 17px;
    height: 1px;
    background: currentColor;
    transition: transform 160ms ease;
  }

  .notes-header.menu-open .notes-menu-toggle span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .notes-header.menu-open .notes-menu-toggle span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .notes-hero {
    padding: 56px 0 52px;
  }

  .notes-hero h1 {
    font-size: 3rem;
  }

  .notes-intro {
    font-size: 1.15rem;
  }

  .entry,
  .article-hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .entry h2 {
    font-size: 2.25rem;
  }

  .article-hero {
    padding: 52px 0 50px;
  }

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

  .article-dek {
    font-size: 1.18rem;
  }

  .article-body {
    padding: 52px 0 68px;
  }

  .article-body p,
  .article-body li {
    font-size: 1.06rem;
  }

  .article-body .article-lead {
    font-size: 1.18rem;
  }

  .article-principle {
    margin: 34px 0;
    padding: 24px;
    font-size: 1.45rem;
  }

  .notes-footer {
    padding: 26px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 360px) {
  :root {
    --gutter: 28px;
  }

  .notes-hero h1 {
    font-size: 2.65rem;
  }

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

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