@layer site {
/* Chart exploration dialog (order 013). Loaded with stats.css. No inline styles (CSP). */
.cx-open-row { margin: 8px 0 0; }
.cx-data-open { margin-block: 8px 0; }
.cx-open:focus-visible, .cx-data-open:focus-visible, .cx-btn:focus-visible, .cx-select:focus-visible, .cx-stage:focus-visible, .cx-legend-item:focus-within { outline: 3px solid var(--primary); outline-offset: 2px; }

html:has(.cx-dialog[open]) { overflow: hidden; }
.cx-dialog {
  position: fixed; inset: 0; margin: auto; width: min(1040px, calc(100% - 32px));
  height: fit-content; max-height: calc(100dvh - 32px); padding: 0;
  border: 1px solid transparent; border-radius: var(--panel-radius); background: var(--bg-card);
  color: var(--text-primary); overflow: auto; overscroll-behavior: contain;
  scroll-padding-block: 5.5rem 1rem; box-shadow: var(--overlay-shadow);
}
.cx-dialog--data { width: min(820px, calc(100% - 32px)); }
.cx-data-content { min-width: 0; }
.cx-data-content .st-tablewrap { max-height: none; overscroll-behavior-inline: contain; }
.cx-data-content .hk-table { overflow-x: auto; }
.cx-data-content :is(.hk-table, .hk-sources) { margin: 0; padding-block: 8px; }
.cx-data-content :is(.hk-table, .hk-sources) > h2 { margin-block-end: .5em; }
.cx-dialog::backdrop { background: rgba(28, 28, 30, .5); }
.cx-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 14px 16px; }
.cx-head { position: sticky; top: 0; z-index: 2; background: var(--bg-card); padding: 6px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cx-title { font-size: 1.05rem; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.cx-controls { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.cx-zoom, .cx-range { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cx-range label { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.cx-btn { min-width: 44px; padding: 0 12px; font-size: .95rem; }
.cx-select { min-height: 44px; padding-block: 4px; border-radius: var(--control-radius); border: 1px solid var(--control-line); background-color: var(--bg-card); font: inherit; color: var(--text-primary); min-width: 0; flex: 1 1 0; }
.cx-range { min-width: 0; }
.cx-range label { flex: none; }
.cx-range select { flex: 1 1 6rem; }
.cx-controls > .cx-range { flex: 1 1 16rem; }
.cx-foot { display: flex; }
.cx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 0; padding: 0; margin: 0; }
.cx-legend:not(:has(.cx-legend-item)) { display: none; }
.cx-legend-item { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .88rem; color: var(--text-secondary); }
.cx-legend-item input { width: 18px; height: 18px; accent-color: var(--primary); }
.cx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cx-info { margin: 0; font-size: .88rem; color: var(--text-muted); }
.cx-stage { position: relative; width: 100%; height: clamp(300px, 58dvh, 560px); border-radius: 12px; background: var(--bg-card); touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; overflow: hidden; }
.cx-stage:not(.cx-stage--ready) { display: grid; place-items: center; }
.cx-ylabel { margin: 0; font-size: .9rem; font-weight: 700; color: var(--text-secondary); }
.cx-details { border-top: 1px solid var(--separator); padding-top: 8px; }
.cx-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--primary-dark); }
.cx-table-wrap { max-height: 40dvh; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--separator); border-radius: 12px; }
.cx-table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.cx-table th, .cx-table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--separator); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cx-table thead th { position: sticky; top: 0; background: var(--bg-card); }
.cx-spark { display: block; width: 100%; max-width: 220px; padding: 4px 2px; margin: 0; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; min-height: 44px; }
.cx-spark:hover { background: var(--primary-pale); }
.cx-spark:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.cx-spark .hs-spark { max-width: none; margin-top: 0; }
.bento .cx-spark { max-width: none; }
@media (max-width: 599px) { .cx-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; } }
.cx-status { margin: 0; min-height: 1.3em; font-size: .88rem; color: var(--text-secondary); }
.cx-hint, .cx-note { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--text-muted); max-width: 70ch; }
@media (min-width: 760px) { .cx-box { padding: 20px 24px 22px; } .cx-title { font-size: 1.2rem; } }
.cx-close { flex: none; white-space: nowrap; }

.cx-title { overflow-wrap: anywhere; }
.cx-stage:focus-visible { outline-offset: -3px; }
@media (max-width: 599px) {
  .cx-box { gap: 8px; }
  .cx-stage { height: clamp(245px, 49dvh, 440px); }
  .cx-close { white-space: normal; }
  .cx-legend { gap: 0 12px; }
  .cx-legend-item { max-width: 100%; overflow-wrap: anywhere; }
}
}
