.editorial {
  --background: #171612;
  --ink: #fff8ed;
  --muted: #dbd1c1;
  --accent: #f1c98d;
  --rule: #ebd7bc57;
  --navy: var(--ink);
  --teal: var(--accent);
  --gold: var(--rule);
  --serif: "Instrument Serif", "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  position: relative;
  isolation: isolate;
  background: var(--background);
  color: var(--ink);
}

.editorial::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, #14120fb0, transparent 18%),
    linear-gradient(90deg, #14120fe8 0%, #15130eb0 36%, #15130e24 78%),
    linear-gradient(0deg, #18151069, transparent 45%),
    url("/reading-room-wallpaper.jpg") center center / cover no-repeat;
}

.editorial > :is(header, main, footer) {
  width: min(calc(100% - clamp(36px, 10vw, 144px)), 1320px);
  padding-inline: 0;
}

:is(.editorial, .article-masthead) > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem clamp(1rem, 2.5vw, 2.5rem);
  min-height: 78px;
  border-bottom: 1px solid var(--rule);
}

:is(.editorial, .article-masthead) .brand {
  width: fit-content;
  color: var(--ink);
  font: 500 clamp(1.38rem, 2.2vw, 2rem)/1.16 var(--serif);
  letter-spacing: -.025em;
}

:is(.editorial, .article-masthead) > header nav {
  gap: .55rem clamp(.9rem, 1.5vw, 1.5rem);
  flex-wrap: wrap;
}

:is(.editorial, .article-masthead) > header nav a,
:is(.editorial, .article-masthead) .language-switch a {
  color: var(--ink);
  font-size: .85rem;
}

:is(.editorial, .article-masthead) .language-switch {
  justify-self: end;
  white-space: nowrap;
}

:is(.editorial, .article-masthead) .language-switch a[aria-current] {
  color: var(--accent);
}

.editorial .edition-cover {
  display: grid;
  align-items: center;
  min-height: clamp(27rem, 60svh, 43rem);
  padding: clamp(3.25rem, 8vw, 8rem) 0;
}

.editorial .edition-intro {
  max-width: 54rem;
}

.editorial .edition-kicker {
  color: var(--accent);
  font: 650 .8rem/1.6 system-ui, sans-serif;
  letter-spacing: .14em;
  margin: 0;
}

.editorial .edition-intro h1 {
  margin: .38em 0 .32em;
  font: 600 clamp(2.75rem, 6.4vw, 6rem)/1.11 var(--serif);
  letter-spacing: -.032em;
  text-shadow: 0 2px 24px #100e0bb3;
}

.editorial:lang(en) .edition-intro h1 {
  font-family: var(--serif);
  font-weight: 400;
}

.editorial .edition-deck {
  max-width: 29em;
  margin: 0;
  color: var(--ink);
  line-height: 1.85;
  font-size: clamp(.95rem, 1.4vw, 1.12rem);
  text-shadow: 0 1px 12px #15120e;
}

.editorial .edition-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem 1.45rem;
  margin-top: 1.8rem;
}

.editorial .edition-jump {
  color: var(--ink);
  font-size: .9rem;
  font-weight: 650;
}

.editorial .edition-primary {
  display: inline-flex;
  align-items: center;
  gap: 1.15em;
  padding: .7rem 1.14rem;
  border-radius: 4px;
  background: #f3e6d2;
  color: #211810;
  text-decoration: none;
}

.editorial .edition-primary:hover {
  background: #fff7eb;
}

.editorial .edition-feature {
  display: grid;
  grid-template-columns: minmax(7.5rem, .3fr) minmax(0, 1.7fr);
  gap: .7rem clamp(1rem, 4vw, 4rem);
  padding: clamp(1rem, 3vw, 2rem);
  background: #211b16e8;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.editorial .edition-feature-label time {
  display: block;
  color: var(--muted);
  margin-top: .35rem;
  font-size: .75rem;
}

