:root {
  --ink: #243538;
  --teal-950: #173f47;
  --teal-800: #1f5a64;
  --teal-700: #276a70;
  --cream: #fffdf7;
  --sand: #f8f1e3;
  --paper: #fffaf0;
  --gold: #d1a84b;
  --rose: #b85b62;
  --line: rgba(36, 53, 56, .17);
  --nav-width: 17rem;
  --sans: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.72; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(209, 168, 75, .34); }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 50; padding: .7rem 1rem; background: white; color: var(--teal-950); border-radius: .2rem; }
.skip-link:focus { top: 1rem; }
.reading-progress { position: fixed; top: 0; left: var(--nav-width); right: 0; height: 3px; z-index: 30; background: transparent; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--gold); }

.site-nav { position: fixed; inset: 0 auto 0 0; width: var(--nav-width); overflow-y: auto; z-index: 25; padding: 2.2rem 1.4rem; background: var(--teal-950); color: #fffaf0; scrollbar-width: thin; }
.site-nav a { display: flex; align-items: baseline; gap: .7rem; padding: .34rem .5rem; border-radius: .2rem; text-decoration: none; font-size: .87rem; color: rgba(255, 250, 240, .86); transition: background .2s ease, color .2s ease, transform .2s ease; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.active { background: rgba(255,255,255,.08); color: white; transform: translateX(.16rem); outline: none; }
.site-nav nav { display: grid; gap: .05rem; }
.site-nav nav span { width: 1.25rem; color: var(--gold); font-size: .72rem; letter-spacing: .08em; }
.nav-brand { display: block !important; padding: 0 .35rem !important; color: white !important; }
.nav-brand small { display: block; color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.nav-brand strong { display: block; margin-top: -.15rem; font-family: var(--serif); font-size: 1.35rem; line-height: 1.05; letter-spacing: .025em; }
.nav-rule { height: 1px; margin: 1.25rem .35rem; background: rgba(255,255,255,.17); }
.site-nav .nav-resources { margin-top: 1.25rem; padding-top: 1.15rem; border-top: 1px solid rgba(255,255,255,.2); border-radius: 0; color: white; font-weight: 700; }

.menu-button { display: none; }
main { margin-left: var(--nav-width); }

.hero { min-height: 100svh; position: relative; display: grid; place-items: center; overflow: hidden; padding: 5rem clamp(2rem, 7vw, 8rem); text-align: center; background: var(--sand); }
.hero::before, .hero::after { content: ""; position: absolute; width: 10rem; height: 10rem; border: 1px solid rgba(31,90,100,.15); transform: rotate(45deg); }
.hero::before { right: -5rem; top: -5rem; }
.hero::after { left: -5rem; bottom: -5rem; }
.brand-lockup { position: absolute; top: 1.7rem; left: 50%; display: block; width: clamp(10rem, 18vw, 13.5rem); transform: translateX(-50%); }
.brand-lockup img { display: block; width: 100%; height: auto; }
.hero-copy { width: 100%; min-width: 0; max-width: 68rem; }
.hero-kicker { margin: 0; color: var(--rose); font-weight: 800; letter-spacing: .18em; }
.hero h1 { margin: .2rem 0 1.35rem; color: var(--teal-800); font-family: var(--serif); font-size: clamp(3.2rem, 8vw, 7.3rem); line-height: .84; letter-spacing: -.055em; text-wrap: balance; }
.hero-subtitle { margin: 0 auto; max-width: 46rem; font-family: var(--serif); font-size: clamp(1.12rem, 2vw, 1.55rem); font-style: italic; }
.hero blockquote { margin: 2rem auto 0; color: var(--teal-800); font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; margin-top: 2.7rem; }
.button { display: inline-flex; min-height: 3.1rem; align-items: center; justify-content: center; padding: .7rem 1.15rem; border: 1px solid var(--teal-800); border-radius: .22rem; text-decoration: none; font-weight: 750; transition: transform .2s ease, box-shadow .2s ease; }
.button:hover, .button:focus-visible { transform: translateY(-2px); box-shadow: 0 .7rem 1.6rem rgba(23,63,71,.12); outline: 3px solid rgba(209,168,75,.38); outline-offset: 2px; }
.button.primary { background: var(--teal-800); color: white; }
.button.secondary { color: var(--teal-800); }
.hero-foot { position: absolute; bottom: 1.6rem; margin: 0; color: rgba(36,53,56,.67); font-size: .72rem; letter-spacing: .17em; }
.hero-foot i { display: inline-block; width: .3rem; height: .3rem; margin: 0 .8rem; border-radius: 50%; background: var(--rose); vertical-align: middle; }

.content-section, .chapter { padding: clamp(5rem, 9vw, 8rem) clamp(2rem, 8vw, 9rem); }
.intro { background: var(--cream); }
.eyebrow { margin: 0 0 .8rem; color: var(--rose); font-size: .78rem; font-weight: 800; letter-spacing: .18em; }
.content-section h2, .chapter-header h2 { max-width: 58rem; margin: 0; color: var(--teal-800); font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 4.6rem); line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(16rem, .75fr); gap: clamp(2rem, 6vw, 6rem); margin-top: 2.3rem; }
.intro-grid > div { max-width: 46rem; font-family: var(--serif); font-size: 1.16rem; }
.quote-panel { position: relative; align-self: start; padding: 2.2rem; border-top: 4px solid var(--gold); background: var(--sand); color: var(--teal-800); font-family: var(--serif); font-size: 1.18rem; font-weight: 700; }
.quote-panel span { position: absolute; top: -.6rem; right: 1rem; color: rgba(209,168,75,.4); font-size: 5rem; line-height: 1; }
.quote-panel p { margin: 0; }

.contents { background: var(--teal-950); color: #fffaf0; }
.contents .eyebrow { color: var(--gold); }
.contents h2 { color: white; }
.chapter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 3rem; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.18); }
.chapter-card { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; min-height: 7.3rem; padding: 1.35rem; background: var(--teal-950); text-decoration: none; transition: background .2s ease; }
.chapter-card:hover, .chapter-card:focus-visible { background: #215461; outline: none; }
.card-number { color: var(--gold); font-family: var(--serif); font-size: 1.7rem; }
.chapter-card strong { display: block; color: white; font-family: var(--serif); font-size: 1.2rem; line-height: 1.2; }
.chapter-card small { display: block; margin-top: .35rem; color: rgba(255,250,240,.68); font-size: .82rem; line-height: 1.45; }

.chapter { position: relative; border-bottom: 1px solid var(--line); background: var(--cream); }
.chapter:nth-of-type(even) { background: var(--paper); }
.chapter-header { padding-bottom: 2.1rem; border-bottom: 1px solid var(--line); }
.chapter-summary { margin: .8rem 0 0; color: var(--teal-700); font-family: var(--serif); font-size: 1.1rem; font-style: italic; }
.prose { max-width: 57rem; margin-top: 2.4rem; font-family: var(--serif); font-size: 1.12rem; }
.prose p { margin: 0 0 1.15rem; }
.prose h3 { margin: 3.2rem 0 1rem; color: var(--teal-800); font-size: 1.55rem; line-height: 1.25; }
.prose strong { color: #172b2f; }
.chapter-list { display: grid; gap: .6rem; margin: 1.3rem 0 2rem; padding-left: 1.4rem; }
.chapter-list li { padding-left: .35rem; }
.chapter-list li::marker { color: var(--rose); font-family: var(--sans); font-weight: 800; }
.table-wrap { max-width: 100%; margin: 1.7rem 0 2.2rem; overflow-x: auto; border: 1px solid var(--line); background: white; }
table { width: 100%; min-width: 45rem; border-collapse: collapse; font-family: var(--sans); font-size: .9rem; line-height: 1.45; }
th, td { padding: .85rem .9rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: var(--teal-800); color: white; font-weight: 750; }
tbody tr:nth-child(even) { background: #eef5f3; }
.back-link { display: inline-block; margin-top: 2.5rem; color: var(--teal-800); font-size: .85rem; font-weight: 750; text-underline-offset: .25rem; }

.site-footer { display: flex; justify-content: space-between; gap: 3rem; padding: 3rem clamp(2rem, 8vw, 9rem); background: #102f35; color: rgba(255,250,240,.74); font-size: .82rem; }
.site-footer strong { color: white; font-family: var(--serif); font-size: 1.1rem; }
.site-footer p { max-width: 31rem; margin: .35rem 0 0; }
.site-footer a { color: white; text-underline-offset: .22rem; }
.to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; width: 2.9rem; height: 2.9rem; border: 0; border-radius: 50%; background: var(--teal-950); color: white; font-size: 1.25rem; opacity: 0; pointer-events: none; transform: translateY(.6rem); transition: opacity .2s, transform .2s; box-shadow: 0 .7rem 1.5rem rgba(16,47,53,.22); }
.to-top.visible { opacity: 1; pointer-events: auto; transform: none; }

@media (max-width: 900px) {
  :root { --nav-width: 0rem; }
  main { margin-left: 0; }
  .reading-progress { left: 0; }
  .menu-button { position: fixed; top: .85rem; right: .85rem; z-index: 40; display: grid; grid-template-columns: 1.1rem auto; gap: .18rem .55rem; align-items: center; padding: .55rem .75rem; border: 0; border-radius: .2rem; background: var(--teal-950); color: white; box-shadow: 0 .5rem 1rem rgba(0,0,0,.16); }
  .menu-button span { grid-column: 1; display: block; width: 1.1rem; height: 1px; background: white; }
  .menu-button b { grid-column: 2; grid-row: 1 / span 3; font-size: .78rem; }
  .site-nav { width: min(88vw, 20rem); transform: translateX(-102%); transition: transform .25s ease; box-shadow: 1rem 0 2rem rgba(0,0,0,.2); }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-nav { transform: none; }
  .hero { min-height: 100svh; padding-inline: 1.25rem; }
  .brand-lockup { top: 1.15rem; left: 1.15rem; width: 9.4rem; transform: none; }
  .hero h1 { font-size: clamp(2.65rem, 12.25vw, 4.7rem); }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 24rem; margin-inline: auto; }
  .intro-grid, .chapter-grid { grid-template-columns: 1fr; }
  .content-section, .chapter { padding-inline: 1.35rem; }
  .site-footer { flex-direction: column; }
}

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

@media print {
  .site-nav, .menu-button, .reading-progress, .to-top, .hero-actions, .back-link { display: none !important; }
  main { margin: 0; }
  .hero { min-height: 90vh; }
  .chapter { break-before: page; padding: 2rem 0; }
  .content-section { padding: 2rem 0; }
  body { background: white; color: black; }
}
