@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap');

:root {
  --ink: #171717;
  --muted: #68645f;
  --paper: #f8f7f3;
  --white: #fffefa;
  --line: #d9d5cd;
  --red: #a62929;
  --red-dark: #7e1d1d;
  --soft-red: #f4e9e6;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "DM Sans", Arial, sans-serif;
  --display: "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
.skip-link, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { width: auto; height: auto; clip: auto; padding: .8rem; margin: 1rem; z-index: 100; background: white; }

.masthead { padding: 1.4rem clamp(1rem, 4vw, 4.5rem) 0; background: var(--white); border-top: 5px solid var(--ink); }
.masthead-top { max-width: 1500px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-bottom: 1.2rem; }
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 68px; height: 68px; flex: 0 0 auto; border: 2px solid var(--red); color: var(--red); font-family: var(--serif); font-weight: 700; font-size: 1.35rem; transform: rotate(-3deg); }
.brand-copy { display: flex; flex-direction: column; gap: .3rem; }
.brand-name { font: 700 clamp(2.1rem, 5vw, 4.4rem)/.82 var(--serif); letter-spacing: -.06em; text-transform: uppercase; }
.brand-subtitle { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.masthead-motto { margin: 0; text-align: right; color: var(--red); font: italic 600 clamp(1rem, 2vw, 1.5rem)/1.35 var(--display); }
.edition-strip { max-width: 1500px; margin: auto; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--ink); padding: .65rem 0 .8rem; font: 600 .82rem var(--serif); }
.edition-label { color: var(--muted); font-weight: 400; }

.main-nav { display: flex; align-items: center; gap: 1.4rem; padding: .7rem clamp(1rem, 4vw, 4.5rem); background: var(--ink); color: white; position: sticky; top: 0; z-index: 20; border-bottom: 3px solid var(--red); }
.main-nav a { text-decoration: none; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.main-nav a:hover, .main-nav a.is-active { color: #f0aaa5; }
.nav-categories { display: flex; align-items: center; gap: 1.2rem; overflow-x: auto; flex: 1; scrollbar-width: thin; }
.nav-categories a { color: #e8e5df; }
.search-form { display: flex; flex: 0 1 280px; min-width: 150px; border: 1px solid #656565; background: #282828; }
.search-form input { min-width: 0; width: 100%; padding: .65rem .7rem; color: white; border: 0; outline: 0; background: transparent; font-size: .78rem; }
.search-form input::placeholder { color: #c2c0bc; }
.search-form:focus-within { outline: 2px solid #d98983; outline-offset: 2px; }
.search-form button { width: 42px; border: 0; background: var(--red); color: white; font-size: 1.5rem; }

.page-shell { max-width: 1500px; margin: auto; padding: 0 clamp(1rem, 4vw, 4.5rem) 4rem; }
.home-intro { padding: clamp(2.3rem, 5vw, 4.8rem) 0 2.4rem; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 .8rem; color: var(--red); font-size: .69rem; font-weight: 700; letter-spacing: .16em; }
.home-intro h1 { margin: 0; font: 700 clamp(2.5rem, 6vw, 5.8rem)/.99 var(--display); letter-spacing: -.055em; }
.home-intro h1 em { color: var(--red); }
.intro-text { max-width: 590px; margin: 1.3rem 0 0; color: var(--muted); font-size: .97rem; line-height: 1.7; }

.content-layout { display: grid; grid-template-columns: minmax(220px, 285px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); padding-top: 2rem; align-items: start; }
.story-index { position: sticky; top: 82px; max-height: calc(100vh - 105px); overflow-y: auto; padding: 1.1rem; background: #f0eee8; border-top: 3px solid var(--ink); }
.index-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.index-heading .eyebrow { margin: 0; }
.index-count { font: 700 1rem var(--serif); color: var(--red); }
.story-index h2 { margin: .65rem 0 .35rem; font: 700 1.45rem var(--serif); }
.index-hint { margin: 0 0 1rem; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.story-list { display: flex; flex-direction: column; }
.story-link { display: grid; grid-template-columns: 27px 1fr; gap: .7rem; align-items: start; padding: .9rem .2rem; text-decoration: none; border-top: 1px solid #d6d2ca; }
.story-link:hover .story-link-title, .story-link.is-active .story-link-title { color: var(--red); }
.story-link.is-active { border-left: 3px solid var(--red); padding-left: .55rem; background: #e8e3dc; }
.story-number { padding-top: .12rem; color: #8b867e; font: italic 1rem var(--serif); }
.story-link-title { font: 700 .98rem/1.25 var(--serif); }
.story-link-meta { display: block; margin-top: .35rem; color: var(--muted); font: 600 .62rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.empty-state { font-size: .85rem; line-height: 1.5; color: var(--muted); }

.reader { min-width: 0; }
.reader-topline { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0 .8rem; border-bottom: 1px solid var(--ink); color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .12em; }
.reader-kicker { color: var(--red); }
.article-header { padding: 1.6rem 0 1.4rem; }
.article-header .eyebrow { margin-bottom: .6rem; }
.article-header h2 { margin: 0; font: 700 clamp(1.9rem, 4vw, 3.8rem)/1.03 var(--display); letter-spacing: -.035em; }
.article-header > p:last-child { margin: .8rem 0 0; color: var(--muted); line-height: 1.6; }
.article-pages { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.article-page { display: block; width: 100%; height: auto; background: white; box-shadow: 0 4px 18px #20190e12; }
.article-page-caption { align-self: stretch; padding: .35rem 0 0; color: var(--muted); font-size: .7rem; text-align: right; }
.article-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .12em; }
.article-footer button { border: 1px solid var(--line); padding: .6rem .8rem; background: transparent; color: var(--ink); font-size: .75rem; letter-spacing: 0; }
.article-footer button:hover { border-color: var(--red); color: var(--red); }

.site-footer { padding: 2rem 1rem; text-align: center; background: #171717; color: #f8f7f3; }
.footer-brand { font: 700 1.6rem var(--serif); letter-spacing: -.04em; }
.footer-brand span { color: #e17d76; }
.site-footer p { margin: .45rem 0; color: #d0cdc7; font-size: .8rem; }
.site-footer .footer-note { color: #98948c; font-size: .72rem; }

@media (min-width: 1100px) {
  .article-page { width: min(100%, 900px); }
}
@media (max-width: 850px) {
  .masthead-motto { display: none; }
  .main-nav { flex-wrap: wrap; gap: .8rem 1rem; }
  .nav-categories { order: 3; flex-basis: 100%; }
  .search-form { margin-left: auto; }
  .content-layout { grid-template-columns: 1fr; }
  .story-index { position: static; max-height: none; }
  .story-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
}
@media (max-width: 520px) {
  .masthead { padding-top: 1rem; }
  .brand { gap: .7rem; }
  .brand-mark { width: 48px; height: 48px; font-size: 1rem; }
  .brand-name { font-size: 2.15rem; }
  .brand-subtitle { font-size: .55rem; letter-spacing: .06em; }
  .edition-strip { flex-wrap: wrap; font-size: .72rem; }
  .edition-label { order: 3; flex-basis: 100%; }
  .main-nav { position: static; }
  .search-form { flex-basis: 100%; order: 4; }
  .nav-categories { gap: 1rem; }
  .home-intro h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .story-list { grid-template-columns: 1fr; }
  .article-header h2 { font-size: 2rem; }
  .reader-topline { font-size: .57rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
