/* Price chart (NZU18, 1 Nov 2026). Series colours are the shell graph's published palette,
   checked for colour-blind separation, with its own steps for light and for dark mode.
   Everything else takes the shell's theme variables. */
.pc-root {
  --pc-c1: #2a78d6; --pc-c2: #eb6834; --pc-c3: #1baf7a; --pc-c4: #eda100;
  --pc-c5: #e87ba4; --pc-c6: #008300; --pc-c7: #6250d6; --pc-c8: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pc-root {
    --pc-c1: #3987e5; --pc-c2: #d95926; --pc-c3: #199e70; --pc-c4: #c98500;
    --pc-c5: #d55181; --pc-c6: #008300; --pc-c7: #9085e9; --pc-c8: #e66767;
  }
}
:root[data-theme="dark"] .pc-root {
  --pc-c1: #3987e5; --pc-c2: #d95926; --pc-c3: #199e70; --pc-c4: #c98500;
  --pc-c5: #d55181; --pc-c6: #008300; --pc-c7: #9085e9; --pc-c8: #e66767;
}

/* Over time | By year */
.pc-seg { display: flex; gap: 4px; padding: 3px; margin: 0 0 12px; border-radius: 12px; background: var(--surface-2); }
.pc-segbtn {
  flex: 1 1 0; min-height: 40px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 15px; font-weight: 600;
}
.pc-segbtn[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.pc-card { padding: 12px 12px 10px; }
.pc-loading { display: grid; place-items: center; min-height: 160px; }

/* range buttons and the two switches */
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.pc-chip {
  min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 600;
}
.pc-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.pc-opts .pc-chip { font-weight: 500; }
.pc-note { margin: 2px 2px 8px; }
.pc-sub { margin: 0 2px 6px; }
.pc-hint { margin: 6px 2px 0; font-size: 12.5px; }

/* the plot: vertical swipes still scroll the page, sideways drags move the line */
.pc-wrap {
  position: relative; margin: 0 -4px;
  touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  cursor: crosshair; outline: none;
}
.pc-wrap:focus-visible { box-shadow: 0 0 0 2px var(--accent-soft); border-radius: 8px; }
.pc-svg { display: block; width: 100%; height: auto; overflow: visible; }
.pc-grid { stroke: var(--line); stroke-width: 1; }
.pc-vgrid { stroke: var(--line); stroke-width: 1; opacity: .5; }
.pc-lab { fill: var(--muted); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.pc-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.pc-line.older { stroke-width: 1.6; opacity: .85; }
.pc-thin { fill: none; stroke-width: 1; opacity: .55; }
.pc-band { opacity: .13; }
.pc-model { fill: none; stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .55; }
.pc-pt { stroke: var(--surface); stroke-width: 1.5; }
.pc-cross { stroke: var(--text); stroke-width: 1; opacity: .55; }
.pc-dot { stroke: var(--surface); stroke-width: 2; }

/* the readout box beside the line */
.pc-read {
  position: absolute; z-index: 2; pointer-events: none;
  min-width: 150px; max-width: min(240px, calc(100% - 8px));
  padding: 7px 9px 6px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow);
  font-size: 12.5px; line-height: 1.35;
}
.pc-read[hidden] { display: none; }
.pc-read-h { font-weight: 700; margin-bottom: 3px; color: var(--text); white-space: nowrap; }
.pc-read-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pc-read-k { display: inline-flex; align-items: center; gap: 6px; color: var(--text); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-read-v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-read-row.model, .pc-read-row.small { font-size: 11.5px; }
.pc-read-row.model .pc-read-k { color: var(--muted); }
.pc-read-row.model .pc-read-v { font-weight: 600; }
.pc-read-note { color: var(--muted); font-size: 11px; margin: -1px 0 2px 20px; white-space: nowrap; }

/* legend: tap a name to hide or show its line */
.pc-legend { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-top: 8px; }
.pc-key {
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 8px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13px;
}
.pc-key:disabled { cursor: default; opacity: 1; color: var(--muted); }
.pc-key.off { color: var(--muted); text-decoration: line-through; }
.pc-key.off .pc-sw { opacity: .35; }
.pc-sw { display: inline-block; flex: none; width: 14px; height: 3px; border-radius: 2px; background: var(--sw); }
.pc-sw.dash { background: repeating-linear-gradient(90deg, var(--sw) 0 4px, transparent 4px 7px); opacity: .8; }
.pc-sw.band { height: 10px; border-radius: 3px; opacity: .3; }
.pc-edge { font-size: 10.5px; font-weight: 600; font-family: inherit; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
