/* ── SummitRoom routes library styles ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: #fff;
    color: #0f172a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: #f97316; text-decoration: none; }
a:hover { text-decoration: underline; }

.routes-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    border-bottom: 1px solid #e5e7eb;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.routes-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}
.routes-logo span { font-weight: 400; color: #64748b; }
.routes-logo:hover { text-decoration: none; }
.routes-nav nav { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 600; }
.routes-nav nav a { color: #64748b; }
.routes-nav nav a.active, .routes-nav nav a:hover { color: #0f172a; text-decoration: none; }
.routes-nav .routes-cta {
    background: #f97316;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}
.routes-nav .routes-cta:hover { background: #ea580c; }

/* Hamburger toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    width: 36px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.routes-nav.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.routes-nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.routes-nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Index ─ */
.routes-index-hero {
    max-width: 820px;
    margin: 64px auto 40px;
    padding: 0 24px;
    text-align: center;
}
.routes-index-hero h1 {
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -1.2px;
    margin: 0 0 14px;
}
.routes-index-hero p { font-size: 17px; color: #475569; margin: 0; }

.routes-list {
    max-width: 1180px;
    margin: 0 auto 80px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.route-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.15s, box-shadow 0.15s;
    color: inherit;
}
.route-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15,23,42,0.10);
    text-decoration: none;
}
.route-card-image {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    background-size: cover;
    background-position: center;
}
.route-card-body { padding: 18px 22px 22px; }
.route-card-meta {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #f97316;
    margin-bottom: 6px;
}
.route-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
}
.route-card p { font-size: 14px; color: #475569; margin: 0 0 14px; }
.route-card-stats {
    display: flex;
    gap: 18px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}
.route-card-stats strong { color: #0f172a; }

.routes-faq {
    max-width: 820px;
    margin: 40px auto 80px;
    padding: 40px 24px;
    border-top: 1px solid #e5e7eb;
}
.routes-faq h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 22px;
    color: #0f172a;
}
.faq-item { margin-bottom: 26px; }
.faq-item h3 { font-size: 16px; font-weight: 700; color: #0f172a; margin: 0 0 6px; }
.faq-item p { font-size: 14px; color: #475569; margin: 0; line-height: 1.6; }

/* ── Per-route page ─ */
.route-page {
    max-width: 980px;
    margin: 40px auto 80px;
    padding: 0 24px;
}
.route-breadcrumb {
    font-size: 13px;
    margin-bottom: 18px;
}
.route-breadcrumb a {
    color: #64748b;
    font-weight: 600;
}
.route-breadcrumb a:hover { color: #0f172a; text-decoration: none; }

.route-hero {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 28px;
    margin-bottom: 36px;
}
.route-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}
.route-emoji { font-size: 18px; }
.route-category {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #f97316;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 3px 10px;
    border-radius: 8px;
}
.route-dot { color: #cbd5e1; }
.route-hero h1 {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin: 0 0 14px;
}
.route-lede {
    font-size: 18px;
    color: #475569;
    margin: 0 0 28px;
    line-height: 1.55;
}

.route-stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.route-stat {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}
.rs-val {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.rs-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.6px;
}

.route-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.route-cta-primary, .route-cta-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.2s;
}
.route-cta-primary {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    box-shadow: 0 6px 18px rgba(249,115,22,0.40);
}
.route-cta-primary:hover { box-shadow: 0 8px 24px rgba(249,115,22,0.55); text-decoration: none; }
.route-cta-ghost {
    background: #fff;
    color: #0f172a;
    border: 1.5px solid #e5e7eb;
}
.route-cta-ghost:hover { border-color: #94a3b8; text-decoration: none; }
.route-cta-primary:active, .route-cta-ghost:active { transform: scale(0.97); }

/* Section headers (shared) */
.route-page section { margin-bottom: 48px; }
.route-page section h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
    margin: 0 0 18px;
}

/* Map */
.route-map {
    width: 100%;
    height: 480px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f1f5f9;
}
.route-map-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}
.route-map-caption {
    font-size: 12px;
    color: #94a3b8;
    margin: 10px 0 0;
    text-align: center;
}

/* Elevation profile (inline SVG) */
.route-elev-wrap {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    background: #fff;
}
.route-elev-wrap svg { width: 100%; height: auto; display: block; }

/* Splits table */
/* Splits table — horizontally scrollable on narrow screens so it doesn't
   force the whole page wider than the viewport. The wrapper handles
   overflow; the table sets min-width so columns don't squish. */
.route-splits-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.route-splits {
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 13px;
}
.route-splits thead th {
    background: #f8fafc;
    text-align: left;
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid #e5e7eb;
}
.route-splits tbody td {
    padding: 10px 14px;
    border-top: 1px solid #f1f5f9;
    font-variant-numeric: tabular-nums;
}
.split-bar {
    display: inline-block;
    height: 6px;
    border-radius: 3px;
    vertical-align: middle;
}
.split-bar.up   { background: #f97316; }
.split-bar.down { background: #38bdf8; }
.split-bar.flat { background: #cbd5e1; }

/* Prose section (history / source notes from markdown) */
.route-prose { font-size: 16px; line-height: 1.7; color: #1e293b; }
.route-prose > * + * { margin-top: 1.2em; }
.route-prose h2 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 1.8em;
    margin-bottom: 0.3em;
}
.route-prose h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 1.6em;
}
.route-prose p { margin: 0; }
.route-prose a { color: #ea580c; text-decoration: underline; text-underline-offset: 2px; }
.route-prose ul, .route-prose ol { padding-left: 22px; margin: 0; }
.route-prose li { margin-bottom: 0.4em; }
.route-prose blockquote {
    border-left: 4px solid #f97316;
    padding: 8px 0 8px 18px;
    margin-left: 0;
    color: #475569;
    font-style: italic;
}
.route-prose code {
    background: #f1f5f9;
    color: #c2410c;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.92em;
    font-family: 'SF Mono', Consolas, monospace;
}

/* Bottom CTA card */
.route-cta-card {
    margin-top: 56px;
    padding: 32px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    text-align: center;
}
.route-cta-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}
.route-cta-card p {
    margin: 0 0 18px;
    color: #475569;
    font-size: 15px;
}
.route-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(249,115,22,0.4);
}
.route-cta-btn:hover { box-shadow: 0 8px 22px rgba(249,115,22,0.55); text-decoration: none; }

/* Footer */
.routes-footer {
    border-top: 1px solid #e5e7eb;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 13px;
}

/* Prose / hero overflow protection */
.route-prose { overflow-wrap: anywhere; word-break: break-word; }
.route-prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.route-prose pre   { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.route-prose img   { max-width: 100%; height: auto; }
.route-hero h1, .route-lede { overflow-wrap: anywhere; }

/* Mobile */
@media (max-width: 700px) {
    .routes-nav {
        padding: 14px 18px;
        flex-wrap: wrap;
        row-gap: 12px;
    }
    .nav-toggle { display: flex; }
    .routes-nav nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        border-top: 1px solid #e5e7eb;
        padding-top: 10px;
        margin-top: 4px;
    }
    .routes-nav.open nav { display: flex; }
    .routes-nav nav a {
        padding: 12px 4px;
        font-size: 15px;
        border-bottom: 1px solid #f1f5f9;
    }
    .routes-nav nav a:last-child { border-bottom: none; }
    .routes-nav .routes-cta {
        margin-top: 8px;
        text-align: center;
        padding: 12px 16px;
        border-radius: 10px;
    }

    .routes-index-hero { margin-top: 40px; }
    .routes-index-hero h1 { font-size: 30px; }
    .routes-index-hero p { font-size: 15px; }
    .route-page { margin-top: 28px; padding: 0 18px; }
    .route-hero h1 { font-size: 28px; line-height: 1.2; }
    .route-lede { font-size: 16px; }
    .route-map { height: 360px; }
    .route-stat-strip { grid-template-columns: repeat(2, 1fr); }
    .route-splits { font-size: 12px; min-width: 480px; }
    .route-splits thead th, .route-splits tbody td { padding: 8px 10px; }
    .route-cta-card { padding: 24px 20px; }

    /* Inline elevation SVG — shrink to fit, never push wider */
    .route-elev-wrap { padding: 12px; }
    .route-elev-wrap svg { width: 100% !important; }
}
