@font-face {
  font-family: "DM Serif Display";
  src: url("assets/dm-serif.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #f1eddf;
  --paper-light: #f8f5eb;
  --ink: #191a18;
  --muted: #68685f;
  --rule: #b8b4a8;
  --orange: #e7552c;
  --orange-deep: #c83e19;
  --moss: #24382f;
  --focus: #2365c6;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --shell: min(1320px, calc(100% - 64px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.masthead {
  border-top: 6px solid var(--ink);
}

.masthead__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.masthead__bar p {
  margin: 0;
}

.descriptor {
  text-align: center;
}

.place {
  text-align: right;
}

.signal {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--orange);
}

.brand {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 146px;
  padding: 20px 0 18px;
}

.brand__name {
  font-family: var(--serif);
  font-size: clamp(64px, 8.5vw, 128px);
  line-height: .75;
  letter-spacing: -.055em;
  text-decoration: none;
}

.brand__name span,
.footer__brand span {
  color: var(--orange);
}

.brand__note {
  margin: 0 0 -2px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
  text-transform: uppercase;
}

.topics {
  display: flex;
  gap: 0;
  border-block: 1px solid var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
}

.topics::-webkit-scrollbar {
  display: none;
}

.topic-link {
  min-width: 100px;
  padding: 12px 22px;
  border: 0;
  border-right: 1px solid var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
}

.topic-link:hover,
.topic-link.is-active {
  color: var(--paper-light);
  background: var(--ink);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .55fr);
  gap: 64px;
  align-items: end;
  padding-block: 70px 62px;
}

.eyebrow {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  margin-right: 10px;
  padding: 5px 8px;
  color: var(--paper-light);
  background: var(--orange);
}

.intro h1 {
  max-width: 900px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(62px, 7vw, 108px);
  font-weight: 400;
  line-height: .91;
  letter-spacing: -.045em;
}

.standfirst {
  max-width: 390px;
  margin: 0 0 5px;
  padding-top: 20px;
  border-top: 5px solid var(--orange);
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.25;
}

.browse {
  padding-bottom: 110px;
}

.browse-tools {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 230px 150px;
  border-block: 1px solid var(--ink);
}

.search-field,
.filter-field {
  padding: 14px 22px 16px;
  border-right: 1px solid var(--ink);
}

.search-field label,
.filter-field label {
  display: block;
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.search-wrap,
.select-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  top: 50%;
  left: 0;
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  transform: translateY(-50%);
}

.search-wrap input,
.filter-field select {
  width: 100%;
  height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  outline: none;
}

.search-wrap input {
  padding-left: 30px;
}

.search-wrap input::placeholder {
  color: #77756c;
  opacity: 1;
}

.search-wrap input:focus,
.filter-field select:focus {
  border-bottom-color: var(--orange);
}

.filter-field select {
  appearance: none;
  padding-right: 24px;
  cursor: pointer;
}

.select-wrap::after {
  position: absolute;
  top: 12px;
  right: 2px;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
  pointer-events: none;
  transform: rotate(45deg);
}

.saved-toggle {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
}

.saved-toggle svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.saved-toggle[aria-pressed="true"] {
  color: var(--paper-light);
  background: var(--orange-deep);
}

.saved-toggle[aria-pressed="true"] svg {
  fill: currentColor;
}

.saved-count {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 9px;
}

.section-rule {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 34px 0 15px;
  border-bottom: 5px solid var(--ink);
}

.section-rule h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 33px;
  font-weight: 400;
}

.section-rule p {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.story-card {
  position: relative;
  display: flex;
  grid-column: span 4;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--ink);
}

.story-card:nth-child(3n + 1):not(.story-card--lead) {
  border-right: 0;
}

.story-card--lead {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, .8fr);
  gap: 0;
  padding: 0;
  border-right: 0;
  border-bottom: 1px solid var(--ink);
}

.story-media {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  background: #d4d0c4;
}

.story-card--lead .story-media {
  min-height: 540px;
}

.story-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(12, 13, 12, .24));
  content: "";
  pointer-events: none;
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.78) contrast(1.04);
  transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 300ms ease;
}

.story-card:not(.story-card--lead) .story-media {
  margin-bottom: 18px;
  aspect-ratio: 1.35 / 1;
}

.story-card:hover .story-media img {
  filter: saturate(.95) contrast(1.02);
  transform: scale(1.025);
}

.story-no {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--paper-light);
  background: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
}

