/* charts.css: the interactive figures of the results (assets/js/charts.js).
   Colors come from the page tokens (site.css); the fallbacks are the same values. */

.ch-root {
  --ch-coop: var(--c-coop, #0072b2);
  --ch-local: var(--c-local, #d55e00);
  --ch-exact: var(--c-exact, #56b4e9);
  --ch-pers: var(--c-pers, #6e6e6e);
  --ch-cent: var(--c-cent, #009e73);
  --ch-oracle: var(--c-oracle, #16191d);
  --ch-pooled: var(--c-pooled, #cc79a7);
  --ch-recon: var(--c-recon, #e69f00);
  --ch-frozen: var(--c-frozen, #882255);
  --ch-ink: var(--ink, #16191d);
  --ch-ink-soft: var(--ink-soft, #4a5058);
  --ch-ink-faint: var(--ink-faint, #6b727b);
  --ch-grid: var(--line, #e8e0d0);
  --ch-axis: var(--line-strong, #d3c7b2);
  --ch-raise: var(--bg-raise, #ffffff);
  --ch-sunken: var(--bg-sunken, #f5eee0);
  --ch-accent: var(--accent, #8a1c1c);
  --ch-surface: var(--bg, #fffaf0);
  --ch-band: 0.18;
  --ch-shade: 0.06;
  display: block;
  position: relative;
  min-width: 0;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  color: var(--ch-ink);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  .ch-root {
    --ch-coop: var(--c-coop, #4aa8e8);
    --ch-local: var(--c-local, #f0874a);
    --ch-exact: var(--c-exact, #8fd0f5);
    --ch-pers: var(--c-pers, #a3a3a3);
    --ch-cent: var(--c-cent, #3cc49b);
    --ch-oracle: var(--c-oracle, #e8eaed);
    --ch-pooled: var(--c-pooled, #e29ac3);
    --ch-recon: var(--c-recon, #f2b64a);
    --ch-frozen: var(--c-frozen, #d16a9a);
    --ch-ink: var(--ink, #e8eaed);
    --ch-ink-soft: var(--ink-soft, #b3b9c1);
    --ch-ink-faint: var(--ink-faint, #8f969f);
    --ch-grid: var(--line, #2b3038);
    --ch-axis: var(--line-strong, #3b424d);
    --ch-raise: var(--bg-raise, #1b1f25);
    --ch-sunken: var(--bg-sunken, #101317);
    --ch-accent: var(--accent, #e0837f);
    --ch-surface: var(--bg, #14171b);
    --ch-band: 0.22;
    --ch-shade: 0.07;
  }
}

/* ---------- legend: toggle buttons ---------- */
.ch-legend { margin: 0 0 0.35rem; }
.ch-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.35rem; }
.ch-keys[hidden] { display: none; }
.ch-extra { margin-top: 0.35rem; padding-top: 0.35rem; border-top: 1px dashed var(--ch-grid); }
.ch-key,
.ch-more {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 28px;
  margin: 0;
  padding: 0.18rem 0.6rem 0.18rem 0.4rem;
  border: 1px solid var(--ch-axis);
  border-radius: 999px;
  background: var(--ch-raise);
  color: var(--ch-ink);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.ch-key:hover { border-color: var(--ch-ink-faint); }
.ch-key[aria-pressed="false"] {
  border-style: dashed;
  background: transparent;
  color: var(--ch-ink-faint);
}
.ch-key[aria-pressed="false"] .ch-glyph { opacity: 0.38; filter: grayscale(0.6); }
.ch-key[aria-pressed="false"]:hover { color: var(--ch-ink-soft); }
.ch-key-t { white-space: nowrap; }
.ch-key-t sub, .ch-key-t sup, .ch-tip sub, .ch-tip sup, .ch-table sub, .ch-table sup, .ch-tip-h sub, .ch-tip-h sup {
  font-size: 0.74em; line-height: 0;
}
.ch-m { font-family: var(--font-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif); font-style: italic; }
.ch-more {
  margin-left: auto;
  padding: 0.18rem 0.55rem;
  border-color: transparent;
  background: transparent;
  color: var(--ch-ink-soft);
}
.ch-more:hover { color: var(--ch-ink); border-color: var(--ch-axis); }
.ch-chev {
  display: inline-block;
  width: 0.42em; height: 0.42em;
  margin-left: 0.1rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12em) rotate(45deg);
  transition: transform 0.15s;
}
.ch-more[aria-expanded="true"] .ch-chev { transform: translateY(0.08em) rotate(-135deg); }
.ch-key:focus-visible,
.ch-more:focus-visible,
.ch-data summary:focus-visible,
.ch-table-wrap:focus-visible {
  outline: 2px solid var(--ch-accent);
  outline-offset: 2px;
}
.ch-glyph { flex: none; display: block; overflow: visible; }
.ch-glyph-box { fill: none; stroke: var(--ch-ink-faint); stroke-width: 1; }
.ch-glyph-box.is-on { fill: var(--ch-ink-faint); fill-opacity: 0.35; }

/* ---------- plot ---------- */
.ch-plot {
  position: relative;
  touch-action: pan-y;
  border-radius: 6px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.ch-plot:focus-visible { box-shadow: 0 0 0 2px var(--ch-accent); }
.ch-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}
.ch-svg text { fill: var(--ch-ink-soft); }
.ch-tick { font-size: 11.5px; fill: var(--ch-ink-faint) !important; font-variant-numeric: tabular-nums; }
.ch-title { font-size: 12.5px; fill: var(--ch-ink-soft) !important; }
.ch-note { font-size: 11.5px; fill: var(--ch-ink-faint) !important; font-variant-numeric: tabular-nums; }
.ch-grid { stroke: var(--ch-grid); stroke-width: 1; shape-rendering: crispEdges; }
.ch-axis { stroke: var(--ch-axis); stroke-width: 1; shape-rendering: crispEdges; }
.ch-refline { stroke: var(--ch-ink-faint); stroke-width: 1; stroke-dasharray: 4 3; shape-rendering: crispEdges; }
.ch-shade { fill: var(--ch-ink); fill-opacity: var(--ch-shade); }

.ch-s { transition: opacity 0.18s; }
.ch-line { fill: none; stroke: var(--ch-c); stroke-linejoin: round; stroke-linecap: round; }
.ch-band { fill: var(--ch-c); fill-opacity: var(--ch-band); stroke: none; }
.ch-mk { fill: var(--ch-c); stroke: var(--ch-surface); stroke-width: 1.5; }
.ch-mk.is-open { fill: var(--ch-surface); stroke: var(--ch-c); stroke-width: 1.6; }
.ch-mk.is-stroke { fill: none; stroke: var(--ch-c); stroke-width: 1.7; stroke-linecap: round; }
.ch-dots .ch-mk { fill-opacity: 0.82; stroke-width: 1; }
.ch-med-halo { stroke: var(--ch-surface); stroke-width: 6.5; stroke-linecap: round; fill: none; }
.ch-med { stroke: var(--ch-ink); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.ch-pair { stroke: var(--ch-ink-faint); stroke-width: 1; stroke-opacity: 0.45; fill: none; }
.ch-pair.is-hot { stroke: var(--ch-ink); stroke-width: 1.6; stroke-opacity: 0.9; }
.ch-svg.has-emph .ch-s:not(.is-emph) { opacity: 0.16; }
.ch-svg.has-emph .ch-bandg:not(.is-emph) { opacity: 0.25; }
.ch-enter { animation: ch-fade 0.28s ease-out both; }
@keyframes ch-fade { from { opacity: 0; } }

/* hover layer */
.ch-hov { pointer-events: none; }
.ch-cross { stroke: var(--ch-ink-faint); stroke-width: 1; shape-rendering: crispEdges; }
.ch-ring { fill: none; stroke: var(--ch-c); stroke-width: 1.5; }
.ch-range { stroke: var(--ch-c); stroke-width: 2; fill: none; stroke-linecap: round; }

/* tooltip */
.ch-tip {
  position: absolute;
  left: 0; top: 0;
  z-index: 5;
  min-width: 10rem;
  max-width: min(19rem, calc(100% - 4px));
  padding: 0.45rem 0.6rem 0.5rem;
  border: 1px solid var(--ch-axis);
  border-radius: 8px;
  background: var(--ch-raise);
  box-shadow: 0 1px 2px rgba(16, 20, 26, 0.06), 0 10px 26px -12px rgba(16, 20, 26, 0.35);
  color: var(--ch-ink);
  font-size: 0.78rem;
  line-height: 1.3;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s, visibility 0s linear 0.12s;
}
.ch-tip.is-on { opacity: 1; visibility: visible; transition: opacity 0.08s; }
.ch-tip-h { margin: 0 0 0.3rem; color: var(--ch-ink-soft); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.01em; }
.ch-tip-sub { margin: 0.35rem 0 0.15rem; padding-top: 0.3rem; border-top: 1px solid var(--ch-grid); color: var(--ch-ink-faint); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.ch-tip-r {
  display: grid;
  grid-template-columns: 20px auto 1fr;
  column-gap: 0.4rem;
  align-items: center;
  padding: 0.12rem 0.25rem;
  margin: 0 -0.25rem;
  border-radius: 4px;
}
.ch-tip-r.is-near { background: var(--ch-sunken); }
.ch-tip-r .ch-glyph { width: 20px; height: 10px; }
.ch-tip-v { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ch-ink); }
.ch-tip-l { color: var(--ch-ink-soft); min-width: 0; }
.ch-tip-q { grid-column: 2 / 4; color: var(--ch-ink-faint); font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.ch-tip-f { margin-top: 0.3rem; color: var(--ch-ink-faint); font-size: 0.7rem; }

/* screen-reader only */
.ch-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- data disclosure ---------- */
.ch-data { margin: 0.25rem 0 0; font-size: 0.8rem; }
.ch-data summary {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.15rem 0.1rem;
  border-radius: 4px;
  color: var(--ch-ink-soft);
  cursor: pointer;
  list-style: none;
}
.ch-data summary::-webkit-details-marker { display: none; }
.ch-data summary::before {
  content: "";
  display: inline-block;
  width: 0.38em; height: 0.38em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.1em) rotate(-45deg);
  transition: transform 0.15s;
}
.ch-data[open] summary::before { transform: translateY(-0.2em) rotate(45deg); }
.ch-data-t { font-weight: 600; color: var(--ch-ink); }
.ch-data-h { color: var(--ch-ink-faint); }
.ch-data summary:hover .ch-data-t { text-decoration: underline; text-underline-offset: 2px; }
.ch-table-wrap {
  margin: 0.4rem 0 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ch-grid);
  border-radius: 8px;
  background: var(--ch-raise);
}
.ch-table-wrap.is-tall { max-height: 22rem; }
.ch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--ch-ink);
}
.ch-table caption {
  caption-side: top;
  padding: 0.5rem 0.65rem 0.4rem;
  text-align: left;
  color: var(--ch-ink-soft);
  font-size: 0.76rem;
}
.ch-table th, .ch-table td {
  padding: 0.3rem 0.6rem;
  border-top: 1px solid var(--ch-grid);
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}
.ch-table thead th { position: sticky; top: 0; z-index: 1; background: var(--ch-raise); color: var(--ch-ink-soft); font-weight: 600; border-top: 0; border-bottom: 1px solid var(--ch-axis); }
.ch-table tbody th, .ch-table tfoot th { text-align: left; font-weight: 500; color: var(--ch-ink-soft); }
.ch-table tbody th .ch-glyph { display: inline-block; vertical-align: -1px; margin-right: 0.4rem; }
.ch-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--ch-raise); }
.ch-table thead th:first-child { z-index: 2; }
.ch-table .ch-v { display: block; }
.ch-table .ch-q { display: block; color: var(--ch-ink-faint); font-size: 0.68rem; }
.ch-table tr.is-aux td, .ch-table tr.is-aux th { color: var(--ch-ink-faint); }
.ch-table tr.is-group th { text-align: left; padding-top: 0.5rem; color: var(--ch-ink-faint); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.ch-table tr.is-mark th, .ch-table tr.is-mark td { border-top: 1.5px solid var(--ch-ink-faint); }
.ch-table tfoot th, .ch-table tfoot td { border-top: 1px solid var(--ch-axis); color: var(--ch-ink-soft); }
.ch-table tfoot td[colspan] { text-align: center; }
.ch-src { margin: 0.4rem 0 0.2rem; color: var(--ch-ink-faint); font-size: 0.72rem; line-height: 1.45; overflow-wrap: anywhere; }
.ch-src code { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 0.95em; }
.ch-error { margin: 0; padding: 1rem; border: 1px dashed var(--ch-axis); border-radius: 8px; color: var(--ch-ink-soft); font-size: 0.85rem; }

@media (max-width: 480px) {
  .ch-key, .ch-more { font-size: 0.74rem; padding-right: 0.5rem; }
  .ch-tip { font-size: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-s, .ch-key, .ch-more, .ch-chev, .ch-tip, .ch-data summary::before { transition: none; }
  .ch-enter { animation: none; }
}
@media (forced-colors: active) {
  .ch-key[aria-pressed="true"] { border-width: 2px; }
  .ch-tip { border: 1px solid CanvasText; }
}
@media print {
  .ch-root {
    --ch-coop: #0072b2 !important; --ch-local: #d55e00 !important; --ch-exact: #56b4e9 !important;
    --ch-pers: #6e6e6e !important; --ch-cent: #009e73 !important; --ch-oracle: #000 !important;
    --ch-pooled: #cc79a7 !important; --ch-recon: #e69f00 !important; --ch-ink: #000 !important;
    --ch-ink-soft: #333 !important; --ch-ink-faint: #555 !important; --ch-grid: #e3e3e3 !important;
    --ch-axis: #999 !important; --ch-raise: #fff !important; --ch-surface: #fff !important;
    --ch-band: 0.18 !important; --ch-shade: 0.06 !important;
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .ch-data, .ch-tip, .ch-hov, .ch-more, .ch-key[aria-pressed="false"] { display: none !important; }
  .ch-extra[hidden] { display: flex !important; border: 0; margin: 0; padding: 0; }
  .ch-key { border: 0 !important; background: none !important; padding: 0 0.5rem 0 0; min-height: 0; }
  .ch-plot:focus-visible { box-shadow: none; }
}
