* { box-sizing: border-box; }
body { margin: 0; background: #e5ebf0; color: #24394c; font-family: Arial, Helvetica, sans-serif; }
.lab { width: 100%; max-width: 1920px; margin: 0 auto; padding: 20px 28px 14px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: #6e8496; font-weight: 700; }
h1 { font-size: 25px; margin: 6px 0 0; letter-spacing: -0.5px; }
#controlToolbar { display: flex; align-items: center; gap: 10px; }
button, select, input { font: inherit; }
button, select { height: 39px; border: 1px solid #cbd6e0; background: white; color: #344d63; border-radius: 8px; padding: 0 16px; }
button { cursor: pointer; font-size: 13px; font-weight: 600; min-width: 100px; }
button.primary { background: #2563eb; border-color: #2563eb; color: white; }
button:hover { filter: brightness(0.96); }
button:disabled { opacity: 0.45; cursor: default; }
.count-label { font-size: 12px; color: #647c8e; display: flex; gap: 8px; align-items: center; margin-right: 8px; }
#carToolbars { display: flex; gap: 16px; margin-bottom: 16px; }
.launch-panel { flex: 1; min-width: 0; background: #fff; border: 1px solid #d3dce5; border-radius: 12px; padding: 15px 18px; box-shadow: 0 2px 5px #24394c04; }
[hidden] { display: none !important; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
h2 { font-size: 13px; margin: 0; font-weight: 600; }
.panel-heading > span { color: #8293a2; font-size: 11px; }
.ball-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2563eb; margin-right: 8px; }
.second .ball-dot { background: #dc2626; }
.input-row { display: flex; gap: 16px; }
.input-row label { flex: 1; min-width: 0; color: #64778a; font-size: 11px; }
input { display: block; width: 100%; margin-top: 6px; height: 36px; border: 1px solid #d1dce7; border-radius: 7px; padding: 6px 10px; background: #f8fafc; color: #263d53; font-size: 14px; }
input:focus, button:focus-visible, select:focus-visible { outline: 2px solid #7eacff; outline-offset: 2px; }
input:invalid { border-color: #dc2626; }
.results { color: #587591; font-size: 11px; margin: 12px 0 9px; }
.velocity-components { margin: 10px 0 0; color: #344d63; font-size: 13px; font-variant-numeric: tabular-nums; }
.equations { border-top: 1px solid #edf1f5; padding-top: 9px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: 'Cambria Math', Georgia, serif; font-size: 13px; color: #3e566d; }
#simulationMessage { padding: 10px 14px; color: #a72727; background: #fff1f0; border-radius: 8px; font-size: 13px; }
.simulation-stage { overflow: hidden; border: 1px solid #cbd7e1; border-radius: 12px; background: #f5f9fc; }
.stage-heading { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid #dce5ed; font-size: 10px; letter-spacing: 1.2px; font-weight: 700; }
.stage-heading small { letter-spacing: 0; font-size: 10px; font-weight: 400; margin-left: 15px; color: #8192a1; }
#timer { letter-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
#canvas { width: 100%; height: clamp(310px, 42vh, 540px); display: block; }
#liveValues { min-height: 34px; padding: 10px 18px; font-size: 11px; color: #647b8d; background: #fff; font-variant-numeric: tabular-nums; }
#graphsPanel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.graph-card { background: white; border: 1px solid #d3dce5; border-radius: 12px; overflow: hidden; padding: 12px 10px 2px; }
.graph-card h2 { display: flex; justify-content: space-between; padding: 0 5px; color: #62788d; font-size: 11px; }
.graph-card h2 span { color: #2563eb; font-family: Georgia, serif; font-size: 14px; }
.timeGraph { display: block; width: 100%; height: 205px; }
footer { display: flex; justify-content: space-between; color: #8a9aa8; font-size: 10px; margin-top: 14px; }
footer a { color: inherit; }
.learning-notes { margin-top: 16px; padding: 18px; border: 1px solid #d3dce5; border-radius: 12px; background: #fff; font-size: 13px; line-height: 1.7; color: #526b80; }
.learning-notes h2 { font-size: 15px; color: #24394c; }
.learning-notes p { margin: 10px 0; }
.learning-notes summary { cursor: pointer; font-weight: 600; }
.reference-equations { padding-left: 22px; font-family: 'Cambria Math', Georgia, serif; }
@media (max-width: 1000px) {
    .lab { padding: 16px; }
    #carToolbars { flex-wrap: wrap; }
    .launch-panel { flex-basis: 100%; }
    #graphsPanel { gap: 10px; }
}
@media (max-width: 650px) {
    .lab { padding: 12px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    #controlToolbar { width: 100%; gap: 6px; }
    .count-label { flex: 1; margin: 0; }
    button { min-width: 78px; padding: 0 10px; }
    select { padding: 0 5px; }
    .input-row { flex-wrap: wrap; gap: 10px; }
    .input-row label { flex: 1 1 40%; }
    .stage-heading small { display: none; }
    #graphsPanel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
    .graph-card { flex: 0 0 86%; scroll-snap-align: start; }
    footer { gap: 15px; line-height: 1.6; }
}
