@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/space-grotesk.woff2") format("woff2");
  font-display: swap;
  font-weight: 300 700;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/instrument-serif-italic.woff2") format("woff2");
  font-display: swap;
  font-style: italic;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --paper: #f2efe7;
  --ink: #1d1b18;
  --muted: #625c54;
  --red: #a42b17;
  --rule: #8d8478;
  --soft-rule: #cec6b8;
  --gutter: clamp(20px, 3.7vw, 64px);
  --serif: Georgia, "Noto Serif SC", "Songti SC", "Source Han Serif SC", SimSun, serif;
  --sans: "Space Grotesk", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .24em; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 9;
  top: 1rem;
  left: 1rem;
  background: var(--paper);
  padding: .5rem 1rem;
}

.shell {
  width: min(1520px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 69px;
  border-bottom: 1px solid var(--ink);
}

.brand, .footer-brand {
  font: 700 clamp(1.75rem, 2.65vw, 2.57rem)/1 var(--serif);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -.055em;
}

.brand em {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  gap: clamp(1.1rem, 3.45vw, 3.5rem);
  align-items: center;
  font: 600 clamp(1rem, 1.46vw, 1.25rem)/1.25 var(--serif);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 45px;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover, .site-nav a[aria-current="location"] { color: var(--red); border-color: currentColor; }
.agent-link { gap: .5rem; }

.agent-signal {
  width: .54rem;
  height: .54rem;
  flex: 0 0 .54rem;
  border-radius: 50%;
  background: var(--red);
}

.hero {
  display: grid;
  width: auto;
  margin-inline: max(var(--gutter), calc((100% - 1520px) / 2)) 0;
  grid-template-columns: minmax(0, 39fr) minmax(0, 61fr);
  align-items: stretch;
  height: clamp(320px, 28vw, 500px);
  border-bottom: 1px solid var(--rule);
}

.hero-copy {
  padding: clamp(2.7rem, 5.7vw, 6.25rem) clamp(1.15rem, 2.3vw, 2.65rem) clamp(2rem, 4vw, 4.65rem) 0;
}

.hero-copy::before {
  display: block;
  width: 3.65rem;
  height: 3px;
  margin-bottom: clamp(1.65rem, 2.7vw, 2.8rem);
  background: var(--red);
  content: "";
}

.hero h1 {
  font-size: clamp(2.15rem, 4.58vw, 4.6rem);
  line-height: 1.13;
  letter-spacing: -.05em;
}

.hero h1 span { color: var(--red); }
.hero-description {
  margin-top: 1.2rem;
  max-width: 33em;
  font: 500 clamp(1rem, 1.5vw, 1.35rem)/1.62 var(--serif);
  text-wrap: pretty;
}

.hero-art {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 500px;
  align-self: stretch;
  object-fit: cover;
  object-position: center;
  background: #d28566;
}

.archive { padding-bottom: clamp(3.5rem, 8vw, 7rem); }

.filter-bar {
  display: flex;
  justify-content: space-between;
  gap: .9rem 2rem;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--rule);
}

.organization-choices {
  display: flex;
  gap: clamp(.7rem, 3.3vw, 3.25rem);
  overflow-x: auto;
  scrollbar-width: thin;
}

.organization-choices button {
  flex: 0 0 auto;
  padding: 0 .35rem;
  min-height: 3.7rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  white-space: nowrap;
  font: 600 clamp(1rem, 1.5vw, 1.35rem)/1.2 var(--serif);
}

.organization-choices button:focus-visible { outline-offset: -4px; }
.organization-choices button:first-child { padding-inline: .4rem; }
.organization-choices button:hover { color: var(--red); }
.organization-choices button[aria-pressed="true"] { color: var(--red); border-color: currentColor; }

.field-search {
  position: relative;
  width: min(100%, 20rem);
  flex: 0 1 20rem;
}

.field-search::before {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: .82rem;
  height: .82rem;
  transform: translateY(-66%);
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.field-search::after {
  position: absolute;
  left: 1.65rem;
  top: 50%;
  width: .42rem;
  height: 1.5px;
  transform: translateY(.25rem) rotate(48deg);
  background: var(--muted);
  content: "";
  pointer-events: none;
}

.field-search input {
  width: 100%;
  min-height: 42px;
  padding: .3rem .75rem .3rem 2.45rem;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: transparent;
}

.field-search input::placeholder { color: var(--muted); opacity: 1; }

.filter-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem .8rem;
  padding-block: .85rem 0;
}
.field { min-width: 0; }
.field select {
  appearance: none;
  min-width: 8rem;
  max-width: 16rem;
  min-height: 36px;
  padding: .3rem 1.8rem .3rem .55rem;
  border: 1px solid var(--soft-rule);
  border-radius: 3px;
  background: transparent;
  font: 500 .875rem/1.25 var(--sans);
}
.field { position: relative; }
.field::after {
  position: absolute;
  top: 48%;
  right: .71rem;
  width: .4rem;
  height: .4rem;
  transform: translateY(-65%) rotate(45deg);
  border: solid var(--muted);
  border-width: 0 1px 1px 0;
  content: "";
  pointer-events: none;
}

.section-heading {
  display: flex;
  gap: .6rem 1.2rem;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}

.archive-heading { margin-top: .35rem; }
.section-heading h2 {
  font-size: clamp(1.9rem, 3.03vw, 2.95rem);
  line-height: 1.15;
  letter-spacing: -.04em;
}

.section-meta, .archive-status, .section-description {
  font-size: .9rem;
  color: var(--muted);
}

.archive-status { margin-top: .6rem; min-height: 1.5em; }
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(1.6rem, 3.1vw, 3rem) clamp(1rem, 1.75vw, 1.85rem);
  margin-top: 1.15rem;
}

