/*
 * hills-calculators.css
 * Shared styles for all RC race hills calculator pages.
 * RC brand tokens are defined here; race-specific tokens
 * (--race-primary, --race-accent, etc.) are set per-page.
 * ============================================================ */

/* ── RC Brand tokens — constant across ALL race pages ───── */
:root {
  --rc-green:      #2E9B6A;
  --rc-green-dark: #1F7A51;
  --rc-navy:       #0C2340;
  --rc-blue:       #1B4F8A;

  /* Neutral palette */
  --white:      #FFFFFF;
  --off-white:  #F4F7FA;
  --border:     #DDE3EC;
  --text:       #1A1F2E;
  --text-muted: #6B7280;
  --shadow:     0 2px 12px rgba(12,31,63,0.09);
  --shadow-lg:  0 8px 40px rgba(12,31,63,0.16);

  /* Typography */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
}

/* ── Global reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
  overflow-x: hidden;
}
.container { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* ================================================================
   RC SITE HEADER
   ================================================================ */
.rc-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rc-header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.rc-logo {
  display: flex; align-items: center;
  text-decoration: none; flex-shrink: 0;
}
.rc-logo img {
  height: 44px; width: auto; display: block;
}
.rc-nav {
  display: flex; align-items: center; gap: 4px; flex: 1; margin-left: 20px;
}
.rc-nav a {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  color: #374151; text-decoration: none;
  padding: 8px 12px; border-radius: 6px;
  display: flex; align-items: center; gap: 4px;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.rc-nav a:hover { background: var(--off-white); color: var(--rc-navy); }
.rc-nav a svg { width: 12px; height: 12px; opacity: 0.5; }
.rc-login {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  color: var(--rc-navy); background: transparent;
  border: 2px solid var(--rc-navy); border-radius: 50px;
  padding: 7px 22px; cursor: pointer; text-decoration: none;
  transition: all 0.15s; white-space: nowrap;
}
.rc-login:hover { background: var(--rc-navy); color: var(--white); }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative; min-height: 500px;
  display: flex; align-items: center; overflow: hidden;
  background: var(--race-primary);
}
.hero-photo {
  position: absolute; inset: 0;
  background-image: var(--race-hero-image);
  background-size: cover; background-position: center 35%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: var(--race-hero-overlay);
}
.hero-accent-bar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(to right, var(--race-accent) 0%, var(--race-secondary) 40%, transparent 100%);
}
.hero-content { position: relative; z-index: 2; padding: 80px 0 76px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(200,39,74,0.15);
  border: 1px solid rgba(200,39,74,0.35);
  border-radius: 20px; padding: 5px 14px;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: #F4A0B0;
  margin-bottom: 18px;
}
.hero-badge::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%; background: var(--race-accent);
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(40px,5.5vw,66px);
  font-weight: 800; color: var(--white); line-height: 1.06;
  letter-spacing: -0.5px; margin-bottom: 16px; max-width: 680px;
}
.hero h1 em { font-style: normal; color: #6EE0AA; }
.hero-sub {
  font-size: 17px; color: rgba(255,255,255,0.78);
  max-width: 520px; margin-bottom: 34px; line-height: 1.65;
}
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rc-green); color: var(--white);
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  letter-spacing: 0.3px; text-transform: uppercase;
  padding: 15px 32px; border-radius: 8px; border: none;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(46,155,106,0.35);
}
.btn-primary:hover {
  background: var(--rc-green-dark); transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46,155,106,0.45);
}
.hero-proof {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: rgba(255,255,255,0.55);
}
.hero-proof strong { color: rgba(255,255,255,0.85); }

/* ================================================================
   QUICK FACTS STRIP
   ================================================================ */
.facts-strip { background: var(--race-primary); }
.facts-grid {
  display: grid; grid-template-columns: repeat(6,1fr);
  border-top: 3px solid var(--race-accent);
}
.fact {
  padding: 20px 18px; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.fact:last-child { border-right: none; }
.fact-val {
  display: block; font-family: var(--font-display);
  font-size: 22px; font-weight: 700; color: var(--white);
  line-height: 1.1; margin-bottom: 4px;
}
.fact-val.accent { color: #F4A0B0; }
.fact-lbl {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.8px; color: rgba(255,255,255,0.42);
}

/* ================================================================
   CONTENT INTRO
   ================================================================ */
.intro { background: var(--white); padding: 52px 0 44px; }
.intro h2 {
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  color: var(--rc-navy); margin-bottom: 14px;
}
.intro p { font-size: 16px; color: var(--text-muted); max-width: 640px; margin-bottom: 12px; }

/* ================================================================
   CALCULATOR SECTION
   ================================================================ */
.calc-section { background: var(--off-white); padding: 48px 0 64px; }
.section-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--rc-green);
  margin-bottom: 10px;
}
.section-eyebrow::before { content: ''; display: block; width: 22px; height: 2px; background: var(--rc-green); }
.calc-section h2 {
  font-family: var(--font-display); font-size: 36px; font-weight: 800;
  color: var(--rc-navy); margin-bottom: 8px;
}
.calc-section .section-sub {
  font-size: 16px; color: var(--text-muted); margin-bottom: 32px; max-width: 560px;
}

