@font-face {
  font-family: "Oswald Local";
  src: url("assets/oswald.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

@font-face {
  font-family: "Work Sans Local";
  src: url("assets/work-sans.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f2f0e9;
  --ink: #161616;
  --blue: #1557ff;
  --red: #f14a32;
  --concrete: #cbc9c1;
  --white: #ffffff;
  --display: "Oswald Local", "Arial Narrow", sans-serif;
  --sans: "Work Sans Local", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
}

body.detail-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

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

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

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

.masthead {
  display: grid;
  grid-template-columns: minmax(310px, 31vw) 1fr;
  min-height: 700px;
  border-bottom: 8px solid var(--ink);
}

.brand-block {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 30px clamp(24px, 3.4vw, 52px) 40px;
  background: var(--blue);
  color: var(--white);
}

.issue-line,
.edition-mark {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.issue-line span {
  opacity: 0.78;
}

.wordmark {
  display: block;
  margin: auto 0;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(120px, 15vw, 238px);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.72;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-0.055em);
}

.wordmark span {
  display: block;
}

.brand-note {
  width: 170px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.street-window {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.street-window::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.45));
  content: "";
}

.street-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  filter: saturate(0.82) contrast(1.08);
}

.window-copy {
  position: absolute;
  z-index: 1;
  right: clamp(30px, 5vw, 80px);
  bottom: 56px;
  width: min(600px, 70%);
}

.window-copy > p {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 650;
}

.window-copy h1 {
  max-width: 570px;
  margin: 0 0 28px;
  font-family: var(--display);
  font-size: clamp(48px, 5.6vw, 86px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.window-copy a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 2px solid var(--white);
  font-weight: 650;
  text-decoration: none;
}

.window-copy a:hover {
  background: var(--white);
  color: var(--ink);
}

.edition-mark {
  position: absolute;
  z-index: 1;
  top: 30px;
  right: clamp(30px, 5vw, 80px);
}

.browse {
  display: grid;
  grid-template-columns: minmax(310px, 31vw) minmax(0, 1fr);
  max-width: 1720px;
  margin: 0 auto;
}

.browse-rail {
  min-width: 0;
  padding: 72px clamp(24px, 3.4vw, 52px);
  border-right: 1px solid var(--ink);
}

.rail-heading {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 22px;
  border-bottom: 6px solid var(--ink);
}

.section-mark {
  margin: 0;
  color: var(--red);
  font-size: 16px;
}

.rail-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.result-count {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.filters {
  display: grid;
  margin-top: 32px;
  gap: 24px;
}

.search-field,
.select-field {
  display: grid;
  gap: 9px;
  font-size: 13px;
  font-weight: 650;
}

.search-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-bottom: 2px solid var(--ink);
}

.search-control input {
  width: 100%;
  min-width: 0;
  padding: 10px 0 12px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
}

.search-control input::placeholder {
  color: #6c6b66;
}

.search-control span {
  color: var(--blue);
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
}

.search-control:focus-within {
  border-color: var(--red);
}

.select-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 40px 0 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.saved-toggle {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  min-height: 50px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.saved-toggle:hover,
.saved-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--white);
}

.saved-icon {
  color: var(--red);
  font-size: 22px;
}

.saved-count {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.rail-note {
  max-width: 260px;
  margin: 72px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.story-column {
  min-width: 0;
  padding: 72px clamp(28px, 5vw, 82px) 120px;
}

.story-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 4vw, 64px);
  row-gap: 72px;
}

.story-card {
  --category-color: var(--blue);
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-top: 10px;
  border-top: 8px solid var(--category-color);
}

.story-card[data-category="Food"] {
  --category-color: #e9432e;
}

.story-card[data-category="Culture"] {
  --category-color: #7846d4;
}

.story-card[data-category="People"] {
  --category-color: #178c65;
}

.story-card[data-category="Places"] {
  --category-color: #1557ff;
}

.story-card[data-category="Movement"] {
  --category-color: #e88018;
}

.story-image {
  position: relative;
  overflow: hidden;
  margin: 0 0 22px;
  background: var(--concrete);
  aspect-ratio: 4 / 3;
}

.story-card:nth-child(4n + 2) .story-image,
.story-card:nth-child(4n + 3) .story-image {
  aspect-ratio: 4 / 2.35;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.06);
  transition: transform 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.story-card:hover .story-image img {
  transform: scale(1.025);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  color: var(--category-color);
  font-size: 13px;
  font-weight: 700;
}

.card-topline p {
  margin: 0;
}

.card-saved {
  color: var(--red);
}

.story-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 2.9vw, 48px);
  font-weight: 570;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.story-summary {
  max-width: 50ch;
  margin: 17px 0 24px;
  color: #484742;
  font-size: 16px;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--concrete);
}

