/* Shared price chart (price_chart.js, ahg-rwlm6). Ink on paper: lines and
   labels wear text tokens, amber does the pointing (cursor, comparison band,
   the "now" dot). A series' hue comes from its class's `color` (.pc-s-ink on
   the card page, .mkt-s0..7 on the market pages). */
.pc-svg {
  display: block;
  width: 100%;
  overflow: visible;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
  outline: none;
}
.pc-svg:focus-visible { outline: 2px solid var(--accent-amber); outline-offset: 4px; }

.pc-s-ink { color: var(--text-primary); }

.pc-grid { stroke: var(--border-subtle); stroke-width: 1; }
.pc-baseline { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 2 4; }
.pc-ylbl, .pc-xlbl {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  fill: var(--text-muted);
}
.pc-xlbl { font-family: var(--font-sans); }

.pc-band { fill: var(--accent-amber); fill-opacity: 0.12; }
.pc-bar { fill: var(--text-faint); opacity: 0.6; }
.pc-bars-lbl { font-family: var(--font-sans); font-size: 13px; fill: var(--text-faint); }

.pc-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: opacity 120ms ease, stroke-width 120ms ease;
}
.pc-area { fill: currentColor; fill-opacity: 0.035; stroke: none; }
.pc-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; }
.pc-tail { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pc-tail--gap { stroke-dasharray: 2 5; opacity: 0.7; }
.pc-end { fill: currentColor; stroke: var(--bg); stroke-width: 2; }
.pc-s-ink .pc-end { fill: var(--accent-amber); }

.pc-dot { fill: var(--text-muted); fill-opacity: 0.35; }
.pc-dot--pick { fill: var(--accent-amber); fill-opacity: 0.75; }
.pc-dot--own { fill: none; stroke: var(--accent-amber); stroke-width: 2; }

.pc-ref { stroke: var(--text-secondary); stroke-width: 1; stroke-dasharray: 5 4; }
.pc-ref-lbl {
  font-family: var(--font-sans);
  font-size: 13px;
  fill: var(--text-secondary);
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 4px;
  stroke-linejoin: round;
}
.pc-ref--pick { stroke: var(--accent-amber); }
.pc-ref-lbl.pc-ref--pick, .pc-ref-lbl.pc-ref--you { fill: var(--accent-amber); }
.pc-ref--you { stroke: var(--accent-amber); stroke-dasharray: 1 4; stroke-width: 2; stroke-linecap: round; }

.pc-mark-tick { stroke: var(--text-faint); stroke-width: 1; stroke-dasharray: 1 4; }
.pc-mark--dot { fill: var(--text-muted); }
[data-theme="dark"] .pc-mark:not(.pc-mark--dot), :root:not([data-theme="light"]) .pc-mark:not(.pc-mark--dot) { filter: invert(1); opacity: 0.7; }

.pc-endlbl { cursor: default; color: inherit; transition: opacity 120ms ease; }
.pc-endlbl-hit { fill: transparent; }
.pc-endlbl-sw { stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.pc-endlbl text { font-family: var(--font-sans); font-size: 14px; }
.pc-endlbl-name { fill: var(--text-secondary); }
.pc-endlbl-val { fill: var(--text-primary); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }

/* Focus: hovering a line, its label, or its legend row dims the rest. */
.pc-focusing .pc-series:not(.is-focus) .pc-line,
.pc-focusing .pc-series:not(.is-focus) .pc-tail,
.pc-focusing .pc-series:not(.is-focus) .pc-end,
.pc-focusing .pc-endlbl:not(.is-focus) { opacity: 0.18; }
.pc-focusing .pc-series.is-focus .pc-line { stroke-width: 3; }

.pc-cursor-line { stroke: var(--accent-amber); stroke-width: 1; }
.pc-cursor-dot { fill: currentColor; stroke: var(--bg); stroke-width: 2; }
.pc-s-ink.pc-cursor-dot { fill: var(--accent-amber); }
.pc-pill rect { fill: var(--text-primary); }
.pc-pill text {
  fill: var(--bg);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pc-capture { fill: transparent; }
.pc-span, .pc-cursor, .pc-pill, .pc-band, .pc-grid, .pc-ref, .pc-ref-lbl, .pc-bar, .pc-area, .pc-dot, .pc-line, .pc-tail, .pc-end { pointer-events: none; }

/* Draw-in on each render, and a slow ring on the card page's "now" dot. */
@media (prefers-reduced-motion: no-preference) {
  .pc-line { stroke-dasharray: var(--pc-len, 0); stroke-dashoffset: var(--pc-len, 0); animation: pc-draw 520ms cubic-bezier(.3,.7,.2,1) forwards; }
  .pc-area, .pc-tail, .pc-dot, .pc-bar, .pc-end, .pc-endlbl { animation: pc-fade 360ms ease-out both; }
  .pc-tail, .pc-end, .pc-endlbl { animation-delay: 380ms; }
  .pc-s-ink .pc-end-ring { animation: pc-ring 2.4s ease-out 900ms infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes pc-draw { to { stroke-dashoffset: 0; } }
@keyframes pc-fade { from { opacity: 0; } }
@keyframes pc-ring { 0% { opacity: .55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.6); } }
.pc-end-ring { fill: none; stroke: var(--accent-amber); stroke-width: 1.5; opacity: 0; pointer-events: none; }