.story-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.story-card--lead .story-card__content {
  padding: 35px 36px 30px;
}

.story-kicker {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 24px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.story-kicker::before {
  width: 18px;
  height: 6px;
  background: var(--orange);
  content: "";
}

.story-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 2.2vw, 38px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.story-card--lead h3 {
  font-size: clamp(43px, 4vw, 64px);
  line-height: .98;
}

.story-summary {
  margin: 16px 0 26px;
  color: #4e4f49;
  font-size: 15px;
  line-height: 1.55;
}

.story-card--lead .story-summary {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.4;
}

.story-meta {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.open-story {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  align-self: flex-start;
  margin-top: 24px;
  padding: 10px 0 6px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
}

.open-story::after {
  content: "→";
  font-family: var(--sans);
  font-size: 18px;
  transition: transform 180ms ease;
}

.open-story:hover::after {
  transform: translateX(5px);
}

.empty-state {
  padding: 90px 24px;
  border-bottom: 1px solid var(--ink);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state__mark {
  display: block;
  color: var(--orange);
  font-family: var(--serif);
  font-size: 90px;
  line-height: 1;
}

.empty-state h2 {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
}

.empty-state p {
  margin: 0 0 24px;
}

.empty-state button {
  padding: 12px 18px;
  border: 1px solid var(--ink);
  color: var(--paper-light);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.manifesto {
  color: var(--paper-light);
  background: var(--moss);
}

.manifesto__inner {
  position: relative;
  padding-block: 94px 56px;
}

.manifesto .eyebrow {
  color: #d4d0c2;
}

.manifesto blockquote {
  max-width: 1080px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5.2vw, 78px);
  line-height: 1.04;
  letter-spacing: -.03em;
}

.manifesto__footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 70px;
  padding-top: 16px;
  border-top: 1px solid #718078;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.manifesto__footer p {
  max-width: 450px;
  margin: 0;
}

.manifesto__footer span {
  color: #aab6ae;
  font-size: 44px;
  line-height: .85;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding-block: 48px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.footer p {
  margin: 0;
}

.footer p:last-child {
  text-align: right;
}

.footer__brand {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -.02em;
  text-decoration: none;
  text-transform: none;
}

.article-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--paper-light);
}

.article-dialog::backdrop {
  background: rgba(20, 21, 19, .6);
}

.article-shell {
  min-height: 100%;
}

.article-topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 62px;
  padding: 0 32px;
  border-top: 6px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: rgba(248, 245, 235, .96);
}

.article-topbar__brand {
  font-family: var(--serif);
  font-size: 21px;
}

.article-topbar__label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.close-detail {
  justify-self: end;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  cursor: pointer;
}

.close-detail span {
  margin-left: 8px;
  font-size: 18px;
  vertical-align: -1px;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr);
  min-height: 590px;
  border-bottom: 1px solid var(--ink);
}

.article-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px max(40px, 6vw);
}

.article-heading h2 {
  max-width: 680px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(54px, 5.5vw, 86px);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.04em;
}

.article-deck {
  max-width: 600px;
  margin: 26px 0 0;
  color: #4b4c47;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
}

.article-hero__image {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.article-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.78) contrast(1.04);
}

.article-hero__image span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 6px 8px;
  color: var(--paper-light);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(190px, .45fr) minmax(480px, 680px) minmax(180px, .45fr);
  gap: clamp(30px, 5vw, 80px);
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 70px 0 120px;
}

.article-byline,
.article-actions {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.article-byline {
  padding-top: 7px;
}

.article-byline p {
  margin: 0 0 18px;
}

.article-byline span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
}

.article-body p {
  margin: 0 0 1.35em;
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.7;
}

.article-body p:first-child::first-letter {
  float: left;
  margin: .09em .12em 0 0;
  color: var(--orange);
  font-family: var(--serif);
  font-size: 4.5em;
  line-height: .72;
}

.article-actions {
  position: sticky;
  top: 94px;
  align-self: start;
}

