
:root {
  --accent:    #a04e1d;
  --accent-lt: #e07d42;
  --accent-dim: rgba(160,78,29,0.12);
  --desert-dark: #2a1508;
}

/* ── HERO ───────────────────────────── */
.page-hero {
  min-height: 85vh;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 5rem;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(175deg, #0a0502 0%, #1e0c05 30%, #3a1808 60%, #6a2e10 85%, #9a4418 100%);
}
.canyon-layers {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
}

.page-hero--hike-photo {
  min-height: 72vh;
  justify-content: flex-end;
}
.page-hero--hike-photo .canyon-layers {
  display: none;
}
.page-hero--hike-photo .page-hero-bg:not(.page-hero-photo-layer) {
  display: none;
}
.page-hero-photo-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
}
.page-hero-photo-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 5, 2, 0.94) 0%,
    rgba(10, 5, 2, 0.55) 38%,
    rgba(10, 5, 2, 0.4) 100%
  );
}

.page-main--hike-detail {
  grid-template-columns: minmax(0, 1fr);
}
.page-main--hike-detail .page-sidebar {
  display: none;
}
.page-main--hike-detail .prose-section {
  padding-top: 1.5rem;
}
.page-main--hike-detail .section-rule {
  margin: 1.25rem 0;
}

.trip-photo {
  width: 100%;
  margin: 1.5rem 0;
  overflow: hidden;
}
.trip-photo img {
  width: 100%;
  height: auto;
  display: block;
}
.trip-photo-caption {
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.5rem 0 0;
  letter-spacing: 0.06em;
  border-top: 1px solid var(--border-lt);
  margin-top: 0.15rem;
}
.page-hero-content {
  position: relative; z-index: 2;
  max-width: 820px; text-align: center;
}
.breadcrumb {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(240,235,224,0.55); margin-bottom: 1.5rem;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
}
.breadcrumb a { color: inherit; text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: rgba(240,235,224,0.7); }
.breadcrumb span { opacity: 0.4; }
.page-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 7vw, 6rem);
  font-weight: 600; line-height: 0.95; color: #f0ebe0;
  animation: fadeUp 0.9s ease both;
}
.page-hero-title em {
  display: block; font-style: italic; font-weight: 400;
  font-size: 0.42em; color: rgba(240,235,224,0.55);
  letter-spacing: 0.1em; margin-top: 0.35em;
}
.page-hero-divider { width: 50px; height: 1px; background: var(--accent-lt); margin: 1.75rem auto; }
.page-hero-sub {
  font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(240,235,224,0.6); margin-bottom: 2.5rem;
}
.hero-stats { display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap; }
.h-stat { text-align: center; }
.h-stat-num { font-family: 'Playfair Display', serif; font-size: 2rem; color: #f0ebe0; display: block; line-height: 1; }
.h-stat-lbl { font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(240,235,224,0.5); display: block; margin-top: 0.3rem; }

/* ── QUICK FACTS ─────────────────────── */
.quick-facts { background: var(--ink-soft); border-bottom: 1px solid rgba(255,255,255,0.06); padding: 1.25rem 2rem; overflow-x: auto; }
.quick-facts-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 2.5rem; align-items: center; white-space: nowrap; }
.qf-item { display: flex; flex-direction: column; gap: 0.15rem; flex-shrink: 0; }
.qf-label { font-size: 0.58rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(240,235,224,0.5); }
.qf-value { font-size: 0.82rem; color: rgba(240,235,224,0.8); }
.qf-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.08); flex-shrink: 0; }

/* ── LAYOUT ──────────────────────────── */
.page-main { max-width: 1100px; margin: 0 auto; padding: 0 2rem 5rem; display: grid; grid-template-columns: 1fr 280px; gap: 4rem; align-items: start; }
@media(max-width:900px){ .page-main { grid-template-columns: minmax(0, 1fr); } .page-sidebar { order: 1; position: static !important; padding-top: 1.5rem; } .sidebar-card:has(.toc-nav) { display: none; } }

