/* Post Manager add-on: Data table (the website). Text and lines follow the page's own colours; the chart colours are a
   colour-blind-safe set in a fixed order, which a site may replace with --pm-data-1 … --pm-data-8. */
.pm-data {
  --pm-data-1: #2a78d6; --pm-data-2: #eb6834; --pm-data-3: #1baf7a; --pm-data-4: #eda100;
  --pm-data-5: #e87ba4; --pm-data-6: #008300; --pm-data-7: #6250d6; --pm-data-8: #e34948;
  --pm-data-surface: var(--surface, #fff);
  margin: 2em 0; max-width: 100%;
}
:root[data-theme="dark"] .pm-data {
  --pm-data-1: #3987e5; --pm-data-2: #d95926; --pm-data-3: #199e70; --pm-data-4: #c98500;
  --pm-data-5: #d55181; --pm-data-6: #008300; --pm-data-7: #9085e9; --pm-data-8: #e66767;
}
.pm-data__title { font-weight: 700; font-size: 1.05em; line-height: 1.3; margin: 0 0 .6em; }
.pm-data figcaption { margin-top: .6em; line-height: 1.5; font-size: .9em; opacity: .8; }
.pm-data__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Table */
.pm-data__scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.pm-data__scroll:focus-visible { outline: 2px solid var(--accent, #1a73e8); outline-offset: 2px; }
.pm-data__table { width: 100%; border-collapse: collapse; font-size: .92em; line-height: 1.4; margin: 0; }
.pm-data__table th, .pm-data__table td { padding: .5em .75em; border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent); text-align: left; vertical-align: top; }
.pm-data__table thead th { font-weight: 700; border-bottom-width: 2px; white-space: nowrap; vertical-align: bottom; }
.pm-data__table tbody th { font-weight: 600; }
.pm-data__table tfoot th, .pm-data__table tfoot td { font-weight: 700; border-top: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-bottom: 0; }
.pm-data__table .pm-data__num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-data__table tbody tr:hover > * { background: color-mix(in srgb, currentColor 4%, transparent); }
.pm-data__table tr[hidden] { display: none; }
.pm-data__sortbtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .35em; }
.pm-data__sortbtn:focus-visible { outline: 2px solid var(--accent, #1a73e8); outline-offset: 2px; border-radius: 2px; }
.pm-data__sortbtn::after { content: ""; width: .5em; height: .5em; border: solid currentColor; border-width: 0 2px 2px 0; opacity: .3; transform: rotate(45deg) translateY(-2px); }
th[aria-sort="ascending"] .pm-data__sortbtn::after { opacity: 1; transform: rotate(-135deg) translate(-2px, 0); }
th[aria-sort="descending"] .pm-data__sortbtn::after { opacity: 1; }
.pm-data__tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6em 1em; margin-bottom: .6em; }
.pm-data__search { font: inherit; padding: .45em .7em; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: 4px; background: transparent; color: inherit; min-width: 0; width: 16em; max-width: 100%; }
.pm-data__pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6em; margin-top: .6em; font-size: .9em; }
.pm-data__pager button { font: inherit; padding: .35em .8em; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.pm-data__pager button:disabled { opacity: .4; cursor: default; }
.pm-data__empty { padding: .8em 0; opacity: .7; }

/* Chart */
.pm-data__chart { position: relative; width: 100%; min-height: 200px; }
.pm-data__chart svg { display: block; width: 100%; height: auto; overflow: visible; font-size: 12px; }
.pm-data__chart text { fill: currentColor; }
.pm-data__axis text { opacity: .72; }
.pm-data__grid line { stroke: currentColor; stroke-opacity: .12; }
.pm-data__base { stroke: currentColor; stroke-opacity: .45; }
.pm-data__legend { display: flex; flex-wrap: wrap; gap: .3em 1.1em; margin: 0 0 .7em; padding: 0; list-style: none; font-size: .88em; }
.pm-data__legend li { display: inline-flex; align-items: center; gap: .45em; margin: 0; }
.pm-data__legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.pm-data__legend--line i { height: 3px; border-radius: 2px; }
.pm-data__legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pm-data__tip { position: absolute; z-index: 5; pointer-events: none; min-width: 9em; max-width: 18em; padding: .55em .7em; border-radius: 6px; font-size: 13px; line-height: 1.35;
  background: var(--pm-data-surface); color: inherit; box-shadow: 0 2px 12px rgba(0, 0, 0, .18), 0 0 0 1px color-mix(in srgb, currentColor 12%, transparent); }
.pm-data__tip[hidden] { display: none; }
.pm-data__tip strong { display: block; margin-bottom: .25em; }
.pm-data__tip div { display: flex; align-items: center; gap: .5em; }
.pm-data__tip div span { flex: 1; opacity: .8; }
.pm-data__tip div b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pm-data__tip i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.pm-data__hit { fill: transparent; cursor: default; }
.pm-data__cross { stroke: currentColor; stroke-opacity: .35; stroke-width: 1; pointer-events: none; }
.pm-data__mark { transition: opacity .15s; }
.pm-data__chart.is-hovering .pm-data__mark:not(.is-on) { opacity: .45; }
.pm-data__figures { margin-top: .8em; }
.pm-data__figures > summary { cursor: pointer; font-size: .9em; font-weight: 600; width: max-content; max-width: 100%; }
.pm-data__figures[open] > summary { margin-bottom: .6em; }
@media (forced-colors: active) { .pm-data__mark { stroke: CanvasText; } }
@media (prefers-reduced-motion: reduce) { .pm-data__mark { transition: none; } }
