.hero-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 21px; }
.hero-actions .hero-action { margin-top: 0; }
.hero-action-secondary { border: 1px solid #607087; background: #222d3a; color: var(--ink); }
.hero-action-secondary:hover { border-color: var(--green); background: #26333f; color: var(--green); }
.op-scope { align-self: center; color: var(--green); border-color: #4a603e; background: #202a22; white-space: nowrap; }
.op-filters { margin-bottom: 9px; }
.op-overview {
  display: grid; grid-template-columns: minmax(125px, .8fr) minmax(0, 4fr); align-items: stretch;
  min-height: 76px; margin: 0 0 10px; border: 1px solid #344537; border-radius: 9px;
  background: radial-gradient(ellipse at 4% 100%, #222d25, #121923 70%);
}
.op-scope-name {
  display: flex; align-items: center; padding: 14px;
  color: #d0e7ab; font: 600 12px/1.4 var(--mono);
}
.op-summary, .op-focus-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.op-stat {
  display: grid; align-content: start; gap: 3px; min-width: 0; padding: 11px 12px;
  border-left: 1px solid rgb(104 118 140 / .26);
}
.op-stat span { color: #b5c1d1; font-size: 11px; }
.op-stat strong { color: var(--ink); font: 700 30px/1 var(--display); letter-spacing: .015em; white-space: nowrap; }
.op-stat small { color: var(--muted); font: 400 10px/1.3 var(--mono); }
.op-explorer { overflow: hidden; border-color: #344153; }
.op-toolbar, .op-controls {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid #2a3544; background: #10151e;
}
.op-controls { display: grid; grid-template-columns: minmax(170px, 1.4fr) repeat(3, minmax(120px, 1fr)); gap: 9px; }
.op-controls label { min-width: 0; display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.op-controls select { width: 100%; min-width: 0; }
.op-controls input {
  width: 100%; min-width: 0; border-radius: 5px; padding: 6px 9px;
  background: #141a23; border: 1px solid var(--stroke); color: var(--ink); font-size: 12px;
}
.op-controls input::placeholder { color: #8997ab; }
.op-workspace { display: grid; grid-template-columns: minmax(195px, .74fr) minmax(0, 3fr); }
.op-roster {
  align-self: start; display: grid; grid-template-rows: auto minmax(0, 1fr);
  min-height: 0; max-height: 640px; border-right: 1px solid #2d3849; background: #0f151e;
}
.op-roster-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 12px 10px; font-size: 12px; border-bottom: 1px solid #263142; }
.op-roster-heading output { color: var(--muted); font: 400 10px var(--mono); white-space: nowrap; }
.op-list { overflow: auto; padding: 6px; overscroll-behavior: contain; scrollbar-color: #46576b #151b25; }
.op-roster-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 5px;
  text-align: left; margin-bottom: 3px; padding: 5px 6px; border: 1px solid transparent;
  color: var(--ink); background: transparent; border-radius: 5px;
}
.op-roster-item:hover { background: #1a2533; }
.op-roster-item[aria-pressed=true] { background: #243026; border-color: #5e7646; }
.op-roster-item .num { color: #b8c5d7; font-size: 11px; }
.op-roster-item[aria-pressed=true] .num { color: var(--green); }
.op-roster-item:focus-visible { outline-offset: -1px; }
.op-icon { flex-shrink: 0; display: inline-block; object-fit: contain; }
.op-icon-large { filter: drop-shadow(0 4px 11px #08101b); }
.op-identity { display: flex; align-items: center; gap: 7px; min-width: 0; }
.op-ident-labels { min-width: 0; display: grid; gap: 2px; }
.op-ident-labels strong { overflow: hidden; text-overflow: ellipsis; font-weight: 650; font-size: 12px; white-space: nowrap; }
.op-ident-labels small { font: 500 9px var(--mono); }
.op-side-attack { color: #ffb993; }
.op-side-defense { color: #92c9ff; }
.op-detail { min-width: 0; }
.op-focus-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 13px; background: linear-gradient(110deg, #1b2a39, #131822 70%);
}
.op-focus-head .op-identity { gap: 10px; }
.op-focus-head .op-ident-labels small { font-size: 10px; }
.op-focus-head h3 { color: var(--ink); font: 700 37px/.95 var(--display); }
.op-focus-head .unit { white-space: nowrap; }
.op-focus-stats { border-block: 1px solid #29374a; background: #141c27; }
.op-focus-stats .op-stat:first-child, .op-summary .op-stat:first-child { border-left: 0; }
.op-focus-stats .op-stat strong { font-size: 25px; }
.op-compare-block { padding: 12px 13px; }
.op-compare-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 7px; }
.op-compare-head h4 { margin: 0; color: var(--ink); font-size: 14px; }
.op-compare-head > span { color: var(--muted); font-size: 11px; }
.op-compare-rows { display: grid; gap: 6px; }
.op-bar-row { display: grid; grid-template-columns: minmax(115px, .92fr) minmax(55px, 3fr) minmax(49px, auto); gap: 10px; align-items: center; }
.op-bar-label { display: grid; gap: 1px; }
.op-bar-label .player-name { font-size: 12px; font-weight: 600; }
.op-bar-label small { color: var(--muted); font-size: 10px; }
.op-bar-track { position: relative; height: 8px; background: #303b4b; border-radius: 5px; }
.op-benchmark { position: absolute; z-index: 1; top: -3px; bottom: -3px; width: 0; border-left: 1px dashed #eff9cd; }
.op-bar-fill { display: block; border-radius: inherit; height: 100%; transform-origin: left; animation: bar-in .24s ease-out; }
.op-bar-value { font-size: 12px; text-align: right; color: var(--ink); }
.op-low-sample { color: var(--muted); }
.op-detail-scroll { border-top: 1px solid #2d3849; }
.op-data-table { min-width: 790px; }
.op-data-table th, .op-data-table td { padding: 8px; border-bottom-color: #283243; }
.op-data-table td { text-align: right; font-size: 11px; }
.op-data-table thead th { white-space: nowrap; text-align: right; }
.op-data-table thead th:first-child { text-align: left; }
.op-data-table :is(thead,tbody) th:first-child { position: sticky; left: 0; z-index: 1; background: #141b26; }
.op-data-table tbody th:first-child { font-size: 12px; }
.op-data-table thead th { position: sticky; top: 0; z-index: 1; background: #101722; }
.op-data-table thead th:first-child { z-index: 2; background: #101722; }
.op-total-row { background: #202c23; color: #dbf4ac; }
.op-data-table .op-total-row th:first-child { color: #dbf4ac; background: #202c23; white-space: nowrap; }
.op-table-intro { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: baseline; padding: 12px; color: var(--muted); font-size: 12px; border-bottom: 1px solid #2d3849; }
.op-table-intro strong { color: var(--ink); font-size: 13px; }
.op-table-scroll { max-height: 530px; overscroll-behavior: contain; }
.op-table-pick { appearance: none; display: inline-flex; min-width: 120px; white-space: nowrap; gap: 4px; padding: 3px; text-align: left; background: transparent; color: var(--ink); border: 0; }
.op-table-pick:hover { color: var(--green); }
.op-matrix-table { min-width: 790px; }
.op-matrix-table td { padding: 4px; }
.op-matrix-value { display: grid; gap: 2px; text-align: center; border-radius: 4px; padding: 5px 4px; background: var(--matrix-cell, #1c2633); font: 600 11px var(--mono); white-space: nowrap; }
.op-matrix-value small { color: #c7d2df; font: 400 10px var(--mono); }
.op-data-table .op-current-metric { color: var(--green); }
.op-source { margin: 9px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.op-source a { color: #c7d6e9; text-decoration-color: #52677f; text-underline-offset: 2px; }
.op-source a:hover { color: var(--green); }
@media (max-width: 800px) {
  .op-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-workspace { grid-template-columns: minmax(170px, .9fr) minmax(0, 2.6fr); }
  .op-overview { grid-template-columns: minmax(100px, .8fr) minmax(0, 4fr); }
  .op-scope-name { font-size: 11px; padding: 8px; }
  .op-stat { padding: 9px; }
}
@media (max-width: 600px) {
  .hero-actions { margin-top: 16px; }
  .top nav a[href="#overview"] { display: none; }
  .op-scope { align-self: flex-start; }
  .op-overview { grid-template-columns: 1fr; }
  .op-scope-name { border-bottom: 1px solid #344537; padding: 7px 8px; }
  .op-summary, .op-focus-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-summary .op-stat:nth-child(n+3), .op-focus-stats .op-stat:nth-child(n+3) { border-top: 1px solid #2d3a4b; }
  .op-summary .op-stat:nth-child(odd), .op-focus-stats .op-stat:nth-child(odd) { border-left: 0; }
  .op-toolbar, .op-controls { padding: 8px; }
  .op-toolbar .periods { max-width: 100%; flex-wrap: wrap; }
  .op-toolbar .periods button { padding-inline: 7px; font-size: 11px; }
  .op-workspace { grid-template-columns: minmax(0, 1fr); }
  .op-roster { border: 0; border-bottom: 1px solid #2d3849; min-width: 0; max-height: none; }
  .op-roster-heading { padding: 7px 9px; }
  .op-list { display: flex; overflow-x: auto; position: relative; gap: 2px; max-width: 100%; }
  .op-roster-item { width: auto; flex: 0 0 auto; margin: 0; }
  .op-roster-item .op-icon { width: 23px; height: 23px; }
  .op-roster-item .op-ident-labels strong { font-size: 11px; }
  .op-focus-head { padding: 9px; }
  .op-focus-head h3 { font-size: 31px; }
  .op-compare-block { padding-inline: 9px; }
  .op-bar-row { grid-template-columns: minmax(105px, 1.5fr) minmax(40px, 2fr) minmax(44px, auto); gap: 6px; }
  .op-bar-label .player-name { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .op-bar-fill { animation: none; } }