/* ── PROSE ───────────────────────────── */
.prose-section { padding-top: 4rem; }
.prose-eyebrow { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.prose-title { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 400; color: var(--ink); margin-bottom: 1.25rem; line-height: 1.2; }
.prose p { font-size: 0.92rem; color: #3a3530; line-height: 1.8; margin-bottom: 1.1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 500; color: var(--ink); }
.prose a { color: var(--accent); }
.section-rule { height: 1px; background: var(--border); margin: 2.5rem 0; }

/* ── BEST TIME ───────────────────────── */
.months-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin: 1.5rem 0; }
@media(max-width:640px){ .months-grid { grid-template-columns: repeat(6,1fr); } }
.month-cell { text-align: center; padding: 0.5rem 0.2rem; }
.month-cell .month-name { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 0.3rem; color: var(--muted); }
.month-cell .month-dot { width: 8px; height: 8px; border-radius: 50%; margin: 0 auto; }
.month-bad  .month-dot { background: rgba(0,0,0,0.1); }
.month-ok   .month-dot { background: rgba(194,98,42,0.35); }
.month-good .month-dot { background: var(--accent); }
.month-peak .month-dot { background: var(--accent-lt); box-shadow: 0 0 0 2px rgba(224,125,66,0.3); }
.month-legend { display: flex; gap: 1.5rem; font-size: 0.68rem; color: var(--muted); flex-wrap: wrap; }
.month-legend span { display: flex; align-items: center; gap: 0.4rem; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── CAMPGROUND TABLE ────────────────── */
.camp-table { width: 100%; border-collapse: collapse; margin-top: 1.25rem; font-size: 0.82rem; }
.camp-table th { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); padding: 0.5rem 0.75rem; text-align: left; border-bottom: 2px solid var(--border); font-weight: 400; }
.camp-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border-lt); color: #3a3530; vertical-align: top; }
.camp-table tr:last-child td { border-bottom: none; }
.camp-table tr:hover td { background: rgba(0,0,0,0.02); }
.camp-table .cn { font-weight: 500; color: var(--ink); }
.camp-table .cost { color: var(--accent); font-weight: 500; }
.camp-table .hard { color: #b5312b; font-weight: 500; font-size: 0.75rem; }
.camp-table .easy { color: #3d6b3d; font-weight: 500; font-size: 0.75rem; }
.camp-table .med { color: #9a5322; font-weight: 500; font-size: 0.75rem; }

/* ── PRACTICAL ───────────────────────── */
.practical-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1px; background: var(--border); margin-top: 1.5rem; }
.practical-card { background: var(--paper); padding: 1.5rem; transition: background 0.2s; }
.practical-card:hover { background: var(--warm); }
.practical-card h4 { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.practical-card p { font-size: 0.82rem; color: #3a3530; line-height: 1.65; }

/* ── SIDEBAR ─────────────────────────── */
.page-sidebar { padding-top: 4rem; position: sticky; top: 78px; }
.sidebar-card { background: var(--warm); border: 1px solid var(--border); padding: 1.5rem; margin-bottom: 1rem; }
.sidebar-card h3 { font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.sidebar-list { list-style: none; }
.sidebar-list li { display: flex; justify-content: space-between; align-items: baseline; padding: 0.5rem 0; border-bottom: 1px solid var(--border-lt); font-size: 0.82rem; color: var(--ink); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list .lbl { color: var(--muted); font-size: 0.78rem; }
.sidebar-tip { background: var(--ink); padding: 1.25rem; margin-top: 1rem; }
.sidebar-tip h4 { font-size: 0.58rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold-lt); margin-bottom: 0.6rem; }
.sidebar-tip p { font-size: 0.78rem; color: rgba(240,235,224,0.65); line-height: 1.6; }
.toc-nav { list-style: none; }
.toc-nav li a { display: block; font-size: 0.8rem; color: var(--muted); text-decoration: none; padding: 0.45rem 0; border-bottom: 1px solid var(--border-lt); transition: color 0.2s, padding-left 0.2s; }
.toc-nav li a:hover { color: var(--ink); padding-left: 0.4rem; }
.toc-nav li:last-child a { border-bottom: none; }

/* ── RELATED ─────────────────────────── */
.related-section { background: var(--ink); padding: 4rem 2rem; }
.related-inner { max-width: 1100px; margin: 0 auto; }
.related-inner .section-eyebrow { color: var(--gold-lt); font-size: 0.62rem; letter-spacing: 0.35em; text-transform: uppercase; }
.related-title { font-family: 'Playfair Display', serif; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400; color: #f0ebe0; margin: 0.5rem 0 2rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,0.06); }
@media(max-width:700px){ .related-grid { grid-template-columns: 1fr; } }
.related-card { background: var(--ink-soft); padding: 1.75rem; text-decoration: none; color: inherit; display: block; transition: background 0.2s; }
.related-card:hover { background: rgba(255,255,255,0.04); }
.related-region { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(240,235,224,0.5); margin-bottom: 0.5rem; }
.related-name { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 400; color: #f0ebe0; margin-bottom: 0.5rem; line-height: 1.2; }
.related-desc { font-size: 0.82rem; color: rgba(240,235,224,0.6); line-height: 1.6; margin-bottom: 1rem; }
.related-cta { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-lt); display: flex; align-items: center; gap: 0.4rem; transition: gap 0.2s; }
.related-card:hover .related-cta { gap: 0.65rem; }
.related-cta::after { content: '→'; }

/* ─── MOBILE OVERRIDES (injected) ─── */
@media (max-width: 768px) {
  .page-hero         { padding: 5rem 1rem 3rem !important; min-height: 65vh; }
  .page-hero-content { max-width: 100% !important; }
  .page-hero-title   { font-size: clamp(2rem, 9vw, 3rem) !important; }
  .page-hero-sub     { font-size: 0.8rem; }
  .hero-stats        { gap: 1.5rem; }
  .h-stat-lbl        { font-size: 0.68rem !important; letter-spacing: 0.16em !important; }

  .quick-facts       { padding: 0.9rem 1rem !important; }
  .quick-facts-inner { white-space: normal !important; flex-wrap: wrap !important; gap: 0.75rem 1.25rem !important; }
  .qf-divider        { display: none !important; }
  .qf-item           { flex: 1 1 42%; min-width: 110px; }
  .qf-label          { font-size: 0.68rem !important; }
  .qf-value          { font-size: 0.9rem !important; }

  .page-main         { padding: 0 1rem 3rem !important; gap: 2rem !important; grid-template-columns: minmax(0, 1fr) !important; }
  .page-content      { min-width: 0 !important; }
  .prose-section     { padding-top: 2rem !important; }
  .page-main--hike-detail .prose-section { padding-top: 1.5rem !important; }
  .prose-title       { font-size: clamp(1.3rem, 5vw, 1.75rem) !important; }
  .prose p           { font-size: 1rem !important; line-height: 1.75 !important; }
  .section-rule      { margin: 2rem 0 !important; }
  .page-main--hike-detail .section-rule { margin: 1.25rem 0 !important; }

  .day-card { padding: 8px !important; }
  .hike-card, .island-card, .city-card { padding: 1.1rem !important; }
  .day-top, .hike-top, .island-top, .city-top     { flex-direction: column !important; gap: 0.6rem !important; }
  .day-title, .hike-name, .island-name, .city-name { font-size: 1.25rem !important; }
  .day-desc, .hike-desc, .island-desc, .city-desc   { font-size: 0.98rem !important; }
  .day-detail                                       { font-size: 0.9rem !important; }

  .day-detail-grid, .hike-detail-grid,
  .island-detail-grid, .city-detail-grid { grid-template-columns: 1fr !important; gap: 0.4rem !important; }

  .practical-grid    { grid-template-columns: 1fr !important; }
  .related-grid      { grid-template-columns: 1fr !important; }
  .related-section   { padding: 2.5rem 1rem !important; }

  .page-sidebar      { padding-top: 1.25rem !important; }
  .sidebar-card      { padding: 1rem !important; }

  .table-scroll      { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .camp-table, .transit-table { min-width: 520px; }

  .months-grid       { grid-template-columns: repeat(6,1fr) !important; }
}

@media (max-width: 560px) {
  .page-hero         { padding: 4.5rem 0.875rem 2.5rem !important; min-height: 60vh !important; }
  .page-hero-title   { font-size: clamp(1.75rem, 9vw, 2.5rem) !important; }
  .page-hero-title em { font-size: 0.38em !important; letter-spacing: 0.04em !important; }
  .page-hero-sub     { font-size: 0.72rem !important; letter-spacing: 0.08em !important; }
  .breadcrumb        { font-size: 0.7rem; gap: 0.3rem; }

  .quick-facts       { padding: 0.75rem 0.875rem !important; }
  .quick-facts-inner { gap: 0.6rem 1rem !important; }
  .qf-item           { flex: 1 1 100% !important; min-width: 0 !important; }

  .page-main         { padding: 0 0.875rem 2rem !important; }

  .day-card { padding: 8px !important; }
  .hike-card, .island-card, .city-card { padding: 0.875rem !important; }
  .day-title, .hike-name, .island-name, .city-name { font-size: 1.2rem !important; }
  .day-desc, .hike-desc, .island-desc, .city-desc   { font-size: 0.92rem !important; }
  .day-detail, .hike-detail                         { font-size: 0.88rem !important; }
  .day-pill                                         { font-size: 0.68rem !important; }

  .hero-stats        { gap: 1rem; }
  .h-stat-num        { font-size: 1.5rem !important; }
  .h-stat-lbl        { font-size: 0.68rem !important; letter-spacing: 0.15em !important; }

  .day-detail strong { font-size: 0.65rem !important; }
  .sidebar-tip h4    { font-size: 0.65rem !important; }

  .related-card      { padding: 1.25rem !important; }
  .related-name      { font-size: 1.1rem !important; }
}

@media (max-width: 400px) {
  .page-hero-sub     { font-size: 0.76rem !important; }
  .breadcrumb        { font-size: 0.72rem !important; }
  .qf-label          { font-size: 0.7rem !important; }
  .qf-value          { font-size: 0.88rem !important; }
  .prose p           { font-size: 0.98rem !important; }
  .day-title, .hike-name, .island-name, .city-name { font-size: 1.24rem !important; }
  .day-desc, .hike-desc, .island-desc, .city-desc   { font-size: 0.94rem !important; }
  .day-detail, .hike-detail                         { font-size: 0.9rem !important; }
  .day-pill                                         { font-size: 0.7rem !important; }
}

