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

:root {
  color-scheme: light;
  --paper: #f4efe3;
  --paper-deep: #ebe2d1;
  --paper-light: #fbf8f0;
  --ink: #281f1a;
  --ink-soft: #67584d;
  --sepia: #6b3f2a;
  --sepia-light: #996a4e;
  --rule: #cdbb9d;
  --gold: #b18b54;
  --shadow: 0 15px 40px rgba(65, 44, 29, 0.09);
  font-family: 'Alegreya', Georgia, serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(107, 63, 42, 0.045) 0.55px, transparent 0.55px);
  background-size: 6px 6px;
  font-size: 18px;
  line-height: 1.5;
}
button, a { font: inherit; }
button { color: inherit; }
a { color: var(--sepia); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #a46e35;
  outline-offset: 4px;
}
.skip-link {
  position: fixed; z-index: 20; top: 8px; left: 8px; transform: translateY(-150%);
  background: var(--ink); color: white; padding: 0.6rem 0.9rem;
}
.skip-link:focus { transform: translateY(0); }

.masthead { max-width: 1320px; margin: 0 auto; padding: 24px 6vw 0; text-align: center; }
.masthead__rule { height: 1px; background: var(--rule); position: relative; }
.masthead__rule span { position: absolute; left: 50%; top: -3px; width: 7px; height: 7px; border: 1px solid var(--sepia); background: var(--paper); transform: rotate(45deg); }
.masthead__rule--bottom { max-width: 180px; margin: 0 auto; }
.brand { display: inline-flex; gap: 10px; align-items: center; margin: 12px 0 14px; color: var(--sepia); text-decoration: none; text-transform: uppercase; letter-spacing: 0.14em; font: 600 0.72rem/1.2 'Alegreya', Georgia, serif; }
.brand i { color: var(--gold); font-style: normal; }
.brand__mark { width: 31px; height: 31px; }