.archive-card {
  overflow-wrap: anywhere;
  padding-top: 1rem;
  border-top: 1px solid var(--soft-rule);
}

.archive-card-cover { padding-top: 0; border-top: 0; }
.entry-cover {
  width: 100%;
  height: auto;
  margin-bottom: .72rem;
  object-fit: cover;
  aspect-ratio: 2.12;
  background: #d9d0bc;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .78rem;
  font-size: .89rem;
  color: var(--muted);
}

.entry-organization { color: var(--red); font-weight: 650; }
.entry-meta time { white-space: nowrap; }
.entry-title { text-decoration: none; }
.entry-title:hover { text-decoration: underline; text-decoration-color: var(--red); }
.archive-card h3 {
  margin-top: .22rem;
  font-size: clamp(1.25rem, 1.92vw, 1.79rem);
  line-height: 1.32;
  letter-spacing: -.035em;
}
.entry-byline { margin-top: .5rem; color: var(--muted); font-size: .91rem; }
.entry-summary {
  margin-top: .5rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.entry-topics, .article-people {
  margin-top: .7rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .65rem;
  list-style: none;
  font-size: .86rem;
}
.entry-topics li { color: var(--muted); border-bottom: 1px solid var(--soft-rule); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: .48rem 1rem;
  border: 1px solid transparent;
  font-size: .95rem;
  text-decoration: none;
}
.button-primary { color: #fff8f0; background: var(--red); border-color: var(--red); }
.button-primary:hover { background: #782415; }
.button-quiet { margin-top: 1rem; color: var(--ink); background: transparent; border-color: var(--rule); }
.button-quiet:hover { border-color: var(--red); color: var(--red); }
.button-more { display: flex; width: max-content; max-width: 100%; margin: 2.4rem auto 0; }

.researchers, .sources {
  border-top: 1px solid var(--ink);
  padding-block: 1.65rem clamp(2.8rem, 6vw, 5.25rem);
}

.section-description { margin-top: .9rem; max-width: 68ch; }
.researcher-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.25rem;
  column-gap: clamp(1rem, 1.75vw, 1.85rem);
}
.researcher-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  justify-content: space-between;
  gap: .65rem 1rem;
  min-width: 0;
  padding: .95rem 0;
  border-bottom: 1px solid var(--soft-rule);
  overflow-wrap: anywhere;
}
.researcher-card h3 { font-size: 1.14rem; }
.researcher-meta { color: var(--muted); font-size: .88rem; }
.researcher-count { color: var(--muted); font-size: .87rem; white-space: nowrap; }
.researcher-count strong { color: var(--red); font-size: 1.1rem; }

.source-list {
  padding: 0;
  margin-top: 1.1rem;
  list-style: none;
}
.source-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, auto);
  gap: .25rem .8rem;
  align-items: baseline;
  padding-block: .7rem;
  border-bottom: 1px solid var(--soft-rule);
}
.source-name { overflow-wrap: anywhere; }
.source-meta { color: var(--muted); font-size: .88rem; text-align: right; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.05rem 1.8rem;
  align-items: baseline;
  border-top: 1px solid var(--ink);
  padding-block: 1.15rem 1.9rem;
}
.footer-brand { font-size: 1.5rem; }
.site-footer nav { display: flex; gap: .55rem 1.3rem; flex-wrap: wrap; font-size: .9rem; }

