:root {
  --bg: #f7f2eb;
  --paper: #fffaf3;
  --ink: #2d241f;
  --muted: #6e6259;
  --line: #ddcdbd;
  --accent: #8b5e3c;
  --accent-soft: #f0e2d3;
  --shadow: 0 16px 40px rgba(50, 35, 20, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: linear-gradient(
    180deg,
    #f6efe6 0%,
    #f8f4ee 180px,
    var(--bg) 100%
  );
  line-height: 1.6;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
.hero {
  padding: 56px 20px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #efe0cf 0, #f6eee6 100%);
}
.hero--small {
  padding-top: 44px;
}
.hero__inner,
.container {
  max-width: 1180px;
  margin: 0 auto;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin: 0.2rem 0 1rem;
}
h2 {
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  line-height: 1.2;
  margin: 0;
}
h3 {
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0;
}
h4 {
  font-size: 1.02rem;
  margin: 0 0 0.7rem;
}
.lead {
  max-width: 860px;
  font-size: 1.08rem;
  color: #41352d;
  margin: 0 0 1rem;
}
.hero__note,
.intro-card,
.section-intro,
.next-steps {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero__note {
  max-width: 860px;
  padding: 14px 16px;
  margin: 18px 0 0;
}
.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.quick-nav a,
.primary-link,
.open-file,
.open-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff7ef;
  color: #3b2d24;
  font-size: 0.96rem;
  cursor: pointer;
}
.quick-nav a:hover,
.primary-link:hover,
.open-file:hover,
.open-image:hover {
  background: #f3e3d3;
}
.container {
  padding: 26px 20px 60px;
}
.intro-card,
.next-steps {
  padding: 22px 24px;
  margin-bottom: 24px;
}
.simple-note {
  color: var(--muted);
}
.cta-row {
  margin-top: 14px;
}
.doc-section {
  margin: 34px 0 44px;
}
.section-head {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}
.section-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}
.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.section-intro {
  padding: 16px 18px;
  margin-bottom: 16px;
}
.page-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.page-card__header {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}
.page-number {
  color: var(--muted);
  margin: 0 0 4px;
  font-size: 0.92rem;
}
.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.page-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) 1fr;
  gap: 22px;
}
.original-panel {
  position: sticky;
  top: 16px;
  align-self: start;
}
.image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}
.image-button img {
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(40, 26, 12, 0.08);
}
.caption {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 10px 0 0;
}
.text-panel {
  display: grid;
  gap: 16px;
}
.text-block {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  background: #fffefb;
}
.text-block.modern {
  background: var(--accent-soft);
}
.text-block p:last-child {
  margin-bottom: 0;
}
.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 89px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: flex-start;
}
.timeline-year {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  min-height: 42px;
  border-radius: 14px;
  background: #fff7ef;
  border: 1px solid var(--line);
  font-weight: 700;
  padding: 10px 50px;
}
.timeline-content {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  z-index: 2;
}
.timeline-content h3 {
  margin-bottom: 6px;
}
.timeline-source {
  color: var(--muted);
  font-size: 0.9rem;
}
.lightbox[hidden] {
  display: none;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 12, 8, 0.78);
}
.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1200px);
  max-height: 92vh;
  overflow: auto;
  margin: 3vh auto;
  background: #17110d;
  color: #fff;
  border-radius: 18px;
  padding: 18px;
}
.lightbox__close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}
.lightbox__title {
  margin: 0 0 12px;
  color: #ead9c8;
  padding-right: 30px;
}
.lightbox__dialog img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}
ol,
ul {
  padding-left: 1.25rem;
}
code {
  background: #f5e8dc;
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
}
@media (max-width: 920px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .original-panel {
    position: static;
  }
  .page-card__header,
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .timeline::before {
    left: 20px;
  }
  .timeline-item {
    grid-template-columns: 1fr;
  }
  .timeline-year {
    width: auto;
    max-width: 170px;
  }
}

/* navbar */
/* top navigation — mobile first */
nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 250, 243, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(50, 35, 20, 0.08);
}

nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.25;
  color: #3b2d24;
  background: linear-gradient(180deg, #fffaf4 0%, #f6eadf 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(50, 35, 20, 0.06);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

nav a:hover {
  background: linear-gradient(180deg, #fff7ef 0%, #f1dfcc 100%);
  border-color: #ceb49d;
  box-shadow: 0 10px 20px rgba(50, 35, 20, 0.1);
  transform: translateY(-1px);
}

nav a:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(50, 35, 20, 0.08);
}

nav a:focus-visible {
  outline: 3px solid rgba(139, 94, 60, 0.18);
  outline-offset: 2px;
  border-color: var(--accent);
}

/* make the section nav more mobile-friendly too */
.quick-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 18px;
}

.quick-nav a {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  border-radius: 16px;
  box-shadow: 0 6px 14px rgba(50, 35, 20, 0.05);
}

/* tablet and up */
@media (min-width: 700px) {
  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
  }

  nav a {
    min-width: 210px;
  }

  .quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .quick-nav a {
    width: auto;
  }
}

/* desktop polish */
@media (min-width: 1024px) {
  nav {
    padding: 16px 24px;
  }

  nav a {
    min-width: 230px;
    padding: 13px 18px;
  }
}
nav a[aria-current="page"] {
  background: linear-gradient(180deg, #ead8c4 0%, #e2ccb4 100%);
  border-color: var(--accent);
  color: #2f2118;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
