:root {
  --paper:   #f5f6f4;
  --ink:     #16282e;
  --ink-soft:#4a5b60;
  --rule:    #d6ddd8;
  --teal:    #1f6f6b;
  --pin:     #c0492f;
  --maxw:    980px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
}
.brand {
  font-family: "Spectral", Georgia, serif;
  font-size: 1.5rem; font-weight: 600; letter-spacing: .2px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.site-nav a {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-soft); margin-left: 20px;
}

/* ---- Hero map ---- */
.hero { padding: 22px 20px 0; }
#map {
  height: 68vh; min-height: 360px;
  max-width: 1200px; margin: 0 auto;
  border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(22,40,46,.04);
  background: #e9ede9;
}

/* ---- Intro ---- */
.intro { margin: 26px auto 6px; color: var(--ink-soft); }
.intro p { margin: 0; max-width: 62ch; }

/* ---- Section titles ---- */
.section-title {
  font-family: "Spectral", Georgia, serif;
  font-weight: 600; font-size: 1.35rem;
  margin: 40px 0 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* ---- Stops list (log style) ---- */
.stops { list-style: none; margin: 0 0 60px; padding: 0; }
.stop { border-bottom: 1px solid var(--rule); }
.stop a {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 18px;
  padding: 16px 4px;
  color: var(--ink);
}
.stop a:hover { text-decoration: none; background: rgba(31,111,107,.05); }
.stop-date {
  grid-row: 1 / span 2;
  font-size: .78rem; letter-spacing: .08em;
  color: var(--ink-soft); padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.stop-place { font-family: "Spectral", Georgia, serif; font-size: 1.15rem; font-weight: 600; }
.stop-summary { color: var(--ink-soft); font-size: .95rem; }

/* ---- Post ---- */
.post { padding-top: 30px; padding-bottom: 60px; }
.post-head { margin-bottom: 22px; }
.eyebrow {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 6px;
}
.post h1 {
  font-family: "Spectral", Georgia, serif;
  font-size: 2.2rem; font-weight: 600; line-height: 1.15; margin: 0;
}
.lede { font-size: 1.1rem; color: var(--ink-soft); margin: 10px 0 0; max-width: 60ch; }
.post-map {
  height: 320px; margin: 0 0 30px;
  border: 1px solid var(--rule); border-radius: 3px;
}
.post-body { max-width: 64ch; }
.post-body img { max-width: 100%; height: auto; border-radius: 3px; }
.post-body h2 { font-family: "Spectral", Georgia, serif; margin-top: 1.8em; }

.post-nav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--rule);
  font-size: .95rem;
}

/* ---- Leaflet popups ---- */
.leaflet-popup-content { font-family: "Inter", sans-serif; }
.leaflet-popup-content strong { font-family: "Spectral", Georgia, serif; font-size: 1.05rem; }
.popup-date { color: var(--ink-soft); font-size: .8rem; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--rule); margin-top: 20px;
  font-size: .82rem; color: var(--ink-soft);
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; padding: 20px; flex-wrap: wrap; }
.muted { color: var(--ink-soft); }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  #map { height: 56vh; }
  .stop a { grid-template-columns: 1fr; }
  .stop-date { grid-row: auto; }
  .post h1 { font-size: 1.7rem; }
}

/* ---- A11y ---- */
a:focus-visible, .stop a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }

/* ===== Feed + synced map (homepage) ===== */
.feedmap { display: flex; flex-direction: column; }

.map-pane { order: -1; position: sticky; top: 0; z-index: 5; height: 44vh; }
.map-pane #map {
  height: 100%; width: 100%;
  border: 0; border-radius: 0; border-bottom: 1px solid var(--rule);
  box-shadow: none; background: #e9ede9;
}

.feed { padding: 0 20px; }
.feed-head { padding: 28px 0 10px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.feed-head h1 { font-family: "Spectral", Georgia, serif; font-weight: 600; font-size: 1.9rem; margin: 0; }
.feed-head .subtitle { color: var(--ink-soft); margin: 6px 0 0; max-width: 60ch; }

.day { padding: 26px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 46vh; }
.day-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.day-meta time {
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); font-variant-numeric: tabular-nums;
}
.day-loc {
  font: inherit; font-size: .82rem; color: var(--teal);
  background: rgba(31,111,107,.08); border: 1px solid rgba(31,111,107,.25);
  border-radius: 999px; padding: 2px 10px; cursor: pointer;
}
.day-loc:hover { background: rgba(31,111,107,.16); }
.day-title { font-family: "Spectral", Georgia, serif; font-weight: 600; font-size: 1.5rem; margin: 0 0 10px; }
.day-body { max-width: 64ch; }
.day-body > :first-child { margin-top: 0; }
.day-body img { width: 100%; height: auto; border-radius: 4px; margin: 14px 0; }
.day-body h2, .day-body h3 { font-family: "Spectral", Georgia, serif; margin-top: 1.4em; }

.feed-foot { padding: 24px 0 60px; }

/* ---- Photo gallery ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin: 24px 0 60px;
}
.gallery-item {
  background: none; border: none; padding: 0; cursor: pointer;
  border-radius: 3px;
}
.gallery-item img {
  width: 100%; height: auto; display: block;
  transition: opacity .15s;
}
.gallery-item:hover img { opacity: .85; }
.gallery-video { cursor: default; }
.gallery-video video { width: 100%; height: auto; display: block; border-radius: 3px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 2px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: none; border: none;
  color: #fff; font-size: 2rem; cursor: pointer; padding: 12px;
  opacity: .7; line-height: 1;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 12px; right: 16px; }
.lb-prev  { left: 8px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 16px; color: rgba(255,255,255,.6); font-size: .85rem; }

/* Wide screens: feed scrolls next to a full-height sticky map. */
@media (min-width: 900px) {
  .feedmap { display: grid; grid-template-columns: minmax(0, 560px) 1fr; align-items: start; }
  .feed { padding: 0 40px; }
  .map-pane { order: 0; position: sticky; top: 0; height: 100vh; }
  .map-pane #map { border-bottom: 0; border-left: 1px solid var(--rule); }
  .day { scroll-margin-top: 24px; }
}