.editorial .edition-feature h2 {
  font: 600 clamp(1.22rem, 2.65vw, 2rem)/1.47 var(--serif);
  margin: 0 0 .45rem;
  text-wrap: balance;
}

.editorial .edition-feature a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
}

.editorial .edition-feature a:hover {
  text-decoration-color: var(--accent);
}

.editorial .edition-feature-story p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.editorial main > :is(.news-section, .books, #archive, .about) {
  padding: clamp(1.15rem, 3.5vw, 3rem);
  background: #1e1915f0;
  border: 1px solid var(--rule);
  border-radius: 5px;
  margin: 0 0 clamp(1.8rem, 5vw, 4.5rem);
}

.editorial .section-head h2, .editorial .about h2 {
  font-family: var(--serif);
  font-weight: 600;
}

.editorial :is(.news-checked, .news-footnote, .books-position, .book-card p, .metadata, .sources span, footer span) {
  color: var(--muted);
}

.editorial .news-section .news-layout {
  border-top: 1px solid var(--rule);
  border-bottom-color: var(--rule);
}

.editorial .news-section :is(.news-lead, .news-list > .news-item:first-child, .news-list > .news-item:last-child) {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
  padding-inline: clamp(.85rem, 2.3vw, 2rem);
}

.editorial .news-section :is(.news-lead, .news-item) :is(a, p, .news-date, .news-tag) {
  color: var(--muted);
  border-color: var(--accent);
}

.editorial .news-section :is(.news-lead, .news-item) :is(a, .news-tag) {
  color: var(--accent);
}

.editorial .news-section .news-layout :is(.news-lead, .news-item) :is(h2, h3) {
  margin: .7rem 0 .8rem;
  font: 650 clamp(1.1rem, 1.65vw, 1.35rem)/1.55 var(--serif);
  overflow-wrap: anywhere;
}

.editorial .news-section .news-layout :is(.news-lead, .news-item) :is(h2, h3) a {
  color: var(--ink);
}

.editorial :is(.source-archive-link, .books-control) {
  color: var(--accent);
  border-color: var(--rule);
  background: transparent;
}

.editorial :is(.source-archive-link, .books-control):hover {
  background: #f1c98d26;
}

.editorial .book-visual {
  background: #e0cfbb22;
}

.editorial .filters {
  background: #e0cfbb16;
}

.editorial .filters :is(input, select) {
  background: #f7eee1;
  color: #241c16;
}

.editorial .card {
  color: var(--ink);
  background: transparent;
  border-color: var(--rule);
}

.editorial .card:hover {
  background: #e0cfbb16;
}

.editorial > footer {
  border-color: var(--rule);
  text-shadow: 0 1px 5px #100e0b;
}

.editorial :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 1060px) {
  :is(.editorial, .article-masthead) > header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  :is(.editorial, .article-masthead) > header nav {
    grid-row: 2;
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .editorial::before {
    background-position: center, center, center, 60% center;
  }

  :is(.editorial, .article-masthead) > header {
    padding-block: 1rem;
    gap: .75rem;
  }

  :is(.editorial, .article-masthead) .language-switch {
    font-size: .7rem;
    gap: .35rem;
  }

  :is(.editorial, .article-masthead) > header nav a,
  :is(.editorial, .article-masthead) .language-switch a {
    font-size: .76rem;
  }

  .editorial .edition-cover {
    min-height: min(32rem, 70svh);
    padding-block: 3.7rem;
  }

  .editorial .edition-intro h1 {
    font-size: clamp(2.2rem, 9vw, 3.35rem);
  }

  .editorial .edition-feature {
    grid-template-columns: 1fr;
  }

  .editorial .edition-feature-label {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .35rem 1rem;
  }
}

@media (max-width: 350px) {
  :is(.editorial, .article-masthead) > header {
    grid-template-columns: 1fr;
  }

  :is(.editorial, .article-masthead) .language-switch {
    justify-self: start;
  }
}

@media (forced-colors: active) {
  .editorial::before {
    display: none;
  }
}
