/* Camino View official brand palette (brand sheet, approved 2026-10-16):
   Espresso ink, Ground Ivory and Sand, Santiago Red, and the route colors. */
:root {
  --ivory: #f8f0dd;
  --paper: #fffdf7;
  --sand: #e0c497;
  --sand-soft: #eee0c4;
  --ink: #221410;
  --ink-soft: #5d5148;
  --red: #c30000;
  --blue: #5379a8;
  --sage: #7d9e91;
  --ochre: #c3b052;
  --terra: #d7704f;
  --purple: #886191;
  --rose: #e89988;
  --line: #ddd0b4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Barlow", "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 18px;
}
h1, h2, h3, .brand span {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.15;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; margin-top: 2rem; }
h3 { font-size: 1.35rem; }
a { color: var(--red); }
a:hover { text-decoration: none; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem 1rem;
  padding: 0.8rem 1.25rem;
  background: linear-gradient(180deg, var(--ivory), var(--sand-soft));
  border-bottom: 2px solid var(--sand);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font-size: 1.5rem; }
.brand img { border-radius: 50%; }
.site-header nav a { margin-left: 1.05rem; color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 500; }
.site-header nav a:hover { color: var(--red); }
main { max-width: 920px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero img { border-radius: 50%; }
.hero h1 { font-size: 3rem; margin: 1rem 0 0.5rem; }
.button {
  display: inline-block; background: var(--red); color: #fff;
  padding: 0.6rem 1.2rem; border-radius: 6px; text-decoration: none; margin: 0.25rem;
  font-weight: 600;
}
.button.ghost { background: transparent; color: var(--red); border: 2px solid var(--red); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 1rem 1.1rem;
  border-top: 4px solid var(--sand);
}
.card h3 { margin-top: 0.2rem; }
.card.wide { margin-bottom: 1rem; }
.facts { color: var(--ink-soft); font-size: 0.92rem; }
.guide table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.98rem; }
.guide th, .guide td { border: 1px solid var(--line); padding: 0.45rem 0.6rem; text-align: left; }
.guide th { background: var(--sand-soft); }
.guide tr:nth-child(even) td { background: var(--paper); }
.plan-box {
  background: var(--paper); border: 2px solid var(--sand); border-radius: 8px;
  padding: 1rem 1.2rem; margin: 1.5rem 0;
}
.plan-box .slot-tag {
  display: inline-block; font-size: 0.78rem; color: var(--ink-soft);
  border: 1px dashed var(--sand); border-radius: 4px; padding: 0.05rem 0.4rem; margin-left: 0.4rem;
}
.plan-box a[aria-disabled="true"] { color: var(--ink-soft); pointer-events: none; text-decoration: underline dotted; }
.signup {
  background: linear-gradient(180deg, var(--sand-soft), var(--ivory));
  border: 1px solid var(--sand); border-radius: 10px;
  padding: 1.4rem 1.5rem; margin: 2rem 0; text-align: center;
}
.signup form { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 0.8rem; }
.signup input[type="email"] {
  font: inherit; padding: 0.55rem 0.8rem; border: 1px solid var(--sand);
  border-radius: 6px; min-width: 260px; background: #fff;
}
.signup button {
  font: inherit; background: var(--red); color: #fff; border: 0;
  padding: 0.55rem 1.1rem; border-radius: 6px; cursor: pointer; font-weight: 600;
}
.fine { font-size: 0.85rem; color: var(--ink-soft); }
.news-list { list-style: none; padding: 0; }
.news-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.date { color: var(--ink-soft); font-size: 0.9rem; }
.crumbs { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 1rem; }
.about-badge { float: right; border-radius: 50%; margin: 0 0 1rem 1rem; }
.site-footer {
  text-align: center; padding: 2rem 1rem 2.5rem;
  border-top: 2px solid var(--sand);
  background: linear-gradient(0deg, var(--ivory), var(--sand-soft));
}
.site-footer img { border-radius: 50%; }
.sr-only { position: absolute; left: -9999px; }

