/* Theme surfaces retain each school's own brand palette. */
:root{color-scheme:light;--surface:#fff;--surface-raised:#fff;--surface-soft:#f2f5f7;--surface-hover:#edf2f5;--muted:#586a78;--line:#dce4e9;--brand-readable:var(--dark);--positive:#237446;--negative:#a64438;--watch:#8c650e;--focus:var(--dark);--chart-one:#6997b3;--chart-three:#40566d}
:root[data-theme="dark"]{color-scheme:dark;--paper:#0c141d;--ink:#eef4f8;--muted:#afbdca;--line:#354552;--surface:#17232f;--surface-raised:#1d2c39;--surface-soft:#22313f;--surface-hover:#2b3b49;--brand-readable:color-mix(in srgb,var(--brand) 44%,#fff);--green:#8ad3ad;--positive:#8ad3ad;--negative:#ffb0a5;--watch:#ffd572;--focus:var(--brand-readable);--chart-one:#aac8da;--chart-three:#94a7ff;--shadow:0 5px 22px #00000018}
body{background:var(--paper);color:var(--ink)}
button,input,select,textarea{background:var(--surface);color:var(--ink);border-color:var(--line)}
button:hover{background:var(--surface-hover)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
.sidebar button:focus-visible,.hero button:focus-visible,.drawer-head button:focus-visible{outline-color:#fff}
.topbar,.metric,.panel,.boardcard,.depth-slot,.compare-card,.chat-message,.ask-form,.drawer,.modal,.modal .panel-head,.skip{background:var(--surface)}
.global-search input,.depth-title,.timeline-note,.profile-stats div,.step:before{background:var(--surface-soft)}
.global-search input::placeholder,input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
th{background:var(--surface-soft);color:var(--muted)}
td,.listrow,.depth-player{border-color:var(--line)}
tr:hover td{background:var(--surface-hover)}
.field label,.about-foot,.help-link,.key{color:var(--muted)}
.key{border-color:var(--line)}
.bar{background:var(--surface-soft)}
.column{background:var(--surface-soft);border-color:var(--line)}
.boardcard{border-color:var(--line)}
.pill-selector{background:var(--surface-soft)}
.pill-selector .active{background:var(--surface-raised);color:var(--brand-readable)}
.role-select option{background:var(--surface);color:var(--ink)}
.theme-control{display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--line);border-radius:8px;background:var(--surface-soft);flex:none}
.theme-control button{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:7px 8px;border:0;border-radius:5px;color:var(--muted);background:transparent;font-size:10px;min-height:30px;font-weight:600}
.theme-control button svg{width:14px;height:14px;flex:none}
.theme-control button[aria-pressed="true"]{background:var(--surface-raised);color:var(--brand-readable);box-shadow:0 1px 5px #00000012}
.theme-control button:hover{color:var(--ink);background:var(--surface-hover)}
.navgroup{color:#ffffffa8}.powered{color:#ffffffb3}.brand small{opacity:.8}
.hero p{color:#ffffffd1}.hero .eyebrow{color:color-mix(in srgb,var(--accent) 60%,#fff);filter:none}
:root[data-theme="dark"] .sidebar{border-right:1px solid #ffffff16}
:root[data-theme="dark"] .navitem.active{background:var(--surface-raised);color:#fff;box-shadow:inset 3px 0 var(--brand-readable)}
:root[data-theme="dark"] button.primary,:root[data-theme="dark"] .primary,:root[data-theme="dark"] .tabs button.active{background:var(--brand-readable);border-color:var(--brand-readable);color:#0b1721}
:root[data-theme="dark"] button.soft,:root[data-theme="dark"] .metric-icon,:root[data-theme="dark"] .badge.brand{background:color-mix(in srgb,var(--brand) 22%,var(--surface));color:var(--brand-readable)}
:root[data-theme="dark"] .linkbtn,:root[data-theme="dark"] .timeline-note button{color:var(--brand-readable)}
:root[data-theme="dark"] .linkbtn{background:none}
:root[data-theme="dark"] .scout-feature{background:linear-gradient(135deg,var(--surface),var(--surface-soft))}
:root[data-theme="dark"] .alert{background:var(--surface-soft);color:#c4d1dc;border-left-color:var(--brand-readable)}
:root[data-theme="dark"] .playeravatar{background:linear-gradient(150deg,#324a5c,#233746);color:#dce7ef}
:root[data-theme="dark"] .badge{background:#2b3b49;color:#d8e2eb}
:root[data-theme="dark"] .badge.green,:root[data-theme="dark"] .grade{background:#183d30;color:#9ee5bb}
:root[data-theme="dark"] .badge.blue,:root[data-theme="dark"] .grade.mid{background:#203c57;color:#b2d6ff}
:root[data-theme="dark"] .badge.gold,:root[data-theme="dark"] .grade.low,:root[data-theme="dark"] .demo-pill{background:#44391c;color:#ffdf91;border-color:#675830}
:root[data-theme="dark"] .badge.red{background:#482b2b;color:#ffc0b5}
:root[data-theme="dark"] .badge.brand{background:color-mix(in srgb,var(--brand) 22%,var(--surface));color:var(--brand-readable)}
:root[data-theme="dark"] .clip.active{background:color-mix(in srgb,var(--brand) 18%,var(--surface));border-color:var(--brand-readable)}
:root[data-theme="dark"] .depth-player .rank{color:#95a8b8}
:root[data-theme="dark"] .depth-player:first-of-type .rank{color:var(--brand-readable)}
:root[data-theme="dark"] .bar span,:root[data-theme="dark"] .dot{background:var(--brand-readable)}
:root[data-theme="dark"] .checkrow input{accent-color:var(--brand-readable)}
:root[data-theme="dark"] .chat-message.user{background:var(--dark);color:#fff}
:root[data-theme="dark"] .overlay{background:#030910b8}
:root[data-theme="dark"] #toast{background:var(--surface-raised);border-color:var(--brand-readable);color:var(--ink)}
@media(max-width:1320px){.topbar .breadcrumb{display:none}.topbar{gap:10px}}
@media(max-width:620px){.topbar{display:grid;grid-template-columns:36px 1fr auto;gap:9px 10px;height:auto;padding:11px 16px}.topbar .menu{grid-column:1;grid-row:1;min-height:38px}.topbar .theme-control{grid-column:2;grid-row:1;justify-self:end}.topbar .role-select{grid-column:3;grid-row:1;width:103px;min-height:38px}.topbar .global-search{grid-column:1/-1;grid-row:2;width:100%;margin:0}.topbar .global-search input{font-size:12px;padding-top:9px;padding-bottom:9px}.theme-control button{min-height:31px;padding:7px 9px}.theme-control button svg{width:13px;height:13px}}
@media print{:root[data-theme]{--paper:#fff;--surface:#fff;--surface-raised:#fff;--surface-soft:#f2f5f7;--surface-hover:#f2f5f7;--ink:#182634;--muted:#586a78;--line:#dce4e9;--brand-readable:var(--dark)}.theme-control{display:none!important}}
/* Keep primary actions readable through hover in either appearance. */
button.primary:hover,.primary:hover{background:var(--dark);color:#fff}
:root[data-theme="dark"] button.primary:hover,:root[data-theme="dark"] .primary:hover{background:var(--brand-readable);color:#0b1721}

.grade.low{color:#805814}.chat-message.user .label{color:#ffffffbf}

.local-integration-tools{margin-top:24px}.local-integration-tools>summary{padding:18px 20px;cursor:pointer;font-weight:700;color:var(--ink)}.local-integration-tools[open]>summary{border-bottom:1px solid var(--line)}.legacy-integration-title{margin-bottom:16px}

@media print{:root[data-theme]{color-scheme:light;--positive:#237446;--negative:#a64438;--watch:#8c650e;--green:#147750;--chart-one:#6997b3;--chart-three:#40566d}.badge,.grade,:root[data-theme="dark"] .badge,:root[data-theme="dark"] .grade,:root[data-theme="dark"] .grade.mid,:root[data-theme="dark"] .grade.low,:root[data-theme="dark"] .badge.brand{background:#eef2f5;color:#253c4a}.chat-message.user,:root[data-theme="dark"] .chat-message.user{background:#f2f5f7;color:#182634}.chat-message.user .label{color:#586a78}.alert,:root[data-theme="dark"] .alert{color:#364957;background:#f2f5f7}.scout-feature,:root[data-theme="dark"] .scout-feature{background:#f2f5f7}.playeravatar,:root[data-theme="dark"] .playeravatar{background:#e6edf2;color:#364957}}

@media print{.badge,.grade{background:#eef2f5!important;color:#253c4a!important}}

@media(max-width:620px){.integ-hub .integ-section{scroll-margin-top:140px}}
