/* Refinement production v3. Shared tokens remain bound to tokens.css. */
:root{--oi-critical:oklch(54% .016 175);--oi-danger:oklch(73% .14 28);--oi-balanced:var(--muted);--oi-good:oklch(76% .13 155);--oi-excellent:oklch(87% .17 145)}
body{isolation:isolate}
body:before{content:'';position:fixed;inset:0;z-index:-1;background:linear-gradient(oklch(from var(--bg) l c h / .84),oklch(from var(--bg) l c h / .97)),url('./occult-new-york.png') center top/cover no-repeat;pointer-events:none}
.workspace{background:transparent}
.topbar{background:oklch(from var(--bg) l c h / .94)}
.panel,.summary-card,.history-card{background:var(--panel)}
.page-layout{padding-top:22px}
.oi-sign{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:none;border:1px solid currentColor;background:var(--bg);border-radius:3px}
.oi-sign svg{width:20px;height:20px}
.oi-weak{color:var(--oi-critical)}
.oi-below{color:var(--oi-danger)}
.oi-even{color:var(--oi-balanced)}
.oi-strong{color:var(--oi-good)}
.oi-outstanding{color:var(--oi-excellent)}
.oi-scale{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;max-width:230px;height:12px}
.oi-scale i{height:6px;align-self:center;background:currentColor;opacity:.23;border-radius:1px}
.oi-scale i.current{height:12px;opacity:1;box-shadow:0 0 0 1px var(--fg)}
.tier-gallery .oi-sign{width:30px;height:30px}
/* Home: meta and news lead, search closes the page. */
.companion-banner{height:116px;position:relative;margin:-10px 0 16px;border-bottom:1px solid var(--line);isolation:isolate}
.companion-collage{position:absolute;inset:0 0 0 auto;display:flex;align-items:end;gap:12px;width:55%;justify-content:center;overflow:hidden;z-index:-1}
.collage-hero{height:114px;width:105px;display:block;overflow:hidden;transform:rotate(-5deg);border:1px solid var(--border);background:var(--soft)}
.collage-hero-1{height:125px;transform:rotate(2deg)}
.collage-hero-2{transform:rotate(7deg)}
.collage-hero img{width:100%;height:100%;object-fit:cover;object-position:center 20%;filter:none}
.companion-banner #home-personal{height:100%;display:flex;align-items:center;max-width:40%}
.companion-banner #home-personal .btn{padding-left:0}
.home-personal-link{margin:0}
.home-meta-section{margin-bottom:24px}
.home-meta-section h1{font-size:28px;letter-spacing:-.02em}
.home-meta-strip{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.home-meta-hero{min-height:90px;background:var(--panel)}
.home-meta-hero>img{width:54px;height:90px;object-fit:cover;object-position:center 20%}
.home-meta-hero>span{padding:8px;min-width:0}
.home-meta-hero strong{font-size:12px;overflow-wrap:anywhere}
.home-meta-hero small{font-size:10px}
.home-lower-grid{grid-template-columns:minmax(0,1fr) 260px;gap:20px}
.home-shortcuts{padding-top:0;display:grid;gap:16px;align-content:start}
.home-shortcuts .companion-shortcut{padding:14px;background:var(--panel)}
.home-shortcuts .companion-shortcut h2{font:550 18px var(--font-body);margin:0 0 12px}
.home-leaderboard .panel-heading{padding:8px 14px}
.home-leaderboard h2{font-size:18px}
.home-ladder-row{display:grid;grid-template-columns:24px minmax(0,1fr) 30px;align-items:center;gap:8px;padding:10px 14px;min-height:48px;border-top:1px solid var(--line);font-size:12px}
.home-ladder-row strong{font-weight:550;overflow-wrap:anywhere}
.home-ladder-row img{width:28px;height:28px;object-fit:cover;border-radius:2px}
.home-ladder-row:hover{background:var(--soft);color:var(--fg)}
.home-search-section{margin:24px 0 0;padding:16px;background:var(--panel);border:1px solid var(--line)}
.home-search-section label{font-size:18px;margin-bottom:12px;font-weight:550}
/* News cover is the surface, no marketing or source captions. */
.news-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.news-layout .news-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.news-card{min-height:225px;position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:end;border:1px solid var(--border);overflow:hidden;border-radius:4px;background:var(--surface-raised)}
.news-card .news-image{position:absolute;inset:0;z-index:-2;height:100%;display:block;background:var(--surface)}
.news-card .news-image img{width:100%;height:100%;object-fit:cover}
.news-card:after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(oklch(8% .008 175 / .12),oklch(8% .008 175 / .95))}
.news-card.text-news:after{background:linear-gradient(oklch(from var(--surface-raised) l c h / .5),var(--bg))}
.news-card-content{padding:18px;position:relative;display:flex;flex-direction:column;gap:10px;background:transparent;min-height:0}
.news-card-content time{font-size:11px;color:var(--fg)}
.news-card h2{font:400 23px/1.2 var(--font-display);letter-spacing:-.015em;display:block;overflow:visible;max-height:none}
.news-card h2 a{display:block}
.news-card a:hover{color:var(--fg);text-decoration:underline;text-underline-offset:3px}
.news-read{font-size:11px;min-height:44px;display:flex;align-items:center;align-self:start}
.news-card h2 a:focus-visible{outline-offset:3px}
.news-layout .toolbar{padding:12px}
/* Profile sidebar aligns with the very first summary row. */
.profile-layout .profile-identity{min-height:76px;margin-bottom:12px;gap:16px}
.profile-layout .avatar-wrap{width:70px;height:70px}
.profile-layout .identity-copy h1{font-size:34px}
.profile-layout .profile-columns{grid-template-columns:minmax(0,1fr) 265px;gap:18px;align-items:start}
.profile-layout .sidebar-panels{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start}
.profile-layout .summary-grid{grid-template-columns:minmax(0,1fr);margin-bottom:12px}
.profile-layout .summary-record{padding:10px 14px}
.profile-layout .summary-title{margin-bottom:8px}
.profile-layout .summary-number{font-size:26px}
.profile-layout .summary-number small{display:inline;margin-left:7px}
.summary-record .summary-title>strong{font:400 24px var(--font-display)}
.overall-impact .panel-heading{padding:8px 15px}
.overall-impact-value{display:flex;align-items:center;gap:10px;padding:0 15px 12px}
.overall-impact-value strong{font:400 36px var(--font-display);letter-spacing:-.02em}
.overall-impact-value>span:last-child{font-size:12px}
.overall-impact>.oi-scale{margin:0 15px 17px}
.profile-layout .wheel-wrap{width:190px;height:190px}
.profile-layout .wheel-panel .panel-heading{padding:13px 15px 7px}
.profile-layout .wheel-legend{padding:0 15px 14px}
.history-card{margin-bottom:5px}
.history-card-main{grid-template-columns:80px minmax(82px,1fr) 92px 90px minmax(160px,192px);gap:8px;padding:8px 10px 0;min-height:76px}
.history-card-details>summary{min-height:32px;padding:0 10px 0 98px}
.history-card-impact .oi-sign{width:22px;height:22px}
.history-card-impact .oi-sign svg{width:17px;height:17px}
.history-card-impact small{font-size:9px}
.history-build-preview{grid-template-columns:repeat(6,minmax(0,1fr));gap:1px}
.history-build-preview .item-icon{height:29px;padding:1px;min-height:29px}
.history-build-preview .item-icon img{width:26px;height:26px}
.history-card-hero img{width:80px;height:50px;filter:none}
.history-card-kda .kda{font-size:17px}
.history-workbar{display:flex;gap:7px;align-items:center;padding:10px;border-bottom:1px solid var(--line);min-width:0}
.history-workbar .segmented{padding:0;flex-wrap:nowrap;gap:2px;flex:none}
.history-workbar .segmented button{padding:0 8px;min-height:36px;font-size:11px}
.history-workbar .control{min-width:0;width:125px;flex:1;height:36px;min-height:36px;font-size:11px;padding-inline:8px}
.history-workbar .btn{min-height:36px;font-size:11px;padding-inline:6px}
.history-workspace #history-sub-content{padding:7px}
.history-purchase-row{grid-template-columns:150px 70px minmax(0,1fr);padding:10px 7px;gap:10px}
.history-purchase-row .item-list{gap:3px}
.history-purchase-row .item-icon{width:36px;height:36px;padding:2px}
.history-foot{padding-block:6px}
/* Match: compact score and clear player selection. */
.match-score-header{display:flex;align-items:center;gap:18px;margin-bottom:10px;min-height:76px}
.match-score-header h1{font:400 26px/1.1 var(--font-display);letter-spacing:-.02em}
.match-side-labels{display:flex;gap:18px;color:var(--muted);font-size:10px;margin-top:7px}
.match-score{margin-left:auto;display:flex;gap:14px;font:400 38px/1 var(--font-display);letter-spacing:-.02em}
.match-tabs{margin-bottom:18px}
.combat-art{position:relative}
.combat-art>img{filter:none}
.combat-card[aria-pressed=true]{outline:2px solid var(--fg);outline-offset:2px}
.combat-card[aria-pressed=true] .combat-art{box-shadow:none}
.selected-player{padding:18px;margin-bottom:18px}
.selected-impact>.oi-sign{width:26px;height:26px}
.selected-impact strong{font-size:26px}
.selected-heading{margin-bottom:14px}
.graph-toolbar{display:flex;gap:10px;align-items:center;padding:12px;border-bottom:1px solid var(--line)}
.graph-toolbar .segmented{padding:0;flex-wrap:nowrap}
.graph-toolbar .control{width:180px;min-height:38px}
.graph-toolbar button{min-height:38px;font-size:12px}
.graph-toolbar #graph-average{margin-left:auto;border:1px solid var(--border)}
.graph-toolbar #graph-average[aria-pressed=true]{background:var(--soft);color:var(--fg);border-color:var(--fg)}
.graph-player-toggles{display:flex;flex-wrap:wrap;padding:12px;gap:6px}
.graph-player-chip{display:flex;align-items:center;gap:7px;min-height:44px;padding:4px 8px 4px 4px;border:1px solid var(--border);background:var(--surface);font-size:11px;border-radius:3px}
.graph-player-chip img{width:32px;height:32px;object-fit:cover;object-position:center 25%;filter:none}
.graph-player-chip[aria-pressed=true]{background:var(--surface-hover);border-color:var(--fg)}
.graph-player-chip:hover{background:var(--surface-hover);color:var(--fg)}
.graph-toolbar button:hover{background:var(--soft);color:var(--fg)}
.inline-impact-list{padding:0}
.inline-impact-list .impact-player-row{width:100%;grid-template-columns:64px minmax(100px,1fr) minmax(100px,1fr) 30px;padding:10px 18px;margin:0;min-height:70px}
.inline-impact-list .impact-player-row>img{width:64px;height:46px;object-fit:cover;object-position:center 25%}
.impact-player-entry:last-child .impact-player-row{border-bottom:0}
.inline-impact-list .impact-player-row[aria-expanded=true]{background:var(--soft);color:var(--fg)}
.inline-impact-components{display:grid;gap:14px;padding:18px 70px 22px 100px;border-bottom:1px solid var(--line);background:var(--bg)}
.inline-impact-components .component{grid-template-columns:minmax(120px,1fr) minmax(90px,2fr) 30px}
/* Item reference, all copy is provided by the actual item endpoint. */
.item-loading{height:180px}
.item-reference-head{display:flex;align-items:center;gap:18px;margin-bottom:18px}
.reference-item-image,.item-reference-placeholder{width:72px;height:72px;object-fit:contain;flex:none;padding:7px;border:1px solid var(--border);background:var(--soft);border-radius:4px}
.item-reference-placeholder{display:grid;place-items:center}
.item-reference-placeholder .icon{width:30px;height:30px}
.item-reference-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:8px}
.item-reference-meta strong{color:var(--fg);font-weight:550}
.item-reference-description,.item-effect p{white-space:pre-line;font-size:14px;line-height:1.6}
.item-reference-description{margin-bottom:18px}
.item-attributes{display:grid;gap:0;margin:0 0 20px}
.item-attributes>div{display:flex;align-items:start;justify-content:space-between;gap:20px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13px}
.item-attributes dd{margin:0;text-align:right;font-weight:550}
.item-effect{margin:0 0 20px}
.item-effect h3{margin-bottom:7px}
.item-reference-error{padding:25px 0;font-size:13px}
/* Sanitized article body, responsive media and comfortable reading. */
.article-back{display:inline-flex;align-items:center;min-height:44px;font-size:13px;margin-bottom:15px}
.article-page{max-width:860px;margin:0 auto;background:var(--panel);border:1px solid var(--line)}
.article-heading{padding:30px 40px}
.article-heading time{font-size:12px;color:var(--muted)}
.article-heading h1{font-size:42px;line-height:1.15;margin-top:12px;overflow-wrap:anywhere;text-wrap:balance}
.article-cover{display:block;width:100%;height:auto;max-height:480px;object-fit:cover}
.article-body{padding:30px 40px;overflow-wrap:anywhere;font-size:16px;line-height:1.7;min-width:0}
.article-body>*{max-width:100%}
.article-body p,.article-body ul,.article-body ol,.article-body blockquote,.article-body figure{margin:0 0 22px}
.article-body h2,.article-body h3,.article-body h4{margin:28px 0 14px;line-height:1.3}
.article-body h2{font:400 30px/1.2 var(--font-display);letter-spacing:-.02em}
.article-body h3{font-size:21px}
.article-body li{margin-bottom:8px}
.article-body img,.article-body video{display:block;max-width:100%;height:auto;margin:20px auto}
.article-body iframe{max-width:100%;height:auto;aspect-ratio:16/9;border:0}
.article-body a{color:var(--fg);text-decoration:underline;text-underline-offset:3px}
.article-body a:hover{background:var(--soft);color:var(--fg)}
.article-body pre{white-space:pre-wrap;overflow-wrap:anywhere}
.article-body table{display:block;max-width:100%;overflow:auto}
.article-body blockquote{padding:10px 20px;background:var(--soft);border:1px solid var(--border)}
.article-original{padding:0 40px 25px}
.article-original .btn{padding-left:0;font-size:11px}
.article-skeleton{height:400px;max-width:860px;margin:auto}
@media(max-width:1250px){.home-meta-strip{grid-template-columns:repeat(3,minmax(0,1fr))}
.profile-layout .profile-columns{grid-template-columns:minmax(0,1fr) 240px;gap:14px}
.history-card-main{grid-template-columns:80px minmax(80px,1fr) 90px 80px minmax(130px,156px);gap:6px}
.history-card-impact{gap:4px}
.history-workbar{gap:4px}
.history-workbar .segmented button{padding-inline:6px}
.history-workbar .control{font-size:10px;width:105px}
.news-layout .news-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1040px){.profile-layout .profile-columns{grid-template-columns:minmax(0,1fr) 225px}
.history-card-main{grid-template-columns:80px 1fr 90px 85px}
.history-build-preview{grid-column:1/-1;display:flex;flex-wrap:wrap}
.history-build-preview .item-icon{width:32px;height:32px}
.home-lower-grid{grid-template-columns:minmax(0,1fr) 225px}
.history-workbar{flex-wrap:wrap}
.history-workbar .segmented{width:100%;padding-bottom:5px}
.graph-toolbar{flex-wrap:wrap}
}
@media(max-width:760px){.profile-layout .profile-columns{grid-template-columns:minmax(0,1fr)}
.profile-layout .sidebar-panels{grid-template-columns:1fr 1fr;gap:12px}
.profile-layout .sidebar-panels>section:last-child{grid-column:1/-1}
.home-lower-grid{grid-template-columns:minmax(0,1fr)}
.home-shortcuts{grid-template-columns:1fr 1fr}
.companion-banner{height:110px}
.companion-collage{width:65%;gap:5px}
.collage-hero{height:108px;width:82px}
.collage-hero-1{height:119px}
.history-card-main{grid-template-columns:80px minmax(0,1fr) 90px;gap:8px}
.history-card-impact{grid-column:2/-1;grid-row:2;max-width:190px}
.history-build-preview{grid-column:1/-1;grid-row:3}
.history-card-details>summary{padding-left:10px;min-height:44px}
.history-workbar .control,.history-workbar .btn{min-height:44px}
.history-workbar .segmented button{min-height:44px}
}
@media(max-width:600px){.page-layout{padding:14px 12px}
.profile-layout .profile-identity{min-height:60px;gap:12px;margin-bottom:8px}
.profile-layout .avatar-wrap{width:56px;height:56px}
.profile-layout .identity-copy h1{font-size:30px}
.profile-layout .summary-number small{display:inline}
.profile-layout .sidebar-panels{grid-template-columns:minmax(0,1fr)}
.profile-layout .sidebar-panels>section:last-child{grid-column:auto}
.history-card-main{padding:8px 8px 0;grid-template-columns:80px minmax(0,1fr) 86px}
.history-card-result{font-size:11px}
.history-card-kda .kda{font-size:16px}
.history-build-preview{gap:2px}
.history-build-preview .item-icon{width:44px;height:44px;min-height:44px}
.history-build-preview .item-icon img{width:37px;height:37px}
.history-workbar{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.history-workbar .segmented{grid-column:1/-1}
.history-workbar .control{width:100%;font-size:12px}
.history-workbar .btn{grid-column:1/-1}
.history-purchase-row{grid-template-columns:minmax(0,1fr) 70px}
.history-purchase-row .item-list{grid-column:1/-1}
.history-purchase-row .item-icon{width:44px;height:44px}
.companion-banner{height:100px;margin-top:0}
.companion-collage{width:62%;gap:3px}
.collage-hero{width:70px;height:100px}
.collage-hero-1{height:112px}
.companion-banner #home-personal{max-width:38%}
.companion-banner .home-personal-link{font-size:12px}
.home-meta-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
.home-meta-hero{min-height:75px}
.home-meta-hero>img{width:51px;height:75px}
.home-meta-section .section-heading h1{font-size:25px}
.news-grid,.news-layout .news-grid{grid-template-columns:minmax(0,1fr)}
.news-card{min-height:225px}
.news-card h2{font-size:25px}
.home-shortcuts{grid-template-columns:minmax(0,1fr)}
.home-search-section{padding:12px}
.big-search{flex-wrap:wrap;gap:7px}
.big-search select{width:100%;min-height:44px}
.big-search input{width:100%;min-height:48px;min-width:0}
.big-search button{width:100%;min-height:44px}
.match-score-header{gap:10px;min-height:65px}
.match-score-header h1{font-size:20px}
.match-score-header .back-link{width:32px;flex:none}
.match-score{gap:6px;font-size:28px}
.match-side-labels{font-size:9px;gap:12px}
.match-score-header .icon-btn{width:32px;min-width:32px}
.graph-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.graph-toolbar .control{width:100%;min-height:44px;grid-column:1/-1}
.graph-toolbar .segmented{grid-column:1/-1}
.graph-toolbar button{min-height:44px;font-size:11px}
.graph-toolbar #graph-average{margin:0}
.graph-player-toggles{gap:5px;padding:8px}
.graph-player-chip{flex:1 0 30%;min-width:0;padding:3px;gap:4px;font-size:9px}
.graph-player-chip img{width:28px;height:34px}
.graph-player-chip span{overflow-wrap:anywhere}
.inline-impact-list .impact-player-row{grid-template-columns:48px minmax(70px,1fr) 90px 26px;gap:8px;padding:8px}
.inline-impact-list .impact-player-row>img{width:48px;height:40px}
.inline-impact-list .impact-player-row .impact-inline{gap:5px}
.inline-impact-components{padding:16px}
.inline-impact-components .component{grid-template-columns:minmax(105px,1fr) minmax(65px,1fr) 25px;font-size:11px;gap:8px}
.article-heading{padding:22px}
.article-heading h1{font-size:32px}
.article-body{padding:22px;font-size:16px}
.article-body h2{font-size:26px}
.article-original{padding:0 22px 20px}
.item-reference-head{gap:12px;align-items:start}
.reference-item-image,.item-reference-placeholder{width:56px;height:56px}
.item-reference-meta{gap:6px 10px}
}
.graph-player-chip[aria-current=true]{box-shadow:inset 0 -2px var(--fg)}
.benchmark-status{font-size:11px;color:var(--muted);max-width:130px}
.series-legend .dashed-key{height:0;background:none!important;border-top:2px dashed var(--series-color);width:22px;border-radius:0}
@media(max-width:600px){.benchmark-status{grid-column:1/-1;max-width:none}}
/* Empty benchmark status must not reserve a row in compact graph controls. */
.benchmark-status:empty{display:none}
@media(max-width:600px){
 .graph-toolbar .control{grid-column:1;min-width:0}
 .graph-toolbar .segmented{grid-column:2;justify-content:center;gap:0}
 .graph-toolbar .segmented button{padding-inline:8px}
 .graph-toolbar #graph-average{grid-column:1}
 .graph-toolbar #select-all-graph{grid-column:2}
}
dialog{max-height:min(82vh,760px);overflow:auto}
/* Four hero keys fit in two rows, keeping the overall rating in view. */
.profile-layout .wheel-legend{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px}
.profile-layout .hero-legend-row{display:block;min-width:0}
.profile-layout .hero-legend-row button{min-height:30px;max-width:100%;font-size:11px}
.profile-layout .legend-result{padding-left:22px;font-size:9px}
@media(max-width:600px){.profile-layout .hero-legend-row button{min-height:44px}}
