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

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

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

:root {
  --paper: #f2eddf;
  --paper-deep: #e6deca;
  --ink: #14241b;
  --muted: #556158;
  --blue: #0b57ff;
  --yellow: #ffd83d;
  --coral: #ff654f;
  --mint: #b9e4cd;
  --white: #fffdf7;
  --line: rgba(20, 36, 27, 0.22);
  --ui: "Work Sans Local", sans-serif;
  --display: "Oswald Local", sans-serif;
  --reading: "Literata Local", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--blue) var(--paper-deep);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(20, 36, 27, 0.027) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 8px;
  color: var(--ink);
  font-family: var(--ui);
  accent-color: var(--blue);
}

body.detail-open { overflow: hidden; }

::selection { background: var(--yellow); color: var(--ink); }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--paper-deep); }
::-webkit-scrollbar-thumb { background: var(--blue); border: 3px solid var(--paper-deep); }

button, input, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

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

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

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: minmax(340px, 1.25fr) minmax(300px, 0.75fr) 110px;
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  min-height: 510px;
  padding: 42px clamp(30px, 5vw, 76px) 56px;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
}

.masthead::before {
  content: "";
  position: absolute;
  width: 43vw;
  height: 43vw;
  min-width: 500px;
  min-height: 500px;
  left: -13vw;
  bottom: -25vw;
  border: clamp(70px, 8vw, 120px) solid var(--blue);
  border-radius: 50%;
  opacity: 0.96;
  pointer-events: none;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  font: 700 clamp(6rem, 12vw, 10.75rem)/0.74 var(--display);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.brand-lockup span:last-child { color: var(--blue); }

.mast-copy {
  position: relative;
  z-index: 1;
  padding-bottom: 9px;
}

.manifesto {
  max-width: 470px;
  margin: 0 0 36px;
  font: 500 clamp(1.8rem, 3vw, 3rem)/1.06 var(--reading);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.manifesto em {
  color: var(--blue);
  font-style: italic;
}

.edition-note {
  max-width: 370px;
  margin: 0;
  padding-top: 11px;
  border-top: 1px solid var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.5;
  text-transform: uppercase;
}

.walking-mark {
  align-self: start;
  justify-self: end;
  width: 88px;
  height: 88px;
  color: var(--blue);
}

.walking-mark svg,
.search-wrap svg,
.select-wrap svg,
.kept-toggle svg,
.open-item svg,
.close-detail svg,
.save-item svg,
.empty-state svg,
.article-end svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.route-controls {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, 0.52fr) auto;
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid var(--ink);
}

.search-wrap,
.select-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: center;
  min-height: 88px;
  padding: 13px 26px;
  border-right: 1px solid rgba(255, 253, 247, 0.25);
}

