/* ══════════════════════════════════════════════════════════════════
   Brachistochrone lesson (/discover/brachistochrone).
   Page-specific layout; the shared kl-* styles live in wwwroot/app.css.
   ══════════════════════════════════════════════════════════════════ */

.br-stage {
    position: absolute;
    top: 14px; right: 14px; bottom: 14px;
    /* .kl-info: left 14px + width 288px (content-box) + padding 32px
       + border 2px = 336px right edge. Add 14px gap = 350px. */
    left: 350px;
    overflow-y: auto;
    padding: 4px 8px 8px 8px;
    display: flex; flex-direction: column; gap: 14px;
}
.br-stage::-webkit-scrollbar { width: 6px; }
.br-stage::-webkit-scrollbar-thumb { background: rgba(var(--io-line-rgb), 0.15); border-radius: 3px; }

.br-panel {
    background: linear-gradient(160deg, rgba(var(--io-surface-hi-rgb), 0.82) 0%, rgba(var(--io-bg-rgb), 0.82) 100%);
    border: 1px solid rgba(var(--io-line-rgb), 0.12);
    border-radius: 10px;
    padding: 10px 14px 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
}
/* The title row, with the 3D picture's Reset view button (an .sb the
   stage makes in .br-panel-view) at its right. The row keeps the button's
   height with or without it, so the picture doesn't jump down when the
   button arrives; on touch the button is 44 px tall (.sb's rule). */
.br-panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 24px;
    margin-bottom: 6px;
}
.br-panel-title {
    color: rgba(var(--io-subtitle-rgb), 0.75);
    font-size: 11px; font-weight: 600;
    letter-spacing: 1.4px; text-transform: uppercase;
}
.br-panel-view { flex: none; display: flex; }
@media (pointer: coarse) {
    .br-panel-head { min-height: 44px; }
}
.br-panel-caption {
    color: rgba(var(--io-text-soft-rgb), 0.75);
    font-size: 13px; line-height: 1.65;
    margin-top: 8px;
}
/* A panel's picture (a small 3D stage, or a 2D canvas on the low tier),
   boxed as the SVG it replaces was: full width at the picture's shape,
   up to a height, with the picture centred in any width left over. */
.br-scene {
    width: 100%;
    background: radial-gradient(ellipse at center, rgba(var(--io-glow-haze-rgb), 0.045) 0%, rgba(var(--io-glow-haze-rgb), 0) 70%);
    border-radius: 6px;
}
.br-scene-race { aspect-ratio: 400 / 260; max-height: 360px; }
.br-scene-orbit { aspect-ratio: 400 / 320; max-height: 420px; }

/* "Cut the cycloid out and apply it to orbit" bridge between the two panels. */
.br-bridge {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 6px;
}
.br-bridge-line {
    flex: 1; height: 1px;
    background: linear-gradient(90deg, rgba(255,212,102,0), rgba(255,212,102,0.35), rgba(255,212,102,0));
}
.br-bridge-badge {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 12px;
    border: 1px solid rgba(255,212,102,0.28);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,212,102,0.06), rgba(255,212,102,0.12), rgba(255,212,102,0.06));
    color: rgba(255,220,140,0.9);
    font-size: 11px; letter-spacing: 0.3px;
    white-space: nowrap;
}
.br-bridge-text { font-style: italic; }
.br-bridge-glyph {
    width: 52px; height: 22px;
    filter: drop-shadow(0 0 4px rgba(255,212,102,0.35));
}

.br-connection {
    background: linear-gradient(90deg, rgba(255,200,80,0.08), rgba(255,200,80,0));
    border-left: 2px solid rgba(255,200,80,0.45);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
}
.br-connection-title {
    color: rgba(255,220,120,0.95);
    font-size: 13px; font-weight: 600;
    letter-spacing: 0.4px;
    margin: 0 0 6px;
}
.br-connection p {
    color: rgba(var(--io-text-soft-rgb), 0.8);
    font-size: 13px; line-height: 1.65;
    margin: 0;
}

/* On narrow viewports, push the stage below the info panel instead of beside it. */
@media (max-width: 900px) {
    .br-stage {
        left: 14px;
        top: auto;
        position: static;
        margin-top: 14px;
    }
    /* margin-top: 42px clears the fixed breadcrumb bar (bottom ≈ 30 px),
       as on Newton's page. */
    .br-scroll-wrap .kl-info { position: static; width: auto; margin: 42px 14px 14px; max-height: none; }
    /* Allow the stacked content to scroll vertically rather than being
       clipped by the inherited overflow:hidden on the flex child. */
    .br-scroll-wrap { overflow-y: auto !important; }
}
