/* V2 is a separate, opt-in visual system. Every rule is scoped so V1 stays intact. */
.ui-version-switch{display:inline-flex;align-items:center;gap:3px;flex:0 0 auto;padding:3px;border:1px solid rgba(130,220,255,.34);background:#06131b;color:#b7d5de;font:700 .62rem Inter,sans-serif;letter-spacing:.1em}
.ui-version-switch>span{padding:0 8px;color:#91acb5}
.ui-version-switch button{min-width:37px;min-height:30px;padding:4px 9px;border:0;background:transparent;color:#a9c4ce;font:700 .65rem Inter,sans-serif;cursor:pointer}
.ui-version-switch button[aria-pressed="true"]{background:#9de1f0;color:#06131b}
.ui-version-switch button:focus-visible{outline:2px solid #9de1f0;outline-offset:2px}
.v2-race-wire,.v2-feature,.v2-editorial{display:none}

html.ui-v2{--v2-ink:#071720;--v2-deep:#0b1d27;--v2-panel:#102630;--v2-line:#31535e;--v2-blue:#86d7e9;--v2-paper:#eaf1f2;--v2-paper-dark:#d5e4e7;--v2-text:#0a2530;--v2-muted:#91aab3}
html.ui-v2 body{background:var(--v2-ink);color:#edf5f6}
html.ui-v2 .app-shell{display:block!important;min-height:100vh;background:var(--v2-ink)!important}
html.ui-v2 .app-shell::before{background:none!important;display:none!important}
html.ui-v2 .race-footer{display:none!important}
html.ui-v2 .sidebar-street-art,html.ui-v2 .side-foot{display:none!important}
html.ui-v2 main{width:100%;min-width:0;padding:0 2.6vw 80px!important;background:var(--v2-ink)!important;overflow:visible!important}
html.ui-v2 .topbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:55px!important;margin:0 -2.6vw 0!important;padding:8px 2.6vw!important;background:#0a202b!important;border-bottom:1px solid #2c5260!important;box-shadow:none!important;backdrop-filter:none!important}
html.ui-v2 .top-cloud{margin:0 auto 0 0!important;font-size:.59rem;white-space:nowrap}
html.ui-v2 .top-cloud svg{width:17px;height:17px}
html.ui-v2 .top-cloud b{width:6px;height:6px;box-shadow:none}
html.ui-v2 .header-actions{display:flex!important;align-items:center;gap:6px;width:auto!important;margin:0!important}
html.ui-v2 .header-actions select,html.ui-v2 .admin-perspective{border-color:#31535e!important;background:#071720!important;color:#d7e8ed!important;box-shadow:none!important}
html.ui-v2 .view{padding:22px 0 0}
html.ui-v2 .section-intro{padding:28px 0 22px;border-bottom:2px solid var(--v2-blue)}
html.ui-v2 .section-intro h2,html.ui-v2 .overview-hero h1{font-family:'Barlow Condensed',Impact,sans-serif;letter-spacing:0;text-shadow:none!important}
html.ui-v2 .section-intro h2{font-size:clamp(2.7rem,5vw,5rem);line-height:.85}
html.ui-v2 .section-intro>p:last-child{color:#a8c0c8}
html.ui-v2 .eyebrow{color:var(--v2-blue)!important}
html.ui-v2 .panel,html.ui-v2 .metric,html.ui-v2 .entity-card,html.ui-v2 .battle-card,html.ui-v2 .garage-search-bar,html.ui-v2 .specialist-card,html.ui-v2 .time-trial-row{background:var(--v2-panel)!important;border:1px solid var(--v2-line)!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html.ui-v2 .panel-head h2,html.ui-v2 .section-intro h2,html.ui-v2 .panel h3{box-shadow:none!important;text-shadow:none!important}
html.ui-v2 .primary{background:#a6e1ec!important;color:#09202a!important;border-color:#a6e1ec!important;box-shadow:none!important}
html.ui-v2 .ghost{box-shadow:none!important}
html.ui-v2 input,html.ui-v2 select,html.ui-v2 textarea{box-shadow:none!important}
html.ui-v2 .nav-live-count{box-shadow:none!important}
html.ui-v2 .live-racer-thumb b{box-shadow:none!important}
html.ui-v2 .sidebar .nav-item[hidden]{display:none!important}
html.ui-v2.crew-design-active .panel,html.ui-v2.crew-design-active .entity-card,html.ui-v2.crew-design-active .battle-card,html.ui-v2.crew-design-active .garage-search-bar,html.ui-v2.crew-design-active .crew-profile-hero,html.ui-v2.crew-design-active .crew-social-card,html.ui-v2.crew-design-active .time-trial-row{border-color:var(--crew-primary)!important}

@media(min-width:751px){
  html.ui-v2 .sidebar{position:relative!important;inset:auto!important;top:auto!important;display:grid!important;grid-template-columns:120px minmax(0,1fr);align-items:stretch;width:100%!important;height:auto!important;min-height:68px!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-bottom:1px solid #31535e!important;background:#07131a!important;box-shadow:none!important;backdrop-filter:none!important;overflow:visible!important;transform:none!important}
  html.ui-v2 .sidebar .brand{display:flex!important;flex-direction:row!important;align-items:center;justify-content:center;width:120px;min-width:0;height:68px;margin:0!important;padding:4px 9px!important;border:0!important;border-right:1px solid #294650!important;gap:0}
  html.ui-v2 .sidebar .brand-emblem{display:block!important;width:55px!important;height:58px!important;flex:0 0 55px;background-image:url('cuh-sidebar-logo.jpg')!important;background-position:center;background-size:contain!important;filter:none!important}
  html.ui-v2 .sidebar .brand>div{display:none!important}
  html.ui-v2 .sidebar nav{display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important;gap:0!important;width:100%;height:68px!important;min-height:0!important;padding:0 9px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin;scrollbar-color:#426b78 #07131a}
  html.ui-v2 .sidebar .nav-item{display:flex!important;flex:0 0 auto;align-items:center;justify-content:center;grid-template-columns:none!important;gap:6px!important;width:auto!important;height:68px!important;min-height:68px!important;padding:0 10px!important;border:0!important;border-bottom:3px solid transparent!important;background:none!important;color:#a4bac1!important;font:700 .71rem Inter,sans-serif!important;white-space:nowrap;box-shadow:none!important;text-transform:uppercase;letter-spacing:.02em}
  html.ui-v2 .sidebar .nav-item>span,html.ui-v2 .sidebar .nav-item svg{display:none!important}
  html.ui-v2 .sidebar .nav-item.active{border-bottom-color:var(--v2-blue)!important;color:#f1f9fa!important;background:#102630!important;box-shadow:none!important}
  html.ui-v2 .sidebar .nav-item:hover{color:#f1f9fa!important}
  html.ui-v2 .sidebar .nav-item:has(.nav-live-count){padding-right:30px!important}
  html.ui-v2 .sidebar .nav-live-count{right:7px;min-width:14px;height:14px;padding:0 3px;border-radius:50%;font-size:.45rem}
}

/* Overview uses the broadcast composition; its values remain the live app's nodes. */
html.ui-v2 #overview.active{display:grid!important;grid-template-columns:minmax(0,1.14fr) minmax(280px,.86fr);grid-template-areas:"wire wire" "hero feature" "ledger ledger" "activity specialists" "leaderboard leaderboard";gap:0;align-items:stretch;padding:0!important}
html.ui-v2 #overview .v2-race-wire{grid-area:wire;display:flex;align-items:center;gap:16px;min-height:29px;margin:0 -2.6vw;padding:0 2.6vw;overflow:hidden;white-space:nowrap;background:#153c4b;border-bottom:1px solid #497b89;color:#e5f4f6;font:700 .56rem Inter,sans-serif;letter-spacing:.09em;text-transform:uppercase}
html.ui-v2 #overview .v2-race-wire strong{display:flex;align-items:center;align-self:stretch;margin-left:-2.6vw;padding:0 12px 0 2.6vw;background:#0b2733;color:#9be3f0}
html.ui-v2 #overview .v2-race-wire i{font-style:normal;opacity:.58}
html.ui-v2 #overview .overview-hero{grid-area:hero;position:relative;display:block!important;min-width:0;min-height:345px;margin:0!important;padding:28px 32px 20px;background:linear-gradient(108deg,#112c38,#071720 75%);overflow:hidden}
html.ui-v2 #overview .overview-hero::before{content:'01';position:absolute;right:-12px;top:-92px;color:#1b3a45;font:800 350px/.9 'Barlow Condensed',Impact,sans-serif;letter-spacing:-.12em;opacity:.65;pointer-events:none}
html.ui-v2 #overview .overview-hero>div:first-child,html.ui-v2 #overview .overview-hero>p{display:none!important}
html.ui-v2 #overview .v2-editorial{position:relative;z-index:1;display:flex;flex-direction:column;height:100%}
html.ui-v2 #overview .v2-edition{color:#88d9e8;font:800 .66rem Inter,sans-serif;letter-spacing:.17em}
html.ui-v2 #overview .v2-editorial-title{margin:25px 0 18px;color:#f2f8f8;font:800 clamp(4rem,7vw,7rem)/.77 'Barlow Condensed',Impact,sans-serif;font-style:italic;letter-spacing:-.025em}
html.ui-v2 #overview .v2-editorial-title em{color:#89d8e9;font-style:inherit}
html.ui-v2 #overview .v2-editorial>p{max-width:320px;margin:auto 0 8px;padding-top:10px;border-top:1px solid #52717a;color:#bed2d5;font-size:.72rem;line-height:1.4}
html.ui-v2 #overview .v2-editorial>small{font:700 .58rem Inter,sans-serif;letter-spacing:.12em;color:#e0ebec}
html.ui-v2 #overview .v2-feature{grid-area:feature;display:flex;flex-direction:column;min-width:0;min-height:345px;background:#091720;border-left:1px solid #3a5a64;color:#edf6f7}
html.ui-v2 #overview .v2-feature-head{display:flex;justify-content:space-between;gap:10px;padding:17px 19px;border-bottom:1px solid #3a5a64;font:800 .61rem Inter,sans-serif;letter-spacing:.12em}
html.ui-v2 #overview .v2-feature-head b{color:#8ad8e9}
html.ui-v2 #overview .v2-feature-body{display:flex;flex-direction:column;justify-content:center;flex:1;min-width:0;padding:20px 20px}
html.ui-v2 #overview .v2-feature-body>strong{font-size:.8rem;color:#c5d9de}
html.ui-v2 #overview .v2-feature-score{display:flex;align-items:baseline;gap:10px;min-width:0;margin:10px 0 5px;font:800 clamp(3.2rem,7vw,6.5rem)/.9 'Barlow Condensed',Impact,sans-serif;letter-spacing:-.04em}
html.ui-v2 #overview .v2-feature-score i{color:#79d0e6;font-size:.55em;font-style:normal}
html.ui-v2 #overview .v2-feature-score span:last-child{color:#8ca9b1}
html.ui-v2 #overview .v2-feature.is-time-trial .v2-feature-score{font-size:clamp(2.8rem,5vw,5rem)}
html.ui-v2 #overview .v2-feature.is-time-trial .v2-feature-score i,html.ui-v2 #overview .v2-feature.is-time-trial .v2-feature-score span:last-child{display:none}
html.ui-v2 #overview .v2-feature-teams{color:#a6c4cd;font:800 .6rem Inter,sans-serif;letter-spacing:.16em;text-transform:uppercase}
html.ui-v2 #overview .v2-feature-foot{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #3a5a64}
html.ui-v2 #overview .v2-feature-foot>div{min-width:0;padding:11px 16px}
html.ui-v2 #overview .v2-feature-foot>div+div{border-left:1px solid #3a5a64}
html.ui-v2 #overview .v2-feature-foot small{display:block;color:#94b4be;font:800 .56rem Inter,sans-serif;letter-spacing:.12em}
html.ui-v2 #overview .v2-feature-foot b{display:block;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.73rem}
html.ui-v2 #overview .metric-grid{grid-area:ledger;display:grid!important;grid-template-columns:1.15fr 1.15fr 1fr 1fr!important;grid-template-rows:repeat(2,minmax(90px,auto));gap:0!important;margin:0!important;background:var(--v2-paper-dark)!important;color:var(--v2-text)}
html.ui-v2 #overview .metric-grid .metric{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:3px!important;min-width:0;min-height:0!important;margin:0!important;padding:14px 18px!important;border:0!important;border-right:1px solid #aac0c6!important;border-bottom:1px solid #aac0c6!important;background:transparent!important;color:var(--v2-text)!important;text-align:left!important}
html.ui-v2 #overview .metric-grid .metric:first-child{grid-column:1/3;grid-row:1/3;align-items:flex-start!important;justify-content:center!important;padding:20px 28px!important}
html.ui-v2 #overview .metric-grid .metric>div{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-items:start!important;text-align:left!important}
html.ui-v2 #overview .metric-grid .metric-icon{display:none!important}
html.ui-v2 #overview .metric-grid .metric div>span{order:0;color:#496974!important;font:800 .61rem Inter,sans-serif!important;letter-spacing:.12em;text-transform:uppercase}
html.ui-v2 #overview .metric-grid .metric strong{order:1;max-width:100%;margin-top:5px;color:#0a2530!important;font:800 clamp(1.75rem,3vw,2.8rem)/.9 'Barlow Condensed',Impact,sans-serif!important;text-shadow:none!important;overflow-wrap:anywhere}
html.ui-v2 #overview .metric-grid .metric strong.compact{font-size:clamp(1.25rem,2.2vw,2rem)!important;line-height:1!important}
html.ui-v2 #overview .metric-grid .metric:first-child strong{font-size:clamp(6rem,12vw,11rem)!important;letter-spacing:-.06em}
html.ui-v2 #overview .metric-grid .metric small{order:2;margin-top:6px;color:#47636d!important;font:500 .62rem Inter,sans-serif!important}
html.ui-v2 #overview .dashboard-grid{display:contents!important}
html.ui-v2 #overview .activity-panel{grid-area:activity;background:var(--v2-paper)!important;color:var(--v2-text)!important;border:0!important;padding:24px 26px!important;min-width:0}
html.ui-v2 #overview .specialists-panel{grid-area:specialists;background:#cbdde1!important;color:var(--v2-text)!important;border:0!important;border-left:1px solid #a7c0c6!important;margin:0!important;padding:24px 24px!important;min-width:0}
html.ui-v2 #overview .activity-panel .panel-head,html.ui-v2 #overview .specialists-panel .panel-head{display:flex;flex-direction:row;align-items:end;justify-content:space-between;min-height:45px;margin-bottom:8px;padding:0 0 12px;border-bottom:3px solid #143743!important}
html.ui-v2 #overview .activity-panel .panel-head .eyebrow,html.ui-v2 #overview .specialists-panel .panel-head .eyebrow{display:none}
html.ui-v2 #overview .activity-panel h2,html.ui-v2 #overview .specialists-panel h2{color:#0a2530!important;font:800 2rem/.9 'Barlow Condensed',Impact,sans-serif!important;font-style:italic!important;letter-spacing:0!important;text-shadow:none!important;text-transform:uppercase}
html.ui-v2 #overview .live-feed{color:#315662!important;font-size:.58rem}
html.ui-v2 #overview .activity-list .activity{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px;align-items:center;min-height:51px;padding:8px 0!important;border-bottom:1px solid #b4c8ce!important;background:none!important}
html.ui-v2 #overview .activity-list .activity::before{display:none!important}
html.ui-v2 #overview .activity-list .activity strong{color:#0a2530!important;font-size:.7rem}
html.ui-v2 #overview .activity-list .activity p,html.ui-v2 #overview .activity-list .activity time{color:#526f79!important;font-size:.61rem}
html.ui-v2 #overview .activity-list .activity time{white-space:nowrap}
html.ui-v2 #overview .specialists-grid{display:grid!important;grid-template-columns:1fr!important;gap:0!important}
html.ui-v2 #overview .specialist-card{display:block!important;min-height:55px;padding:10px 0!important;border:0!important;border-bottom:1px solid #a7c0c6!important;background:transparent!important;color:var(--v2-text)!important}
html.ui-v2 #overview .specialist-card svg{display:none}
html.ui-v2 #overview .specialist-card>div{display:grid;grid-template-columns:1fr auto;gap:3px 8px;align-items:baseline}
html.ui-v2 #overview .specialist-card span{grid-column:1/-1;color:#4c6d76!important;font-size:.59rem}
html.ui-v2 #overview .specialist-card strong{color:#0a2530!important;font:700 1.02rem Inter,sans-serif!important;text-transform:none}
html.ui-v2 #overview .specialist-card small{color:#297b98!important;font:700 .63rem Inter,sans-serif!important}
html.ui-v2 #overview .leaderboard-panel{grid-area:leaderboard;margin-top:20px;background:#102630!important}
html.ui-v2 #overview .leaderboard-panel .panel-head{border-bottom-color:#426875!important}

@media(max-width:1000px) and (min-width:751px){
  html.ui-v2 #overview.active{grid-template-columns:minmax(0,1fr) minmax(260px,.9fr)}
  html.ui-v2 #overview .v2-editorial-title{font-size:clamp(3.6rem,7vw,5.5rem)}
  html.ui-v2 #overview .metric-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:750px){
  html.ui-v2 .sidebar{background:#071720!important;border-right-color:#365d69!important}
  html.ui-v2 main{padding:70px 10px 34px!important}
  html.ui-v2 .topbar{min-height:48px!important;margin:0 0 12px!important;padding:0 0 0 48px!important;border:0!important;background:transparent!important;flex-wrap:wrap}
  html.ui-v2 .ui-version-switch{order:0;margin-right:auto}
  html.ui-v2 .top-cloud{display:none!important}
  html.ui-v2 .header-actions{order:1;min-width:0;width:auto!important;flex:1 1 100%;justify-content:flex-end}
  html.ui-v2 .header-actions #crew-filter{max-width:100%}
  html.ui-v2 #overview.active{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"wire" "hero" "feature" "ledger" "activity" "specialists" "leaderboard"}
  html.ui-v2 #overview .v2-race-wire{margin:0 -10px;padding:0 10px;gap:9px}
  html.ui-v2 #overview .v2-race-wire strong{margin-left:-10px;padding:0 8px 0 10px}
  html.ui-v2 #overview .v2-race-wire span:last-child,html.ui-v2 #overview .v2-race-wire i:last-of-type{display:none}
  html.ui-v2 #overview .overview-hero{min-height:330px;padding:25px 20px}
  html.ui-v2 #overview .overview-hero::before{font-size:270px;top:-60px}
  html.ui-v2 #overview .v2-editorial-title{font-size:clamp(4rem,17vw,6.8rem)}
  html.ui-v2 #overview .v2-feature{min-height:245px;border-left:0;border-top:1px solid #3a5a64}
  html.ui-v2 #overview .v2-feature-score{font-size:4.3rem}
  html.ui-v2 #overview .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto!important}
  html.ui-v2 #overview .metric-grid .metric:first-child{grid-column:1/-1;grid-row:auto}
  html.ui-v2 #overview .metric-grid .metric:first-child strong{font-size:7rem!important}
  html.ui-v2 #overview .metric-grid .metric{min-height:100px!important}
  html.ui-v2 #overview .activity-panel,html.ui-v2 #overview .specialists-panel{padding:22px 18px!important}
  html.ui-v2 #overview .specialists-panel{border-left:0!important}
  html.ui-v2 #overview .leaderboard-panel{margin-top:12px}
}
@media(max-width:420px){
  html.ui-v2 .topbar{padding-left:44px!important}
  html.ui-v2 .ui-version-switch>span{display:none}
  html.ui-v2 #overview .metric-grid .metric{padding:12px!important}
  html.ui-v2 #overview .metric-grid .metric strong.compact{font-size:1.25rem!important}
  html.ui-v2 #overview .activity-list .activity{grid-template-columns:1fr!important}
}