.article-dialog {
  position: fixed;
  width: min(calc(100% - 2rem), 43rem);
  max-height: min(87vh, 56rem);
  padding: clamp(1.4rem, 4.7vw, 3.5rem);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
}
.article-dialog::backdrop { background: rgb(29 27 24 / .55); }
.dialog-actions { display: flex; justify-content: end; margin: -.8rem -.6rem 0 0; }
.dialog-close {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--rule);
  font: 1.55rem/1 var(--serif);
}
.dialog-close:hover { border-color: var(--red); color: var(--red); }
#article-content { overflow-wrap: anywhere; }
#article-content h2 {
  margin-top: .55rem;
  font-size: clamp(1.6rem, 3.5vw, 2.65rem);
  line-height: 1.27;
  letter-spacing: -.035em;
}
#article-content h3 { margin-top: 1.35rem; font-size: 1.16rem; }
#article-content > p:not(.entry-meta) { margin-top: .33rem; }
.original-title, .article-people { color: var(--muted); }
.article-people li + li::before { content: "、"; margin-right: .2rem; }
.takeaways { margin-top: .45rem; padding-inline-start: 1.3rem; }
.takeaways li + li { margin-top: .4rem; }
.article-source { display: flex; align-items: baseline; gap: .35rem .85rem; flex-wrap: wrap; margin-top: 1.6rem; }

@media (min-width: 1680px) {
  .hero { margin-inline-end: max(var(--gutter), calc((100% - 1520px) / 2)); }
}

@media (max-width: 1050px) {
  .hero { grid-template-columns: minmax(0, 43fr) minmax(0, 57fr); }
}

@media (max-width: 760px) {
  .hero {
    width: min(1520px, calc(100% - 2 * var(--gutter)));
    margin-inline: auto;
    display: block;
    height: auto;
  }
  .hero-copy { padding-block: 2rem 1.7rem; }
  .hero-copy::before { width: 2.75rem; margin-bottom: 1.4rem; }
  .hero h1 { font-size: clamp(2.3rem, 8vw, 3.6rem); }
  .hero-description { margin-top: .7rem; }
  .hero-art { height: auto; aspect-ratio: 2.15; }
  .filter-bar { flex-wrap: wrap; padding-bottom: .8rem; gap: .5rem; }
  .organization-choices { width: 100%; }
  .organization-choices button { min-height: 3.1rem; }
  .field-search { width: 100%; flex: auto; }
  .archive-grid, .researcher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-card:nth-child(3) { padding-top: 1rem; border-top: 1px solid var(--soft-rule); }
  .archive-card:nth-child(3) .entry-cover { display: none; }
}

@media (max-width: 480px) {
  .topbar { gap: .35rem .75rem; min-height: auto; align-items: start; flex-direction: column; padding-top: .85rem; }
  .site-nav { gap: clamp(.7rem, 4vw, 1.3rem); width: 100%; }
  .site-nav a { min-height: 42px; }
  .site-nav .agent-link { margin-inline-start: auto; }
  .hero h1 { font-size: clamp(2rem, 8.8vw, 2.85rem); }
  .organization-choices { gap: clamp(.65rem, 4vw, 1.5rem); }
  .filter-details { justify-content: flex-start; column-gap: .4rem; }
  .field select { min-width: 0; max-width: 12rem; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-card:nth-child(2) { padding-top: 1rem; border-top: 1px solid var(--soft-rule); }
  .archive-card:nth-child(2) .entry-cover { display: none; }
  .researcher-grid { grid-template-columns: 1fr; }
  .source-list li { grid-template-columns: 1fr; }
  .source-meta { text-align: left; }
}
