/* Abacus Hoops / four reversible visual directions on the same working editor.
   Local OFL display fonts; utility text stays native and numbers stay tabular. */
@font-face{font-family:'AH Strike';src:url('vendor/fonts/ProtestStrike-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:optional}
@font-face{font-family:'AH Bungee';src:url('vendor/fonts/Bungee-Regular.ttf') format('truetype');font-style:normal;font-weight:400;font-display:optional}
:root[data-identity]{--bg:#171918;--panel:#222623;--line:#526058;--text:#f4f1e8;--muted:#bfc8bf;--accent:#f6b77c;--ah-surface:#1b201d;--ah-raised:#29302a;--ah-display:'AH Strike',system-ui,sans-serif;--ah-grid:#ffffff04;--ah-radius:7px;--ah-success:#b8e0b7;--ah-warning:#ffb8a9;--ah-shadow:#0003;color-scheme:dark;font-family:system-ui,-apple-system,'Segoe UI',sans-serif}
:root[data-identity=scoreboard]{--bg:#111c22;--panel:#1b2c34;--line:#526d77;--text:#eff6f2;--muted:#bacfd2;--accent:#9aecc9;--ah-surface:#13242c;--ah-raised:#223c45;--ah-display:'AH Bungee',system-ui,sans-serif;--ah-grid:#9aecc905;--ah-radius:12px;--ah-success:#b6e8c2}
:root[data-identity=blueprint]{--bg:#101b30;--panel:#162640;--line:#53749d;--text:#edf5ff;--muted:#b7cce8;--accent:#99ccff;--ah-surface:#102039;--ah-raised:#203752;--ah-display:'AH Strike',system-ui,sans-serif;--ah-radius:2px;--ah-success:#b4e6cc;--ah-warning:#ffc3ad}
:root[data-identity=courtside]{--bg:#f1ede4;--panel:#fffcf5;--line:#8b8174;--text:#27251f;--muted:#645b50;--accent:#97401b;--ah-surface:#f7f2e9;--ah-raised:#ece5d8;--ah-display:Georgia,'Times New Roman',serif;--ah-radius:4px;--ah-success:#1d422c;--ah-warning:#9e3025;--ah-shadow:#5d493516;color-scheme:light}
[data-identity] body{background:linear-gradient(90deg,var(--ah-grid) 1px,transparent 1px) center / 80px 100%,var(--bg);color:var(--text)}
[data-identity] header,[data-identity] main,[data-identity] .creation-actions{max-width:1440px}
.abacus-masthead{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding-top:20px;padding-bottom:18px;gap:16px;border-bottom:1px solid var(--line);margin-bottom:16px}
.abacus-masthead>div{display:flex;align-items:center;gap:28px;min-width:0}
.abacus-brand{display:flex;align-items:center;gap:14px}
.abacus-mark{width:54px;height:54px;flex:0 0 54px;fill:var(--accent);overflow:visible}
.abacus-mark .mark-frame{stroke:var(--muted);stroke-width:2;fill:none;stroke-linecap:round}
.abacus-mark circle{stroke:var(--bg);stroke-width:2}
.abacus-wordmark{display:flex;gap:9px;font-family:var(--ah-display);font-weight:400;font-size:clamp(27px,3vw,38px);line-height:1.15;letter-spacing:.015em}
.abacus-wordmark>span{color:var(--accent)}
.abacus-tagline{display:block;font-size:12px;line-height:1.6;letter-spacing:.08em;color:var(--muted);margin-top:4px}
[data-identity] header .abacus-descriptor{margin:18px 0 4px;text-transform:uppercase;font-size:11px;letter-spacing:.14em;color:var(--accent)}
[data-identity] header .abacus-page-title{font:600 12px/1.5 system-ui,sans-serif;margin:0;padding:8px 0 8px 24px;border-left:1px solid var(--line);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
[data-identity] header .abacus-intro{font-size:14px;max-width:62ch;margin:0}
.theme-chooser{position:relative;align-self:flex-start;margin:0;z-index:50;max-width:100%}
.theme-chooser[open]{z-index:60}
.theme-chooser>summary{min-height:44px;padding:12px 16px;border:1px solid var(--line);border-radius:var(--ah-radius);font-size:13px;background:var(--ah-surface)}
.theme-options{position:absolute;right:0;top:calc(100% + 8px);width:330px;max-width:calc(100vw - 32px);padding:12px;display:grid;gap:8px;background:var(--panel);border:1px solid var(--line);box-shadow:0 12px 32px var(--ah-shadow);border-radius:var(--ah-radius)}
.theme-options button{display:grid;grid-template-columns:20px 1fr;gap:4px 12px;text-align:left;min-height:64px;padding:10px;white-space:normal}
.theme-options button::before{content:'';grid-row:1 / span 2;width:20px;height:32px;align-self:center;background:linear-gradient(90deg,#222623 50%,#f6b77c 50%);border:1px solid var(--line);border-radius:2px}
.theme-options button[data-theme=scoreboard]::before{background:linear-gradient(90deg,#1b2c34 50%,#9aecc9 50%)}
.theme-options button[data-theme=blueprint]::before{background:linear-gradient(90deg,#162640 50%,#99ccff 50%)}
.theme-options button[data-theme=courtside]::before{background:linear-gradient(90deg,#fffcf5 50%,#97401b 50%)}
.theme-options button small{grid-column:2;color:var(--muted);font-size:12px}
.theme-options button[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 3px 0 var(--accent)}
.theme-note{margin:0 0 4px;font-size:12px}
.abacus-masthead>nav[aria-label="Draft actions"]:empty{display:none}
[data-identity] button,[data-identity] input,[data-identity] select,[data-identity] textarea{background-color:var(--ah-surface);border-color:var(--line);border-radius:var(--ah-radius)}
[data-identity] button:hover:not(:disabled){background-color:var(--ah-raised);border-color:var(--accent)}
[data-identity] button:focus-visible,[data-identity] summary:focus-visible,[data-identity] input:focus-visible,[data-identity] select:focus-visible,[data-identity] a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
[data-identity] .creation-actions{margin-top:0;margin-bottom:12px;gap:4px}
[data-identity] .creation-actions>button,[data-identity] .creation-actions>details>summary{border-radius:3px;background:transparent;font-size:14px}
[data-identity] .creation-actions>button:first-child{background:var(--accent);color:var(--bg);font-weight:750;border-color:var(--accent)}
[data-identity] #build-command-bar{background:var(--ah-surface);border-radius:var(--ah-radius);border-left:3px solid var(--accent);backdrop-filter:none;box-shadow:0 4px 12px var(--ah-shadow)}
[data-identity] .build-header{background:var(--panel);border-color:var(--line);border-radius:var(--ah-radius);border-top:3px solid var(--accent);padding:20px;box-shadow:none}
[data-identity] .build-header .compact-budget{background:var(--ah-surface);border:1px solid var(--line);border-radius:50%;width:88px;height:88px;display:flex;justify-content:center;align-items:center;text-align:center;position:relative}
[data-identity] .build-header .compact-budget #overall{font-family:var(--ah-display);font-weight:400;font-size:48px;line-height:1;letter-spacing:0}
[data-identity] .build-header .compact-budget>div:first-child{gap:0;background:transparent;border:0;padding:0;min-width:0;min-height:0}
[data-identity] .build-header .compact-budget::before{content:'';position:absolute;inset:12px -7px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);pointer-events:none;z-index:-1}
[data-identity] .build-header .name-grid strong,[data-identity] #player-card-empty{font:400 clamp(23px,2.5vw,30px)/1.2 var(--ah-display);letter-spacing:.01em;color:var(--text);overflow-wrap:anywhere}
[data-identity] .build-header .measurement-adjustment select{background:var(--ah-surface)}
[data-identity] .position-choice[aria-pressed=true],[data-identity] #shade-current button[aria-pressed=true]{background:var(--ah-raised);color:var(--accent);border-color:var(--accent)}
[data-identity] #weight-slider{accent-color:var(--accent)}
[data-identity] .build-header .body-option-note,[data-identity] .build-header #weight-range{color:var(--muted)}
[data-identity] .player-card-directions>details>summary{color:var(--accent)}
[data-identity] #ratings .group{background:var(--panel);border:1px solid var(--line);border-top:0;border-radius:var(--ah-radius);padding:12px 16px 10px;position:relative}
[data-identity] #ratings .group h2{display:flex;align-items:center;gap:9px;letter-spacing:.1em;font-size:12px;line-height:1.4;margin:0 0 8px;padding:8px 0 10px;border-bottom:1px solid var(--line);color:var(--group)}
[data-identity] #ratings .group h2::before{content:'';width:9px;height:9px;flex:0 0 9px;background:var(--group);border-radius:50%}
[data-identity] #ratings .group>.rating::before{border-radius:var(--ah-radius);background:var(--ah-surface);inset:3px -6px}
[data-identity] #ratings .group>.rating:not(.attribute-expanded):hover::before{background:var(--ah-raised)}
[data-identity] #ratings .group>.rating.attribute-expanded::before{background:var(--ah-raised);border-color:var(--line);box-shadow:inset 3px 0 0 var(--group)}
[data-identity] #ratings .rating-head label{font-size:14px;font-weight:650;letter-spacing:.01em}
[data-identity] #ratings .controls input[type=number]{font-variant-numeric:tabular-nums;background:transparent}
[data-identity] #ratings .attribute-expand:hover,[data-identity] #ratings .attribute-expand:focus-visible{background:var(--ah-raised)}
[data-identity] .footer-card,[data-identity] dialog,[data-identity] .comparison-card,[data-identity] .starter-choice{background:var(--panel);border-color:var(--line);border-radius:var(--ah-radius)}
[data-identity] .attribute-badge,[data-identity] .attribute-takeover,[data-identity] .animation-choice,[data-identity] .badge-tier-choice{background:var(--ah-surface)}
[data-identity] .warning,[data-identity] #notice.error{color:var(--ah-warning)!important}
[data-identity=scoreboard] .abacus-wordmark{font-size:clamp(24px,2.7vw,34px);letter-spacing:0}
[data-identity=scoreboard] .abacus-page-title{font-family:system-ui,sans-serif;font-weight:750;letter-spacing:-.03em}
[data-identity=scoreboard] .build-header .name-grid strong,[data-identity=scoreboard] #player-card-empty{font-family:system-ui,sans-serif;font-weight:750;letter-spacing:-.03em}
[data-identity=scoreboard] .build-header .compact-budget{border-radius:10px;border-bottom:4px solid var(--accent)}
[data-identity=scoreboard] #ratings .group h2{letter-spacing:.06em}
[data-identity=scoreboard] .abacus-mark{transform:rotate(-7deg)}
[data-identity=blueprint] body{background:linear-gradient(#99ccff08 1px,transparent 1px),linear-gradient(90deg,#99ccff08 1px,transparent 1px),var(--bg);background-size:24px 24px}
[data-identity=blueprint] .abacus-masthead{border-bottom:3px double var(--line)}
[data-identity=blueprint] .abacus-wordmark{letter-spacing:.06em;text-transform:uppercase}
[data-identity=blueprint] .abacus-descriptor,[data-identity=blueprint] .abacus-tagline,[data-identity=blueprint] #ratings .group h2{font-family:ui-monospace,Consolas,monospace}
[data-identity=blueprint] .build-header .compact-budget{border-radius:0;border:1px dashed var(--accent)}
[data-identity=blueprint] #ratings .group h2::before{border-radius:0;background:transparent;border:2px solid var(--group)}
[data-identity=courtside] body{background:var(--bg)}
[data-identity=courtside] .abacus-wordmark{font-weight:700;letter-spacing:-.045em;font-size:clamp(28px,3vw,42px)}
[data-identity=courtside] header .abacus-page-title{font-style:normal}
[data-identity=courtside] .abacus-masthead{border-bottom:3px solid var(--text)}
[data-identity=courtside] .build-header{border-top:0;border-left:4px solid var(--accent)}
[data-identity=courtside] .build-header .name-grid strong{font-weight:700}
[data-identity=courtside] #ratings .group h2::before{border-radius:0;width:18px;flex-basis:18px;height:3px}
/* Legacy utility surfaces must follow the palette as well as the headline card. */
[data-identity] dialog{color:var(--text)}
[data-identity] .command-more-options,[data-identity] .workbench-tool-options,[data-identity] .completion-card,[data-identity] .animation-milestone,[data-identity] .card-takeover,[data-identity] .build-header #overall-details[open]{background:var(--ah-surface);color:var(--text);border-color:var(--line)}
[data-identity] .shade-chips button,[data-identity] .review-note,[data-identity] .completion-shades,[data-identity] .build-identity details{color:var(--muted)}
[data-identity] #ratings .controls button,[data-identity] .breaker-cells button{background:var(--ah-surface)}
[data-identity] .attribute-takeover-list .attribute-takeover{background:var(--ah-surface);border-color:var(--line)}
[data-identity] .attribute-takeovers>strong,[data-identity] #creation-goals,[data-identity] #shade-lock-status,[data-identity] .name-range-note,[data-identity] #name-weight-range,[data-identity] .attribute-price.has-headroom>summary,[data-identity] .animation-state.ready{color:var(--ah-success)}
[data-identity] #name-generate:not(:disabled),[data-identity] #shade-generate:not(:disabled),[data-identity] #save{background:var(--accent);border-color:var(--accent);color:var(--bg)}
[data-identity=courtside] #ratings .group{--group:#12395f!important}
[data-identity=courtside] #ratings .group:has(#slider-5){--group:#1d422c!important}
[data-identity=courtside] #ratings .group:has(#slider-8){--group:#593109!important}
[data-identity=courtside] #ratings .group:has(#slider-11){--group:#66202d!important}
[data-identity=courtside] #ratings .group:has(#slider-15){--group:#48265f!important}
[data-identity=courtside] #ratings .group:has(#slider-17){--group:#48380a!important}
[data-identity=courtside] .creation-actions #start-edit{color:var(--bg)}
[data-identity=courtside] .point-marker{background:var(--ah-surface)}
[data-identity=courtside] .slider-point[data-state=safe]{--point-color:var(--ah-success)!important}
[data-identity=courtside] .slider-point[data-state=blocked]{--point-color:var(--ah-warning)!important}
[data-identity=courtside] .body-limit-line{background:var(--text)}
[data-identity=courtside] .basketball-handle{border-color:var(--text);box-shadow:0 0 0 2px var(--ah-surface)}
[data-identity=courtside] #ratings .slider-point input[type=range]::-webkit-slider-thumb{background:linear-gradient(to right,transparent 5px,var(--text) 5px,var(--text) 7px,transparent 7px)}
[data-identity=courtside] #ratings .slider-point input[type=range]::-moz-range-thumb{background:linear-gradient(to right,transparent 5px,var(--text) 5px,var(--text) 7px,transparent 7px)}
[data-identity=courtside] .inline-lock[aria-pressed=true]{background:#dceade;color:#1d422c;border-color:#1d422c}
[data-identity=courtside] .animation-state,[data-identity=courtside] .completion-limit,[data-identity=courtside] #edit-impact-summary{color:var(--muted)}
[data-identity=courtside] .attribute-badge .badge-planned-tier,[data-identity=courtside] .animation-state.planned,[data-identity=courtside] .breaker-rating-label,[data-identity=courtside] .inline-breaker strong{color:#48265f}
[data-identity=courtside] #ratings .rating.linked-preview .controls input[type=number]{color:var(--accent)}
[data-identity=courtside] .body-limit-help{background:var(--ah-surface);color:var(--text);border-color:var(--line)}
@media(max-width:700px){
 .abacus-masthead{padding-top:16px;gap:12px}.abacus-masthead>div{display:contents}.abacus-masthead .abacus-brand{flex-basis:100%}
 .abacus-brand{gap:10px}.abacus-mark{width:44px;height:44px;flex-basis:44px}
 .abacus-wordmark{font-size:27px}.abacus-tagline{font-size:11px;letter-spacing:.04em}
 [data-identity=scoreboard] .abacus-wordmark{font-size:24px}
 [data-identity] header .abacus-descriptor{margin-top:12px}
 [data-identity] header .abacus-page-title{font-size:11px;padding:0;border:0}
 [data-identity] .build-header{padding:16px}
 [data-identity] .build-header>.player-card-top{grid-template-columns:72px minmax(0,1fr);gap:10px}
 [data-identity] .build-header .compact-budget{width:72px;height:72px}
 [data-identity] .build-header .compact-budget #overall{font-size:38px}
 [data-identity] .build-header .name-grid strong,[data-identity] #player-card-empty{font-size:23px}
 .theme-chooser{margin-top:0}.theme-chooser>summary{width:fit-content}.theme-options{right:0;max-width:calc(100vw - 32px)}
 [data-identity=courtside] .abacus-wordmark{font-size:29px}
}
@media(prefers-reduced-motion:reduce){[data-identity] *{scroll-behavior:auto;transition:none}}
@media(forced-colors:active){.abacus-mark{fill:CanvasText}.abacus-mark .mark-frame{stroke:CanvasText}.abacus-mark circle{stroke:Canvas}[data-identity] #ratings .group h2::before{background:CanvasText}}
/* Supplied navy/orange identity. Preserve original artwork; SVG viewports remove only empty margins. */
:root[data-identity=workshop]{--bg:#101b29;--panel:#1a2a3a;--line:#586c7a;--text:#f4f3ed;--muted:#c0ccd3;--accent:#ffb574;--ah-surface:#132232;--ah-raised:#25394a;--ah-grid:#ffffff02;--ah-success:#b8e0c6;--studio-control-line:#7a8c9a}
:root[data-identity]{--ah-display:system-ui,-apple-system,'Segoe UI',sans-serif}
[data-identity] .abacus-masthead{background:#031c3d;border:1px solid #344c68;border-radius:10px;padding:16px 20px;margin-top:12px;margin-bottom:12px;gap:16px;color:#f4f3ed}
[data-identity] .abacus-masthead>div{gap:24px}
[data-identity] .abacus-brand{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-decoration:none;max-width:100%;min-width:0}
.abacus-wordmark-image{display:block;width:290px;height:auto;max-width:100%;aspect-ratio:1360/205}
[data-identity] .abacus-tagline{font:11px/1.5 system-ui,sans-serif;letter-spacing:.065em;color:#c0ccd3;margin:0 0 0 7px}
[data-identity] header .abacus-page-title{color:#c0ccd3;border-color:#526783;font-size:11px;letter-spacing:.1em}
[data-identity] .abacus-masthead .theme-chooser{align-self:center;color:#f4f3ed}
[data-identity] .abacus-masthead .theme-chooser>summary{background:#0c2848;color:#f4f3ed;border-color:#627c99}
[data-identity] .abacus-masthead .theme-options{color:var(--text)}
[data-identity] .abacus-masthead .abacus-brand:focus-visible{outline-color:#ffb574;border-radius:3px}
[data-identity] .build-header .name-grid strong,[data-identity] #player-card-empty{font-family:system-ui,sans-serif;font-weight:750;letter-spacing:-.025em}
[data-identity] .build-header .compact-budget #overall{font-family:system-ui,sans-serif;font-weight:800;letter-spacing:-.055em}
[data-identity] :is(.finder-heading h2,.ability-composer h3){text-wrap:balance}
[data-identity=workshop] .theme-options button[data-theme=workshop]::before{background:linear-gradient(90deg,#1a2a3a 50%,#ffb574 50%)}
@media(max-width:700px){
 [data-identity] .abacus-masthead{padding:14px 16px;gap:12px;align-items:center}
 [data-identity] .abacus-masthead>div{display:flex;flex:1 1 200px;min-width:0}
 [data-identity] .abacus-masthead .abacus-brand{flex-basis:auto}
 [data-identity] header .abacus-page-title{display:none}
 .abacus-wordmark-image{width:250px}
 [data-identity] .abacus-masthead .theme-chooser>summary{padding:10px 12px}
 [data-identity] .abacus-masthead .theme-options{right:0}
}
@media(forced-colors:active){.abacus-wordmark-image{forced-color-adjust:none}.abacus-masthead{border-color:CanvasText!important}}
/* Align the branded masthead with the working surface, including narrow screens. */
[data-identity] .abacus-masthead{width:calc(100% - 48px);max-width:1552px;margin-inline:auto}
@media(max-width:700px){[data-identity] .abacus-masthead{width:calc(100% - 32px);padding:12px}.abacus-wordmark-image{width:236px}}
@media(max-width:700px){
 [data-identity] .abacus-masthead>div{flex:1;max-width:calc(100% - 56px)}
 [data-identity] .abacus-masthead .theme-chooser{right:12px;top:calc(50% - 22px)}
 [data-identity] .abacus-masthead .theme-chooser>summary{width:44px;height:44px;min-height:44px;padding:5px}
}
/* A quiet pixel possession fills the open desktop masthead without competing with controls. */
[data-identity] .abacus-masthead>div:first-child{flex:0 0 auto}
[data-identity] header .abacus-page-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
[data-identity] .abacus-tagline{display:block;font-size:10px;letter-spacing:.14em;text-transform:uppercase}
[data-identity] .abacus-masthead>.masthead-court{display:block;position:relative;flex:1 1 240px;min-width:0;height:84px;margin-inline:8px 12px;overflow:hidden;color:#8da5bb}
.masthead-court svg{width:calc(100% - 88px);height:84px;display:block}
:root[data-identity=courtside]{--bg:#b6b2a8;--panel:#c8c2b6;--ah-surface:#beb8ac;--ah-raised:#ada698;--line:#746f64;--text:#242720;--muted:#363b31;--accent:#592b0d;--ah-success:#1d422c;--ah-warning:#642319;--studio-control-line:#716a5d}
[data-identity=courtside] .theme-options button[data-theme=courtside]::before{background:linear-gradient(90deg,#c8c2b6 50%,#592b0d 50%)}
@media(max-width:1000px){[data-identity] .abacus-masthead>.masthead-court{display:none}.masthead-court :is(.pixel-attacker,.pixel-defender,.pixel-ball){animation:none}}
@media(max-width:700px){[data-identity] .abacus-masthead>div:first-child{flex:1;max-width:calc(100% - 56px)}[data-identity] .abacus-masthead .theme-chooser{top:calc(50% - 22px)}}
@media(prefers-reduced-motion:reduce){.masthead-court :is(.pixel-attacker,.pixel-defender,.pixel-ball){animation:none!important}.pixel-ball{transform:translate(180px,44px)}.court-motion{display:none!important}}
@media(forced-colors:active){.masthead-court{display:none!important}}
[data-identity=courtside]{scrollbar-color:#787267 #beb8ac}
/* Soft surfaces still need crisp type and clearly bounded controls. */
:root[data-identity=courtside]{--text:#141b20;--muted:#252d2b;--line:#625c50;--studio-control-line:#625a4d}
[data-identity=courtside] body{font-weight:500}
[data-identity=courtside] :is(button,summary,label){font-weight:600}
[data-identity=courtside] :is(input,select,textarea){font-weight:500}
[data-identity=courtside] :is(p,small,.body-option-note){color:var(--muted)}
@media(min-width:901px){[data-identity=courtside] #target-optimizer[data-detail=simple]>.finder-body-panel{grid-template-columns:repeat(3,minmax(0,1fr)) 180px}}