.hero { max-width: 980px; margin: 0 auto; padding: clamp(64px, 9vw, 118px) 24px 84px; text-align: center; }
.eyebrow { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 0 0 17px; color: var(--sepia); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow__line { display: inline-block; width: 28px; height: 1px; background: var(--gold); }
.eyebrow--left { justify-content: flex-start; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { max-width: 850px; margin: 0 auto; font-size: clamp(3rem, 8.3vw, 7rem); font-weight: 500; line-height: 0.91; letter-spacing: -0.045em; }
.hero h1 em, .credits h2 em { color: var(--sepia); font-weight: 400; }
.hero__lede { max-width: 690px; margin: 30px auto 0; color: var(--ink-soft); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.52; }
.hero__note { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 580px; margin: 36px auto 0; padding: 13px 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.96rem; }
.hero__note p { margin: 0; }
.hero__note-mark { color: var(--gold); font-size: 1.25rem; }
.scroll-cue { display: inline-flex; min-height: 44px; gap: 13px; align-items: center; margin-top: 37px; color: var(--sepia); text-decoration: none; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.scroll-cue span:last-child { display: inline-grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--sepia-light); border-radius: 50%; font-size: 1rem; transition: transform 180ms ease; }
.scroll-cue:hover span:last-child { transform: translateY(3px); }

.timeline-section { max-width: 1320px; margin: 0 auto; padding: 65px 6vw 110px; border-top: 1px solid var(--rule); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 38px; }
.section-heading h2, .context-note h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.section-heading__aside { margin: 0 0 4px; color: var(--ink-soft); text-align: right; font-size: 0.96rem; }
.filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 30px; padding: 14px 0; border-top: 1px solid rgba(205, 187, 157, 0.75); border-bottom: 1px solid rgba(205, 187, 157, 0.75); }
.filters__label { margin-right: 8px; color: var(--ink-soft); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.filter-button { min-height: 44px; border: 1px solid transparent; padding: 6px 14px; background: transparent; cursor: pointer; color: var(--ink-soft); font-size: 0.92rem; border-radius: 999px; transition: background 150ms ease, color 150ms ease, border-color 150ms ease; }
.filter-button:hover { border-color: var(--rule); color: var(--sepia); }
.filter-button.is-active { border-color: var(--sepia); background: var(--sepia); color: var(--paper-light); }

.archive-layout { display: grid; grid-template-columns: minmax(235px, 0.72fr) minmax(0, 1.8fr); align-items: start; gap: clamp(24px, 5vw, 68px); }
.timeline-nav { position: sticky; top: 24px; padding: 0 0 20px; }
.timeline-nav__topline, .timeline-nav__foot { display: flex; justify-content: space-between; align-items: center; color: var(--sepia); font-size: 0.73rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.timeline-nav__topline { padding: 0 2px 13px; border-bottom: 1px solid var(--rule); }
.timeline-nav__foot { justify-content: flex-start; gap: 9px; padding: 14px 2px 0; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.05em; text-transform: none; }
.timeline-nav__foot-hint { display: none; color: var(--sepia); font-size: 0.75rem; }
.timeline-nav__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.timeline-list { position: relative; list-style: none; margin: 0; padding: 9px 0; }
.timeline-list::before { position: absolute; content: ''; top: 16px; bottom: 16px; left: 7px; width: 1px; background: linear-gradient(var(--gold), var(--rule)); }
.timeline-item { position: relative; padding: 4px 0 4px 27px; }
.timeline-item::before { position: absolute; z-index: 1; content: ''; left: 2px; top: 19px; width: 11px; height: 11px; border: 1px solid var(--sepia-light); border-radius: 50%; background: var(--paper); transition: background 150ms ease, transform 150ms ease; }
.timeline-item.is-active::before { background: var(--sepia); transform: scale(1.18); box-shadow: 0 0 0 4px rgba(107, 63, 42, 0.1); }
.date-button { display: block; width: 100%; min-height: 44px; border: 0; border-radius: 2px; padding: 8px 10px 9px 0; background: transparent; cursor: pointer; text-align: left; transition: background 150ms ease; }
.date-button:hover, .timeline-item.is-active .date-button { background: rgba(177, 139, 84, 0.1); }
.date-button__date { display: block; color: var(--sepia); font-size: 0.88rem; font-weight: 700; letter-spacing: 0.06em; line-height: 1.3; text-transform: uppercase; transition: color 150ms ease; }
.date-button:hover .date-button__date, .timeline-item.is-active .date-button__date { color: var(--ink); }

.event-detail { min-width: 0; border: 1px solid var(--rule); background: rgba(251, 248, 240, 0.84); box-shadow: var(--shadow); }
.event-detail__empty { display: grid; min-height: 390px; grid-template-columns: auto minmax(0, 1fr); align-content: center; align-items: center; gap: clamp(18px, 4vw, 40px); padding: clamp(22px, 4vw, 44px); }
.event-detail__empty-mark { display: grid; width: 72px; height: 72px; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--sepia); font-size: 0.82rem; letter-spacing: 0.08em; }
.event-detail__empty h3 { margin: 0 0 9px; font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 500; line-height: 1.05; }
.event-detail__empty p:last-child { max-width: 460px; margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.event-detail__top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 22px; border-bottom: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.event-detail__number { color: var(--sepia); font-weight: 700; }
.event-detail__body { padding: clamp(22px, 4vw, 44px); }
.event-detail__date { margin-bottom: 7px; color: var(--sepia); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.event-detail h3 { max-width: 760px; margin-bottom: 17px; font-size: clamp(2rem, 4.3vw, 3.35rem); font-weight: 500; line-height: 1.02; letter-spacing: -0.025em; }
.event-detail__summary { max-width: 760px; margin: 0 0 25px; color: #4f4339; font-size: 1.11rem; line-height: 1.55; }
.event-analysis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin: 26px 0 8px; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.event-analysis__item { min-width: 0; }
.event-analysis__item + .event-analysis__item { padding-left: 26px; border-left: 1px solid var(--rule); }
.event-analysis .detail-label { margin: 0 0 8px; }
.event-analysis__text { margin: 0; color: var(--ink-soft); font-size: 0.99rem; line-height: 1.5; }
.archive-figure { margin: 0; padding: 10px; border: 1px solid var(--rule); background: #e7dece; }
.archive-figure img { display: block; width: 100%; max-height: 480px; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; background: #ded2bc; filter: sepia(0.12) saturate(0.82); }
.archive-figure img.image--map { aspect-ratio: 4 / 3; max-height: 430px; object-fit: contain; background: #e4dac6; }
.archive-figure img.image--portrait { object-position: center 28%; }
.archive-figure img.image--newspaper { object-fit: contain; }
.archive-figure figcaption { display: flex; justify-content: space-between; gap: 15px; margin-top: 8px; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.25; }
.archive-figure figcaption span:last-child { flex: 0 0 auto; text-align: right; }
.archive-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 0.75fr); gap: 30px; margin-top: 26px; }
.detail-label { display: block; margin-bottom: 8px; color: var(--sepia); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }
.event-detail__context { margin: 0; color: var(--ink-soft); font-size: 0.99rem; }
.source-list { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.source-list a { display: inline-flex; min-height: 44px; gap: 6px; align-items: center; color: var(--sepia); font-size: 0.94rem; line-height: 1.25; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.source-list a:hover { color: #3d271b; }
.source-list a::after { content: '↗'; font: 0.75rem/1 sans-serif; }
.event-detail__controls { display: flex; justify-content: space-between; gap: 12px; margin-top: 33px; padding-top: 18px; border-top: 1px solid var(--rule); }
.step-button { min-height: 44px; border: 1px solid var(--rule); padding: 7px 13px; background: transparent; color: var(--sepia); cursor: pointer; font-size: 0.9rem; transition: background 150ms ease, color 150ms ease; }
.step-button:hover:not(:disabled) { background: var(--sepia); color: var(--paper-light); }
.step-button:disabled { cursor: not-allowed; opacity: 0.38; }
.loading-note, .noscript-note { padding: 24px; color: var(--ink-soft); }

.context-note { display: grid; grid-template-columns: 75px 1fr; gap: 24px; max-width: 1010px; margin: 0 auto 108px; padding: 30px clamp(22px, 5vw, 55px); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.context-note__seal { display: grid; place-content: center; width: 64px; height: 64px; border: 1px solid var(--gold); border-radius: 50%; color: var(--sepia); text-align: center; font-size: 1.25rem; font-weight: 700; line-height: 0.85; transform: rotate(-8deg); }
.context-note__seal span { font-size: 0.72rem; }
.context-note h2 { max-width: 680px; margin-bottom: 14px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.context-note p:last-child { max-width: 760px; margin-bottom: 0; color: var(--ink-soft); }

.credits { padding: 0 6vw 24px; color: var(--paper-light); background: #34271e; }
.credits__top, .credits__bottom { display: flex; justify-content: space-between; gap: 15px; padding: 13px 0; color: #d9c7a3; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; }
.credits__top { border-bottom: 1px solid rgba(217, 199, 163, 0.35); }
.credits__body { display: flex; justify-content: space-between; align-items: center; gap: 40px; max-width: 1150px; margin: 0 auto; padding: 47px 0 52px; }
.credits .eyebrow { color: #d9c7a3; }
.credits h2 { margin: 0; font-size: clamp(2.1rem, 5vw, 3.9rem); font-weight: 500; line-height: 0.98; }
.credits h2 em { color: #d9c7a3; }
.credits__names { min-width: 240px; padding-left: 28px; border-left: 1px solid rgba(217, 199, 163, 0.5); }
.credits__label { color: #d9c7a3; font-size: 0.73rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.credits__placeholder { margin: 8px 0 0; color: #f5ecdb; font-size: 1.1rem; font-style: italic; }
.credits__bottom { border-top: 1px solid rgba(217, 199, 163, 0.35); color: #c5ad8d; font-weight: 500; letter-spacing: 0.08em; text-transform: none; }

@media (max-width: 960px) {
  .archive-layout { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .timeline-nav { min-width: 0; position: relative; top: auto; padding-bottom: 0; }
  .timeline-list { min-width: 0; max-width: 100%; display: flex; gap: 10px; overflow-x: auto; padding: 14px 2px 17px; scroll-padding-inline: 10px; scroll-snap-type: x proximity; scrollbar-color: var(--gold) transparent; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .timeline-list::before { top: 20px; right: 9px; bottom: auto; left: 10px; width: auto; height: 1px; background: var(--rule); }
  .timeline-item { flex: 0 0 160px; padding: 15px 2px 0; scroll-snap-align: start; }
  .timeline-item::before { top: 0; left: 3px; }
  .date-button { padding-top: 3px; }
  .timeline-nav__foot { padding-top: 0; }
  .timeline-nav__foot-hint { display: inline; margin-left: auto; }
  .archive-lower { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 24px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .masthead { padding: 17px 20px 0; }
  .brand { max-width: 100%; gap: 8px; font-size: clamp(0.6rem, 2.7vw, 0.72rem); letter-spacing: 0.1em; text-align: left; }
  .brand__mark { flex: 0 0 auto; }
  .hero { padding: 58px 20px 60px; }
  .hero h1 { font-size: clamp(2.35rem, 11.7vw, 4.2rem); line-height: 0.96; }
  .hero__lede { font-size: clamp(1rem, 4.5vw, 1.15rem); }
  .hero__note { gap: 10px; padding: 12px; font-size: 0.9rem; }
  .hero__note { align-items: flex-start; text-align: left; }
  .timeline-section { padding: 50px 20px 78px; }
  .section-heading { display: block; margin-bottom: 24px; }
  .section-heading h2 { font-size: clamp(1.95rem, 8.8vw, 2.7rem); line-height: 1.05; }
  .section-heading__aside { margin-top: 12px; text-align: left; }
  .filters { gap: 4px; }
  .filters__label { flex: 0 0 100%; margin-bottom: 3px; }
  .filter-button { min-height: 44px; padding-right: 12px; padding-left: 12px; }
  .timeline-item { flex-basis: clamp(148px, 43vw, 170px); }
  .event-detail__empty { min-height: 280px; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 16px; padding: 28px 20px; text-align: center; }
  .event-detail__empty-mark { width: 56px; height: 56px; }
  .event-detail__empty p:last-child { margin-right: auto; margin-left: auto; }
  .event-detail__top { padding: 13px 16px; }
  .event-detail__top > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  .event-detail__number { flex: 0 0 auto; }
  .event-detail__body { padding: 20px 16px 18px; }
  .event-detail h3 { font-size: clamp(1.8rem, 8.8vw, 2.2rem); line-height: 1.05; }
  .event-detail__summary { font-size: 1rem; }
  .event-analysis { grid-template-columns: 1fr; gap: 16px; margin-top: 22px; }
  .event-analysis__item + .event-analysis__item { padding: 15px 0 0; border-top: 1px solid var(--rule); border-left: 0; }
  .archive-figure { padding: 7px; }
  .archive-figure img { aspect-ratio: 4 / 3; }
  .archive-figure figcaption { display: block; }
  .archive-figure figcaption span:last-child { display: block; margin-top: 4px; text-align: left; }
  .archive-lower { grid-template-columns: 1fr; gap: 19px; }
  .source-list a { min-height: 44px; overflow-wrap: anywhere; }
  .timeline-nav__foot { flex-wrap: wrap; gap: 6px; }
  .timeline-nav__foot-hint { font-size: 0.72rem; }
  .step-button { min-height: 44px; }
  .context-note { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; margin: 0 20px 72px; padding: 23px 0; }
  .context-note__seal { width: 45px; height: 45px; font-size: 1rem; }
  .credits { padding-right: 20px; padding-left: 20px; }
  .credits__body { display: block; padding: 35px 0 38px; }
  .credits__names { min-width: 0; margin-top: 28px; padding: 15px 0 0; border-top: 1px solid rgba(217, 199, 163, 0.5); border-left: 0; }
  .credits__top, .credits__bottom { flex-wrap: wrap; gap: 6px 12px; font-size: 0.62rem; }
}
@media (max-width: 380px) {
  .masthead { padding-right: max(14px, env(safe-area-inset-right)); padding-left: max(14px, env(safe-area-inset-left)); }
  .hero { padding-right: 16px; padding-left: 16px; }
  .timeline-section { padding-right: 16px; padding-left: 16px; }
  .timeline-item { flex-basis: 148px; }
  .event-detail__top { gap: 8px; padding-right: 12px; padding-left: 12px; font-size: 0.7rem; }
  .event-detail__body { padding-right: 13px; padding-left: 13px; }
  .context-note { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; margin-right: 16px; margin-left: 16px; }
  .context-note__seal { width: 40px; height: 40px; }
  .credits { padding-right: 16px; padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