.search-wrap svg { grid-row: 1 / 3; width: 22px; margin-right: 14px; }
.search-wrap label,
.select-wrap label {
  grid-column: 2;
  align-self: end;
  color: #cdd4cf;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-wrap input,
.select-wrap select {
  grid-column: 2;
  align-self: start;
  width: 100%;
  min-width: 0;
  padding: 3px 0 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  font-size: 1rem;
  font-weight: 580;
}

.search-wrap input::placeholder { color: #9fa9a2; opacity: 1; }
.search-wrap:focus-within, .select-wrap:focus-within { background: #23372c; }

.select-wrap { grid-template-columns: 1fr 22px; }
.select-wrap label, .select-wrap select { grid-column: 1; }
.select-wrap select { appearance: none; padding-right: 24px; }
.select-wrap option { background: var(--white); color: var(--ink); }
.select-wrap > svg { grid-column: 2; grid-row: 1 / 3; width: 20px; }

.kept-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 0 26px;
  border: 0;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 750;
}

.kept-toggle:hover { background: #ffe66f; }
.kept-toggle[aria-pressed="true"] { background: var(--blue); color: var(--white); }
.kept-toggle svg { width: 22px; }
.kept-toggle[aria-pressed="true"] svg { fill: currentColor; }
.kept-count {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  margin-left: auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
}

.route-status {
  display: flex;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 42px 20px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.route-status p { margin: 0; }

.story-route {
  position: relative;
  max-width: 1180px;
  min-height: 640px;
  margin: 0 auto;
  padding: 30px 42px 130px;
}

.route-line {
  position: absolute;
  top: 0;
  bottom: 48px;
  left: 50%;
  width: 6px;
  margin-left: -3px;
  background: repeating-linear-gradient(to bottom, var(--blue) 0 34px, transparent 34px 56px);
}

.route-dot {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 22px;
  border: 5px solid var(--paper);
  border-radius: 50%;
  background: var(--blue);
  transform: translateX(-50%);
  box-shadow: 0 2px 10px rgba(20,36,27,.18);
}

.route-dot-start { top: -1px; }
.route-dot-end { bottom: -2px; }

.story-list { position: relative; display: flow-root; }

.story-poster {
  --poster: var(--white);
  position: relative;
  width: calc(50% - 56px);
  min-height: 326px;
  margin-bottom: 72px;
  padding: 30px 34px 28px;
  background: var(--poster);
  border: 1px solid var(--ink);
  box-shadow: 0 16px 28px -20px rgba(20, 36, 27, 0.46);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  transition: transform 240ms cubic-bezier(.22,.8,.26,1), box-shadow 240ms ease;
}

.story-poster:nth-child(odd) { float: left; clear: both; transform: rotate(-0.45deg); }
.story-poster:nth-child(even) { float: right; clear: both; transform: rotate(0.55deg); }
.story-poster:nth-child(3n + 2) { --poster: #d9efdf; }
.story-poster:nth-child(4n) { --poster: #ffe5d9; }
.story-poster:nth-child(5n) { --poster: #fff0aa; }

.story-poster:nth-child(odd)::after,
.story-poster:nth-child(even)::after {
  content: "";
  position: absolute;
  top: 52px;
  width: 58px;
  height: 1px;
  background: var(--ink);
}

.story-poster:nth-child(odd)::after { left: calc(100% + 1px); }
.story-poster:nth-child(even)::after { right: calc(100% + 1px); }

.story-poster:hover {
  transform: translateY(-5px) rotate(0deg);
  box-shadow: 0 24px 42px -22px rgba(20, 36, 27, 0.55);
}

.story-poster.is-saved { box-shadow: 0 16px 28px -20px rgba(20,36,27,.46), inset 0 0 0 5px var(--yellow); }

.poster-pin {
  position: absolute;
  top: 47px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 2px 7px rgba(20,36,27,.25);
}

.story-poster:nth-child(odd) .poster-pin { right: -64px; }
.story-poster:nth-child(even) .poster-pin { left: -64px; }

.poster-bottom,
.detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.poster-meta,
.detail-meta,
.detail-brand {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.story-poster h2 {
  max-width: 15ch;
  margin: 2px 0 18px;
  font: 650 clamp(2rem, 3vw, 3.35rem)/0.98 var(--reading);
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.poster-summary {
  max-width: 44ch;
  min-height: 3.6em;
  margin: 0 0 34px;
  color: #35483d;
  font: 430 0.96rem/1.55 var(--reading);
}

.poster-bottom {
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.poster-meta { color: var(--muted); line-height: 1.45; }

.open-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0 6px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  font-weight: 720;
  white-space: nowrap;
}

.open-item svg { width: 28px; transition: transform 180ms ease; }
.open-item:hover svg { transform: translateX(5px); }

.saved-tab {
  position: absolute;
  top: 78px;
  right: -1px;
  display: none;
  padding: 6px 9px;
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-right: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.is-saved .saved-tab { display: block; }

.empty-state {
  position: relative;
  z-index: 2;
  max-width: 650px;
  margin: 60px auto 0;
  padding: 62px;
  background: var(--yellow);
  border: 1px solid var(--ink);
  text-align: center;
  box-shadow: 0 22px 42px -26px rgba(20,36,27,.5);
}

[hidden] { display: none !important; }

.empty-state svg { width: 120px; margin: 0 auto 25px; color: var(--blue); stroke-width: 3; }
.empty-state h2 { margin: 0 0 14px; font: 650 2.8rem/1 var(--reading); letter-spacing: -0.04em; }
.empty-state p { max-width: 46ch; margin: 0 auto 27px; font: 450 1rem/1.55 var(--reading); }
.empty-state button {
  padding: 12px 17px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 30px;
  align-items: center;
  padding: 30px clamp(24px, 5vw, 76px);
  background: var(--blue);
  color: var(--white);
}

.site-footer p { margin: 0; }
.site-footer p:first-child { font: 700 1.8rem/1 var(--display); text-transform: uppercase; }
.site-footer p:nth-child(2) { font-family: var(--reading); font-style: italic; }
.site-footer button { border: 0; border-bottom: 1px solid currentColor; padding: 5px 0; background: transparent; }

.detail-shell {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(90px, 8vw) minmax(720px, 1fr);
}

.detail-scrim {
  border: 0;
  background: rgba(20, 36, 27, 0.68);
  backdrop-filter: blur(4px);
  cursor: w-resize;
}

.detail-sheet {
  position: relative;
  height: 100dvh;
  overflow-y: auto;
  background: var(--white);
  box-shadow: -22px 0 50px rgba(20, 36, 27, 0.23);
  animation: unfold 500ms cubic-bezier(.16,1,.3,1) both;
  scrollbar-color: var(--coral) var(--paper);
}

@keyframes unfold {
  from { opacity: .6; clip-path: inset(0 0 0 100%); transform: translateX(60px); }
  to { opacity: 1; clip-path: inset(0); transform: translateX(0); }
}

.detail-topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
  padding: 0 32px;
  background: var(--ink);
  color: var(--white);
}

.close-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  font-weight: 700;
}

.close-detail svg { width: 20px; }
.detail-brand { color: var(--yellow); }

.detail-layout {
  display: grid;
  grid-template-columns: 115px minmax(0, 690px) 130px;
  justify-content: center;
  gap: clamp(24px, 4vw, 58px);
  padding: 72px 38px 120px;
}

.detail-margin {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--blue);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: .11em;
  line-height: 1.45;
  text-transform: uppercase;
}

.margin-line { width: 100%; height: 5px; background: var(--blue); }

.detail-content { min-width: 0; }
.detail-meta { justify-content: flex-start; margin-bottom: 20px; color: var(--blue); }
.detail-meta span:not(:last-child)::after { content: "·"; margin-left: 18px; color: var(--ink); }

.detail-content h1 {
  max-width: 13ch;
  margin: 0 0 25px;
  font: 660 clamp(3.5rem, 6.3vw, 6rem)/0.95 var(--reading);
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.detail-deck {
  max-width: 50ch;
  margin: 0 0 27px;
  color: #3c4c42;
  font: 460 1.22rem/1.55 var(--reading);
}

.byline { font-size: .76rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.detail-rule { display: flex; align-items: center; height: 70px; }
.detail-rule::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--coral); }
.detail-rule::after { content: ""; flex: 1; height: 1px; background: var(--ink); }
.detail-rule span { order: 1; width: 35%; height: 5px; background: var(--coral); }

.article-body {
  max-width: 70ch;
  font: 430 clamp(1.07rem, 1.35vw, 1.22rem)/1.82 var(--reading);
}

.article-body p { margin: 0 0 1.55em; }
.article-body p:first-child::first-letter {
  float: left;
  margin: .02em .11em 0 0;
  color: var(--blue);
  font: 700 5.3rem/.77 var(--display);
}

.save-rail { align-self: start; position: sticky; top: 100px; }
.save-item {
  width: 116px;
  padding: 20px 15px;
  border: 1px solid var(--ink);
  background: var(--yellow);
  font-size: .72rem;
  font-weight: 760;
  line-height: 1.25;
}
.save-item svg { width: 30px; margin: 0 auto 13px; }
.save-item[aria-pressed="true"] { background: var(--blue); color: var(--white); }
.save-item[aria-pressed="true"] svg { fill: currentColor; }
.save-item:hover { filter: brightness(1.05); }

.article-end {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 58px;
  color: var(--blue);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.article-end svg { width: 74px; }

@media (max-width: 1100px) {
  .masthead { grid-template-columns: 1fr 1fr; min-height: 490px; }
  .walking-mark { display: none; }
  .route-controls { grid-template-columns: 1fr 0.65fr auto; }
  .kept-toggle { min-width: 76px; padding: 0 20px; }
  .kept-toggle > span:not(.kept-count) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .story-poster { width: calc(50% - 38px); }
  .story-poster:nth-child(odd) .poster-pin { right: -46px; }
  .story-poster:nth-child(even) .poster-pin { left: -46px; }
  .story-poster:nth-child(odd)::after, .story-poster:nth-child(even)::after { width: 40px; }
  .detail-shell { grid-template-columns: 38px 1fr; }
  .detail-layout { grid-template-columns: 70px minmax(0, 1fr) 110px; gap: 22px; padding-inline: 24px; }
  .save-rail { grid-column: 3; grid-row: 1; }
  .detail-content { grid-column: 2; grid-row: 1; }
  .detail-margin { grid-column: 1; grid-row: 1; }
  .save-item { width: 106px; }
}

@media (max-width: 700px) {
  .masthead {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: 430px;
    padding: 26px 20px 38px;
    align-content: end;
  }
  .masthead::before { width: 470px; height: 470px; left: -300px; bottom: -275px; border-width: 70px; }
  .brand-lockup { font-size: clamp(5.1rem, 25vw, 7rem); }
  .mast-copy { padding-left: 31%; }
  .manifesto { margin-bottom: 24px; font-size: 1.72rem; }
  .edition-note { font-size: .62rem; }

  .route-controls {
    position: relative;
    grid-template-columns: 1fr 76px;
  }
  .search-wrap { grid-column: 1 / 3; min-height: 76px; border-right: 0; border-bottom: 1px solid rgba(255,253,247,.25); padding: 10px 18px; }
  .select-wrap { min-height: 72px; padding: 10px 18px; }
  .kept-toggle { grid-column: 2; grid-row: 2; min-width: 0; padding: 0 14px; justify-content: center; }
  .kept-toggle .kept-count { margin-left: 0; }

  .route-status { padding: 28px 20px 12px; }
  .story-route { padding: 24px 20px 86px; overflow: hidden; }
  .route-line { left: 23px; margin-left: 0; width: 4px; }
  .route-dot { left: 2px; width: 18px; height: 18px; border-width: 4px; }
  .story-poster,
  .story-poster:nth-child(odd),
  .story-poster:nth-child(even) {
    float: none;
    clear: none;
    width: calc(100% - 38px);
    min-height: 0;
    margin: 0 0 36px 38px;
    padding: 24px 23px;
    transform: none;
  }
  .story-poster:nth-child(odd)::after,
  .story-poster:nth-child(even)::after { left: auto; right: 100%; width: 39px; top: 36px; }
  .story-poster:nth-child(odd) .poster-pin,
  .story-poster:nth-child(even) .poster-pin { left: -47px; right: auto; top: 30px; }
  .story-poster h2 { font-size: 2.1rem; }
  .poster-summary { min-height: 0; margin-bottom: 25px; }
  .poster-bottom { align-items: flex-start; flex-direction: column; gap: 11px; }
  .open-item { width: 100%; justify-content: space-between; }

  .empty-state { margin: 28px 0 0 38px; padding: 38px 24px; }
  .empty-state h2 { font-size: 2.1rem; }

  .site-footer { grid-template-columns: 1fr; gap: 18px; padding: 28px 20px; }
  .site-footer button { justify-self: start; }

  .detail-shell { display: block; }
  .detail-scrim { display: none; }
  .detail-sheet { width: 100%; }
  .detail-topbar { min-height: 62px; padding: 0 18px; }
  .detail-brand { font-size: .58rem; }
  .detail-layout { display: block; padding: 40px 20px 86px; }
  .detail-margin { display: none; }
  .detail-content { display: flex; flex-direction: column; }
  .detail-meta { flex-wrap: wrap; gap: 7px 12px; padding-right: 0; }
  .detail-meta span:not(:last-child)::after { margin-left: 12px; }
  .detail-content h1 { margin: 0 0 20px; padding-right: 0; font-size: clamp(3rem, 14vw, 4.2rem); }
  .detail-deck { font-size: 1.08rem; }
  .save-rail { position: fixed; z-index: 8; right: 14px; bottom: 14px; margin: 0; }
  .save-item { width: auto; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 14px 16px; box-shadow: 0 12px 25px -12px rgba(20,36,27,.58); }
  .save-item svg { width: 22px; margin: 0; }
  .article-body { font-size: 1.05rem; line-height: 1.74; }
  .article-body p:first-child::first-letter { font-size: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