.save-detail {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 13px 0;
  border: 0;
  border-block: 1px solid var(--ink);
  background: transparent;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.save-detail svg {
  width: 18px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.5;
}

.save-detail[aria-pressed="true"] {
  color: var(--orange-deep);
}

.save-detail[aria-pressed="true"] svg {
  fill: currentColor;
}

.article-end {
  display: block;
  margin-top: 48px;
  color: var(--orange);
  font-family: var(--serif);
  font-size: 38px;
}

@media (max-width: 900px) {
  :root {
    --shell: min(100% - 40px, 760px);
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .standfirst {
    max-width: 620px;
  }

  .browse-tools {
    grid-template-columns: 1fr 210px 130px;
  }

  .story-card {
    grid-column: span 6;
  }

  .story-card:nth-child(3n + 1):not(.story-card--lead) {
    border-right: 1px solid var(--rule);
  }

  .story-card:nth-child(odd):not(.story-card--lead) {
    border-right: 0;
  }

  .story-card--lead {
    grid-template-columns: 1.2fr .8fr;
  }

  .article-hero {
    grid-template-columns: 1fr;
  }

  .article-heading {
    min-height: 470px;
  }

  .article-hero__image {
    min-height: 480px;
  }

  .article-layout {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .article-actions {
    position: static;
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  :root {
    --shell: calc(100% - 40px);
  }

  .masthead {
    border-top-width: 5px;
  }

  .masthead__bar {
    display: flex;
    justify-content: space-between;
  }

  .descriptor {
    display: none;
  }

  .brand {
    min-height: 100px;
    padding: 18px 0 16px;
  }

  .brand__name {
    max-width: 260px;
    font-size: 55px;
    line-height: .82;
  }

  .brand__note {
    font-size: 8px;
  }

  .topics {
    width: 100%;
    padding-left: 20px;
  }

  .topic-link {
    min-width: auto;
    padding: 11px 17px;
  }

  .intro {
    gap: 30px;
    padding-block: 48px 45px;
  }

  .eyebrow {
    margin-bottom: 17px;
  }

  .intro h1 {
    font-size: 54px;
    line-height: .93;
  }

  .standfirst {
    padding-top: 14px;
    font-size: 21px;
  }

  .browse {
    padding-bottom: 72px;
  }

  .browse-tools {
    grid-template-columns: 1fr 118px;
  }

  .search-field {
    grid-column: 1 / -1;
    padding: 15px 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .filter-field {
    padding: 12px 14px 14px 0;
  }

  .saved-toggle {
    border-left: 0;
  }

  .section-rule {
    padding-top: 28px;
    border-bottom-width: 4px;
  }

  .section-rule h2 {
    font-size: 28px;
  }

  .story-grid {
    display: block;
  }

  .story-card,
  .story-card--lead {
    display: flex;
    padding: 24px 0 28px;
    border-right: 0 !important;
  }

  .story-card--lead .story-media,
  .story-media {
    min-height: 0;
    margin-bottom: 22px;
    aspect-ratio: 1.18 / 1;
  }

  .story-card--lead .story-card__content {
    padding: 0;
  }

  .story-kicker {
    margin-bottom: 16px;
  }

  .story-card h3,
  .story-card--lead h3 {
    font-size: 34px;
    line-height: 1.02;
  }

  .story-summary,
  .story-card--lead .story-summary {
    margin: 13px 0 22px;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
  }

  .open-story {
    margin-top: 20px;
  }

  .manifesto__inner {
    padding-block: 70px 42px;
  }

  .manifesto blockquote {
    font-size: 41px;
  }

  .manifesto__footer {
    gap: 30px;
    margin-top: 52px;
  }

  .manifesto__footer span {
    font-size: 30px;
    white-space: nowrap;
  }

  .footer {
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding-block: 34px;
  }

  .footer p:nth-of-type(1) {
    display: none;
  }

  .article-topbar {
    grid-template-columns: 1fr auto;
    min-height: 58px;
    padding: 0 20px;
  }

  .article-topbar__label {
    display: none;
  }

  .article-hero {
    display: flex;
    flex-direction: column-reverse;
  }

  .article-hero__image {
    min-height: 330px;
    aspect-ratio: 1 / .88;
  }

  .article-heading {
    min-height: 0;
    padding: 42px 20px 50px;
  }

  .article-heading h2 {
    font-size: 48px;
    line-height: .98;
  }

  .article-deck {
    margin-top: 20px;
    font-size: 19px;
  }

  .article-layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: calc(100% - 40px);
    padding: 42px 0 72px;
  }

  .article-byline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-bottom: 19px;
    border-bottom: 1px solid var(--rule);
  }

  .article-byline p {
    margin: 0;
  }

  .article-body p {
    font-size: 18px;
    line-height: 1.65;
  }

  .article-actions {
    order: 2;
  }
}

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

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