:root {
  --ink: #20231f;
  --paper: #f3efe5;
  --rust: #d9542b;
  --moss: #596c55;
  --line: rgba(32, 35, 31, 0.2);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.6;
}
a { color: inherit; text-underline-offset: 0.18em; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }

.site-header, .site-footer, main {
  width: min(100% - 40px, 1240px);
  margin-inline: auto;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}
.site-header nav { display: flex; gap: 24px; font-size: 0.88rem; }
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.brand-mark { color: var(--rust); }
.hero { padding: clamp(90px, 14vw, 190px) 0 110px; }
.hero h1, .collection-header h1, .activity-header h1 {
  max-width: 950px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 11vw, 9rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.86;
}
.hero-copy, .collection-summary {
  max-width: 620px;
  margin: 42px 0 0 auto;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--rust);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.listing { padding: 70px 0 120px; border-top: 1px solid var(--line); }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 38px;
}
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: 2.2rem; font-weight: 400; }
.section-heading span { color: var(--moss); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.12em; }
.travelogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1px;
  background: var(--line);
}
.travelogue-card { min-height: 330px; padding: 34px; background: var(--paper); }
.travelogue-card > div { display: flow-root; }
.travelogue-card .richtext-image { height: auto; }
.card-number, .card-meta { color: var(--moss); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.travelogue-card h3 { margin: 64px 0 20px; font-family: var(--serif); font-size: 2.2rem; font-weight: 400; line-height: 1; }
.travelogue-card h3 a { text-decoration: none; }
.travelogue-card h3 a:hover { color: var(--rust); }
.card-byline { color: var(--moss); font-size: 0.82rem; }
.card-activities {
  display: grid;
  gap: 9px;
  padding: 16px 0 0;
  margin: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.card-activities li { display: flex; justify-content: space-between; gap: 18px; }
.card-activities a { font-weight: 700; text-decoration: none; }
.card-activities a:hover { color: var(--rust); }
.card-activities time, .card-more { flex: none; color: var(--moss); font-size: 0.72rem; }
.card-more { margin: 12px 0 0; }
.collection-header, .activity-header { padding: 110px 0 90px; }
.collection-header h1, .activity-header h1 { font-size: clamp(3.7rem, 9vw, 7.5rem); }
.travelogue-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  margin: 48px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.travelogue-stats div { padding: 20px 24px 20px 0; }
.travelogue-stats dt {
  color: var(--moss);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.travelogue-stats dd { margin: 7px 0 0; font-family: var(--serif); font-size: 1.8rem; }
.back-link {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin-top: 42px;
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.back-link:hover { color: var(--rust); }
.activity-list { border-top: 1px solid var(--line); }
.activity-row {
  display: grid;
  grid-template-columns: 170px 1fr auto auto;
  align-items: center;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.activity-row time { color: var(--moss); font-size: 0.8rem; text-transform: uppercase; }
.activity-row h3 { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.7rem); font-weight: 400; }
.activity-row h3 a { text-decoration: none; }
.map-activity-show {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--moss);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.map-activity-show:hover, .map-activity-selected .map-activity-show {
  border-color: var(--rust);
  background: var(--rust);
  color: var(--paper);
}
.map-activity-selected h3 a { color: var(--rust); }
.byline { margin-top: 28px; color: var(--moss); }
.lead-photo img { width: 100%; max-height: 76vh; object-fit: cover; }
figure { margin: 0; }
figcaption { display: flex; justify-content: space-between; gap: 20px; padding-top: 12px; color: var(--moss); font-size: 0.78rem; }
.no-photo {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px solid var(--line);
  color: var(--moss);
  text-align: center;
}
.no-photo span { font-size: 8rem; line-height: 0.5; color: var(--rust); }
.activity-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 10vw; padding: 100px 0; }
.prose { font-family: var(--serif); font-size: clamp(1.2rem, 2vw, 1.55rem); }
.prose p:first-child::first-letter { float: left; margin: 0.08em 0.1em 0 0; color: var(--rust); font-size: 4.7em; line-height: 0.72; }
.activity-facts { padding-left: 28px; border-left: 1px solid var(--line); }
.location { padding: 0 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.location p { margin: 6px 0; }
.location code { font-size: 0.75rem; color: var(--moss); }
.map-section, .overview-map-section, .gallery, .comments, .downloads {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}
.travel-map { height: min(70vh, 650px); background: #d9d4c7; }
.overview-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  min-height: 620px;
  border: 1px solid var(--line);
}
.overview-map-frame { position: relative; min-width: 0; }
.overview-map { height: 100%; min-height: 620px; }
.map-controls {
  position: absolute;
  z-index: 500;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}
.map-controls button {
  padding: 8px 12px;
  border: 1px solid rgba(32, 35, 31, 0.25);
  background: rgba(243, 239, 229, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(32, 35, 31, 0.2);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}
.map-controls button:hover { background: var(--ink); color: var(--paper); }
.map-selection {
  padding: 30px;
  border-left: 1px solid var(--line);
  background: var(--paper);
}
.map-selection h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.1;
}
.map-selection-meta { color: var(--moss); font-size: 0.78rem; }
.map-selection-links { display: grid; gap: 8px; margin-top: 28px; }
.map-selection-links a { font-weight: 750; }
.map-selection-focus,
.map-selection-back,
.map-cluster-activities button {
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.map-selection-focus { margin-top: 16px; }
.map-selection-back { margin-top: 28px; color: var(--moss); }
.map-selection-focus:hover,
.map-selection-back:hover,
.map-cluster-activities button:hover {
  background: transparent;
  color: var(--rust);
}
.map-cluster-activities {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}
.map-legend { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 16px; color: var(--moss); font-size: 0.75rem; }
.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.map-legend i { display: inline-block; width: 14px; height: 14px; }
.legend-location { border-radius: 50%; background: var(--rust); }
.legend-start { background: var(--rust); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.legend-route { height: 4px !important; background: var(--rust); }
.legend-cluster { border-radius: 50%; border: 3px solid var(--paper); background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.legend-region { border: 2px solid #356859; background: rgba(53, 104, 89, 0.2); }
.activity-map-marker { background: transparent; }
.activity-map-marker span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--marker-color);
  color: white;
  box-shadow: 0 1px 5px rgba(32, 35, 31, 0.45);
  font-size: 0.65rem;
}
.activity-map-cluster { background: transparent; }
.activity-map-cluster > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-content: center;
  border: 4px solid rgba(243, 239, 229, 0.88);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 2px 8px rgba(32, 35, 31, 0.4);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}
.activity-map-cluster small {
  margin-top: 3px;
  font-size: 0.48rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
.photo-grid img { width: 100%; aspect-ratio: 9 / 7; object-fit: cover; }
.downloads a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-list { max-width: 820px; }
.comment { padding: 28px 0; border-top: 1px solid var(--line); }
.comment header { display: flex; justify-content: space-between; gap: 20px; }
.comment time { color: var(--moss); font-size: 0.8rem; }
.comment-form, .auth-card form { display: grid; gap: 12px; max-width: 720px; margin-top: 36px; }
textarea, input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.35);
}
button {
  width: fit-content;
  padding: 13px 22px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}
button:hover { background: var(--rust); }
.archive-note, .message { padding: 14px 18px; background: rgba(89, 108, 85, 0.12); }
.messages { width: min(100% - 40px, 1240px); margin: 18px auto; }
.auth-card { max-width: 600px; padding: 100px 0 140px; margin-inline: auto; }
.auth-card h1 { font-family: var(--serif); font-size: 4rem; font-weight: 400; }
.site-footer { padding: 50px 0; border-top: 1px solid var(--line); color: var(--moss); font-size: 0.8rem; }

@media (max-width: 760px) {
  .site-header, .site-footer, main { width: min(100% - 24px, 1240px); }
  .site-header nav { gap: 12px; }
  .hero { padding-top: 80px; }
  .travelogue-grid, .photo-grid, .activity-layout, .overview-map-layout { grid-template-columns: 1fr; }
  .travelogue-stats { grid-template-columns: 1fr; }
  .travelogue-stats div + div { border-top: 1px solid var(--line); }
  .activity-row { grid-template-columns: 1fr auto auto; gap: 8px 12px; }
  .activity-row time { grid-column: 1 / -1; }
  .activity-facts { padding: 28px 0 0; border: 0; border-top: 1px solid var(--line); }
  .overview-map-layout { min-height: 0; }
  .overview-map { min-height: 480px; }
  .map-selection { min-height: 210px; border-top: 1px solid var(--line); border-left: 0; }
  .map-controls { top: 10px; right: 10px; }
  figcaption { display: block; }
}
