@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,650;9..144,750&display=swap');

:root {
  --ink: #192421;
  --muted: #5d6a65;
  --pine: #123c35;
  --pine-2: #0b2b27;
  --river: #2e7771;
  --river-soft: #d9ebe7;
  --copper: #d76d3b;
  --gold: #d6a14f;
  --paper: #f7f3e9;
  --paper-2: #eee8da;
  --white: #fffdf8;
  --line: #d7d1c4;
  --danger: #9c332c;
  --shadow: 0 18px 50px rgb(12 40 35 / 0.12);
  --sidebar: 276px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgb(214 161 79 / 0.09), transparent 26rem),
    linear-gradient(135deg, rgb(18 60 53 / 0.025) 25%, transparent 25%) 0 0 / 18px 18px,
    var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.65;
}

a { color: #17635d; text-underline-offset: 0.2em; }
a:hover { color: #0a413c; }
img, svg { max-width: 100%; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 9999; padding: .7rem 1rem; background: var(--white); color: var(--pine); border-radius: 8px; }
.skip-link:focus { top: 1rem; }

h1, h2, h3, h4 {
  margin: 0 0 .6rem;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.12;
  color: var(--pine-2);
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 7vw, 6.8rem); letter-spacing: -.045em; }
h2 { font-size: clamp(2rem, 4vw, 3.7rem); letter-spacing: -.03em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .42rem; }
strong { color: var(--pine-2); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--sidebar);
  overflow-y: auto;
  padding: 1.7rem 1.25rem;
  color: #eff6ee;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .04), transparent 25%),
    var(--pine-2);
  border-right: 1px solid rgb(255 255 255 / .12);
}
.brand { display: block; padding: .35rem .55rem 1.35rem; color: white; text-decoration: none; }
.brand-mark { display: flex; gap: .75rem; align-items: center; }
.brand-mark svg { width: 42px; height: 42px; flex: none; }
.brand strong { display: block; color: white; font-family: "Fraunces", Georgia, serif; font-size: 1.28rem; line-height: 1.05; }
.brand small { display: block; margin-top: .45rem; color: #aac6bf; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.nav-label { margin: 1rem .6rem .35rem; color: #789f96; font-size: .65rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.sidebar nav a, .mobile-panel nav a { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 10px; color: #d8e6e2; font-size: .9rem; font-weight: 600; text-decoration: none; }
.sidebar nav a:hover, .sidebar nav a.active, .mobile-panel nav a:hover, .mobile-panel nav a.active { background: rgb(255 255 255 / .1); color: white; }
.sidebar nav a.active { box-shadow: inset 3px 0 var(--copper); }
.nav-icon { width: 1.2rem; color: #d7a468; text-align: center; }
.side-note { margin: 1.6rem .55rem 0; padding: 1rem; border: 1px solid rgb(255 255 255 / .12); border-radius: 14px; background: rgb(255 255 255 / .055); color: #bcd0cb; font-size: .77rem; }
.side-note strong { display: block; margin-bottom: .2rem; color: white; }

.mobile-header { display: none; }
.page { margin-left: var(--sidebar); min-width: 0; }
.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: clamp(3.5rem, 8vw, 7rem) clamp(1.4rem, 6vw, 6rem);
  color: white;
  background:
    linear-gradient(115deg, rgb(5 28 25 / .92), rgb(8 45 40 / .58) 58%, rgb(9 34 31 / .72)),
    radial-gradient(ellipse at 72% 30%, rgb(65 142 130 / .75), transparent 36%),
    repeating-radial-gradient(ellipse at 70% 110%, transparent 0 28px, rgb(255 255 255 / .06) 29px 31px),
    var(--pine);
}
.hero-page { min-height: 520px; }
.hero-page--short { min-height: 500px; }
.hero-page--tall { min-height: 540px; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .28;
  background:
    linear-gradient(155deg, transparent 56%, #080 57% 58%, transparent 59%),
    radial-gradient(ellipse at 75% 100%, #84b3a9 0 12%, transparent 12.5%),
    radial-gradient(ellipse at 92% 90%, #759f96 0 9%, transparent 9.5%);
  mix-blend-mode: screen;
}
.hero-content { position: relative; width: min(1100px, 100%); }
.eyebrow { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; color: #f1bf78; font-size: .72rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 34px; height: 2px; background: currentColor; }
.hero h1 { max-width: 980px; color: white; }
.hero .lede { max-width: 820px; margin: 1.2rem 0 2rem; color: #dbe9e5; font-size: clamp(1.06rem, 2vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .7rem 1rem; border: 1px solid rgb(255 255 255 / .3); border-radius: 999px; color: white; background: rgb(255 255 255 / .08); font-size: .86rem; font-weight: 700; text-decoration: none; backdrop-filter: blur(8px); }
.hero-actions button { cursor: pointer; }
.button:hover { color: white; background: rgb(255 255 255 / .16); }
.button.primary { border-color: var(--copper); background: var(--copper); }

.stat-band { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); margin: -1.9rem clamp(1.2rem, 5vw, 4rem) 0; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.stat { min-width: 0; padding: 1.35rem 1.5rem; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-label { display: block; color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.stat strong { display: block; margin-top: .35rem; font-family: "Fraunces", Georgia, serif; font-size: 1.45rem; }
.stat small { color: var(--muted); }

.content { width: min(1180px, calc(100% - 2.4rem)); margin: 0 auto; padding: 5.5rem 0; }
.section { padding: 4.5rem 0; border-bottom: 1px solid var(--line); }
.section:first-child { padding-top: 0; }
.section:last-child { border-bottom: 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .7fr); gap: 2.5rem; align-items: end; margin-bottom: 2rem; }
.section-kicker { margin-bottom: .6rem; color: var(--copper); font-size: .68rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.section-intro { color: var(--muted); font-size: 1.03rem; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.15rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgb(255 253 248 / .82); box-shadow: 0 6px 24px rgb(12 40 35 / .045); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-number { display: inline-grid; width: 38px; height: 38px; place-items: center; margin-bottom: 1rem; border-radius: 50%; color: white; background: var(--pine); font-family: "Fraunces", Georgia, serif; font-weight: 700; }
.tag { display: inline-flex; padding: .28rem .55rem; border-radius: 999px; color: #1a554f; background: var(--river-soft); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.callout { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.4rem; border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; background: #fff7e6; }
.callout.danger { border-color: var(--danger); background: #fff0ed; }
.callout h3 { font-size: 1.2rem; }
.callout-icon { font-size: 1.5rem; }
.evidence { counter-reset: claim; }
.claim { position: relative; padding: 1.4rem 1.4rem 1.4rem 4.3rem; border-top: 1px solid var(--line); }
.claim::before { counter-increment: claim; content: "0" counter(claim); position: absolute; left: .2rem; top: 1.25rem; color: var(--copper); font-family: "Fraunces", Georgia, serif; font-size: 1.5rem; font-weight: 700; }
.claim h3 { margin-bottom: .3rem; }
.confidence { margin-top: .65rem; color: var(--muted); font-size: .78rem; }
.confidence strong { color: var(--river); }

.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 26px; top: 10px; bottom: 20px; width: 1px; background: #bfc9c4; }
.day { position: relative; display: grid; grid-template-columns: 54px 1fr; gap: 1.35rem; margin-bottom: 1.35rem; }
.day-dot { position: relative; z-index: 1; display: grid; width: 54px; height: 54px; place-items: center; border: 5px solid var(--paper); border-radius: 50%; color: white; background: var(--pine); font-size: .7rem; font-weight: 700; }
.day-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.day-header { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; color: white; background: var(--pine); }
.day-header h2 { color: white; font-size: 1.55rem; }
.day-header span { color: #bcd5cf; font-size: .8rem; white-space: nowrap; }
.day-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .75fr); gap: 1.3rem; padding: 1.4rem; }
.day-body--single { grid-template-columns: 1fr; }
.day-metrics { display: grid; align-content: start; gap: .7rem; }
.metric { padding: .8rem; border-radius: 10px; background: var(--paper-2); font-size: .82rem; }
.metric strong { display: block; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--pine); background: var(--paper-2); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.check-group { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.check-group h3 { padding: 1rem 1.15rem; color: white; background: var(--pine); font-size: 1.25rem; }
.checklist { display: grid; gap: 0; margin: 0; padding: .5rem 1.1rem 1rem; list-style: none; }
.checklist li { position: relative; margin: 0; padding: .65rem .3rem .65rem 1.75rem; border-bottom: 1px solid #ece6d9; }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .9rem; width: .86rem; height: .86rem; border: 1.5px solid #78908a; border-radius: 3px; background: var(--white); }
.pack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }

.map-shell { overflow: hidden; border: 1px solid #b8c5c0; border-radius: var(--radius); background: #dbe7e4; box-shadow: var(--shadow); }
.map-toolbar { display: flex; flex-wrap: wrap; gap: .45rem; padding: .85rem; background: var(--pine-2); }
.map-toolbar button { padding: .48rem .78rem; border: 1px solid rgb(255 255 255 / .22); border-radius: 999px; color: #dceae7; background: transparent; cursor: pointer; font-size: .76rem; font-weight: 700; }
.map-toolbar button:hover, .map-toolbar button.active { color: var(--pine-2); background: #f1c27d; }
#route-map { height: min(68vh, 680px); min-height: 450px; }
.map-note { padding: .8rem 1rem; color: #d7e4e1; background: var(--pine-2); font-size: .76rem; }
.leaflet-popup-content h3 { font-size: 1.05rem; }
.leaflet-popup-content p { margin: .25rem 0; }
.route-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.route-summary > div { padding: 1rem; background: var(--white); }
.route-summary strong { display: block; }

.source-list { display: grid; gap: .85rem; margin: 0; padding: 0; list-style: none; }
.source { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.source a { font-weight: 700; overflow-wrap: anywhere; }
.source span { display: block; margin-top: .3rem; color: var(--muted); font-size: .82rem; }
.source-badge { display: inline-block !important; margin: 0 .4rem 0 0 !important; padding: .15rem .4rem; border-radius: 4px; color: white !important; background: var(--river); font-size: .62rem !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.mt-1 { margin-top: 1rem; }
.schematic-card { overflow: hidden; background: #dce9e5; }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.error-card { max-width: 620px; text-align: center; }
.error-title { font-size: clamp(2.5rem, 9vw, 5rem); }

.footer { margin-left: var(--sidebar); padding: 2.5rem max(1.2rem, 5vw); color: #acc3bd; background: var(--pine-2); font-size: .78rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; width: min(1180px, 100%); margin: auto; }
.footer a { color: white; }
.fine-print { color: var(--muted); font-size: .8rem; }
.no-js { margin: 0; padding: 1rem; color: #fff; background: var(--danger); text-align: center; }

@media (max-width: 1050px) {
  .stat-band, .route-summary { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .sidebar { display: none; }
  .mobile-header { position: sticky; top: 0; z-index: 100; display: block; color: white; background: var(--pine-2); }
  .mobile-header summary { display: flex; justify-content: space-between; align-items: center; min-height: 62px; padding: .7rem 1rem; cursor: pointer; list-style: none; }
  .mobile-header summary::-webkit-details-marker { display: none; }
  .mobile-header summary strong { color: white; font-family: "Fraunces", Georgia, serif; }
  .menu-toggle { padding: .32rem .65rem; border: 1px solid rgb(255 255 255 / .22); border-radius: 999px; font-size: .72rem; }
  .mobile-panel { max-height: calc(100vh - 62px); overflow-y: auto; padding: .3rem .7rem 1rem; border-top: 1px solid rgb(255 255 255 / .12); }
  .mobile-panel nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page, .footer { margin-left: 0; }
  .hero { min-height: 570px; padding-bottom: 5rem; }
  .section-head, .day-body { grid-template-columns: 1fr; }
  .section-head { gap: .7rem; align-items: start; }
  .pack-grid, .grid-2 { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 540px) {
  .hero { min-height: 610px; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
  .stat-band { grid-template-columns: 1fr; margin-inline: .8rem; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .content { width: min(100% - 1.3rem, 1180px); padding-top: 4rem; }
  .section { padding: 3.5rem 0; }
  .grid-4, .route-summary { grid-template-columns: 1fr; }
  .mobile-panel nav { grid-template-columns: 1fr; }
  .day { grid-template-columns: 38px 1fr; gap: .6rem; }
  .day-dot { width: 38px; height: 38px; border-width: 3px; }
  .timeline::before { left: 19px; }
  .day-header { display: block; }
  .day-header span { white-space: normal; }
  #route-map { min-height: 470px; }
}

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

@media print {
  @page { margin: .55in; }
  .sidebar, .mobile-header, .hero-actions, .map-toolbar, .footer { display: none !important; }
  .page { margin: 0; }
  .hero { min-height: auto; padding: 1.5rem; color: var(--ink); background: white; border-bottom: 2px solid var(--pine); }
  .hero h1, .hero .lede { color: var(--ink); }
  .stat-band { margin: 1rem 0; box-shadow: none; }
  .content { width: 100%; padding: 1rem 0; }
  .section { break-inside: avoid; padding: 1.4rem 0; }
  .card, .check-group, .day-card, .callout { box-shadow: none; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .7em; overflow-wrap: anywhere; }
}
