/* Phone layout: keep actions in document flow and retain semantic feedback colours. */
.lesson-mobile-actions{display:none}
@media(max-width:800px){
 html{scroll-padding-top:18px}body{font-size:16px;line-height:1.65}.shell,main,.panel,.fact-content,.question-card{min-width:0}main{padding:22px 16px}.sidebar{padding:14px 16px;gap:12px;align-items:center;flex-wrap:wrap}.sidebar .brand{width:210px;margin:0;max-width:calc(100% - 92px)}.sidebar .nav-toggle{margin:0;min-height:48px;min-width:76px}.sidebar nav{grid-template-columns:1fr 1fr}.sidebar nav a{min-height:48px;padding:12px;font-size:14px}.topbar{padding:12px 16px}.toolbar{width:100%;justify-content:flex-end;gap:12px}.toolbar select,.toolbar a,.toolbar button{min-height:44px}.toolbar a{display:inline-flex;align-items:center}.username{max-width:100px;overflow:hidden;text-overflow:ellipsis}.page-heading{gap:14px;align-items:flex-start;flex-wrap:wrap}.page-heading h1{font-size:28px;line-height:1.35}.page-heading p{font-size:15px}.button,button,input,select,textarea{font-size:16px}.button,button:not(.text-button),select,input:not([type=radio]):not([type=checkbox]):not([type=hidden]){min-height:48px}.button{padding:12px 16px;white-space:normal;text-align:center;justify-content:center}.text-button{min-height:44px;padding:10px}.panel{padding:18px}.lesson-mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 20px}.lesson-mobile-actions .button{font-size:14px}.lesson-facts article{gap:10px}.lesson-facts .fact-content p{font-size:17px;line-height:1.9}.lesson-cta .button,.lesson-cta form{width:100%}.lesson-cta form .button{margin-top:10px}.example-solution summary,details summary{min-height:48px;padding:12px 4px;cursor:pointer}.source{flex-wrap:wrap;gap:12px}.source a,.back{display:inline-flex;align-items:center;min-height:44px}.learning-visual{max-width:100%;margin-inline:0}.learning-visual img,.learning-visual svg{max-width:100%;height:auto}.question-card{padding:18px 14px}.question-card h2{font-size:21px;line-height:1.65}.answer{min-height:60px;align-items:flex-start;padding:15px 12px;font-size:16px;gap:12px}.answer input{flex:0 0 22px;width:22px;height:22px;margin-top:4px}.answer span:last-child{min-width:0;overflow-wrap:anywhere}.answer-letter{display:none}.question-card .actions{display:grid;grid-template-columns:1fr;gap:8px;position:sticky;bottom:0;background:#fff;padding:12px 0 max(12px,env(safe-area-inset-bottom));border-top:1px solid #e1e8f2;z-index:2}.question-card .actions .button,.question-card .actions .text-button{width:100%}.question-card .stack{gap:12px}.timer{max-width:100%;padding:10px 14px}.timer strong{font-size:24px}.timing-settings input{width:100%;max-width:160px}.region-options{grid-template-columns:1fr}.region-option{min-height:80px}.region-option input{width:22px;height:22px}.filters{display:flex;flex-wrap:wrap;gap:12px}.filters label,.filters select{width:100%}.filters .button{width:100%}footer{padding:20px 16px;line-height:1.8}
 #sim-root .overlay{padding:10px;padding-bottom:max(10px,env(safe-area-inset-bottom));overscroll-behavior:contain}#sim-root .setup-card{padding:20px 16px;scroll-padding-bottom:90px;overscroll-behavior:contain}#sim-root .sim-brand-logo{width:240px;max-width:90%;margin-bottom:12px}#sim-root .setup-card h1{font-size:25px;line-height:1.4}#sim-root .setup-card h2{font-size:20px}#sim-root .setup-card p{font-size:14px;line-height:1.7}#sim-root .setup-fields{grid-template-columns:1fr;gap:16px}#sim-root .setup-card label{font-size:15px}#sim-root .setup-card input,#sim-root .setup-card select{font-size:16px;min-height:48px;width:100%}#sim-root .setup-card input[type=checkbox]{width:22px;min-height:22px;flex-shrink:0}#sim-root .setup-card small{font-size:12px;line-height:1.6}#sim-root .route-catalog{padding:12px}#sim-root .route-shortcuts{grid-template-columns:1fr;gap:10px}#sim-root .route-shortcuts button{min-height:52px;font-size:14px;padding:12px;line-height:1.6}#sim-root #start-test{min-height:54px;font-size:17px;bottom:0;margin-block:20px 12px;box-shadow:0 -5px 12px #10274825}#sim-root .setup-card .actions{display:flex;flex-wrap:wrap;gap:10px}#sim-root .setup-card .actions>*{flex:1 1 140px;min-height:48px}#sim-root .sim-header{padding-inline:12px}#sim-root .sim-header>a{min-height:44px;display:flex;align-items:center}#sim-root .drive-actions button{min-height:48px;padding:10px 14px;font-size:12px}#sim-root .drive-actions{scrollbar-width:thin;scroll-snap-type:x proximity}#sim-root .drive-actions button{scroll-snap-align:start}#sim-root .look-controls button{min-height:48px}#sim-root .pedals{gap:8px}#sim-root .pedals button{min-height:68px;font-size:13px;border-width:2px}#sim-root .vehicle-tools{grid-template-columns:1fr 1fr;gap:10px}#sim-root .vehicle-tools button{min-height:48px}
}
@media(max-width:360px){.sidebar .brand{width:180px}.sidebar nav{grid-template-columns:1fr}.lesson-mobile-actions{grid-template-columns:1fr}.toolbar{gap:8px}.page-heading h1{font-size:25px}}
@media(max-height:500px) and (orientation:landscape){#sim-root .setup-card{padding:14px 20px}#sim-root .sim-brand-logo{width:190px}#sim-root .setup-fields{grid-template-columns:1fr 1fr}#sim-root .pedals button{min-height:58px}#sim-root .drive-actions button{min-height:44px}}
@media(max-width:800px){.sidebar{flex-direction:row}.sidebar .nav-caption,.sidebar .sidebar-bottom{display:none}}
@media(max-width:800px) and (min-height:501px){#sim-root #pause{position:fixed;inset-inline-start:12px;bottom:160px;z-index:5;min-height:48px;min-width:130px;background:#086be8;border-color:#c6d9f1;box-shadow:0 2px 10px #10274840}}
/* Driving touch deck: controls stay below the forward road sightline. */
.orientation-tools{display:none}#sim-root.touch-layout .orientation-tools{display:grid;gap:8px;margin:12px 0}#sim-root.touch-layout .orientation-tools button{min-height:48px;font-size:16px}
#sim-root.touch-layout .drive-actions{display:contents}#sim-root.touch-layout #camera,#sim-root.touch-layout #pause{position:fixed;bottom:150px;z-index:5;min-height:46px;width:auto;min-width:110px;padding:9px 12px;font-size:13px;box-shadow:none}#sim-root.touch-layout #camera{left:12px;right:auto}#sim-root.touch-layout #pause{right:12px;left:auto;inset-inline-start:auto;background:#086be8}#sim-root.touch-layout .look-controls{position:fixed;top:auto;bottom:92px;left:12px;right:12px;width:auto;max-width:none;transform:none;display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;direction:ltr}#sim-root.touch-layout .look-controls button{min-height:48px;font-size:12px;padding:8px 4px}#sim-root.touch-layout .pedals{direction:ltr;display:grid;grid-template-areas:'left right throttle brake';grid-template-columns:repeat(4,1fr);left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));gap:8px}#sim-root.touch-layout #steer-left{grid-area:left}#sim-root.touch-layout #steer-right{grid-area:right}#sim-root.touch-layout #throttle-pedal{grid-area:throttle;background:#164264}#sim-root.touch-layout #brake-pedal{grid-area:brake;background:#692f3d}#sim-root.touch-layout .pedals button{min-height:64px;font-size:13px;border:2px solid #a3bfd8;touch-action:none}#sim-root.touch-layout .pedals button.on{background:#087aff}#sim-root.touch-layout .navigation{top:10px;left:10px;max-width:43%;width:43%;padding:6px 8px}#sim-root.touch-layout .navigation small{display:none}#sim-root.touch-layout .telemetry{top:80px;bottom:auto;left:10px;max-width:60%;min-height:40px}#sim-root.touch-layout .proximity-panel{display:none}#sim-root.touch-layout .vehicle-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#sim-root.touch-layout .vehicle-tools button{min-height:48px;white-space:normal}#sim-root.touch-layout .vehicle-tools #camera,#sim-root.touch-layout .vehicle-tools #pause{position:static}#sim-root.touch-layout .look-controls button[aria-pressed=true]{background:#087aff;border-color:#d7eaff}
@media(max-height:500px) and (orientation:landscape){#sim-root.touch-layout .pedals button{min-height:56px}#sim-root.touch-layout .look-controls{bottom:80px;left:25%;right:25%;gap:6px}#sim-root.touch-layout #camera,#sim-root.touch-layout #pause{bottom:80px;min-width:100px;max-width:22%;min-height:46px}#sim-root.touch-layout .telemetry{top:8px;left:38%;max-width:28%;width:210px;padding:3px 8px}#sim-root.touch-layout .navigation{top:8px;width:28%;max-width:28%}#sim-root.touch-layout .live-status{top:8px;width:22%;padding:5px 8px}#sim-root.touch-layout .look-controls button{min-height:46px}#sim-root.touch-layout .parking-assist{top:70px;max-width:180px}}
#sim-root.touch-layout #pause{inset:auto 12px 150px auto}@media(max-height:500px) and (orientation:landscape){#sim-root.touch-layout #pause{inset:auto 12px 80px auto}}
#sim-root.touch-layout #left-indicator,#sim-root.touch-layout #right-indicator{position:fixed;bottom:150px;min-height:46px;width:48px;min-width:48px;padding:8px 2px;z-index:5}#sim-root.touch-layout #left-indicator{left:calc(50% - 54px)}#sim-root.touch-layout #right-indicator{left:calc(50% + 6px)}@media(max-height:500px) and (orientation:landscape){#sim-root.touch-layout #left-indicator,#sim-root.touch-layout #right-indicator{bottom:80px}#sim-root.touch-layout #left-indicator{left:calc(25% - 60px)}#sim-root.touch-layout #right-indicator{left:auto;right:calc(25% - 60px)}}@media(max-width:360px) and (min-height:501px){#sim-root.touch-layout #camera,#sim-root.touch-layout #pause{min-width:80px;max-width:90px;font-size:11px}#sim-root.touch-layout #left-indicator,#sim-root.touch-layout #right-indicator{width:44px;min-width:44px}#sim-root.touch-layout #left-indicator{left:calc(50% - 48px)}#sim-root.touch-layout #right-indicator{left:calc(50% + 4px)}}
#sim-root.touch-layout .telemetry{transform:none;right:auto;width:220px;max-width:calc(100% - 20px)}@media(max-height:500px) and (orientation:landscape){#sim-root.touch-layout .telemetry{width:210px;max-width:28%}}
