:root {
  color-scheme: light;
  --bg: #f7f3ea;
  --surface: #fffdfa;
  --ink: #1f2522;
  --muted: #5f685f;
  --line: #d8d0c1;
  --green: #153c35;
  --eucalyptus: #2f6f62;
  --clay: #b85d3d;
  --sand: #eadfcb;
  --warning: #7a421d;
  --focus: #0d6bff;
  --shadow: 0 18px 45px rgba(33, 37, 31, 0.12);
  --radius: 8px;
  --max: 1180px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

::selection {
  color: #fff;
  background: var(--green);
}

a {
  color: var(--green);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover { color: #0d2c27; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--green);
  color: #fff;
  padding: .65rem .9rem;
  border-radius: var(--radius);
}

.skip-link:focus { transform: none; }

.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 243, 234, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: .78rem;
  letter-spacing: .06em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .2rem;
  font-size: .94rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: .62rem .75rem;
  border-radius: 6px;
}

.site-nav a:hover { background: var(--sand); }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  padding: .6rem .8rem;
  font-weight: 700;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  padding-block: 1rem .5rem;
  font-size: .88rem;
  color: var(--muted);
}

.breadcrumbs a { color: var(--muted); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(330px, .72fr);
  gap: clamp(1rem, 3vw, 2.6rem);
  align-items: stretch;
  padding: clamp(1.2rem, 4vw, 3.2rem) 0 clamp(1.4rem, 5vw, 4rem);
}

.hero-copy {
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-label {
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .22rem .6rem;
  color: var(--green);
  background: var(--surface);
  font-size: .78rem;
  font-weight: 800;
}

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  margin: .8rem 0 1rem;
  font-size: clamp(2.3rem, 7vw, 5.6rem);
}

h2 {
  margin: 2.8rem 0 .9rem;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

h3 {
  margin: 0 0 .45rem;
  font-size: 1.08rem;
}

p {
  max-width: 72ch;
  margin: 0 0 1rem;
}

.hero p {
  max-width: 68ch;
  color: #39423d;
  font-size: clamp(1.04rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: .45rem 0 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius);
  padding: .76rem 1rem;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 28px rgba(21, 60, 53, .18);
}

.button.is-disabled {
  cursor: not-allowed;
  opacity: .72;
  box-shadow: none;
}

.button.secondary {
  color: var(--green);
  background: var(--surface);
  border: 1px solid var(--line);
}

.rg-notice {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  max-width: 760px;
  margin-top: .9rem;
  padding: .9rem 1rem;
  border: 1px solid #d0aa85;
  border-radius: var(--radius);
  background: #fff7e8;
  color: var(--warning);
}

.rg-notice strong { white-space: nowrap; }

.location-panel {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) auto;
  gap: .75rem;
  min-height: 470px;
}

.map-frame {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #efe6d4;
  box-shadow: var(--shadow);
}

.map-frame::before,
.map-frame::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(216, 208, 193, .9);
  border-radius: 999px;
}

.map-frame::before {
  left: -12%;
  right: 12%;
  bottom: 25%;
  height: 34px;
  transform: rotate(9deg);
}

.map-frame::after {
  right: -10%;
  top: 34%;
  width: 42%;
  height: 28px;
  transform: rotate(-18deg);
}

.map-river {
  position: absolute;
  left: 0;
  right: 0;
  top: 9%;
  height: 58px;
  background: #aac6bd;
  transform: rotate(-5deg);
  border-block: 1px solid rgba(21,60,53,.25);
}

.map-road {
  position: absolute;
  color: var(--green);
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .28rem .6rem;
  font-size: .78rem;
  font-weight: 800;
}

.map-road.north { left: 14%; right: 8%; top: 49%; }
.map-road.king { left: 48%; top: 22%; writing-mode: vertical-rl; }

.map-pin {
  position: absolute;
  left: 23%;
  top: 40%;
  max-width: 165px;
  padding: .75rem .85rem;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
  box-shadow: 0 14px 30px rgba(21, 60, 53, .25);
  font-weight: 900;
}

.map-pin::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: -9px;
  width: 18px;
  height: 18px;
  background: var(--green);
  transform: rotate(45deg);
}

.map-note {
  position: absolute;
  padding: .45rem .55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}

.map-note.station { left: 18%; bottom: 22%; }
.map-note.oval { right: 10%; top: 18%; }

.mini-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin: 0;
}

.mini-facts div {
  padding: .72rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mini-facts dt {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-facts dd {
  margin: .12rem 0 0;
  font-weight: 800;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
  min-width: 0;
}

.toc {
  position: sticky;
  top: 88px;
  display: grid;
  gap: .35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}

.toc strong {
  margin-bottom: .25rem;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
  padding: .38rem .45rem;
  border-radius: 6px;
}

.toc a:hover { background: var(--sand); color: var(--green); }

.content {
  max-width: 850px;
  min-width: 0;
}

.band {
  margin-block: clamp(1.5rem, 5vw, 4rem);
  padding-block: clamp(2rem, 5vw, 4rem);
  background: #efe7d7;
  border-block: 1px solid var(--line);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  margin-top: 1rem;
}

.link-card {
  min-height: 132px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.link-card p { color: var(--muted); margin-bottom: 0; }
.link-card a { color: var(--ink); }

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: .96rem;
}

th, td {
  padding: .9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--green);
  background: #f1eadc;
}

tr:last-child td { border-bottom: 0; }

.checklist {
  display: grid;
  gap: .65rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.checklist label {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
}

.checklist input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--green);
  margin-top: .2rem;
}

.nearby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.nearby-grid div {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf7ef;
}

.nearby-grid strong,
.nearby-grid span { display: block; }
.nearby-grid span { margin-top: .25rem; color: var(--muted); }

details {
  border-top: 1px solid var(--line);
  padding: .9rem 0;
}

summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 900;
}

.source-list {
  columns: 2;
  padding-left: 1.2rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr);
  gap: 1rem;
  margin-block: 2rem 4rem;
}

.site-footer {
  padding: 2rem 0;
  color: #dfe9df;
  background: var(--green);
}

.site-footer a { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr);
  gap: 1rem;
}

.footer-grid nav {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: .6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .site-nav[data-open="true"] { display: flex; }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 1rem;
  }
  .hero-copy,
  .location-panel {
    min-height: auto;
  }
  .location-panel { grid-template-rows: auto auto; }
  .map-frame { min-height: 280px; }
  .layout { grid-template-columns: 1fr; }
  .toc {
    position: static;
    display: flex;
    overflow-x: auto;
    max-width: 100%;
    white-space: nowrap;
  }
  .toc strong { display: none; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, var(--max)); }
  .brand { font-size: .94rem; }
  h1 { max-width: 10ch; }
  .hero-actions,
  .rg-notice {
    flex-direction: column;
  }
  .rg-notice strong { white-space: normal; }
  .mini-facts,
  .card-grid,
  .nearby-grid,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .source-list { columns: 1; }
  .map-road.king { display: none; }
}

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