/* chart primitives shared by both pages */

svg.chart { width: 100%; height: auto; display: block; overflow: visible; }

svg.chart .grid { stroke: rgba(117, 136, 163, 0.16); stroke-width: 1; stroke-dasharray: 2 4; }
svg.chart .grid.mid { stroke: rgba(117, 136, 163, 0.34); stroke-dasharray: none; }
svg.chart .grid.v { stroke: rgba(117, 136, 163, 0.12); }
svg.chart .refline { stroke: rgba(255, 255, 255, 0.5); stroke-width: 1.5; stroke-dasharray: 2 3; }

svg.chart .ax {
  fill: var(--chalk-2);
  font-size: 11px;
  font-family: "DM Sans", sans-serif;
  font-variant-numeric: tabular-nums;
}
svg.chart .ax.end { text-anchor: end; }
svg.chart .ax.mid { text-anchor: middle; }
svg.chart .ax.lbl { fill: var(--chalk-2); font-size: 12px; }
svg.chart .ax.num { fill: var(--chalk); font-size: 12px; font-weight: 700; }
svg.chart .ax.sub { fill: var(--chalk-2); font-size: 10.5px; }

svg.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .line.s1 { stroke: var(--s1); }
svg.chart .area { fill: rgba(249, 148, 31, 0.13); stroke: none; }
svg.chart .endpt.s1 { fill: var(--s1); stroke: var(--ink-900); stroke-width: 2; }

svg.chart .cross { stroke: rgba(236, 239, 246, 0.3); stroke-width: 1; opacity: 0; }
svg.chart .knob { fill: var(--s1); stroke: var(--ink-900); stroke-width: 2; opacity: 0; }
svg.chart.hover .cross, svg.chart.hover .knob { opacity: 1; }

svg.chart .bar { transition: opacity 0.15s ease; }
svg.chart .bar:hover { opacity: 0.82; }
svg.chart .bar.s1 { fill: var(--s1); }
svg.chart .bar.s2 { fill: var(--s2); }
svg.chart .bar.up { fill: var(--s3); }
svg.chart .bar.down { fill: var(--s5); }

svg.chart .seg-frame { fill: none; stroke: rgba(9, 11, 16, 0.6); stroke-width: 0; }
svg.chart .seg:hover { opacity: 0.85; }

svg.chart .court { fill: var(--ink-800); stroke: var(--line); }
svg.chart .paint { fill: none; stroke: rgba(255, 255, 255, 0.34); stroke-width: 1.2; }
svg.chart .hoop { fill: none; stroke: var(--leather); stroke-width: 1.8; }
svg.chart .zone { stroke: rgba(8, 12, 22, 0.8); stroke-width: 1; transition: stroke 0.12s ease; }
svg.chart .zone:hover { stroke: var(--chalk); stroke-width: 1.6; }
svg.chart .zone.empty { pointer-events: none; }
svg.chart .lines { pointer-events: none; }
svg.chart .paint.three { stroke: rgba(255, 255, 255, 0.45); stroke-width: 1.4; }

.ramp { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--chalk-2); margin-top: 10px; }
.ramp i { width: 22px; height: 8px; border-radius: 2px; }
.ramp { color: var(--chalk-2); }
.ramp .sp { flex: 1; }

.tip {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--chalk-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  max-width: 260px;
}
.tip.on { opacity: 1; transform: none; }
.tip b { display: block; color: var(--chalk); font-size: 12.5px; margin-bottom: 2px; }
.tip span { display: block; }
.tip .mut { color: var(--chalk-2); }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* numbers printed into each shot zone, as the app does */
svg.chart .zone-pct,
svg.chart .zone-made {
  text-anchor: middle;
  font-family: "DM Sans", sans-serif;
  pointer-events: none;
  fill: #0B1120;
}
svg.chart .zone-pct { font-size: 9.5px; font-weight: 700; }
svg.chart .zone-made { font-size: 7.5px; font-weight: 500; opacity: 0.75; }

/* ---------- shot map: the app's own plate ---------- */
svg.chart .sm-zone {
  stroke: rgba(8, 12, 22, 0.55);
  stroke-width: 1;
  transition: filter 120ms ease;
}
svg.chart .sm-zone:hover { filter: brightness(1.14); }

/* markings ride over the fills in the court's tan, not white */
svg.chart .sm-lines { pointer-events: none; }
svg.chart .sm-lines * {
  fill: none;
  stroke: rgba(255, 236, 214, 0.55);
  stroke-width: 1.3;
}
svg.chart .sm-lines .hoop { stroke: #FFF0DC; stroke-width: 1.8; }

svg.chart .sm-pct,
svg.chart .sm-made {
  text-anchor: middle;
  fill: #FFFFFF;
  paint-order: stroke;
  stroke: rgba(8, 12, 22, 0.55);
  stroke-width: 2.4px;
  stroke-linejoin: round;
  pointer-events: none;
}
svg.chart .sm-pct  { font-size: 12px; font-weight: 700; letter-spacing: -0.02em; }
svg.chart .sm-made { font-size: 9px; font-weight: 500; opacity: 0.92; }
