/* Block-textured run bars, rank emblems, elo section */

/* run bars */
.race-track { height: 36px; }
.race-bar { height: 100%; border-bottom: 3px solid transparent; box-sizing: border-box; gap: 0; }
.race-seg { filter: saturate(.9) brightness(.92); background-size: 32px 32px; image-rendering: pixelated; box-shadow: inset -1px 0 0 rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.08); color: #fff; }
.race-seg:first-child { border-radius: 3px 0 0 0; }
.race-seg:last-child { border-radius: 0 3px 0 0; }
.race-seg .tp { background: rgba(8, 8, 10, .74); color: #fff; font: 600 10.5px var(--mono); padding: 1px 5px; border-radius: 3px; pointer-events: none; }
.race-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 0 2px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.race-head:first-child { border-top: 0; padding-top: 0; }
.race-head b { color: var(--text); font-size: 14px; }

.tx-key { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); font-size: 12px; margin-top: 12px; }
.tx-key span { display: inline-flex; align-items: center; gap: 6px; }
.tx-sw { display: inline-block; width: 14px; height: 14px; border-radius: 2px; background-size: 28px 28px; image-rendering: pixelated; flex: none; vertical-align: -2px; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.tx-key .tx-sw { margin-right: 0; }

/* rank emblems */
.rk svg, .ladder-ranks svg { image-rendering: pixelated; }
.rk svg { width: 18px; height: 18px; }
.logo-emblem, .chip-emblem, .kpi-emblem { display: inline-block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.logo-emblem { width: 36px; height: 36px; }
.chip-emblem { width: 18px; height: 18px; vertical-align: -3px; }
.kpi-emblem { width: 44px; height: 44px; }
.logo-emblem svg, .chip-emblem svg, .kpi-emblem svg { width: 100%; height: 100%; image-rendering: pixelated; }
.hero-card .badge { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px; border-radius: 10px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rk) 20%, transparent), transparent 70%); }
.hero-card .badge svg { width: 96px; height: 96px; }
.pips { display: flex; gap: 5px; }
.pips i { width: 10px; height: 10px; background: var(--surface-3); box-shadow: inset 0 -2px 0 rgba(0,0,0,.35); }
.pips i.on { background: var(--rk); }

/* player head */
.head-img { width: 34px; height: 34px; image-rendering: pixelated; border-radius: 3px; box-shadow: 0 0 0 2px var(--border-hi), 0 3px 8px rgba(0,0,0,.4); flex: none; }
.player-chip .sub .chip-emblem { margin-right: 4px; }

/* elo */
.elo-card .chart.tall { height: 360px; }
.chart.elo-delta { height: 120px; margin-top: 4px; }
.elo-card .seg-ctl button { padding: 4px 10px; }

.focus-item .title .tx-sw, .track-row .lbl .tx-sw, .multiples h3 .tx-sw, th .tx-sw { margin-right: 6px; }
th .tx-sw { width: 11px; height: 11px; background-size: 22px 22px; }

/* ================= deep dive, training, climbers, heatmap ================= */
.leg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 8px; vertical-align: -1px; }
.leg-dot.you { background: var(--you); }
.leg-dot.them { background: var(--target); }
.db { display: flex; flex-direction: column; gap: 2px; }
.db-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 150px; gap: 12px; align-items: center; min-height: 30px; }
.db-lbl { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.db-lbl span { font-weight: 400; color: var(--muted); font-size: 11px; }
.db-track { position: relative; height: 18px; }
.db-tick { position: absolute; top: -6px; bottom: -6px; width: 1px; background: rgba(255,255,255,.05); }
.db-line { position: absolute; top: 7px; height: 4px; background: var(--border-hi); border-radius: 2px; }
.db-line.bad { background: rgba(230,103,103,.55); }
.db-line.good { background: rgba(70,196,112,.55); }
.db-dot { position: absolute; top: 3px; width: 12px; height: 12px; border-radius: 50%; transform: translateX(-50%); box-shadow: 0 0 0 2px var(--surface-2); }
.db-dot.you { background: var(--you); z-index: 2; }
.db-dot.them { background: var(--target); }
.db-val { display: flex; gap: 8px; align-items: center; justify-content: flex-end; font-size: 12.5px; }
.db-axis .db-track { height: 14px; }
.db-axis span { position: absolute; transform: translateX(-50%); color: var(--muted); font: 10.5px var(--mono); }
.why-list { display: flex; flex-direction: column; gap: 10px; }
.why-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; background: var(--surface); border: 2px solid var(--border); border-radius: 5px; padding: 10px 12px; }
.why-item .rank-n { font-family: var(--pixel); font-size: 18px; color: var(--warn); }
.why-item .t2 { font-size: 12.5px; margin-top: 2px; }

.plan-item { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.plan-item:last-of-type { border-bottom: 0; }
.plan-item b { font-size: 15px; }
.plan-item .t2 { font-size: 12.5px; }
.plan-tex { width: 44px; height: 44px; border-radius: 4px; background-size: 44px 44px; image-rendering: pixelated; box-shadow: inset 0 -3px 0 rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.35); }

.wi { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.wi-sliders { display: flex; flex-direction: column; gap: 8px; }
.wi-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: 13px; }
.wi-row input { width: 100%; }
.wi-row b { text-align: right; font-size: 12px; }
.wi-sliders .btn { align-self: flex-start; margin-top: 4px; }
.wi-res { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.wi-col { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 110px; }
.wi-col .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.wi-col b { font-family: var(--pixel); font-weight: 400; font-size: 15px; }
.wi-em { width: 48px; height: 48px; display: block; }
.wi-em svg { width: 100%; height: 100%; image-rendering: pixelated; }
.wi-arrow { font-size: 24px; color: var(--muted); }
.wi-delta { display: flex; gap: 8px; margin-bottom: 14px; }

.head-sm { width: 20px; height: 20px; image-rendering: pixelated; border-radius: 2px; }
.death-tag { display: inline-flex; align-items: center; margin-right: 8px; font: 12px var(--mono); }
.death-tag .tx-sw { margin-right: 4px; width: 12px; height: 12px; background-size: 24px 24px; }

table.hm td.hm-cell { text-align: center; border: 2px solid var(--surface-2); border-radius: 4px; padding: 8px 6px; }
table.hm td.hm-cell b { display: block; font-size: 14px; }
table.hm td.hm-cell span { font-size: 11px; color: var(--text-2); }
table.hm td.empty-c { background: rgba(255,255,255,.02); }
table.hm th { text-align: center; }

@media (max-width: 860px) {
  .db-row { grid-template-columns: 110px minmax(0, 1fr); }
  .db-val { grid-column: 2; justify-content: flex-start; }
  .wi { grid-template-columns: 1fr; }
}
