*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --background: #ffffff;
  --text: #1f1f1f;
  --strong: #111111;
  --muted: #5f5f5f;
  --secondary: #707070;
  --line: #d8d8d8;
  --line-strong: #b8b8b8;
  --card: #fafafa;
  --card-quiet: #f5f5f3;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover { border-color: var(--strong); }
a:focus-visible { outline: 2px solid var(--strong); outline-offset: 4px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  border: 0;
  background: var(--strong);
  color: #fff;
}

.skip-link:focus { top: 1rem; }

.page {
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 5rem 1.5rem 4.5rem;
}

.nav-back {
  display: inline-block;
  margin-bottom: 3rem;
  border: 0;
  color: var(--secondary);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-back:hover { border: 0; color: var(--strong); }

.eyebrow,
.label {
  display: block;
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow { margin-bottom: 0.75rem; }
.label { margin-bottom: 1.4rem; }

h1 {
  max-width: 760px;
  color: var(--strong);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.lede {
  max-width: 680px;
  margin-top: 1rem;
  color: #343434;
  font-size: 1.03rem;
  line-height: 1.72;
}

.divider {
  width: 24px;
  height: 1px;
  margin: 3rem auto;
  background: var(--line);
}

/* Hiking index */
.hike-list {
  margin-top: 2.25rem;
  list-style: none;
}

.hike-card {
  padding: 1.65rem 0;
  border-top: 1px solid var(--line);
}

.hike-card:last-child { border-bottom: 1px solid var(--line); }

.hike-card a {
  display: block;
  border: 0;
}

.hike-card a:hover .hike-title { color: var(--secondary); }

.hike-meta {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
  color: var(--secondary);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.hike-title {
  color: var(--strong);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.hike-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.empty-state {
  margin-top: 2.25rem;
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

/* Individual hike */
.hike-header { margin-bottom: 2rem; }

.title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.plan-status {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--secondary);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.plan-status-small {
  margin-left: 0.1rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.56rem;
}

.hike-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact {
  min-width: 0;
  padding: 1.05rem 0.8rem 1rem;
  text-align: center;
}

.fact + .fact { border-left: 1px solid var(--line); }

.fact strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--strong);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.fact span {
  display: block;
  margin-top: 0.35rem;
  color: var(--secondary);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.map-frame {
  display: block;
  width: 100%;
  height: max(70vh, 620px);
  border: 0;
}

.map-placeholder {
  display: grid;
  min-height: max(70vh, 620px);
  place-items: center;
  padding: 2rem;
  color: var(--secondary);
  text-align: center;
}

.map-placeholder p { max-width: 520px; }
.map-placeholder code {
  padding: 0.12rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

.map-caption {
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 0.75rem 1.5rem 0;
  color: var(--secondary);
  font-size: 0.72rem;
  text-align: right;
}

.map-caption a { border-color: transparent; }
.map-caption a:hover { border-color: var(--line-strong); }

.hike-footer {
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4.5rem;
  color: var(--secondary);
  font-size: 0.78rem;
  text-align: center;
}

.hike-footer a { border-color: transparent; }
.hike-footer a:hover { border-color: var(--line); color: var(--strong); }

::selection { background: #e8e8e8; color: #111111; }

@media (max-width: 700px) {
  .hike-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact + .fact { border-left: 0; }
  .fact:nth-child(even) { border-left: 1px solid var(--line); }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .fact:last-child { grid-column: 1 / -1; border-left: 0; }
}

@media (max-width: 480px) {
  html { font-size: 16px; }
  .page { padding: 3.5rem 1.2rem 3.5rem; }
  .map-frame,
  .map-placeholder { min-height: 520px; height: 72vh; }
  .map-caption { padding-inline: 1.2rem; }
  .hike-footer { padding-inline: 1.2rem; }
}
