:root {
  color-scheme: light;
  --ink: #14211d;
  --muted: #52625c;
  --paper: #fbfdf9;
  --soft: #edf3ed;
  --line: #cbd8cf;
  --green: #146c4b;
  --green-dark: #0b4a33;
  --lime: #d9f2ae;
  --navy: #102a43;
  --shadow: 0 18px 50px rgba(16, 42, 67, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

a { color: var(--green-dark); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
a:focus-visible {
  outline: 3px solid #f2b705;
  outline-offset: 4px;
  border-radius: 0.15rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: #fff;
  color: #000;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.wide-shell { width: min(1380px, calc(100% - 1.25rem)); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(203, 216, 207, 0.86);
  background: rgba(251, 253, 249, 0.95);
  backdrop-filter: blur(14px);
}
.header-row, .footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}
.mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 0.55rem;
  background: var(--green-dark);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
nav { display: flex; gap: 1.15rem; }
nav a { color: var(--ink); font-weight: 650; text-decoration: none; }

.hero {
  overflow: hidden;
  padding: clamp(4rem, 9vw, 8.5rem) 0 clamp(4.5rem, 9vw, 8rem);
  background:
    radial-gradient(circle at 82% 22%, rgba(217, 242, 174, 0.8), transparent 30rem),
    linear-gradient(135deg, #fbfdf9 0%, #edf5ec 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 0.72fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 6rem);
}
.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, h3 { color: var(--navy); line-height: 1.1; }
h1 {
  margin: 0;
  max-width: 16ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 7.2vw, 6.7rem);
  font-weight: 700;
  letter-spacing: -0.055em;
}
.subtitle {
  margin: 1.1rem 0 0;
  color: var(--green-dark);
  font-size: clamp(1.05rem, 2vw, 1.38rem);
  font-weight: 700;
}
.lede { max-width: 62ch; margin: 1.6rem 0 0; font-size: 1.1rem; }
.english-note { margin: 0.7rem 0 0; color: var(--muted); }
.actions, .compact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.actions { margin-top: 2rem; }
.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 2px solid var(--green-dark);
  border-radius: 0.45rem;
  font-weight: 750;
  text-decoration: none;
}
.button.primary { background: var(--green-dark); color: #fff; }
.button.secondary { background: transparent; color: var(--green-dark); }
.button:hover { transform: translateY(-1px); }

.edition-card {
  border: 1px solid rgba(20, 108, 75, 0.24);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  padding: 0.7rem 1.5rem;
}
.edition-card dl { margin: 0; }
.edition-card dl div { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.edition-card dl div:last-child { border-bottom: 0; }
.edition-card dt { color: var(--muted); font-size: 0.78rem; font-weight: 750; text-transform: uppercase; }
.edition-card dd { margin: 0.1rem 0 0; font-weight: 680; }

.reader-section { padding: clamp(3.5rem, 8vw, 7rem) 0; background: #102a43; color: #e8f1ed; }
.reader-section h2 { color: #fff; }
.reader-section .eyebrow { color: var(--lime); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4.5vw, 3.8rem); letter-spacing: -0.035em; }
.compact-actions a { color: #fff; font-weight: 700; }
.pdf-frame {
  margin-top: 1.5rem;
  overflow: hidden;
  border: 1px solid #78909c;
  border-radius: 0.75rem;
  background: #dfe6e2;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}
.pdf-frame iframe {
  display: block;
  width: 100%;
  height: min(78vh, 980px);
  min-height: 38rem;
  border: 0;
  background: #fff;
}
.reader-help { max-width: 85ch; margin: 1rem 0 0; color: #d7e4de; }
.reader-help a { color: #fff; }

.downloads, .about { padding: clamp(4rem, 9vw, 8rem) 0; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2.3rem; }
.artifact-card {
  min-height: 15rem;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
}
.artifact-card h3 { margin: 0.6rem 0; font-size: 1.35rem; }
.artifact-card p { color: var(--muted); }
.artifact-card a { font-weight: 750; }
.file-type {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border-radius: 99rem;
  background: var(--soft);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.integrity-box { margin-top: 1rem; padding: 1.3rem 1.6rem; border-left: 0.35rem solid var(--green); background: var(--soft); }
.integrity-box h3 { margin: 0; }
.integrity-box p { margin-bottom: 0; }

.about { background: #e9f0eb; }
.about-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 8vw, 7rem); }
.about-grid p:first-child { margin-top: 0; }
.source-links { padding-left: 1.15rem; }
.source-links li + li { margin-top: 0.4rem; }

footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 0.88rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  nav { display: none; }
  .hero-grid, .about-grid, .card-grid { grid-template-columns: 1fr; }
  .edition-card { margin-top: 1rem; }
  .section-heading, .footer-row { align-items: flex-start; flex-direction: column; }
  .footer-row { padding-block: 1rem; gap: 0; }
  .footer-row p { margin: 0.25rem 0; }
  .pdf-frame iframe { height: 72vh; min-height: 30rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button:hover { transform: none; }
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --ink: #e9f2ed; --muted: #b7c8c0; --paper: #0f1c18; --soft: #1b3028; --line: #395248; --navy: #e8f3ee; --green: #8fe0b9; --green-dark: #8fe0b9; }
  .site-header { background: rgba(15, 28, 24, 0.94); }
  .hero { background: radial-gradient(circle at 82% 22%, rgba(20, 108, 75, 0.35), transparent 30rem), linear-gradient(135deg, #0f1c18, #14271f); }
  .edition-card, .artifact-card, footer { background: #14251f; }
  .button.primary { background: #b8efcf; color: #0a3525; }
  .button.secondary { border-color: #b8efcf; color: #b8efcf; }
  .about { background: #14251f; }
  .integrity-box { background: #1a3027; }
}

@media print {
  .site-header, .actions, .compact-actions, .pdf-frame { display: none; }
  body { background: #fff; color: #000; }
  .hero, .downloads, .about { padding: 2rem 0; background: #fff; }
  h1, h2, h3, a { color: #000; }
}
