.cw-live {
  --line:#2d4659;
  --muted:#a8c0d0;
  --bar-columns:minmax(68px,25%) minmax(0,1fr) minmax(45px,12%);
  --bar-gap:8px;
  --bar-padding:8px;
  padding:clamp(12px,2.5vw,24px);
  border:1px solid var(--line);
  border-radius:16px;
  background:radial-gradient(ellipse at 12% 0,#1a424747,transparent 60%),linear-gradient(135deg,#132331,#0d1623);
}
.cw-live-head,.cw-live-plot-title {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;}
.cw-live-head span,.cw-live-plot-title span,.cw-live-readout>span,.cw-live-picker>span {
  color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.09em;
}
.cw-live-legend {display:flex;flex-wrap:wrap;gap:6px;}
.cw-root .cw-live [data-legend] {padding:7px 9px;font-size:11px;line-height:1.3;}
.cw-live-picker {display:grid;min-width:min(100%,160px);gap:4px;}
.cw-root .cw-live-picker select {width:100%;min-height:36px;padding:5px 8px;background:#0b1723;color:#eaf2ff;border:1px solid var(--line);border-radius:6px;}
.cw-live-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,28%);gap:10px;}
.cw-live-plot,.cw-live-readout {min-width:0;border:1px solid var(--line);border-radius:12px;background:#0b1521;}
.cw-live-plot {padding:clamp(9px,1.8vw,18px);}
.cw-live-plot-title {margin:0 0 10px;}
.cw-live-plot-title h3 {font-size:clamp(15px,2.3vw,22px);line-height:1.15;}
.cw-live-readout {padding:14px;background:linear-gradient(155deg,#192f3e,#0e1a28);}
.cw-live-readout h3 {font-size:18px;margin:4px 0 9px;}
.cw-live-reading {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px 0;border-top:1px solid var(--line);font-size:12px;}
.cw-live-reading span {font-weight:700;overflow-wrap:anywhere;}
.cw-live-reading small {display:block;color:var(--muted);font-size:10px;font-weight:500;}
.cw-live-reading strong {font-size:17px;color:var(--series);font-variant-numeric:tabular-nums;}
.cw-live-readout p,.cw-live p.cw-live-foot {margin-top:10px;color:var(--muted);font-size:11px;}
.cw-root .cw-live button.cw-live-bar-row {
  display:grid;grid-template-columns:var(--bar-columns);align-items:center;gap:var(--bar-gap);
  width:100%;min-height:47px;margin:4px 0;padding:5px var(--bar-padding);text-align:left;
  border:1px solid transparent!important;border-radius:6px;background:#132434!important;
}
.cw-root .cw-live button.cw-live-bar-row:hover,.cw-root .cw-live button.cw-live-bar-row[aria-pressed=true] {border-color:var(--series)!important;}
.cw-live-name {font-size:12px;font-weight:800;line-height:1.18;overflow-wrap:anywhere;}
.cw-live-name small {display:block;margin-top:3px;font-size:10px;color:var(--muted);}
.cw-live-bar-row strong {color:var(--series);font-size:15px;font-variant-numeric:tabular-nums;text-align:right;}
.cw-live-track {position:relative;height:10px;border-radius:3px;background:#274054;}
.cw-live-zero {position:absolute;top:-3px;bottom:-3px;width:1px;background:#92acbf;opacity:.75;}
.cw-live-fill {
  position:absolute;inset:0 auto 0 var(--start);width:var(--length);border-radius:3px;transform-origin:var(--origin);
  background:linear-gradient(90deg,color-mix(in srgb,var(--series) 55%,#203c49),var(--series));
  box-shadow:0 0 12px color-mix(in srgb,var(--series) 34%,transparent);
}
.cw-live-animate .cw-live-fill {animation:cw-live-enter .4s ease-out both;}
.cw-live-scale-row {display:grid;grid-template-columns:var(--bar-columns);gap:var(--bar-gap);padding:0 calc(var(--bar-padding) + 1px);}
.cw-live-scale {grid-column:2;position:relative;height:19px;margin:4px 0 2px;color:var(--muted);font-size:9px;}
.cw-live-scale span {position:absolute;transform:translateX(-50%);white-space:nowrap;}
.cw-live-scale .cw-live-tick-0 {transform:none;}
.cw-live-scale .cw-live-tick-2 {transform:translateX(-100%);}
.cw-live-legend {margin-top:8px;}
.cw-live-legend i {display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:var(--series);}
.cw-root .cw-live-legend [aria-pressed=true] {border-color:var(--series)!important;color:var(--series)!important;}
.cw-live-timeline {display:block;width:100%;height:auto;overflow:hidden;touch-action:manipulation;}
.cw-live-timeline text {fill:#b6cbd9;font:700 11px Arial,sans-serif;}
.cw-live-rule {stroke:#294357;stroke-width:1;}
.cw-live-cursor {stroke:#a1f8ed;stroke-width:1;stroke-dasharray:3 4;}
.cw-live-series {transition:opacity .22s ease;pointer-events:none;}
.cw-live-series path {fill:none;stroke:var(--series);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;}
.cw-live-animate .cw-live-series path {animation:cw-live-trace .55s ease-out both;}
.cw-live-series circle {fill:var(--series);}
.cw-live-series .is-selected {stroke:#edfaff;stroke-width:1.3;}
.cw-live-week {cursor:pointer;}
.cw-live-week rect {fill:transparent;}
.cw-live-week[aria-pressed=true] text {fill:#a1f8ed;text-decoration:underline;}
.cw-live-week:hover rect,.cw-live-week:focus-visible rect {fill:#92e7da18;stroke:#92e7da55;}
.cw-live-week-picker {display:flex;align-items:center;width:max-content;margin:6px 0;}
.cw-live-week-picker select {min-height:30px!important;}
.cw-live .is-muted {opacity:.43;}
.cw-live p.cw-live-empty {padding:18px;border:1px dashed var(--line);border-radius:8px;color:var(--muted);}
.cw-advanced {margin-top:12px;border:1px solid #30455a;border-radius:12px;background:#101b28;}
.cw-advanced>summary {cursor:pointer;padding:12px;color:#dcebf3;font-weight:750;}
.cw-advanced>.cw-layout {padding:0 8px 8px;}
@keyframes cw-live-enter {from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes cw-live-trace {from{stroke-dasharray:1;stroke-dashoffset:1}to{stroke-dasharray:1;stroke-dashoffset:0}}
@media(max-width:700px){
 .cw-live-grid {grid-template-columns:minmax(0,1fr);}
 .cw-live-readout {padding:10px 12px;}
 .cw-live-reading {padding:4px 0;}
}
@media(max-width:450px){
 .cw-live {--bar-columns:minmax(56px,27%) minmax(0,1fr) minmax(38px,13%);--bar-gap:5px;--bar-padding:5px;}
 .cw-live-name {font-size:11px;}
 .cw-live-bar-row strong {font-size:12px;}
}
@media(prefers-reduced-motion:reduce){
 .cw-live-animate .cw-live-fill,.cw-live-animate .cw-live-series path {animation:none;}
 .cw-live-series {transition:none;}
}

/* Portrait lineup and the two selected charts share the same player colors. */
.cw-matchup {
  display:grid;grid-template-columns:repeat(var(--matchup-count),minmax(0,1fr));gap:10px;margin:0 0 14px;
}
.cw-matchup-player {
  position:relative;display:grid;isolation:isolate;grid-template-columns:minmax(72px,34%) minmax(0,1fr);
  align-items:end;gap:8px;min-width:0;min-height:132px;overflow:hidden;border-radius:12px;
  border:1px solid color-mix(in srgb,var(--matchup-ink) 70%,#385465);
  background:radial-gradient(ellipse at 20% 100%,color-mix(in srgb,var(--matchup-ink) 42%,transparent),transparent 78%),#142331;
}
.cw-matchup-player::after {
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,transparent 14%,#09152255 52%,#091522c9);
}
.cw-matchup-crest {
  position:absolute;z-index:-2;inset:-17% auto -17% 4%;width:52%;height:134%;object-fit:contain;
  transform:scaleX(-1);opacity:.44;filter:saturate(.9);
}
.cw-matchup-portrait {position:relative;align-self:stretch;display:grid;place-items:center;min-width:0;min-height:130px;}
.cw-matchup-portrait>span {position:absolute;z-index:-1;color:#c8d9e2;font-size:22px;font-weight:900;}
.cw-matchup-portrait img {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:bottom;filter:drop-shadow(0 7px 13px #0008);}
.cw-matchup-name {padding:12px 8px 15px 0;min-width:0;}
.cw-matchup-name small {color:#c6d8e3;font-size:10px;line-height:1.2;overflow-wrap:anywhere;}
.cw-matchup-name h2 {font-size:clamp(16px,2.3vw,30px);line-height:1.08;margin:3px 0 0;overflow-wrap:anywhere;}
.cw-chart-caption {display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 0 8px;}
.cw-chart-caption h2 {font-size:clamp(17px,2.3vw,25px);}
.cw-chart-caption span,.cw-slot-picker>span,.cw-slot-empty {font-size:11px;color:#a8c0d0;}
.cw-chart-slots {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));align-items:start;gap:12px;}
.cw-chart-single {grid-template-columns:minmax(0,1fr);}
.cw-chart-slot {min-width:0;padding:10px;border:1px solid #30465b;border-radius:12px;background:#111e2c;}
.cw-slot-picker {display:grid;gap:4px;margin-bottom:9px;}
.cw-slot-picker>span {font-weight:800;letter-spacing:.1em;}
.cw-root .cw-slot-picker select {width:100%;min-height:38px;padding:7px 10px;border:1px solid #44667b;border-radius:6px;background:#14283b;color:#e8f4fb;}
.cw-slot-empty {padding:12px 4px;}
.cw-slot-glass {background:linear-gradient(155deg,#192b3a,#111e2c);}
.cw-chart-slot .cw-slot-context {margin:0 0 7px;color:#b7cedb;font-size:11px;}
.cw-slot-legacy.cw-light {color:#17283d;}
.cw-slot-legacy.cw-light .cw-main-matrix td,.cw-slot-legacy.cw-light .cw-main-matrix th {color:#17283d;}
.cw-chart-slot .cw-live {padding:9px;border-radius:8px;}
.cw-chart-slot .cw-live-head {margin:0 0 8px;}
.cw-chart-slot .cw-live-head .cw-live-picker {flex:1 1 215px;max-width:100%;}
.cw-chart-slot .cw-live-grid {grid-template-columns:minmax(0,1fr);gap:6px;}
.cw-chart-slot .cw-live-plot,.cw-chart-slot .cw-live-readout {padding:8px;}
.cw-chart-slot .cw-live-plot-title {margin-bottom:4px;}
.cw-chart-slot .cw-live-readout {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px;}
.cw-chart-slot .cw-live-readout>h3 {font-size:13px;margin:0;}
.cw-chart-slot .cw-live-readout>p {grid-column:1/-1;margin:0;}
.cw-chart-slot .cw-live-reading {grid-template-columns:minmax(0,1fr) auto;align-items:start;padding:4px 0;}
.cw-chart-slot .cw-live-reading strong {font-size:13px;}
.cw-chart-slot .cw-live-foot {display:none;}
.cw-slot-legacy {padding:8px;border-radius:8px;background:var(--chart-bg);overflow-x:auto;}
.cw-slot-legacy svg {display:block;width:100%;height:auto;}
.cw-slot-legacy .cw-pyramid-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));}
.cw-chart-print .cw-chart-slot>h3 {margin:0 0 8px;font-size:15px;}
.cw-chart-print :is(.cw-live-head .cw-live-picker,.cw-live-legend,.cw-live-week-picker) {display:none;}
.cw-slot-settings {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr));align-items:end;gap:8px;padding:0 10px 10px;}
.cw-slot-settings :is(.cw-field,.cw-background) {margin:0;}
@media(max-width:620px) {
  .cw-matchup {grid-template-columns:repeat(2,minmax(0,1fr));}
  .cw-matchup-player {grid-template-columns:minmax(0,1fr);gap:0;min-height:115px;}
  .cw-matchup-crest {width:90%;height:110%;inset:-9% auto auto 5%;opacity:.36;}
  .cw-matchup-portrait {min-height:75px;}
  .cw-matchup-name {padding:4px 6px 8px;text-align:center;}
  .cw-matchup-name small {font-size:9px;}
  .cw-matchup-name h2 {font-size:16px;}
}

/* Season production duel. Each tier has one shared scale and two team colors. */
.cw-duel .cw-matchup {margin-bottom:10px;}
.cw-duel .cw-matchup-player {min-height:102px;}
.cw-duel .cw-matchup-portrait {min-height:100px;}
.cw-duel-stage {
  isolation:isolate;position:relative;overflow:hidden;padding:10px 8px 8px;
  border:1px solid #334b61;border-radius:10px;
  background:radial-gradient(ellipse at 5% 20%,color-mix(in srgb,var(--duel-left) 22%,transparent),transparent 60%),
    radial-gradient(ellipse at 95% 20%,color-mix(in srgb,var(--duel-right) 22%,transparent),transparent 60%),#0c1724;
}
.cw-duel-stage::before {
  content:"";position:absolute;z-index:-1;inset:27px 1% 31px;
  clip-path:polygon(50% 0,100% 100%,0 100%);
  background:linear-gradient(90deg,color-mix(in srgb,var(--duel-left) 29%,transparent),#d3e7f50b 50%,color-mix(in srgb,var(--duel-right) 29%,transparent));
}
.cw-duel-meta {
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px;
  color:#a9c1d2;font-size:9px;line-height:1.2;letter-spacing:.07em;
}
.cw-duel-meta span:last-child {text-align:right;}
.cw-duel-meta b {font-size:9px;text-align:center;}
.cw-duel-tiers {list-style:none;margin:7px 0;padding:0;display:grid;gap:4px;}
.cw-duel-tier {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(64px,16%) minmax(0,1fr);align-items:center;
  gap:7px;width:var(--tier-width);min-height:36px;margin:0 auto;padding:4px 6px;
  border:1px solid #8db4d225;border-radius:6px;background:#122233d9;
}
.cw-duel-label {color:#c8dce9;font-size:10px;font-weight:800;text-align:center;line-height:1.1;}
.cw-duel-arm {min-width:0;display:grid;grid-template-columns:5.8ch minmax(0,1fr);align-items:center;gap:7px;font-size:clamp(13px,2vw,20px);}
.cw-duel-arm-0 {--duel-team:var(--duel-left);}
.cw-duel-arm-1 {--duel-team:var(--duel-right);grid-template-columns:minmax(0,1fr) 5.8ch;}
.cw-duel-arm strong {color:#f0f7ff;font-variant-numeric:tabular-nums;white-space:nowrap;}
.cw-duel-arm-1 strong {grid-column:2;grid-row:1;text-align:right;}
.cw-duel-arm-1 .cw-duel-track {grid-column:1;grid-row:1;}
.cw-duel-track {display:block;position:relative;height:7px;background:#90acbe27;border-radius:2px;}
.cw-duel-track:empty {background:none;}
.cw-duel-track i {
  position:absolute;inset:0 auto 0 0;width:var(--fill);border-radius:inherit;
  background:linear-gradient(90deg,color-mix(in srgb,var(--duel-team) 54%,#24384d),color-mix(in srgb,var(--duel-team) 58%,#ecf7ff));
  box-shadow:0 0 8px color-mix(in srgb,var(--duel-team) 40%,transparent);
  transform-origin:left;animation:cw-live-enter .4s ease-out both;
}
.cw-duel-arm-0 .cw-duel-track i {inset:0 0 0 auto;transform-origin:right;}
.cw-duel-stage .cw-duel-note {display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px;margin:6px 0 0;color:#a9c1d2;font-size:10px;}
.cw-duel-sr {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
@media(max-width:620px) {
  .cw-duel .cw-matchup-player {min-height:95px;}
  .cw-duel .cw-matchup-portrait {min-height:62px;}
  .cw-duel-tier {gap:4px;min-height:33px;padding:3px 4px;}
  .cw-duel-arm {gap:4px;}
}
@media(prefers-reduced-motion:reduce){.cw-duel-track i {animation:none;}}

.cw-cutoffs {
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));gap:5px 12px;
  list-style:none;margin:6px 0 9px;padding:0;
}
.cw-cutoffs li {display:grid;gap:1px;padding:4px 7px;border-left:2px solid #52718a;color:#a9c1d2;font-size:10px;line-height:1.25;}
.cw-cutoffs b {color:#deebf3;}
.cw-chart-slots + .cw-cutoffs {margin-top:9px;}

/* Detailed duel: use the same player order and colors as the pyramid. */
.cw-full {margin-top:12px;border:1px solid #334b61;border-radius:9px;background:#0d1926;}
.cw-full summary {
  display:flex;align-items:center;gap:8px;padding:11px 12px;cursor:pointer;list-style:none;color:#eef6ff;font-weight:750;
}
.cw-full summary::-webkit-details-marker {display:none;}
.cw-full summary::before {
  content:"";width:7px;height:7px;flex:none;margin-right:2px;border:solid #a7cadf;border-width:0 2px 2px 0;transform:rotate(-45deg);
}
.cw-full[open] summary::before {transform:rotate(45deg);}
.cw-full summary small {margin-left:auto;padding:2px 7px;border-radius:9px;background:#20374a;color:#bed2e2;font-size:10px;white-space:nowrap;}
.cw-full[open] summary {border-bottom:1px solid #334b61;}
.cw-full-content {padding:9px;}
.cw-full .cw-full-scroll {border-radius:6px;}
.cw-full-table {font-size:13px;}
.cw-full-table .cw-full-player {border-top:3px solid color-mix(in srgb,var(--player-accent) 64%,#aac6e1);}
.cw-full-player b,.cw-full-player small {display:block;overflow-wrap:anywhere;}
.cw-full-player small {color:#b5cadd;font-size:10px;font-weight:500;}
.cw-full-table .cw-full-value {background:color-mix(in srgb,var(--player-accent) 11%,transparent);}
.cw-full-table .cw-quick-delta {color:#b3dfdb;background:#91c5c509;}
.cw-full-table tbody th {letter-spacing:.035em;}

@media(max-width:540px){
  .cw-full-content {padding:7px;}
  .cw-full .cw-full-scroll {overflow:visible;border:0;}
  .cw-full-table,.cw-full-table thead,.cw-full-table tbody {display:block;}
  .cw-full-table thead tr,.cw-full-table tbody tr {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(58px,.62fr);}
  .cw-full-table thead th:first-child {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);}
  .cw-full-table thead tr {margin-bottom:6px;border:1px solid #334b61;border-radius:6px;overflow:hidden;align-items:stretch;}
  .cw-full-table thead th {padding:6px;align-content:center;}
  .cw-full-table thead .cw-quick-delta {font-size:9px;white-space:normal;}
  .cw-full-table tbody tr {margin-bottom:5px;border:1px solid #2b4155;border-radius:6px;overflow:hidden;}
  .cw-full-table tbody th {grid-column:1/-1;padding:5px 6px;background:#15283a;color:#cbdce8;overflow-wrap:normal;}
  .cw-full-table td,.cw-full-table .cw-quick-delta {width:auto;min-width:0;padding:5px 6px;border-bottom:0;}
  .cw-full-table td {font-size:14px;}
  .cw-full-table td.cw-quick-delta {font-size:12px;}
}

.cw-production-mode {
  display:flex;flex-wrap:wrap;gap:5px;width:fit-content;margin:9px 0;padding:3px;
  border:1px solid #30485c;border-radius:9px;background:#0a1522;
}
.cw-root .cw-production-mode button {
  min-height:40px;padding:7px 13px;border-color:transparent!important;
}
.cw-root .cw-production-mode button[aria-pressed=true] {
  background:#7ce4d7!important;border-color:#7ce4d7!important;color:#071b20!important;
}
.cw-production-mode button:focus-visible,.du-p-card button:focus-visible {
  outline:2px solid #a1f0df;outline-offset:2px;
}
@media (prefers-reduced-motion:no-preference) {
  .du-p-shell .du-p-hero img {animation:du-home-image-in .7s ease-out both;}
  .du-p-shell .du-p-grid .du-p-card {animation:du-home-card-in .35s ease-out both;}
  .du-p-shell .du-p-grid .du-p-card:nth-child(2) {animation-delay:45ms;}
  .du-p-shell .du-p-grid .du-p-card:nth-child(3) {animation-delay:90ms;}
  .du-p-shell .du-p-grid .du-p-card:nth-child(4) {animation-delay:135ms;}
  .cw-matchup-crest {transition:transform .25s ease,opacity .25s ease;}
  .cw-matchup-portrait img {transition:transform .25s ease;}
  .cw-production-mode button {transition:background-color .2s ease,color .2s ease;}
  @media (hover:hover) {
    .cw-matchup-player:hover .cw-matchup-crest {transform:scaleX(-1) scale(1.045);opacity:.54;}
    .cw-matchup-player:hover .cw-matchup-portrait img {transform:scale(1.025);}
  }
}
@keyframes du-home-image-in {from{transform:scale(1.028)}to{transform:scale(1)}}
@keyframes du-home-card-in {from{opacity:.82;translate:0 5px}to{opacity:1;translate:0 0}}