/* Social proof bar */
.proof-bar {
  background: linear-gradient(135deg, var(--race-primary) 0%, var(--race-secondary) 100%);
  border-radius: 12px 12px 0 0;
  padding: 18px 28px;
  display: flex; align-items: center; gap: 0; flex-wrap: wrap;
}
.proof-stat {
  display: flex; align-items: center; gap: 12px; flex: 1;
  min-width: 160px; padding: 4px 0;
}
.proof-stat + .proof-stat {
  border-left: 1px solid rgba(255,255,255,0.12);
  margin-left: 24px; padding-left: 24px;
}
.proof-num {
  font-family: var(--font-display); font-size: 30px; font-weight: 800;
  color: #F4A0B0; line-height: 1;
}
.proof-txt { font-size: 13px; color: rgba(255,255,255,0.68); line-height: 1.4; }

/* Main calculator card */
.calc-card {
  background: var(--white); border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.calc-inputs { padding: 32px 36px 28px; }
.calc-inputs h3 {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted);
  margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.inputs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.input-group label {
  display: block; font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.time-row { display: flex; align-items: center; gap: 6px; }
.time-box { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.time-box input {
  width: 100%; text-align: center;
  font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--rc-navy);
  background: var(--off-white); border: 2px solid var(--border);
  border-radius: 8px; padding: 10px 4px; outline: none; transition: border-color 0.15s;
}
.time-box input:focus { border-color: var(--race-secondary); }
.time-box span {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-muted);
}
.time-colon {
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
  color: var(--border); padding-bottom: 20px;
}
.pace-toggle {
  display: flex; background: var(--off-white); border: 2px solid var(--border);
  border-radius: 8px; overflow: hidden; height: 56px;
}
.pace-toggle button {
  flex: 1; font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: 0.3px; border: none; cursor: pointer;
  background: transparent; color: var(--text-muted); transition: all 0.15s;
}
.pace-toggle button.active { background: var(--rc-navy); color: var(--white); }
.slider-group { margin-bottom: 30px; }
.slider-header {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px;
}
.slider-header label {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted);
}
.slider-val {
  font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--rc-navy);
}
.slider-val span { font-size: 12px; color: var(--text-muted); font-weight: 500; }
input[type=range] {
  width: 100%; height: 6px; border-radius: 3px; appearance: none;
  background: linear-gradient(to right, var(--rc-green) 0%, var(--rc-green) 33%, var(--border) 33%, var(--border) 100%);
  outline: none; margin-bottom: 8px;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--rc-green);
  box-shadow: 0 2px 8px rgba(46,155,106,0.3); cursor: pointer; transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider-hints {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}
