/* CS2 Analytics — built on the shared tokens from ui.css/styles.css (--text, --muted,
   --card, --border, --accent, --paper-dim, --line-mid, --sans, --mono). Chart marks carry
   the validated series colors (see public/cs2-charts.js); all text uses text tokens. */

.cs2an-gate-panel {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.cs2an-gate-panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

/* --- Sticky sub-nav ---------------------------------------------------------------- */

.cs2an-subnav {
  position: sticky;
  top: 68px;
  z-index: 5;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.3rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}

.cs2an-subnav a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.5rem 0.9rem;
  border-radius: 9px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.cs2an-subnav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.cs2an-subnav a.is-active {
  color: #fff;
  background: var(--accent);
}

/* --- Section states ---------------------------------------------------------------- */

.cs2an-section.is-loading {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s;
}

.cs2an-skeleton {
  background: linear-gradient(90deg, #121216 25%, #1a1a20 37%, #121216 63%);
  background-size: 400% 100%;
  animation: cs2an-shimmer 1.4s ease infinite;
  border-radius: 12px;
}

@keyframes cs2an-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.cs2an-empty {
  padding: 2.4rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-mid, #2a2a2a);
  border-radius: 12px;
}

.cs2an-empty strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.cs2an-unsupported {
  border: 1px dashed var(--line-mid, #333);
  border-radius: 12px;
  background: var(--card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 62ch;
}

.cs2an-unsupported h2 {
  margin: 0;
  font-size: 1.2rem;
}

.cs2an-unsupported p {
  margin: 0;
}

/* --- Hero row: rating hero + primary tiles ---------------------------------------- */

.cs2an-hero-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) 2fr;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.cs2an-hero-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(201, 169, 97, 0.12), transparent 60%),
    var(--card);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  /* The card stretches to the height of the 2x2 tile grid beside it. The heading stays
     pinned to the top and the rating block floats in the middle of what is left, so the
     slack never collects above the label. */
  justify-content: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.cs2an-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.cs2an-hero-range {
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

.cs2an-hero-value {
  /* Auto margins here and on the block below centre the rating in the space left
     under the heading. */
  margin-top: auto;
  font: 700 3.4rem/1 var(--sans, inherit);
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.cs2an-hero-value small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.cs2an-hero-value.is-muted {
  font-size: 1.6rem;
  color: var(--muted);
}

.cs2an-hero-note {
  margin: 0 0 auto;
  font-size: 0.82rem;
  color: var(--muted);
}

.cs2an-hero-scale {
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cs2an-hero-scale-track {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(230, 103, 103, 0.35), rgba(255, 255, 255, 0.08) 33.3%, rgba(25, 158, 112, 0.45));
}

.cs2an-hero-scale-track i {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold, #c9a961);
  border: 2px solid var(--card);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(201, 169, 97, 0.6);
}

.cs2an-hero-scale-track b {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateX(-50%);
}

.cs2an-hero-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
  font-family: var(--mono, monospace);
}

/* --- Stat tiles -------------------------------------------------------------------- */

.cs2an-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.cs2an-tile-grid.is-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0.9rem;
}

.cs2an-tile {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.cs2an-tile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  min-height: 32px;
}

/* Brand mark shown wherever the Blinta Rating is labelled. */
.cs2an-blinta-icon {
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: -0.15em;
}

.cs2an-tile-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cs2an-tile-value {
  /* The head stays pinned to the top of the tile; these auto margins float the value and
     whatever follows it through the middle of the row height, so a tile without a
     sub-line does not leave all of its slack in one lump under the meter. */
  margin-top: auto;
  font: 700 1.9rem/1.1 var(--sans, inherit);
  letter-spacing: -0.02em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.cs2an-tile > :last-child {
  margin-bottom: auto;
}

.cs2an-tile .cs2an-meter {
  margin-top: 0.15rem;
}

.cs2an-tile-value.is-muted,
.cs2an-mini-value.is-muted,
.is-muted {
  color: var(--muted);
  font-weight: 500;
}

.cs2an-tile-sub {
  font-size: 0.76rem;
  color: var(--muted);
}

.cs2c-spark {
  flex: 0 0 auto;
  overflow: visible;
}

.cs2an-delta {
  font-size: 0.74rem;
  font-weight: 600;
  width: fit-content;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-family: var(--mono, monospace);
}

.cs2an-delta em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.8;
  font-family: var(--sans, inherit);
}

.cs2an-delta.is-up { color: #3fcf95; background: rgba(25, 158, 112, 0.14); }
.cs2an-delta.is-down { color: #f28b8b; background: rgba(230, 103, 103, 0.14); }
.cs2an-delta.is-flat { color: var(--muted); background: rgba(255, 255, 255, 0.05); }

.cs2an-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.cs2an-mini-grid.is-modal {
  margin-bottom: 0.9rem;
}

.cs2an-mini {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.cs2an-mini-value {
  font: 600 1.05rem/1.2 var(--mono, monospace);
  color: var(--text);
  overflow-wrap: anywhere;
}

.cs2an-mini-value small {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.is-good { color: #3fcf95; }
.is-bad { color: #f28b8b; }
.is-mono { font-family: var(--mono, monospace); }

.cs2an-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--line-mid, #444);
  background: transparent;
  color: var(--muted);
  font: 600 0.62rem var(--sans, inherit);
  text-transform: none;
  letter-spacing: 0;
  cursor: help;
  padding: 0;
}

.cs2an-info:hover,
.cs2an-info:focus-visible {
  color: var(--text);
  border-color: var(--text);
}

/* Meter: fill carries the value, the track is a dim step of the same hue, the
   thin marker is the reference (50%, 1.00, etc.). */
.cs2an-meter {
  position: relative;
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  overflow: visible;
}

.cs2an-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
  background: var(--c);
}

.cs2an-meter b {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--card);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
  transform: translateX(-50%);
}

/* --- Chart cards ------------------------------------------------------------------- */

.cs2an-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.cs2an-chart-grid.is-secondary {
  grid-template-columns: 3fr 2fr;
}

.cs2c-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  padding: 0.95rem 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.cs2c-card.is-wide {
  grid-column: 1 / -1;
  margin-bottom: 0.9rem;
}

.cs2c-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.cs2c-card-head h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.cs2c-sub {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.cs2c-plot {
  width: 100%;
  min-width: 0;
}

.cs2c-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--sans, inherit);
}

.cs2c-empty {
  margin: 0;
  padding: 1.6rem 0.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.cs2c-footnote {
  margin: 0;
  font-size: 0.72rem;
  color: var(--paper-mute, var(--muted));
}

/* Marks */
.cs2c-grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.cs2c-axis-line { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; }
.cs2c-axis { fill: var(--muted); font-size: 11px; font-family: var(--mono, monospace); }
.cs2c-ref { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; stroke-dasharray: 3 4; }
/* Painted over marks, so it carries a surface halo to stay readable on any background. */
.cs2c-ref-label {
  fill: var(--muted);
  font-size: 10px;
  paint-order: stroke;
  stroke: var(--card);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.cs2c-line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cs2c-area { fill: var(--c); fill-opacity: 0.1; }
.cs2c-dot { fill: var(--c); stroke: var(--card); stroke-width: 2; }
.cs2c-end-label { fill: var(--text); font-size: 11px; font-weight: 600; font-family: var(--mono, monospace); }
.cs2c-value { fill: var(--text); font-size: 11px; font-family: var(--mono, monospace); }
.cs2c-row-label { fill: var(--text); font-size: 12px; }
.cs2c-track { fill: rgba(255, 255, 255, 0.06); }
.cs2c-bar { fill: var(--c); transition: filter 0.12s, opacity 0.12s; }
.cs2c-bar.is-hover { filter: brightness(1.25); }
.cs2c-hit { fill: transparent; cursor: crosshair; outline: none; }
.cs2c-hit:focus-visible { fill: rgba(255, 255, 255, 0.05); }
.cs2c-overlay { fill: transparent; cursor: crosshair; outline: none; }
.cs2c-overlay:focus-visible { stroke: rgba(255, 255, 255, 0.25); stroke-width: 1; }
.cs2c-cross { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; pointer-events: none; }
.cs2c-cross-dot { fill: var(--c); stroke: var(--card); stroke-width: 2; pointer-events: none; }

/* Legend */
.cs2c-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.cs2c-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cs2c-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}

.cs2c-swatch.is-line {
  width: 14px;
  height: 2px;
  border-radius: 1px;
}

/* Tooltip */
.cs2c-tip {
  position: fixed;
  z-index: 400;
  pointer-events: none;
  background: #16161c;
  border: 1px solid var(--line-mid, #2a2a2a);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  min-width: 140px;
  max-width: 280px;
  font-size: 0.78rem;
  color: var(--text);
}

.cs2c-tip-title {
  color: var(--muted);
  font-size: 0.72rem;
  margin-bottom: 0.3rem;
  white-space: normal;
}

.cs2c-tip-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.1rem 0;
}

.cs2c-tip-key {
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: var(--c);
  flex: 0 0 auto;
}

.cs2c-tip-row b {
  font-family: var(--mono, monospace);
  font-weight: 600;
  color: var(--text);
}

.cs2c-tip-row span {
  color: var(--muted);
}

/* --- Form pips --------------------------------------------------------------------- */

.cs2an-form {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.cs2an-form-legend {
  margin-top: auto;
}

.cs2an-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  color: #0a0a0c;
  cursor: default;
  outline: none;
  transition: transform 0.12s;
}

.cs2an-pip.is-md { width: 28px; height: 28px; font-size: 0.74rem; }
.cs2an-pip.is-lg { width: 40px; height: 40px; font-size: 0.95rem; border-radius: 10px; }
.cs2an-pip.is-sm { width: 20px; height: 20px; font-size: 0.6rem; border-radius: 5px; }
.cs2an-pip.is-win { background: #199e70; }
.cs2an-pip.is-loss { background: #e66767; }
.cs2an-pip.is-tie { background: #8a8781; }
.cs2an-pip.is-hover,
.cs2an-pip:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--card), 0 0 0 3px rgba(255, 255, 255, 0.5); }

/* --- Not-tracked disclosure -------------------------------------------------------- */

.cs2an-not-tracked {
  border: 1px dashed var(--line-mid, #2a2a2a);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.cs2an-not-tracked summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--paper-dim, var(--muted));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cs2an-not-tracked summary span {
  font-weight: 500;
  font-size: 0.72rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

.cs2an-not-tracked ul {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.5rem 1.2rem;
}

.cs2an-not-tracked li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cs2an-not-tracked strong {
  color: var(--text);
  font-weight: 600;
}

/* --- Rounds ------------------------------------------------------------------------ */

.cs2an-round-legend {
  margin-bottom: 0.2rem;
}

.cs2an-round-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.cs2an-round {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 0.62rem var(--mono, monospace);
  color: #fff;
  outline: none;
  cursor: default;
}

.cs2an-round.is-won { background: #199e70; }
.cs2an-round.is-lost { background: #e66767; }
.cs2an-round.is-unknown { background: #3a3a40; }
.cs2an-round.is-died { background-image: linear-gradient(135deg, transparent 0 55%, rgba(0, 0, 0, 0.45) 55% 100%); }
.cs2an-round.is-pistol { box-shadow: inset 0 0 0 2px #ecd9a8; }
.cs2an-round.is-mvp::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9a961;
  border: 1.5px solid var(--card);
}
.cs2an-round.is-legend { width: 16px; height: 16px; background: #3a3a40; font-size: 0.55rem; border-radius: 4px; }
.cs2an-round.is-hover,
.cs2an-round:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 3px rgba(255, 255, 255, 0.55); }
.cs2an-round.is-pistol.is-hover,
.cs2an-round.is-pistol:focus-visible { box-shadow: inset 0 0 0 2px #ecd9a8, 0 0 0 2px var(--card), 0 0 0 3px rgba(255, 255, 255, 0.55); }

/* --- Maps -------------------------------------------------------------------------- */

.cs2an-maps-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.4rem 0 0.35rem;
}

.cs2an-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cs2an-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

.cs2an-legend-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c);
}

.cs2an-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
  align-items: start;
}

.cs2an-mapcard {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-bottom: 0.9rem;
}

/* Hero: the map's own screenshot, with the name plate anchored to its bottom edge the way
   an in-game map pick looks. */
.cs2an-mapcard-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--paper-dim, rgba(255, 255, 255, 0.04));
}

.cs2an-mapcard-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs2an-mapcard-blank {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font: 700 2rem/1 var(--sans, inherit);
  color: var(--muted);
}

.cs2an-mapcard-name {
  position: absolute;
  left: 50%;
  bottom: -0.1rem;
  transform: translateX(-50%);
  background: rgba(12, 12, 14, 0.92);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.28rem 0.75rem;
  font: 700 1rem/1.2 var(--sans, inherit);
  color: #fff;
  white-space: nowrap;
}

.cs2an-mapcard-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.55rem 1rem 0;
  text-align: center;
}

.cs2an-mapcard-figures span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.cs2an-mapcard-figures strong {
  display: block;
  font: 700 1.75rem/1.1 var(--sans, inherit);
  letter-spacing: -0.02em;
}

/* Side bars: one row per side, three comparison series each. */
.cs2an-sides {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 1rem;
}

.cs2an-side-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* The CT/T art already carries its own ring and disc, so the badge is only a slot for it. */
.cs2an-side-badge {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  font: 700 0.72rem/1 var(--sans, inherit);
  letter-spacing: 0.02em;
}

.cs2an-side-logo {
  display: block;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.cs2an-side-logo.is-sm {
  width: 1.15rem;
  height: 1.15rem;
}

.cs2an-side-badge.is-inline {
  gap: 0.35rem;
  grid-auto-flow: column;
}

.cs2an-side-badge.is-ct {
  color: #9cc4f2;
}

.cs2an-side-badge.is-t {
  color: #e5be6d;
}

.cs2an-side-count {
  flex: 0 0 auto;
  min-width: 2.6rem;
  text-align: right;
  font: 700 0.72rem/1 var(--sans, inherit);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.cs2an-sidebar {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  cursor: default;
}

.cs2an-sidebar i {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 2.6rem;
  border-radius: 4px;
  background: var(--c);
  padding-right: 0.3rem;
}

.cs2an-sidebar b {
  font: 700 0.72rem/1 var(--sans, inherit);
  font-variant-numeric: tabular-nums;
  color: #06110d;
}

.cs2an-sidebar.is-empty {
  display: flex;
  align-items: center;
  padding-left: 0.4rem;
}

.cs2an-sidebar.is-empty em {
  font: 400 0.7rem/1 var(--sans, inherit);
  font-style: normal;
  color: var(--muted);
}

.cs2an-sidebar:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.cs2an-mapcard-nodemo {
  margin: 0;
  padding: 0 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.cs2an-map-stats {
  margin: 0.2rem 0 0;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.8rem;
}

.cs2an-map-stats div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cs2an-map-stats dt {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cs2an-map-stats dd {
  margin: 0;
  font: 600 0.95rem var(--sans, inherit);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.cs2an-map-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  margin-top: auto;
}

/* Drawer triggers */
.cs2an-mapcard-actions {
  display: flex;
  gap: 0.4rem;
  padding: 0 1rem;
  flex-wrap: wrap;
}

.cs2an-mapview {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: 600 0.78rem/1 var(--sans, inherit);
  padding: 0.5rem 0.55rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.cs2an-mapview i {
  font-style: normal;
  color: var(--muted);
}

.cs2an-mapview:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
}

.cs2an-mapview.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cs2an-mapview.is-active i { color: #fff; }

.cs2an-mapview:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Full-width flash analysis opened by a map card. The cards themselves deliberately keep
   their existing layout; this panel owns the denser radar interaction below the grid. */
.cs2flash-slot {
  scroll-margin-top: 6.5rem;
  margin: 0.4rem 0 1.5rem;
}

.cs2flash-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.cs2flash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(110deg, rgba(196, 35, 48, 0.11), transparent 45%);
}

.cs2flash-head h2,
.cs2flash-stats h3 { margin: 0; color: var(--text); }
.cs2flash-head h2 { font: 700 clamp(1.15rem, 2vw, 1.5rem)/1.2 var(--sans, inherit); }
.cs2flash-head p:not(.cs2flash-eyebrow) { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.76rem; }
.cs2flash-eyebrow {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font: 700 0.65rem/1 var(--sans, inherit);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cs2flash-filters,
.cs2flash-levels {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.16);
}

.cs2flash-filter,
.cs2flash-level {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.52rem 0.72rem;
  font: 650 0.72rem/1 var(--sans, inherit);
  cursor: pointer;
}

.cs2flash-filter + .cs2flash-filter,
.cs2flash-level + .cs2flash-level { border-left: 1px solid var(--border); }
.cs2flash-filter:hover,
.cs2flash-level:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.cs2flash-filter.is-active { background: var(--accent); color: #fff; }
.cs2flash-filter.is-ct.is-active { background: #6d9fd5; color: #07121e; }
.cs2flash-filter.is-t.is-active { background: #d4a84f; color: #1c1404; }
.cs2flash-level.is-active { background: rgba(196, 35, 48, 0.2); color: #fff; }
.cs2flash-level span { margin-left: 0.25rem; color: currentColor; opacity: 0.68; }
.cs2flash-filter:focus-visible,
.cs2flash-level:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

.cs2flash-layout {
  display: grid;
  grid-template-columns: minmax(0, 13fr) minmax(260px, 7fr);
  min-height: 32rem;
}

.cs2flash-map-column {
  min-width: 0;
  padding: 1rem;
  background: #0b0b0e;
}

.cs2flash-levels { margin-bottom: 0.7rem; }
.cs2flash-radar {
  position: relative;
  width: min(100%, calc(var(--flash-aspect, 1) * 42rem));
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  overflow: hidden;
  background: #09090b;
  isolation: isolate;
}

.cs2flash-radar svg { display: block; width: 100%; height: auto; }
.cs2flash-radar image { opacity: 0.84; }
.cs2flash-trajectory { cursor: pointer; outline: none; }
.cs2flash-hitline { stroke: transparent; stroke-width: 13; pointer-events: stroke; }
.cs2flash-line {
  stroke: var(--flash-color);
  stroke-width: 1.25;
  stroke-opacity: 0.23;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition: opacity 0.12s, stroke-width 0.12s;
}
.cs2flash-start,
.cs2flash-end {
  fill: var(--flash-color);
  stroke: rgba(5, 5, 7, 0.86);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  opacity: 0.52;
  transition: opacity 0.12s;
}
.cs2flash-end { fill: #fff; stroke: var(--flash-color); stroke-width: 1.5; }
.cs2flash-trajectory.is-dimmed { opacity: 0.08; }
.cs2flash-trajectory.is-focused .cs2flash-line {
  stroke-width: 3;
  stroke-opacity: 0.98;
  filter: drop-shadow(0 0 3px var(--flash-color));
}
.cs2flash-trajectory.is-focused circle { opacity: 1; }
.cs2flash-trajectory:focus-visible .cs2flash-line { stroke-opacity: 1; stroke-width: 3; }

.cs2flash-tooltip {
  position: absolute;
  z-index: 4;
  width: 152px;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(10, 10, 13, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: var(--text);
  pointer-events: none;
}
.cs2flash-tooltip strong { display: block; margin-bottom: 0.32rem; font-size: 0.76rem; }
.cs2flash-tooltip span { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.67rem; line-height: 1.55; }
.cs2flash-tooltip em { color: var(--muted); font-style: normal; }
.cs2flash-tooltip b { color: var(--text); font-weight: 650; text-align: right; }

.cs2flash-radar-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(9, 9, 11, 0.9);
  color: var(--muted);
  font-size: 0.8rem;
}
.cs2flash-radar-error[hidden] { display: none; }
.cs2flash-empty,
.cs2flash-map-note { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.73rem; text-align: center; }
.cs2flash-empty { color: #d1b7b9; }

.cs2flash-stats {
  padding: 1.15rem;
  border-left: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.012);
}
.cs2flash-stats h3 {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  font: 700 0.85rem/1.2 var(--sans, inherit);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cs2flash-stats-list { margin: 0; }
.cs2flash-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.18rem 0.75rem;
  align-items: baseline;
  padding: 0.88rem 0;
  border-bottom: 1px solid var(--border);
}
.cs2flash-stat-label { color: var(--muted); font-size: 0.75rem; }
.cs2flash-stat-value { color: var(--text); font: 700 1.08rem/1 var(--sans, inherit); font-variant-numeric: tabular-nums; }
.cs2flash-stat small { grid-column: 1 / -1; color: var(--muted); font-size: 0.66rem; text-align: right; }
.cs2flash-stat.is-actionable {
  position: relative;
  width: 100%;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.cs2flash-stat.is-actionable:hover:not(:disabled) { background: rgba(255, 255, 255, 0.035); }
.cs2flash-stat.is-actionable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cs2flash-stat.is-actionable.is-active {
  background: rgba(196, 35, 48, 0.1);
  box-shadow: inset 3px 0 var(--accent);
  padding-left: 0.65rem;
  padding-right: 0.35rem;
}
.cs2flash-stat.is-actionable.is-active .cs2flash-stat-label,
.cs2flash-stat.is-actionable.is-active .cs2flash-stat-value { color: #fff; }
.cs2flash-stat.is-actionable:disabled { cursor: default; opacity: 0.62; }
.cs2flash-stat-label i {
  display: inline-block;
  margin-left: 0.4rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.08rem 0.3rem;
  font: 650 0.52rem/1 var(--sans, inherit);
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.55;
}
.cs2flash-stat.is-actionable.is-active .cs2flash-stat-label i { opacity: 1; color: var(--accent); background: #fff; border-color: #fff; }
.cs2flash-stats-empty,
.cs2flash-map-empty {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}
.cs2flash-stats-empty strong,
.cs2flash-map-empty strong { color: var(--text); }
.cs2flash-stats-empty span,
.cs2flash-map-empty span { max-width: 32rem; font-size: 0.75rem; }

@media (max-width: 900px) {
  .cs2flash-layout { grid-template-columns: 1fr; }
  .cs2flash-stats { border-left: 0; border-top: 1px solid var(--border); }
  .cs2flash-stats-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
}

@media (max-width: 600px) {
  .cs2flash-head { align-items: stretch; flex-direction: column; }
  .cs2flash-filters { align-self: stretch; }
  .cs2flash-filter { flex: 1 1 0; padding-inline: 0.35rem; }
  .cs2flash-map-column { padding: 0.65rem; }
  .cs2flash-stats-list { grid-template-columns: 1fr; }
}

/* Duel zones, the second full-width panel a map card can open. It mirrors the flash panel's
   chrome so the two read as one pair of views on the same radar. */
.cs2zone-slot {
  scroll-margin-top: 6.5rem;
  margin: 0.4rem 0 1.5rem;
}

.cs2zone-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.cs2zone-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(110deg, rgba(196, 35, 48, 0.11), transparent 45%);
}

.cs2zone-head-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.cs2zone-head h2,
.cs2zone-stats h3 { margin: 0; color: var(--text); }
.cs2zone-head h2 { font: 700 clamp(1.15rem, 2vw, 1.5rem)/1.2 var(--sans, inherit); }
.cs2zone-head p:not(.cs2zone-eyebrow) { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.76rem; }
.cs2zone-eyebrow {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font: 700 0.65rem/1 var(--sans, inherit);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cs2zone-filters,
.cs2zone-levels {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.16);
}

.cs2zone-filter,
.cs2zone-level {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.52rem 0.72rem;
  font: 650 0.72rem/1 var(--sans, inherit);
  cursor: pointer;
}

.cs2zone-filter + .cs2zone-filter,
.cs2zone-level + .cs2zone-level { border-left: 1px solid var(--border); }
.cs2zone-filter:hover,
.cs2zone-level:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.cs2zone-filter.is-active { background: var(--accent); color: #fff; }
.cs2zone-filter.is-ct.is-active { background: #6d9fd5; color: #07121e; }
.cs2zone-filter.is-t.is-active { background: #d4a84f; color: #1c1404; }
.cs2zone-filter.is-kill.is-active { background: #199e70; color: #04140d; }
.cs2zone-filter.is-death.is-active { background: #e66767; color: #240a0a; }
.cs2zone-level.is-active { background: rgba(196, 35, 48, 0.2); color: #fff; }
.cs2zone-level span { margin-left: 0.25rem; color: currentColor; opacity: 0.68; }
.cs2zone-filter:focus-visible,
.cs2zone-level:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

.cs2zone-layout {
  display: grid;
  grid-template-columns: minmax(0, 13fr) minmax(260px, 7fr);
  min-height: 32rem;
}

.cs2zone-map-column {
  min-width: 0;
  padding: 1rem;
  background: #0b0b0e;
}

.cs2zone-levels { margin-bottom: 0.7rem; }
.cs2zone-radar {
  position: relative;
  width: min(100%, calc(var(--zone-aspect, 1) * 42rem));
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  overflow: hidden;
  background: #09090b;
  isolation: isolate;
}

.cs2zone-radar svg { display: block; width: 100%; height: auto; }
.cs2zone-radar image { opacity: 0.84; }

.cs2zone-duel { cursor: pointer; outline: none; }
/* A transparent disc wider than the dot, so a duel stays easy to hit on a dense map. */
.cs2zone-hit { fill: transparent; pointer-events: fill; }
.cs2zone-dot {
  fill: var(--zone-color);
  fill-opacity: 0.62;
  stroke: var(--zone-color);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition: fill-opacity 0.12s ease;
}
.cs2zone-duel.is-dimmed { opacity: 0.1; }
.cs2zone-duel.is-focused .cs2zone-dot { fill-opacity: 1; stroke: #fff; stroke-width: 2; }
.cs2zone-duel:focus-visible .cs2zone-dot { fill-opacity: 1; stroke: #fff; stroke-width: 2; }

.cs2zone-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 9.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(12, 12, 15, 0.96);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.cs2zone-tooltip[hidden] { display: none; }
.cs2zone-tooltip strong { display: block; margin-bottom: 0.32rem; font-size: 0.76rem; color: var(--text); }
.cs2zone-tooltip span { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.67rem; line-height: 1.55; }
.cs2zone-tooltip em { color: var(--muted); font-style: normal; }
.cs2zone-tooltip b { color: var(--text); font-weight: 650; text-align: right; }

.cs2zone-radar-error {
  position: absolute;
  inset: auto 0 0;
  padding: 0.45rem;
  background: rgba(12, 12, 15, 0.92);
  color: #d1b7b9;
  font-size: 0.7rem;
  text-align: center;
}
.cs2zone-radar-error[hidden] { display: none; }
.cs2zone-empty,
.cs2zone-map-note { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.73rem; text-align: center; }
.cs2zone-empty { color: #d1b7b9; }

.cs2zone-stats {
  padding: 1.15rem 1.25rem;
  border-left: 1px solid var(--border);
}

.cs2zone-stats h3 {
  margin-bottom: 0.75rem;
  font: 700 0.8rem/1 var(--sans, inherit);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cs2zone-stats-list { margin: 0; }
.cs2zone-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.cs2zone-stat dt { color: var(--muted); font-size: 0.75rem; }
.cs2zone-stat dd { margin: 0; color: var(--text); font: 700 1.08rem/1 var(--sans, inherit); font-variant-numeric: tabular-nums; }
.cs2zone-stat span { grid-column: 1 / -1; color: var(--muted); font-size: 0.66rem; text-align: right; }

.cs2zone-legend {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.cs2zone-legend li { display: flex; align-items: center; gap: 0.4rem; }
.cs2zone-legend i { width: 9px; height: 9px; border-radius: 50%; }
.cs2zone-note { margin: 0.55rem 0 0; color: var(--muted); font-size: 0.68rem; line-height: 1.5; }

.cs2zone-stats-empty,
.cs2zone-map-empty {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}
.cs2zone-stats-empty strong,
.cs2zone-map-empty strong { color: var(--text); }
.cs2zone-stats-empty span,
.cs2zone-map-empty span { max-width: 32rem; font-size: 0.75rem; }

@media (max-width: 900px) {
  .cs2zone-layout { grid-template-columns: 1fr; }
  .cs2zone-stats { border-left: 0; border-top: 1px solid var(--border); }
  .cs2zone-stats-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
}

@media (max-width: 600px) {
  .cs2zone-head { align-items: stretch; flex-direction: column; }
  .cs2zone-head-filters { justify-content: flex-start; }
  .cs2zone-filters { flex: 1 1 100%; }
  .cs2zone-filter { flex: 1 1 0; padding-inline: 0.35rem; }
  .cs2zone-map-column { padding: 0.65rem; }
  .cs2zone-stats-list { grid-template-columns: 1fr; }
}

:root { --ui-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* --- Match table ------------------------------------------------------------------- */

.cs2an-match-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--card);
  padding: 0.45rem;
}

/* Map | Date | Score | Rating | K | D | K/D | ADR | Aim | Utility | Achievements | Source | > */
.cs2an-match-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) 96px 78px 110px 52px 60px 66px 60px 108px 108px minmax(120px, 1fr) 60px 22px;
  gap: 0.6rem;
  align-items: center;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 0.72rem 0.8rem;
  text-align: left;
  color: var(--text);
  font: inherit;
  font-family: var(--ui-sans);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  min-width: 1240px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cs2an-match-row.is-head {
  background: transparent;
  border-left-color: transparent;
  cursor: default;
  padding: 0.35rem 0.8rem 0.55rem;
  font-family: var(--ui-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: normal;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.cs2an-match-row:not(.is-head):nth-of-type(odd) { background: rgba(255, 255, 255, 0.018); }
.cs2an-match-row:not(.is-head):hover { background: #14141a; }
.cs2an-match-row.is-win:not(.is-head):hover { border-left-color: #199e70; }
.cs2an-match-row.is-loss:not(.is-head):hover { border-left-color: #e66767; }
.cs2an-match-row.is-tie:not(.is-head):hover { border-left-color: #8a8781; }

.cs2an-match-row > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.cs2an-match-row > span.is-num {
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}

.cs2an-match-row small {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: normal;
}

/* Figures read in the row's own sans with tabular figures, not the chrome mono. */
.cs2an-match-row .is-mono {
  font-family: var(--ui-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: normal;
}

/* Sortable headers ---------------------------------------------------------- */

.cs2an-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.cs2an-sort.is-end { justify-content: flex-end; width: 100%; }
.cs2an-sort:hover { color: var(--text); }
.cs2an-sort.is-active { color: var(--text); }
.cs2an-sort i { font-style: normal; font-size: 0.6rem; opacity: 0.85; }

/* Map cell ------------------------------------------------------------------ */

.cs2an-map-cell {
  flex-direction: row !important;
  align-items: center;
  gap: 0.55rem !important;
}

.cs2an-map-thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #1a1a22;
}

.cs2an-map-thumb.is-blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.cs2an-map-name { display: flex; flex-direction: column; min-width: 0; }
.cs2an-map-name strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cs2an-match-date strong { font-weight: 400; }

/* Score --------------------------------------------------------------------- */

.cs2an-match-score {
  flex-direction: row !important;
  align-items: baseline;
  gap: 0.15rem !important;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.cs2an-match-score i { font-style: normal; color: var(--muted); }
.cs2an-match-row.is-win .cs2an-match-score { color: #3fcf95; }
.cs2an-match-row.is-loss .cs2an-match-score { color: #f28b8b; }
.cs2an-match-row.is-tie .cs2an-match-score { color: var(--muted); }

.cs2an-match-rating {
  align-items: flex-end;
  gap: 0.22rem !important;
}

.cs2an-match-rating .cs2an-meter { max-width: 92px; height: 8px; }

/* Bar cells (aim, utility) --------------------------------------------------- */

.cs2an-cell-bar {
  position: relative;
  display: block;
  height: 28px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.cs2an-cell-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  background: var(--c, #3987e5);
  opacity: 0.62;
}

.cs2an-cell-bar em {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.4rem;
  font-style: normal;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.cs2an-cell-bar.is-empty {
  background: transparent;
  color: var(--muted);
  text-align: center;
  line-height: 28px;
}

/* Achievement chips ---------------------------------------------------------- */

.cs2an-badges {
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem !important;
  color: var(--muted);
}

.cs2an-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 25px;
  padding: 0 0.42rem;
  border-radius: 6px;
  font-family: var(--ui-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: normal;
  color: #0a0a0c;
}

.cs2an-badge.is-ace { background: #c07ae0; }
.cs2an-badge.is-quad { background: #e07aa8; }
.cs2an-badge.is-clutch { background: #d99a3d; }
.cs2an-badge.is-entry { background: #3987e5; color: #f2f6ff; }
.cs2an-badge.is-mvp { background: #c9a961; }

/* Source + row affordance ----------------------------------------------------- */

.cs2an-source-cell { align-items: center; }

.cs2an-source {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
}

.cs2an-source img { opacity: 0.75; }
.cs2an-source.is-demo img { opacity: 1; }

.cs2an-source b {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 13px;
  height: 13px;
  border-radius: 4px;
  background: #199e70;
  color: #0a0a0c;
  font-family: var(--ui-sans);
  font-size: 0.58rem;
  line-height: 13px;
  letter-spacing: normal;
  text-align: center;
}

.cs2an-source.is-pending i {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9a961;
}

.cs2an-row-go {
  align-items: center;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
}

.cs2an-match-row:hover .cs2an-row-go { color: var(--text); }

.cs2an-status {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  width: fit-content;
  text-transform: capitalize;
}

.cs2an-status.is-completed { background: rgba(25, 158, 112, 0.16); color: #3fcf95; }
.cs2an-status.is-discovered { background: rgba(201, 169, 97, 0.16); color: #ecd9a8; }
.cs2an-status.is-failed { background: rgba(230, 103, 103, 0.16); color: #f28b8b; }
.cs2an-status.is-unavailable { background: rgba(255, 255, 255, 0.08); color: var(--muted); }

.cs2an-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

/* --- Modal (match detail) ----------------------------------------------------------- */

.cs2an-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cs2an-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
}

.cs2an-modal-card {
  position: relative;
  z-index: 1;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cs2an-modal-card > div {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cs2an-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cs2an-modal-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "result score" "title score" "meta score";
  gap: 0.2rem 1rem;
  align-items: center;
  padding-right: 2rem;
}

.cs2an-modal-result {
  grid-area: result;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cs2an-modal-result.is-win { color: #3fcf95; }
.cs2an-modal-result.is-loss { color: #f28b8b; }
.cs2an-modal-result.is-tie { color: var(--muted); }

.cs2an-modal-head h2 {
  grid-area: title;
  margin: 0;
  font-size: 1.4rem;
}

.cs2an-modal-head h2 small {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 0.4rem;
}

.cs2an-modal-head .cs2c-sub {
  grid-area: meta;
}

.cs2an-modal-score {
  grid-area: score;
  font: 700 2.4rem/1 var(--sans, inherit);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* --- Responsive ------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .cs2an-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs2an-chart-grid.is-secondary { grid-template-columns: 1fr 1fr; }
  .cs2an-tile-grid.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .cs2an-hero-row { grid-template-columns: 1fr; }
  .cs2an-subnav { top: 60px; }
  .cs2an-match-row { grid-template-columns: 90px 1fr 1fr; }
  .cs2an-match-row.is-head { display: none; }
  .cs2an-match-row > span:nth-child(n+5) { display: none; }
}

@media (max-width: 640px) {
  .cs2an-chart-grid,
  .cs2an-chart-grid.is-secondary,
  .cs2an-tile-grid,
  .cs2an-tile-grid.is-four { grid-template-columns: 1fr; }
  .cs2an-hero-value { font-size: 2.8rem; }
  .cs2an-modal-head { grid-template-columns: 1fr; grid-template-areas: "result" "title" "meta" "score"; }
}

@media (prefers-reduced-motion: reduce) {
  .cs2an-skeleton { animation: none; background: #141418; }
  .cs2an-pip, .cs2c-bar { transition: none; }
}
/* Demo telemetry reuses the existing analytics palette and card typography. */
.cs2demo-panel { display: grid; grid-template-columns: minmax(0,1fr); min-width: 0; gap: 18px; margin-top: 22px; }
.cs2demo-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(175px,1fr)); gap: 12px; }
.cs2demo-value { display: block; font-size: 24px; margin: 10px 0; font-variant-numeric: tabular-nums; }

/* Stat board: one framed card whose bands (a label row + its cells) are separated by real
   hairlines. The 1px grid gap over a border-coloured backdrop draws every divider, so the
   rules survive any wrap without per-cell border bookkeeping. */
.cs2demo-board {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.cs2demo-band {
  margin: 0;
  padding: 9px 16px;
  background: color-mix(in srgb, var(--card) 82%, #000);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs2demo-cells {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
}
.cs2demo-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px 16px;
  background: var(--card);
}
.cs2demo-cell-label {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs2demo-cell-value {
  font: 700 1.6rem/1.05 var(--sans, inherit);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.cs2demo-cell-value.is-muted { font-size: 0.95rem; font-weight: 500; line-height: 1.6; }
.cs2demo-cell-meter { margin-top: auto; }
.cs2demo-scroll { min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; }
.cs2demo-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cs2demo-table th,.cs2demo-table td { padding: 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.07); white-space: nowrap; }
.cs2demo-table th { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: #9ca0aa; }
.cs2demo-table tfoot td { border-top: 1px solid rgba(255,255,255,.14); border-bottom: 0; background: rgba(255,255,255,.025); }
.cs2demo-table small { color: #9ca0aa; }
.cs2demo-utility .cs2demo-table { font-size: 13px; }
.cs2demo-utility .cs2demo-table th,.cs2demo-utility .cs2demo-table td { padding: 16px 14px; }
.cs2demo-utility .cs2-wep { width: 52px; height: 20px; }
.cs2demo-utility .cs2-wep-cell { gap: 13px; }
.cs2demo-utility .cs2demo-table th:nth-child(n+2),
.cs2demo-utility .cs2demo-table td:nth-child(n+2) { width: 19%; font-variant-numeric: tabular-nums; }
.cs2demo-utility .cs2an-info { margin-left: 6px; vertical-align: middle; }
.cs2demo-unavailable { color: #9ca0aa; cursor: help; }
.cs2demo-success { display: inline-flex; align-items: baseline; gap: 7px; }
.cs2demo-success strong { font-size: 14px; }
.cs2demo-success small { font-size: 10px; }
.cs2demo-panel a { color: inherit; text-decoration-color: #e5484d; text-underline-offset: 3px; }
.cs2demo-spray select { background: #17181c; color: inherit; padding: 8px 12px; border: 1px solid #393b42; border-radius: 5px; }
.cs2demo-plot { max-width: 560px; margin: auto; }
.cs2demo-plot svg { display: block; width: 100%; }
.cs2demo-panel .cs2c-spark { max-width: 100%; height: auto; }

/* Per-weapon body hit map. The figure is an inline SVG so every hitgroup remains a real
   focusable target, rather than an approximate hotspot positioned over a bitmap. */
.cs2hit {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,.025), transparent 48%), #111216;
  font-family: var(--sans, inherit);
}
.cs2hit-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.cs2hit-head h4 { margin: 0 0 3px; font-size: 15px; }
.cs2hit-head p { margin: 0; color: #9ca0aa; font-size: 12px; }
.cs2hit-head > span {
  flex: none; padding: 5px 9px; border: 1px solid rgba(229,72,77,.3); border-radius: 999px;
  color: #e9b4b6; background: rgba(229,72,77,.08); font: 600 11px var(--sans, inherit);
}
.cs2hit-layout { display: grid; grid-template-columns: minmax(260px, .82fr) minmax(260px, 1.18fr); min-height: 470px; }
.cs2hit-figure {
  position: relative; display: grid; place-items: center; align-content: center; gap: 4px;
  min-width: 0; margin: 0; padding: 18px;
  border-right: 1px solid rgba(255,255,255,.08);
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 24px 24px;
}
.cs2hit-avatar { display: block; width: min(100%, 350px); height: auto; overflow: hidden; border-radius: 8px; }
.cs2hit-avatar image { pointer-events: none; }
.cs2hit-region { cursor: crosshair; outline: none; }
.cs2hit-region path {
  fill: rgba(229,72,77,var(--hit-alpha));
  stroke: rgba(255,255,255,.08); stroke-width: 2;
  transition: fill .14s ease, filter .14s ease, stroke .14s ease;
}
.cs2hit-region:hover path,
.cs2hit-region.is-active path,
.cs2hit-region:focus-visible path {
  fill: rgba(237,93,98,.48); stroke: #ffd6d7; stroke-width: 4;
  filter: drop-shadow(0 0 8px rgba(229,72,77,.58));
}
.cs2hit-side { fill: rgba(255,255,255,.72); font: 600 12px var(--sans, inherit); letter-spacing: .08em; pointer-events: none; }
.cs2hit-stats { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; padding: 18px; }
.cs2hit-selected {
  display: grid; grid-template-columns: minmax(120px, 1fr) auto; grid-template-areas: "copy metrics" "note metrics";
  align-items: center; gap: 8px 24px; min-height: 104px; margin-bottom: 14px; padding: 16px;
  border: 1px solid rgba(229,72,77,.24); border-radius: 8px;
  background: radial-gradient(circle at 90% 50%, rgba(229,72,77,.14), transparent 42%), rgba(255,255,255,.025);
}
.cs2hit-selected-copy { grid-area: copy; display: grid; gap: 5px; }
.cs2hit-selected-copy > span { color: #9ca0aa; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.cs2hit-selected-copy > strong { font-size: 21px; text-transform: capitalize; }
.cs2hit-metrics { grid-area: metrics; display: flex; align-items: stretch; }
.cs2hit-metrics > span { display: grid; align-content: center; min-width: 86px; padding: 0 16px; text-align: right; }
.cs2hit-metrics > span + span { border-left: 1px solid rgba(255,255,255,.12); }
.cs2hit-metrics b { color: #fff; font: 700 38px/1 var(--sans, inherit); font-variant-numeric: tabular-nums; }
.cs2hit-metrics b.is-unavailable { font-size: 12px; color: #9ca0aa; }
.cs2hit-metrics small { margin-top: 5px; color: #9ca0aa; font: 600 9px var(--sans, inherit); text-transform: uppercase; letter-spacing: .08em; }
.cs2hit-selected > small { grid-area: note; color: #9ca0aa; font-size: 11px; }
.cs2hit-list { align-self: start; display: grid; gap: 4px; }
.cs2hit-list-head,
.cs2hit-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 38px 64px 48px; align-items: center; gap: 10px;
}
.cs2hit-list-head {
  padding: 0 10px 5px; color: #777a84; font: 600 9px var(--sans, inherit); text-transform: uppercase; letter-spacing: .07em;
}
.cs2hit-list-head span:not(:first-child) { text-align: right; }
.cs2hit-row {
  width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 6px;
  color: inherit; background: transparent; font: inherit; letter-spacing: normal; text-align: left; cursor: pointer;
}
.cs2hit-row:hover, .cs2hit-row.is-active, .cs2hit-row:focus-visible { border-color: rgba(229,72,77,.24); background: rgba(229,72,77,.08); outline: none; }
.cs2hit-row span { overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.cs2hit-row strong, .cs2hit-row b { font: 600 13px var(--sans, inherit); text-align: right; }
.cs2hit-row b { color: #c8cad0; font-size: 11px; }
.cs2hit-row small { color: #9ca0aa; font: 500 10px var(--sans, inherit); text-align: right; }
.cs2hit.is-kills .cs2hit-list-head,
.cs2hit.is-kills .cs2hit-row { grid-template-columns: minmax(0, 1fr) 48px 60px; }
.cs2hit.is-kills .cs2hit-metrics b[data-hit-share] { font-size: 25px; }
.cs2kill-distribution { display: grid; gap: 14px; margin-top: 2px; }
.cs2kill-distribution-head h3 { margin: 0 0 5px; font-size: 18px; }
.cs2kill-distribution-head p { margin: 0; color: #9ca0aa; font-size: 12px; }

.cs2weapon-hit-open {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-width: 190px;
  padding: 3px 5px; border: 0; border-radius: 5px; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer;
}
.cs2weapon-hit-open > span:last-child { color: #e68b8e; font: 600 9px var(--mono, monospace); text-transform: uppercase; letter-spacing: .06em; opacity: 0; }
.cs2weapon-hit-open:hover, .cs2weapon-hit-open:focus-visible { background: rgba(229,72,77,.09); outline: 1px solid rgba(229,72,77,.3); }
.cs2weapon-hit-open:hover > span:last-child, .cs2weapon-hit-open:focus-visible > span:last-child { opacity: 1; }
.cs2weapon-modal-open { overflow: hidden; }
.cs2weapon-hit-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; }
.cs2weapon-hit-modal[hidden] { display: none; }
.cs2weapon-hit-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(7px); cursor: default; }
.cs2weapon-hit-dialog {
  position: relative; width: min(1480px, 96vw); max-height: 94vh; overflow: auto; padding: 24px;
  border: 1px solid rgba(255,255,255,.13); border-radius: 14px; outline: none;
  background: #0e0f12; box-shadow: 0 24px 80px rgba(0,0,0,.72); font-family: var(--sans, inherit);
}
.cs2weapon-hit-close {
  position: sticky; z-index: 2; top: 0; float: right; display: grid; place-items: center;
  width: 34px; height: 34px; margin: -6px -6px 0 12px; padding: 0;
  border: 1px solid rgba(255,255,255,.14); border-radius: 50%; color: #fff; background: #202228; cursor: pointer;
}
.cs2weapon-hit-close svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cs2weapon-hit-close:hover, .cs2weapon-hit-close:focus-visible { border-color: rgba(229,72,77,.7); background: #2a2023; outline: 2px solid rgba(229,72,77,.24); outline-offset: 2px; }
.cs2weapon-hit-title { display: flex; align-items: center; gap: 16px; margin: 2px 44px 20px 0; }
.cs2weapon-hit-title .cs2-wep { width: 82px; height: 34px; opacity: 1; }
.cs2weapon-hit-title h3 { margin: 3px 0; font-size: 24px; }
.cs2weapon-target-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; clear: both; }
.cs2hit.is-compact { margin-top: 0; }
.cs2hit.is-compact .cs2hit-layout { grid-template-columns: minmax(210px,.8fr) minmax(235px,1.2fr); min-height: 430px; }
.cs2hit.is-compact .cs2hit-avatar { width: min(100%, 280px); }
.cs2hit.is-compact .cs2hit-head { padding: 13px 15px; }
.cs2hit.is-compact .cs2hit-stats { padding: 13px; }
.cs2hit.is-compact .cs2hit-selected { grid-template-columns: minmax(95px, 1fr) auto; gap: 8px 12px; padding-inline: 10px; }
.cs2hit.is-compact .cs2hit-metrics > span { min-width: 65px; padding-inline: 10px; }
.cs2hit-refreshing { padding: 40px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; text-align: center; }
.cs2hit-refreshing p { color: #9ca0aa; }

@media (min-width: 721px) {
  .cs2hit.is-compact .cs2hit-figure { min-height: 430px; padding: 0; overflow: hidden; }
  .cs2hit.is-compact .cs2hit-avatar { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
}

@media (max-width: 1180px) {
  .cs2weapon-target-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .cs2hit-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .cs2hit-layout { grid-template-columns: 1fr; }
  .cs2hit-figure { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .cs2hit-avatar { width: min(100%, 330px); }
  .cs2weapon-hit-modal { padding: 0; }
  .cs2weapon-hit-dialog { width: 100vw; max-height: 100vh; min-height: 100vh; padding: 14px; border: 0; border-radius: 0; }
  .cs2weapon-hit-title { margin-top: 5px; }
  .cs2hit.is-compact .cs2hit-layout { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .cs2hit-figure { padding-inline: 8px; }
  .cs2hit-stats { padding: 12px; }
  .cs2hit-selected { padding: 13px; }
  .cs2hit-selected-copy > strong { font-size: 18px; }
  .cs2hit-metrics > span { min-width: 65px; padding-inline: 9px; }
  .cs2hit-metrics b { font-size: 30px; }
  .cs2hit-list-head, .cs2hit-row { grid-template-columns: minmax(0, 1fr) 30px 56px 42px; gap: 6px; }
  .cs2hit.is-kills .cs2hit-list-head,
  .cs2hit.is-kills .cs2hit-row { grid-template-columns: minmax(0, 1fr) 38px 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .cs2hit-region path { transition: none; }
}

/* Weapon icons render directly to avoid cross-browser SVG mask-mode differences.
   The versioned URL also prevents a stale, previously broken icon from persisting.
   .cs2-wep-none reserves the same box when no SVG exists for that weapon. */
.cs2-wep-cell { display: flex; align-items: center; gap: 10px; }
.cs2-wep { display: block; width: 46px; height: 17px; flex: none; object-fit: contain;
  object-position: left center; opacity: .68; transition: opacity .12s; }
.cs2demo-table tr:hover .cs2-wep { opacity: 1; }
.cs2-wep-none { background: none; }

/* --- Aim: spray control cards ------------------------------------------------------- */
.cs2spray { display: grid; gap: 14px; }
/* One button per weapon with sprays; the icon carries the row, the name backs it up. */
.cs2spray-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cs2spray-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; cursor: pointer;
  border: 1px solid #393b42; border-radius: 6px; background: #17181c; color: #9ca0aa;
  font: inherit; font-size: 13px; transition: color .12s, background .12s, border-color .12s;
}
.cs2spray-tab .cs2-wep { opacity: .6; transition: opacity .12s; }
.cs2spray-tab:hover { background: #22242a; color: var(--text); }
.cs2spray-tab:hover .cs2-wep { opacity: .9; }
.cs2spray-tab.is-active { border-color: var(--accent); background: #22242a; color: var(--text); }
.cs2spray-tab.is-active .cs2-wep { opacity: 1; }
.cs2spray-tab:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
/* A spray pattern is a tall, thin shape; past this width the plot only gains empty margin. */
.cs2spray-stage { max-width: 380px; }
.cs2spray-card { margin: 0; padding: 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: #17181c; }
.cs2spray-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #9ca0aa; }
.cs2spray-key { display: inline-flex; align-items: center; gap: 5px; }
.cs2spray-key i { width: 14px; height: 3px; border-radius: 2px; background: var(--k); }
.cs2spray-svg { display: block; width: 100%; height: auto; margin-top: 6px; }

@media (max-width: 640px) {
  .cs2spray-stage { max-width: none; }
  .cs2spray-tab span { display: none; }
  .cs2spray-tab { padding: 6px 8px; }
}

/* --- Overview: recent match cards ---------------------------------------------------
   Three cards above the charts. The map's own artwork sits behind the card, faded from
   the right so the result and score stay legible over it; the footer strip carries the
   three headline stats. The whole card is one button that opens the match modal. */

.cs2an-recent {
  margin-bottom: 1rem;
}

.cs2an-recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.cs2an-recent-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cs2an-recent-all {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.cs2an-recent-all:hover { color: var(--text); }

/* Three across on a full-width page; the cards wrap to two, then one, on their own. */
.cs2an-recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
}

.cs2an-recent-grid > .cs2an-skeleton { border-radius: 14px; }

.cs2an-rm-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.85rem 0.9rem 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.cs2an-rm-card:hover,
.cs2an-rm-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

/* Map artwork: covers the right half and fades out towards the copy on the left. */
.cs2an-rm-shot {
  position: absolute;
  inset: 0 0 auto auto;
  z-index: -1;
  width: 62%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%);
  mask-image: linear-gradient(90deg, transparent, #000 55%);
}

/* A result-tinted wash keeps text contrast steady over any map image. */
.cs2an-rm-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, var(--card) 34%, rgba(18, 18, 22, 0.72) 72%, rgba(18, 18, 22, 0.45));
}

.cs2an-rm-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.cs2an-rm-result {
  font-size: 0.98rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cs2an-rm-score {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cs2an-rm-score i { font-style: normal; color: var(--muted); font-weight: 500; }

.cs2an-rm-card.is-win .cs2an-rm-score { color: #3fcf95; }
.cs2an-rm-card.is-loss .cs2an-rm-score { color: #f28b8b; }
.cs2an-rm-card.is-tie .cs2an-rm-score { color: var(--muted); }

.cs2an-rm-go {
  margin-left: auto;
  color: var(--muted);
  font-size: 1rem;
  transition: transform 0.15s, color 0.15s;
}

.cs2an-rm-card:hover .cs2an-rm-go { color: var(--text); transform: translateX(3px); }

.cs2an-rm-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.cs2an-rm-when {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  background: rgba(12, 12, 15, 0.6);
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cs2an-rm-when img { opacity: 0.8; }
.cs2an-rm-when b { font-weight: 500; color: var(--text); }
.cs2an-rm-when i { font-style: normal; opacity: 0.6; }

.cs2an-rm-tags {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.cs2an-rm-tags .cs2an-badge { min-width: 30px; height: 22px; font-size: 0.7rem; }

.cs2an-rm-mvp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  height: 22px;
  min-width: 26px;
  padding: 0 0.4rem;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cs2an-rm-mvp { background: rgba(201, 169, 97, 0.18); color: #c9a961; }

.cs2an-rm-map {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cs2an-rm-map i { font-style: normal; opacity: 0.6; }

/* Footer strip: three equal stats, divided the way the table's columns are. */
.cs2an-rm-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 -0.9rem;
  border-top: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.55);
}

.cs2an-rm-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.cs2an-rm-stat + .cs2an-rm-stat { border-left: 1px solid var(--border); }

.cs2an-rm-stat svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: currentColor;
  opacity: 0.75;
}

.cs2an-rm-stat em {
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.66rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cs2an-rm-stat b {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.cs2an-rm-stat b.is-good { color: #3fcf95; }
.cs2an-rm-stat b.is-bad { color: #f28b8b; }
.cs2an-rm-stat b.is-muted { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .cs2an-rm-card,
  .cs2an-rm-go { transition: none; }
  .cs2an-rm-card:hover,
  .cs2an-rm-card:focus-visible { transform: none; }
}