/* ---- interactive maps ---- */
.cv-map {
  height: 420px; border: 1px solid var(--sand); border-radius: 10px;
  margin: 1rem 0 0.4rem; z-index: 0; background: var(--sand-soft);
}
.cv-map.tall { height: 520px; }
.map-credit { font-size: 0.8rem; color: var(--ink-soft); margin: 0.2rem 0 1.2rem; }
.map-legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.92rem; }
.map-legend .swatch { display: inline-block; width: 22px; height: 5px; border-radius: 3px; vertical-align: middle; margin-right: 0.35rem; }
.leaflet-popup-content { font-family: "Barlow", sans-serif; font-size: 0.95rem; }

/* ---- planner tool ---- */
.tool {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.2rem 1.3rem; margin: 1.2rem 0;
}
.tool .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem; }
.tool label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; }
.tool input, .tool select {
  width: 100%; font: inherit; padding: 0.5rem 0.6rem;
  border: 1px solid var(--sand); border-radius: 6px; background: #fff;
}
.tool .actions { margin-top: 1rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.tool button {
  font: inherit; font-weight: 600; background: var(--red); color: #fff; border: 0;
  padding: 0.55rem 1.1rem; border-radius: 6px; cursor: pointer;
}
.tool button.secondary { background: transparent; color: var(--red); border: 2px solid var(--red); }
.plan-summary { font-size: 1.05rem; margin: 1rem 0 0.4rem; }
.plan-table { border-collapse: collapse; width: 100%; margin: 0.8rem 0; font-size: 0.96rem; }
.plan-table th, .plan-table td { border: 1px solid var(--line); padding: 0.4rem 0.55rem; text-align: left; }
.plan-table th { background: var(--sand-soft); }
.plan-table tr.rest td { background: var(--sand-soft); color: var(--ink-soft); font-style: italic; }
.plan-table tr.long td { background: #fbeae8; }
.budget-out { font-size: 1.05rem; }
@media print {
  .site-header, .site-footer, .tool .fields, .tool .actions, .signup, .no-print { display: none !important; }
  body { background: #fff; }
}

/* ---- quiz and FAQ ---- */
.quiz { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem; margin: 1.2rem 0; }
.quiz fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.quiz legend { font-weight: 600; margin-bottom: 0.4rem; }
.quiz label { display: block; padding: 0.25rem 0; font-weight: 400; }
.quiz button { font: inherit; font-weight: 600; background: var(--blue); color: #fff; border: 0; padding: 0.55rem 1.1rem; border-radius: 6px; cursor: pointer; }
.quiz-result { margin-top: 1rem; font-size: 1.05rem; }
.faq-item { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.faq-item h3 { margin: 0 0 0.35rem; }
.faq-item p { margin: 0.2rem 0; }

@media (max-width: 640px) {
  .hero h1 { font-size: 2.2rem; }
  h1 { font-size: 2rem; }
  .site-header nav a { margin-left: 0.7rem; }
  .about-badge { float: none; display: block; margin: 0 auto 1rem; }
  .cv-map { height: 340px; }
  .cv-map.tall { height: 420px; }
}

/* ---- v3 design pass: depth, sticky header, dark footer, explorer ---- */
::selection { background: rgba(195, 0, 0, 0.18); }
.site-header {
  position: sticky; top: 0; z-index: 600;
  background: rgba(248, 240, 221, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(34, 20, 16, 0.10);
  border-bottom: 1px solid var(--sand);
}
.route-ribbon { height: 6px; }
.hero { padding: 3rem 0 1.5rem; }
.hero h1 { font-size: 3.4rem; }
.hero p { max-width: 640px; margin-left: auto; margin-right: auto; }
.hero img { box-shadow: 0 10px 30px rgba(34, 20, 16, 0.25); }
.kicker {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem;
  font-weight: 700; color: var(--red); margin-bottom: 0.3rem;
}
.button { box-shadow: 0 3px 10px rgba(195, 0, 0, 0.25); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(195, 0, 0, 0.28); text-decoration: none; }
.button.ghost { box-shadow: none; }
.card {
  border-top: 4px solid var(--rc, var(--sand));
  box-shadow: 0 2px 8px rgba(34, 20, 16, 0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(34, 20, 16, 0.13); }
.guide th, .plan-table th { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.signup, .tool, .quiz { box-shadow: 0 2px 10px rgba(34, 20, 16, 0.07); }
.site-footer {
  background: var(--ink); color: var(--ivory);
  border-top: 4px solid var(--red);
}
.site-footer a { color: var(--sand); }
.site-footer .fine { color: #b3a68d; }
.site-footer img { box-shadow: 0 0 0 3px var(--sand); }
.cv-map { box-shadow: 0 4px 18px rgba(34, 20, 16, 0.13); border: 1px solid var(--sand); }
.explorer {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.1rem 1.2rem 1.3rem; margin: 1.2rem 0;
  box-shadow: 0 4px 18px rgba(34, 20, 16, 0.08);
}
.stats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.4rem; }
.chip {
  background: var(--sand-soft); border: 1px solid var(--sand); border-radius: 999px;
  padding: 0.28rem 0.8rem; font-size: 0.92rem;
}
.profile-wrap { position: relative; margin-top: 0.6rem; }
.profile {
  width: 100%; height: auto; display: block;
  background: linear-gradient(180deg, #fffdf7, var(--sand-soft));
  border: 1px solid var(--line); border-radius: 8px;
}
.profile-tip {
  position: absolute; top: -6px; transform: translateX(-50%);
  background: var(--ink); color: var(--ivory); font-size: 0.82rem;
  padding: 0.15rem 0.55rem; border-radius: 999px; white-space: nowrap;
  display: none; pointer-events: none;
}
.stage-head { display: flex; align-items: center; justify-content: space-between; margin-top: 1.2rem; }
.stage-head h3 { margin: 0; }
.stage-reset {
  font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--red); border: 2px solid var(--red);
  padding: 0.35rem 0.9rem; border-radius: 999px;
}
.stage-reset:hover { background: var(--red); color: #fff; }
.stage-table { border-collapse: collapse; width: 100%; margin: 0.6rem 0 0; font-size: 0.96rem; }
.stage-table th, .stage-table td { border: 1px solid var(--line); padding: 0.42rem 0.55rem; text-align: left; }
.stage-table th { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.stage-table tbody tr { cursor: pointer; }
.stage-table tbody tr:hover td { background: var(--sand-soft); }
.stage-table tr.active td { background: #f0dfba; }
.stage-table tr.active td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.stage-table td.gain { color: #22685a; font-weight: 600; }
.stage-table td.loss { color: var(--terra); font-weight: 600; }
a:focus-visible, button:focus-visible, .stage-row:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (max-width: 640px) {
  .hero h1 { font-size: 2.5rem; }
  .stage-table { font-size: 0.88rem; }
}

/* ---- carry-along pass: locate controls and mobile polish ---- */
.locate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0.6rem 0 0.2rem; }
.locate-btn {
  font: inherit; font-weight: 600; cursor: pointer; min-height: 44px;
  background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 0.5rem 1.1rem;
  box-shadow: 0 3px 10px rgba(83, 121, 168, 0.35);
}
.locate-btn:active { transform: translateY(1px); }
.locate-out { font-size: 0.95rem; color: var(--ink-soft); }
.gpx-link { margin-left: auto; font-weight: 600; font-size: 0.95rem; }
.tool input, .tool select, .signup input[type="email"] { font-size: 16px; }
.stage-table td, .stage-table th { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.site-header nav a { padding: 0.35rem 0.1rem; display: inline-block; }
@media (max-width: 640px) {
  body { font-size: 17px; }
  main { padding: 1rem 0.9rem 2.2rem; }
  .explorer { padding: 0.8rem 0.7rem 1rem; }
  .guide table, .plan-table, .stage-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stage-table thead th { position: sticky; top: 0; }
  .gpx-link { margin-left: 0; }
  .hero { padding: 2rem 0 1rem; }
  .stats .chip { font-size: 0.88rem; padding: 0.22rem 0.65rem; }
  .button { min-height: 44px; padding: 0.65rem 1.15rem; }
}