.calc-submit {
  width: 100%; background: var(--rc-green); color: var(--white);
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  padding: 18px 32px; border-radius: 10px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(46,155,106,0.28);
}
.calc-submit:hover {
  background: var(--rc-green-dark); transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(46,155,106,0.4);
}
.calc-note { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* ================================================================
   RESULTS SECTION
   ================================================================ */
.results { display: none; }
.results.visible { display: block; }

.results-summary {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 1px; background: var(--border);
  border-top: 1px solid var(--border);
}
.result-stat { background: var(--white); padding: 20px 22px; text-align: center; }
.result-stat-lbl {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 6px;
}
.result-stat-val {
  font-family: var(--font-display); font-size: 28px; font-weight: 800;
  color: var(--rc-navy); line-height: 1;
}
.result-stat-val.accent { color: var(--race-accent); }
.result-stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.mile-table-wrap { padding: 28px 36px 32px; overflow-x: auto; }
.mile-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mile-table th {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted);
  padding: 8px 12px; text-align: left; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.mile-table td {
  padding: 9px 12px; border-bottom: 1px solid #F0F4F8; vertical-align: middle;
}
.mile-table tr:last-child td { border-bottom: none; }
.mile-table tr:hover td { background: #FAFBFC; }
.mile-num {
  font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--rc-navy);
}
.mile-label { font-size: 12px; color: var(--text-muted); }
.elev-tag {
  display: inline-block; font-family: var(--font-display); font-size: 13px;
  font-weight: 600; padding: 2px 8px; border-radius: 4px;
}
.elev-up   { background: #FEF3C7; color: #92400E; }
.elev-down { background: #DCFCE7; color: #166534; }
.elev-flat { background: var(--off-white); color: var(--text-muted); }
.effort-badge {
  display: inline-block; font-family: var(--font-display); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px; padding: 3px 10px; border-radius: 20px;
}
.effort-push     { background: #DCFCE7; color: #166534; }
.effort-maintain { background: #DBEAFE; color: #1E40AF; }
.effort-gradual  { background: #FEF3C7; color: #92400E; }
.effort-hold     { background: #FEE2E2; color: #991B1B; }
.pace-val {
  font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--rc-navy);
}
.pace-diff-fast { color: #166534; font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.pace-diff-slow { color: #991B1B; font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.bank-ahead { color: #166534; font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.bank-behind { color: #991B1B; font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.elapsed-val { color: var(--text-muted); font-size: 13px; }
.table-section-row td {
  background: var(--race-primary); color: rgba(255,255,255,0.7);
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; padding: 7px 12px;
}
.table-footnote { font-size: 12px; color: var(--text-muted); padding: 0 36px 16px; }

/* Post-results email CTA */
.save-plan-bar {
  margin: 0 36px 32px;
  background: linear-gradient(135deg, #F0F9F4 0%, #E8F5EE 100%);
  border: 1px solid rgba(46,155,106,0.25);
  border-radius: 12px; padding: 24px 28px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.save-plan-text h4 {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--rc-navy); margin-bottom: 4px;
}
.save-plan-text p { font-size: 14px; color: var(--text-muted); }
.save-plan-form { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.save-plan-form input[type=email] {
  flex: 1; padding: 10px 14px; border: 2px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: var(--font-body); outline: none; transition: border-color 0.15s;
}
.save-plan-form input[type=email]:focus { border-color: var(--rc-green); }
.save-plan-form button {
  background: var(--rc-green); color: var(--white);
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px;
  padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer;
  white-space: nowrap; transition: background 0.15s;
}
.save-plan-form button:hover { background: var(--rc-green-dark); }
.save-privacy { font-size: 12px; color: var(--text-muted); margin-top: 8px; width: 100%; }

/* ================================================================
   COURSE SECTIONS — editorial content
   ================================================================ */
.course-guide { background: var(--white); padding: 56px 0; }
.course-guide h2 {
  font-family: var(--font-display); font-size: 34px; font-weight: 800;
  color: var(--rc-navy); margin-bottom: 8px;
}
.course-guide .section-sub {
  font-size: 16px; color: var(--text-muted); margin-bottom: 36px; max-width: 600px;
}
.segment {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 20px;
}
.segment-head {
  background: var(--off-white); padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--border);
}
.segment-num {
  font-family: var(--font-display); font-size: 32px; font-weight: 800;
  color: var(--race-primary); line-height: 1; margin-right: 4px; flex-shrink: 0;
}
.segment-info .name {
  font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--rc-navy);
}
.segment-info .miles { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.segment-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; padding: 5px 12px; border-radius: 20px;
}
.badge-green { background: #DCFCE7; color: #166534; }
.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-red   { background: #FEE2E2; color: #991B1B; }
.badge-blue  { background: #DBEAFE; color: #1E40AF; }
.segment-body { padding: 24px 28px; }
.segment-stats {
  display: flex; gap: 20px; flex-wrap: wrap;
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 18px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.segment-stats span { display: flex; align-items: center; gap: 5px; }
.segment-stats span strong { color: var(--rc-navy); }
.segment-body p { font-size: 15px; color: var(--text); margin-bottom: 12px; line-height: 1.65; }
.segment-body p:last-child { margin-bottom: 0; }
.callout {
  background: #FFFBEB; border-left: 3px solid var(--race-accent);
  border-radius: 0 8px 8px 0; padding: 12px 18px;
  font-size: 14px; font-weight: 500; color: #78350F; margin: 16px 0;
}

/* ================================================================
   WEATHER TABLE
   ================================================================ */
.weather-section { background: var(--off-white); padding: 52px 0; }
.weather-section h2 {
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  color: var(--rc-navy); margin-bottom: 8px;
}
.weather-section .section-sub {
  font-size: 16px; color: var(--text-muted); margin-bottom: 28px; max-width: 600px;
}
.weather-section p { font-size: 15px; color: var(--text); margin-bottom: 16px; line-height: 1.65; max-width: 700px; }
.data-table {
  width: 100%; border-collapse: collapse; background: var(--white);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 16px;
}
.data-table th {
  background: var(--race-primary); color: rgba(255,255,255,0.9);
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px; padding: 12px 16px; text-align: left;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFBFD; }
.data-table .year {
  font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--rc-navy);
}
.data-table .notable { font-size: 13px; color: var(--text-muted); }
.tag-warm  { background: #FEE2E2; color: #991B1B; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.tag-ideal { background: #DCFCE7; color: #166534; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.tag-cool  { background: #DBEAFE; color: #1E40AF; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }

/* ================================================================
   FAQ SECTION
   ================================================================ */
.faq-section { background: var(--white); padding: 52px 0; }
.faq-section h2 {
  font-family: var(--font-display); font-size: 30px; font-weight: 700;
  color: var(--rc-navy); margin-bottom: 28px;
}
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--rc-navy); margin-bottom: 10px;
}
.faq-a { font-size: 15px; color: var(--text); line-height: 1.65; }
.faq-a p { margin-bottom: 10px; }
.faq-a p:last-child { margin-bottom: 0; }

/* ================================================================
   FOOTER CTA BAND
   ================================================================ */
.footer-cta {
  background: linear-gradient(135deg, var(--race-primary) 0%, var(--rc-navy) 100%);
  padding: 52px 0; text-align: center;
}
.footer-cta h2 {
  font-family: var(--font-display); font-size: 36px; font-weight: 800;
  color: var(--white); margin-bottom: 12px;
}
.footer-cta p { font-size: 16px; color: rgba(255,255,255,0.7); margin-bottom: 28px; }

/* ================================================================
   RESPONSIVE — 768px tablet and 480px phone
   ================================================================ */
@media (max-width: 768px) {
  .rc-nav { display: none; }
  .rc-header-inner { padding: 0 16px; }
  .hero-content { padding: 56px 0 52px; }
  .hero h1 { font-size: 38px; }
  .hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .facts-grid { grid-template-columns: repeat(3, 1fr); }
  .intro { padding: 36px 0 28px; }
  .intro h2 { font-size: 24px; }
  .calc-section { padding: 32px 0 48px; }
  .calc-section h2 { font-size: 28px; }
  .proof-bar { flex-direction: column; gap: 10px; padding: 16px 20px; }
  .proof-stat + .proof-stat {
    border-left: none; margin-left: 0; padding-left: 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 10px; margin-top: 2px;
  }
  .calc-inputs { padding: 22px 20px 20px; }
  .inputs-row { grid-template-columns: 1fr; gap: 20px; }
  .results-summary { grid-template-columns: repeat(2, 1fr); }
  .mile-table-wrap { padding: 16px 0 20px; }
  .mile-table-wrap::before {
    content: '← Scroll to see full table →';
    display: block; text-align: center;
    font-size: 12px; color: var(--text-muted);
    margin-bottom: 10px; padding: 0 16px;
  }
  .save-plan-bar { flex-direction: column; gap: 14px; margin: 0 16px 24px; padding: 20px; }
  .save-plan-form { flex-direction: column; }
  .table-footnote { padding: 0 16px 12px; }
  .segment-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .segment-body { padding: 18px 20px; }
  .course-guide h2, .weather-section h2, .faq-section h2 { font-size: 26px; }
  .footer-cta h2 { font-size: 28px; }
}

@media (max-width: 480px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact { padding: 14px 12px; }
  .fact-val { font-size: 18px; }
  .hero h1 { font-size: 32px; }
  .btn-primary { width: 100%; justify-content: center; font-size: 15px; padding: 14px 20px; }
  .calc-section h2 { font-size: 24px; }
  .proof-num { font-size: 24px; }
  .time-box input { font-size: 26px; padding: 8px 2px; }
  .time-colon { font-size: 22px; }
  .calc-submit { font-size: 17px; padding: 16px 20px; }
  .results-summary { grid-template-columns: repeat(2, 1fr); }
  .result-stat-val { font-size: 22px; }
  .mile-table th { font-size: 10px; padding: 6px 8px; }
  .mile-table td { padding: 8px; font-size: 13px; }
  .mile-num { font-size: 14px; }
  .effort-badge { font-size: 11px; padding: 2px 7px; }
  .elev-tag { font-size: 12px; padding: 2px 6px; }
  .segment-badges { flex-wrap: wrap; }
  .segment-num { font-size: 24px; }
  .segment-info .name { font-size: 17px; }
  .rc-login { padding: 6px 14px; font-size: 13px; }
  .container { padding: 0 16px; }
}

/* ─── Elevation Profile Charts ─────────────────────────────────── */
.elev-chart-wrap {
  margin: 0 0 20px;
  padding: 14px 16px 12px;
  background: #f8f8fc;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.elev-chart-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.elev-chart-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 0.74rem; color: var(--text-muted); }
.elev-chart-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.legend-dot.up   { background: rgba(200,55,55,0.85); }
.legend-dot.down { background: rgba(40,110,190,0.85); }
canvas.elev-chart { width: 100% !important; height: 190px !important; }
