/* To OSH — adventure tracker page (/to-osh/). Loaded only on that page. */

.osh-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.osh-intro .prose { max-width: none; margin: 0; }
.osh-intro .prose h2 { margin-top: 0; }
.osh-charity {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: inset 0 0 0 1px rgba(111, 179, 196, .35);
}
.osh-charity p { color: var(--text-dim); margin: 0 0 1.2rem; }

/* Progress bar reuses .flight-progress from main.css */
.osh-progress {
  margin-top: clamp(2rem, 5vw, 3rem);
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 1.5rem clamp(1.2rem, 4vw, 2rem);
}
.osh-progress__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .4rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.osh-progress__head strong { font-family: var(--font-head); font-size: 1.2rem; color: var(--white); }
.osh-progress__head span { color: var(--text-dim); font-size: .95rem; }
.osh-progress__next { margin: 1.1rem 0 0; color: var(--text-dim); font-size: .95rem; }
.osh-progress__next strong { color: var(--white); }

.osh-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
}
.osh-stats > div {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.osh-stats dt {
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 600;
}
.osh-stats dd {
  margin: .3rem 0 0;
  font-family: var(--font-head);
  font-size: 1.45rem;
  color: var(--white);
}
.osh-stats small { font-family: var(--font-body); font-size: .85rem; color: var(--text-dim); }

/* Map */
.osh-map-wrap { background: var(--bg-3); }
.osh-map {
  height: clamp(380px, 70vh, 640px);
  background: #0d1c26;
}
.osh-map .leaflet-popup-content-wrapper,
.osh-map .leaflet-popup-tip {
  background: var(--bg-2);
  color: var(--text);
  box-shadow: var(--shadow);
}
.osh-map .leaflet-popup-content { font-family: var(--font-body); font-size: .92rem; line-height: 1.45; }
.osh-map .leaflet-popup-content strong { color: var(--white); }
.osh-map a.leaflet-popup-close-button { color: var(--text-dim); }
.osh-map .leaflet-tooltip {
  background: var(--bg-2);
  color: var(--white);
  border: 0;
  box-shadow: var(--shadow);
  font-family: var(--font-body);
}
.osh-map .leaflet-tooltip-top::before { border-top-color: var(--bg-2); }
.osh-map .leaflet-control-attribution { background: rgba(13, 28, 38, .8); color: var(--text-dim); }
.osh-map .leaflet-control-attribution a { color: var(--accent-bright); }
.osh-map .leaflet-bar a { background: var(--bg-2); color: var(--white); border-bottom-color: rgba(255, 255, 255, .1); }
.osh-map .leaflet-bar a:hover { background: var(--bg-3); }
.osh-popup { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; margin: .6rem 0 0; }
.osh-popup dt { color: var(--text-dim); }
.osh-popup dd { margin: 0; }

/* Legs list */
.osh-legs {
  list-style: none;
  padding: 0;
  margin: 2rem auto 0;
  max-width: 900px;
  display: grid;
  gap: .8rem;
}
.osh-leg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .6rem 1.2rem;
  align-items: center;
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  opacity: .6;
}
.osh-leg.is-done, .osh-leg.is-next { opacity: 1; }
.osh-leg.is-next { box-shadow: inset 0 0 0 1px #f0c46c; }
.osh-leg__num {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--bg-3);
  color: var(--text-dim);
  font-weight: 600;
}
.osh-leg.is-done .osh-leg__num { background: var(--accent); color: var(--white); }
.osh-leg__route strong { display: block; font-family: var(--font-head); color: var(--white); font-size: 1.1rem; }
.osh-leg__route span { font-size: .9rem; color: var(--text-dim); }
.osh-leg__pending { font-size: .85rem; color: var(--text-dim); text-align: right; }
.osh-leg.is-next .osh-leg__pending { color: #f0c46c; font-weight: 600; }
.osh-leg__link { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.osh-leg__stats {
  grid-column: 2 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.4rem;
  margin: 0;
  font-size: .88rem;
}
.osh-leg__stats dt { display: inline; color: var(--text-dim); margin-right: .35rem; }
.osh-leg__stats dd { display: inline; margin: 0; color: var(--text); }

.osh-extras {
  list-style: none;
  padding: 0;
  margin: 1.2rem auto 0;
  max-width: 900px;
  display: grid;
  gap: .5rem;
}
.osh-extras li {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.2rem;
  align-items: baseline;
  background: var(--bg-2);
  border-radius: 10px;
  padding: .7rem 1.1rem;
  font-size: .92rem;
  color: var(--text-dim);
}
.osh-extras strong { color: var(--white); }
.osh-extras a { margin-left: auto; font-weight: 600; }
.osh-synced { margin-top: 2.5rem; font-size: .88rem; }

@media (max-width: 860px) {
  .osh-intro { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .osh-leg { grid-template-columns: auto 1fr; padding: .9rem 1rem; }
  .osh-leg__pending, .osh-leg__link { grid-column: 2; text-align: left; }
  .osh-leg__stats { grid-column: 1 / -1; grid-row: auto; }
}
