/* Shared role workspaces. Role selection never grants API access. */
.workspace-active{--paper:#101b17;--white:#192720;--ink:#eff5ec;--muted:#b0bfad;--line:#3a4b3e;background:var(--paper);color:var(--ink)}
.workspace-active .topbar{background:#14221b;padding-block:18px}.workspace-active .topbar .button,.workspace-active .topbar a{color:var(--ink)}
.workspace-active .topbar .lime,.workspace-active .lime{color:#172b21}.workspace-active .outline,.workspace-active .light{color:var(--ink);border-color:#71806f}
.workspace-active .welcome{padding:32px 0 24px}.workspace-active .welcome h1{font-size:clamp(35px,4vw,52px);margin-bottom:12px}.workspace-active .trail-art{height:115px;width:220px}.workspace-active .trail-art svg{height:100px}.workspace-active .trail-art span{display:none}
.workspace-active .account-gate{padding:16px 20px}.workspace-active .account-gate .small{display:none}
.workspace-active input,.workspace-active select,.workspace-active textarea{color:var(--ink);background:#101c16;border-color:#64735f;color-scheme:dark}
.workspace-active input[type=checkbox]{accent-color:var(--lime)}.workspace-active .section-tabs{display:none}
.workspace-active .filters,.workspace-active th,.workspace-active .event-list-row,.workspace-active .event-create,.workspace-active .event-setup-grid>details,.workspace-active .event-map-card,.workspace-active .event-score-card{background:#1b2d22}
.workspace-active .pill{background:#2d422b;border-color:#5b7550;color:#e3f4d5}.workspace-active .notice,.workspace-active .event-demo{background:#2b3d27;border-color:#62794c;color:#edf6dc}.workspace-active .error{background:#402c22;color:#ffe2ce;border-color:#b7805a}
.workspace-active .event-secret{background:#3b3622;color:#fff3ca}.workspace-active .event-secret textarea{background:#201f14;color:#fff6cf}.workspace-active .event-ranking .time{color:var(--lime)}
.workspace-active .panel-section{padding:24px 0 36px}.workspace-active .section-heading h2{font-size:32px}.workspace-active .stat-value{color:var(--lime)}.workspace-active .group-card,.workspace-active .best-card,.workspace-active .route-copy{background:var(--white)}
.workspace-nav{margin:22px 0 0;border-bottom:1px solid var(--line);padding:0 0 18px;gap:8px}.workspace-nav .button{font-size:12px;white-space:normal}.workspace-sections{display:flex;gap:7px;flex-wrap:wrap;padding:20px 0;margin:0 0 8px;border-bottom:1px solid var(--line)}
.workspace-sections .button{padding:9px 12px;min-height:40px;font-size:12px;border-color:transparent;font-weight:500}.workspace-sections [aria-current=page]{background:#334a2b;border-color:#829566;color:#dcffae;font-weight:700}
.workspace-heading{font-size:30px;margin:20px 0 8px}.workspace-heading:focus{outline:none}.workspace-status{min-height:18px;margin-bottom:8px}.workspace-grid{margin:16px 0;gap:20px}.workspace-grid:empty{display:none}
.dashboard{display:grid;gap:22px}.dashboard-intro h3{font-size:22px;margin-bottom:6px}.dashboard-intro p{margin:0}.dashboard-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.dashboard-metrics:empty{display:none}.dashboard-metric{padding:22px;border:1px solid var(--line);border-radius:7px;background:var(--white)}.dashboard-metric strong{display:block;font:600 42px/1.3 'Barlow Condensed',Arial,sans-serif;color:var(--lime)}.dashboard-metric p{margin:5px 0 0}.dashboard-actions{display:flex;gap:10px;flex-wrap:wrap}.dashboard-row{display:flex;align-items:center;flex-wrap:wrap;gap:14px;padding:18px;background:var(--white);border:1px solid var(--line);border-radius:5px}.dashboard-row strong{margin-right:auto}.dashboard-row .button{font-size:11px}.workspace-card>.workspace-list>.workspace-card{background:#15221b}.workspace-card>h3{line-height:1.3}.assignment-status{grid-column:1/-1;font-size:12px;margin:0}.workspace-active .stats{margin:22px 0}.workspace-active footer{border-color:var(--line);color:var(--muted)}
.workspace-active :focus-visible{outline:3px solid var(--lime);outline-offset:3px}.workspace-form>button,.workspace-active button,.workspace-active summary{min-height:42px}.workspace-active summary{display:flex;align-items:center;gap:8px;cursor:pointer}.workspace-active summary:before{content:'+';color:var(--lime);margin-right:4px}.workspace-active details[open]>summary:before{content:'−'}.workspace-active .course-map{color:#172b21}.workspace-active .event-positions{margin-top:12px}
@media(min-width:1000px){.workspace-active .shell{max-width:1500px}.workspace-sections{position:sticky;top:0;z-index:5;background:var(--paper)}.workspace-active .workspace-card{padding:26px}.workspace-active .workspace-form{column-gap:24px}.workspace-active .workspace-grid{max-width:1180px}}
@media(max-width:700px){.workspace-active .trail-art{display:none}.workspace-active .welcome{padding:24px 0 18px}.workspace-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-nav .button{padding:11px 8px}.workspace-sections{gap:6px;padding:14px 0}.workspace-sections .button{white-space:normal;text-align:left;flex:0 1 auto}.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dashboard-metric{padding:17px}.dashboard-metric strong{font-size:34px}.workspace-active .workspace-card{padding:17px}.workspace-active .account-gate{padding:16px;align-items:start}.dashboard-row{gap:10px}.dashboard-row .button{width:100%;text-align:center}.workspace-active .section-heading{display:block}.workspace-active .section-heading>p{margin-top:12px}.workspace-active .topbar nav{display:none}.workspace-active .auth-actions{gap:7px}.workspace-active .auth-actions .button{padding:10px}.workspace-active .shell{padding-inline:5%}.workspace-active .button{white-space:normal}.workspace-active .event-live-grid{min-width:0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.button:hover:not(:disabled){transform:none}}

/* Keep the first screen focused on the current task, with a persistent desktop sidebar. */
.workspace-active .welcome{display:none}.workspace-active .topbar{padding:13px 4%;gap:20px}.workspace-active .topbar .brand{font-size:23px}.workspace-active .topbar .auth-actions .button{padding:9px 12px}.workspace-active .account-gate{border:0;border-bottom:1px solid var(--line);border-radius:0;padding:12px 0;background:transparent}.workspace-active .account-gate p{font-size:11px;margin:3px 0 0}.workspace-active .account-gate .button{padding:8px 12px;min-height:38px}.workspace-active .account-gate .state-dot{background:var(--lime)}
#workspace-panels{display:grid;grid-template-columns:210px minmax(0,1fr);gap:28px;align-items:start;padding:22px 0 36px}.workspace-sidebar{position:sticky;top:18px}.workspace-role{display:block;font-size:11px;color:var(--muted);font-weight:600}.workspace-role select{font-size:12px;font-weight:600;margin-top:6px}.workspace-sections{position:static;display:flex;flex-direction:column;gap:4px;border:0;padding:15px 0;margin:0}.workspace-sections .button{display:block;text-align:left;width:100%;padding:10px 12px;font-size:12px}.workspace-main{min-width:0}.workspace-heading{margin:0 0 4px;font-size:30px}.workspace-status{margin:0 0 10px;font-size:11px;min-height:17px}.workspace-grid{margin:12px 0}.workspace-active .stats{margin:10px 0 20px}.workspace-active .stat{padding:18px}.workspace-active .stat-value{font-size:38px}.dashboard{gap:18px}.dashboard-intro h3{font-size:18px}.workspace-mobile-nav{display:none}.workspace-static:empty{display:none}.workspace-active .stats{grid-template-columns:repeat(4,minmax(0,1fr))}.workspace-active .section-heading{margin-bottom:18px}.workspace-active .workspace-card{padding:21px}.workspace-active .workspace-card h3{font-size:20px}.workspace-active .dashboard-metric{padding:18px}.workspace-active #events-toggle{display:none}
@media(max-width:850px){#workspace-panels{grid-template-columns:175px minmax(0,1fr);gap:18px}.workspace-active .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-active .topbar nav{display:none}}
@media(max-width:650px){#workspace-panels{display:block;padding:16px 0 30px}.workspace-sidebar{position:static;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px}.workspace-sections{display:none}.workspace-mobile-nav{display:block;font-size:11px;font-weight:600;color:var(--muted)}.workspace-mobile-nav select{margin-top:6px}.workspace-role select,.workspace-mobile-nav select{font-size:12px;padding:9px 7px;min-height:42px}.workspace-active .topbar{gap:10px;padding:12px 5%;display:grid;grid-template-columns:1fr auto;align-items:center}.workspace-active .topbar .language-picker{margin:0;justify-self:end}.workspace-active .auth-actions{grid-column:1/-1;justify-content:flex-end;gap:8px}.workspace-active .auth-actions .button{padding:7px 10px;min-height:34px;font-size:11px}.workspace-active .topbar .brand{font-size:23px}.workspace-active .account-gate{align-items:center;gap:8px;padding:10px 0}.workspace-active .account-gate strong{font-size:12px}.workspace-active .account-gate p{max-width:210px;font-size:10px}.workspace-active .account-gate .button{font-size:10px;padding:7px 10px;min-height:34px}.workspace-active .account-gate .gate-actions{flex-wrap:nowrap}.workspace-active .account-gate #preview{display:none}.workspace-heading{font-size:28px}.workspace-active .stats{gap:1px;margin:8px 0 16px}.workspace-active .stat{padding:14px}.workspace-active .stat-label{font-size:10px}.workspace-active .stat-value{font-size:32px}.workspace-active .stat-note{font-size:9px}.workspace-active .dashboard-intro h3{font-size:17px}.dashboard-actions .button{flex:1;text-align:center;padding:10px;font-size:11px}.workspace-active .workspace-card{padding:17px}.workspace-active .workspace-card h3{font-size:18px}.workspace-active .panel-section{padding:14px 0 25px}.workspace-active .section-heading h2{font-size:28px}}

@media(max-width:650px){.workspace-active .account-gate{flex-direction:row;text-align:left}.workspace-active .account-gate .gate-actions{width:auto;flex-shrink:0}.workspace-active .account-gate>div:first-child{min-width:0}.workspace-active .account-gate strong{overflow-wrap:anywhere}.workspace-active .account-gate #identity{display:inline}.workspace-active .account-gate #auth-status{max-width:220px}.workspace-active .account-gate .state-dot{margin-right:5px}}

.workspace-utilities{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px;font-size:11px}.workspace-role>.button{display:block;margin-top:10px;text-align:center}

/* Collapse preserves DOM, forms and pending requests. The view switch stays in the top bar. */
#workspace-view{margin-left:auto;min-width:150px}#workspace-view[hidden]{display:none}.workspace-role{display:flex;align-items:center;gap:10px;font-size:11px;white-space:nowrap}.workspace-role select{margin:0;width:auto;min-width:145px}.workspace-role-name{font-size:12px;color:var(--ink)}
#workspace-menu-toggle{width:100%;padding:10px 8px;font-size:12px}#workspace-panels.menu-collapsed{grid-template-columns:88px minmax(0,1fr)}.workspace-sections[hidden]{display:none}
.service-shell .welcome[hidden]{display:none}.service-shell .signed-out{padding:28px 0;max-width:720px}.service-shell:not(.workspace-active) .topbar nav{display:none}.service-shell:not(.workspace-active) .account-gate{margin-top:30px}
@media(max-width:650px){#workspace-panels,#workspace-panels.menu-collapsed{display:block}.workspace-sidebar{display:block;margin-bottom:14px}.workspace-sidebar .workspace-sections:not([hidden]){display:flex;max-height:55vh;overflow-y:auto;padding-bottom:12px}#workspace-menu-toggle{width:auto;min-width:92px}#workspace-view{grid-column:1/-1;grid-row:2;margin:0}.workspace-active .auth-actions{grid-row:3}.workspace-role select{flex:1}.workspace-role-name{display:block}.workspace-active .workspace-sidebar .button{min-height:44px}.workspace-active .topbar{row-gap:8px}}