.byline {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.byline time {
  display: block;
  color: #65645f;
  font-weight: 450;
}

.open-story {
  min-height: 42px;
  padding: 0 15px;
  border: 2px solid var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.open-story:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.empty-state {
  max-width: 620px;
  padding: clamp(50px, 8vw, 100px) 0;
}

.empty-state > span {
  display: block;
  margin-bottom: 18px;
  color: var(--red);
  font-size: 15px;
  font-weight: 700;
}

.empty-state h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.empty-state p {
  margin: 22px 0;
  line-height: 1.5;
}

.empty-state button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  align-items: end;
  gap: 32px;
  min-height: 260px;
  padding: 54px clamp(24px, 5vw, 76px);
  background: var(--ink);
  color: var(--white);
}

.site-footer p {
  margin: 0;
}

.footer-wordmark {
  font-family: var(--display);
  font-size: clamp(64px, 8vw, 110px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 0.8;
  text-transform: uppercase;
}

.photo-note {
  justify-self: end;
  max-width: 400px;
  color: #aaa9a5;
  font-size: 12px;
  line-height: 1.5;
}

.detail-layer {
  position: fixed;
  z-index: 50;
  inset: 0;
  overflow-y: auto;
  background: var(--paper);
}

.detail-layer[hidden] {
  display: none;
}

.detail-shell {
  --detail-color: var(--blue);
  display: grid;
  grid-template-columns: minmax(280px, 27vw) minmax(0, 1fr);
  min-height: 100%;
}

.detail-shell[data-category="Food"] {
  --detail-color: #e9432e;
}

.detail-shell[data-category="Culture"] {
  --detail-color: #7846d4;
}

.detail-shell[data-category="People"] {
  --detail-color: #178c65;
}

.detail-shell[data-category="Movement"] {
  --detail-color: #e88018;
}

.detail-rail {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 28px clamp(24px, 3vw, 46px) 40px;
  background: var(--detail-color);
  color: var(--white);
}

.detail-brand {
  margin: 0;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.close-detail {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 48px;
  margin-top: 44px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid currentColor;
  background: transparent;
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
}

.detail-rail-note {
  max-width: 210px;
  margin: auto 0 0;
  font-size: 15px;
  line-height: 1.45;
}

.detail-main {
  min-width: 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(250px, 0.7fr);
  min-height: 570px;
  border-bottom: 1px solid var(--ink);
}

.detail-heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(54px, 7vw, 104px) clamp(30px, 5vw, 82px) 58px;
}

.detail-category {
  margin: 0 0 22px;
  color: var(--detail-color);
  font-size: 14px;
  font-weight: 750;
}

.detail-heading h2 {
  max-width: 850px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(58px, 7.3vw, 116px);
  font-weight: 580;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

.detail-image {
  min-height: 380px;
  margin: 0;
  overflow: hidden;
  background: var(--concrete);
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.06);
}

.detail-article {
  display: grid;
  grid-template-columns: minmax(170px, 0.32fr) minmax(300px, 680px);
  justify-content: center;
  gap: clamp(36px, 6vw, 100px);
  padding: 64px clamp(30px, 7vw, 110px) 120px;
}

.article-meta {
  font-size: 13px;
}

.article-meta p {
  margin: 0 0 6px;
}

.article-meta strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.save-story {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 28px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.save-story:hover,
.save-story[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.save-story span {
  font-size: 21px;
}

.article-copy .standfirst {
  margin: 0 0 36px;
  font-family: var(--display);
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.article-copy .body-text p {
  margin: 0 0 1.35em;
  font-size: 18px;
  line-height: 1.75;
}

.article-end {
  width: 44px;
  height: 8px;
  margin-top: 54px;
  background: var(--detail-color);
}

@media (max-width: 900px) {
  .masthead {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .brand-block {
    min-height: 470px;
  }

  .wordmark {
    font-size: min(33vw, 190px);
  }

  .street-window {
    min-height: 560px;
  }

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

  .browse-rail {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .filters {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: end;
  }

  .rail-note {
    margin-top: 36px;
  }

  .detail-shell {
    grid-template-columns: 1fr;
  }

  .detail-rail {
    position: sticky;
    z-index: 2;
    top: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    height: auto;
    min-height: 72px;
    padding: 12px 24px;
  }

  .close-detail {
    margin: 0;
  }

  .detail-rail-note {
    display: none;
  }
}

@media (max-width: 620px) {
  html {
    scroll-behavior: auto;
  }

  .masthead {
    border-bottom-width: 6px;
  }

  .brand-block {
    min-height: 350px;
    padding: 20px 20px 24px;
  }

  .issue-line {
    font-size: 12px;
  }

  .wordmark {
    font-size: 35.5vw;
    line-height: 0.7;
  }

  .brand-note {
    font-size: 14px;
  }

  .street-window {
    min-height: 430px;
  }

  .street-window img {
    object-position: 45% center;
  }

  .window-copy {
    right: 20px;
    bottom: 28px;
    left: 20px;
    width: auto;
  }

  .window-copy > p {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .window-copy h1 {
    margin-bottom: 20px;
    font-size: 47px;
  }

  .window-copy a {
    min-height: 44px;
    font-size: 14px;
  }

  .edition-mark {
    top: 18px;
    right: 20px;
    font-size: 11px;
  }

  .browse-rail {
    padding: 42px 20px 38px;
  }

  .rail-heading {
    padding-bottom: 16px;
  }

  .rail-heading h2 {
    font-size: 32px;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 26px;
  }

  .saved-toggle {
    width: 100%;
  }

  .rail-note {
    margin-top: 32px;
  }

  .story-column {
    padding: 46px 20px 80px;
  }

  .story-list {
    grid-template-columns: 1fr;
    row-gap: 58px;
  }

  .story-card h3 {
    font-size: 37px;
  }

  .story-card:nth-child(n) .story-image {
    aspect-ratio: 4 / 2.8;
  }

  .story-summary {
    margin-bottom: 20px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    min-height: 360px;
    padding: 48px 20px;
  }

  .photo-note {
    justify-self: start;
  }

  .detail-rail {
    min-height: 64px;
    padding: 10px 18px;
  }

  .detail-brand {
    font-size: 27px;
  }

  .close-detail {
    min-height: 42px;
    font-size: 14px;
  }

  .detail-hero {
    display: flex;
    min-height: 0;
    flex-direction: column-reverse;
  }

  .detail-image {
    height: 260px;
    min-height: 0;
  }

  .detail-heading {
    padding: 42px 20px 46px;
  }

  .detail-category {
    margin-bottom: 16px;
  }

  .detail-heading h2 {
    font-size: 53px;
  }

  .detail-article {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 38px 20px 80px;
  }

  .article-meta {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--concrete);
  }

  .save-story {
    width: 100%;
    justify-content: center;
  }

  .article-copy .standfirst {
    font-size: 28px;
  }

  .article-copy .body-text p {
    font-size: 17px;
    line-height: 1.7;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
