.endurance{display:grid;gap:16px;min-width:0;padding-bottom:24px}
.endurance .event-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:16px;align-items:start}
.endurance .card{min-width:0;overflow-wrap:anywhere}
.endurance form{display:grid;gap:14px}
.endurance label{display:grid;gap:6px;min-width:0}
.endurance label:has(input[type=checkbox]){display:flex;align-items:flex-start;gap:10px}
.endurance input:not([type=checkbox]),.endurance select,.endurance textarea{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.endurance #event-form textarea{min-height:120px;resize:vertical}
.endurance input[type=checkbox]{width:18px;height:18px;flex-shrink:0}
.endurance .event-row{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:12px;margin-bottom:14px}
.endurance .event-row.reminder{grid-template-columns:minmax(100px,1fr) minmax(140px,1fr) auto}
.endurance .event-deadline-link{margin:12px 0}
.endurance fieldset{min-width:0;display:grid;gap:9px;border:1px solid var(--line);border-radius:var(--radius);padding:16px}
.endurance .event-driver{padding:12px;border:1px solid var(--line);border-radius:var(--radius);display:grid;gap:8px;margin:8px 0}
.endurance .toolbar{display:flex;gap:10px;flex-wrap:wrap}
.endurance button,.endurance a.button{white-space:normal;max-width:100%;min-height:44px;line-height:1.35}
.endurance #countdown{font-size:1.2rem;font-weight:700;font-variant-numeric:tabular-nums;margin:8px 0}
.endurance h2,.endurance h3,.endurance h4{line-height:1.3;margin:0 0 10px}
.endurance h3{font-size:1rem}.endurance h4{font-size:1rem}
.endurance p{line-height:1.5;margin:8px 0}
.endurance time{white-space:normal;overflow-wrap:anywhere;line-height:1.5}
.endurance small{line-height:1.5}
.endurance .event-hero{padding:22px}
.endurance .event-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.endurance .event-section-heading h2{margin:0}
.endurance .event-section-heading .badge{flex-shrink:0}
.endurance .event-next-task{border-left:3px solid var(--red);padding:12px 16px;background:var(--panel2);border-radius:var(--control-radius);margin-top:14px;display:grid;gap:8px}
.endurance .event-next-task strong{font-size:1.06rem;line-height:1.45}
.endurance .event-next-task .eyebrow{margin:0}
.endurance .event-next-task button{justify-self:start}
.endurance .event-facts{display:grid;grid-template-columns:minmax(85px,.7fr) minmax(0,1.3fr);gap:9px 12px;margin:12px 0}
.endurance .event-facts dt{color:var(--muted);font-size:.9em}
.endurance .event-facts dd{margin:0;min-width:0}
.endurance .event-list{list-style:none;margin:8px 0 12px;padding:0;display:grid;gap:8px}
.endurance .event-list li{display:flex;justify-content:space-between;gap:12px;min-width:0;align-items:baseline}
.endurance .event-list li>span{min-width:0}
.endurance .event-list li>strong{font-variant-numeric:tabular-nums;flex-shrink:0}
.endurance .event-selected-slots li{line-height:1.45}
.endurance .event-time-status{display:grid;gap:5px;padding:10px 0;border-bottom:1px solid var(--line)}
.endurance .event-time-status:last-of-type{border-bottom:0;margin-bottom:8px}
.endurance .event-time-status small,.endurance .event-time-status span{font-variant-numeric:tabular-nums}
.endurance .missing-time{border-left:2px solid var(--red);padding-left:12px;margin:8px 0}
.endurance .event-times-summary>small{display:block;margin-top:12px}
.endurance .event-details{padding:0}
.endurance .event-details>summary{padding:16px;cursor:pointer;font-weight:600;min-height:48px;box-sizing:border-box}
.endurance .event-details-body{padding:0 16px 16px}
.endurance .event-details-body>div+div{margin-top:16px}
.endurance .event-slot{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);min-width:0}
.endurance .event-slot>header{margin-bottom:12px;display:flex;justify-content:space-between;gap:6px 16px;flex-wrap:wrap;align-items:baseline}
.endurance .event-slot>header h3{margin:0}
.endurance .event-slot>header time{color:var(--muted);font-size:.9em}
.endurance .event-team{padding:14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel2);min-width:0}
.endurance .event-team p{font-size:.9em}
.endurance .event-team small{color:var(--muted)}
.endurance .event-own-driver{font-weight:600}
.endurance .event-reserve p{font-size:.9em;color:var(--muted)}
.endurance .event-editor-groups{display:block}
.endurance .event-editor-groups>.event-slot:first-child{border-top:0;margin-top:0}
@media(min-width:1100px){.endurance .event-dashboard-grid{grid-template-columns:1fr 1fr 1fr}.endurance .event-information{grid-template-columns:1fr 1fr}}
@media(max-width:650px){
 .endurance{gap:12px}
 .endurance .event-row{grid-template-columns:1fr}
 .endurance .toolbar>*{flex:1 1 140px}
 .endurance .event-nav>*{flex:1 1 auto}
 .endurance .card{padding:14px}
 .endurance .event-details{padding:0}
 .endurance .event-hero{padding:16px}
 .endurance .event-next-task{padding:10px 12px}
 .endurance .event-next-task button{width:100%;justify-self:stretch}
 .endurance fieldset{padding:12px}
 .endurance .event-grid{gap:12px}
 .endurance .event-slot{margin-top:14px;padding-top:14px}
 .endurance .event-team{padding:12px}
 .endurance .event-slot>header{display:grid;gap:4px}
 .endurance .event-facts{grid-template-columns:90px minmax(0,1fr);gap:8px}
}

/* Keep the existing navigation, with one touch-friendly row on Endurance pages. */
@media(max-width:650px){
 .portal-analytics:has(.endurance) #mobile-nav{flex-wrap:nowrap}
 .portal-analytics:has(.endurance) #mobile-nav>button,
 .portal-analytics:has(.endurance) #mobile-nav>details{flex:1 1 0;min-width:0;white-space:normal;overflow-wrap:anywhere;padding-inline:3px}
 .endurance [id]{scroll-margin-bottom:90px}
}
