/* /coverage/ (inc/coverage.php). Colours are validated as sets: the four
   series by vertical order on each surface, the state ramp as ordinal, the
   map ramp as sequential with "none" in neutral grey. Dark first, light by
   attribute, like the rest of the theme. */
/* tokens on the body: the tooltip lives outside main */
.minn-cov-page {
  --s1: #7166f6; --s2: #199e70; --s3: #c98500; --s4: #d55181;
  --q0: var(--panel2); --q1: #353470; --q2: #514cb4; --q3: #7775e9; --q4: #aaaeff;
  --on-q0: var(--text2); --on-q1: #e6e6ff; --on-q2: #ffffff; --on-q3: #0b0b1a; --on-q4: #0b0b1a;
  --st-implemented: #aaaeff; --st-constant: #7775e9; --st-placeholder: #514cb4; --st-missing: var(--border2);
  --st-verified: var(--s2);
  --grid: var(--border); --tile-area: color-mix(in srgb, var(--accent) 16%, transparent);
}
[data-root-theme="light"] .minn-cov-page {
  --s1: #6a5ef2; --s2: #1baf7a; --s3: #c98500; --s4: #d55181;
  --q0: var(--border2); --q1: #c2c6f8; --q2: #979af4; --q3: #706bed; --q4: #513ece;
  --on-q1: #1b1650; --on-q2: #140f45; --on-q3: #ffffff; --on-q4: #ffffff;
  --st-implemented: #513ece; --st-constant: #706bed; --st-placeholder: #979af4; --st-missing: var(--border);
  --tile-area: color-mix(in srgb, var(--accent) 10%, transparent);
}
.minn-cov .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.minn-cov-page .cov-s1 { --c: var(--s1); }
.minn-cov-page .cov-s2 { --c: var(--s2); }
.minn-cov-page .cov-s3 { --c: var(--s3); }
.minn-cov-page .cov-s4 { --c: var(--s4); }
.cov-section { padding-top: 24px; }
.cov-section > p, .cov-section > div > p, .cov-two > div > p { font-size: 16px; line-height: 1.6; color: var(--text2); margin: 12px 0 0; max-width: 760px; }
.minn-cov h2 { scroll-margin-top: 90px; }
.minn-lexicon .cov-legend, .minn-lexicon .cov-tiles, .minn-lexicon .cov-chips, .minn-lexicon .cov-stack-key,
.minn-lexicon .cov-queue, .minn-lexicon .cov-bars, .minn-lexicon .cov-hours, .minn-lexicon .cov-ladder { padding-left: 0; }

/* ---- headline ---- */
.minn-cov-hero h1 { max-width: 900px; }
.cov-headline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 48px; margin: 28px 0 0; }
.cov-figure { margin: 0; display: flex; flex-direction: column; }
.cov-figure-value { font-size: 84px; font-weight: 800; letter-spacing: -3px; line-height: .95; color: var(--text); }
.cov-figure-label { font-size: 16px; color: var(--text2); margin-top: 10px; max-width: 380px; }
.cov-ladder { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0 0 4px; }
.cov-ladder li { display: flex; flex-direction: column; padding: 0 18px; border-left: 1px solid var(--border); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.cov-ladder li:first-child { border-left: 0; padding-left: 0; }
.cov-ladder li span { font-size: 13px; font-weight: 500; color: var(--text3); margin-bottom: 4px; }
.cov-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin: 36px 0 0; }
.cov-facts div { border-top: 2px solid var(--border2); padding-top: 12px; }
.cov-facts dt { font-size: 13.5px; color: var(--text3); }
.cov-facts dd { margin: 4px 0 0; font-size: 17px; font-weight: 700; color: var(--text); }

/* ---- growth chart ---- */
.cov-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; font-size: 14px; color: var(--text2); }
.cov-legend li { display: flex; align-items: center; gap: 8px; }
.cov-key { display: inline-block; width: 18px; height: 2px; border-radius: 2px; background: var(--c); }
.cov-growth { margin: 18px 0 0; }
.cov-chart { position: relative; padding: 10px 62px 0 44px; }
.cov-plot { position: relative; height: 340px; outline: none; cursor: crosshair; touch-action: pan-y; }
.cov-plot:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 4px; }
.cov-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cov-grid, .cov-days, .cov-base { fill: none; vector-effect: non-scaling-stroke; stroke-width: 1px; }
.cov-grid { stroke: var(--grid); }
.cov-days { stroke: color-mix(in srgb, var(--grid) 55%, transparent); }
.cov-base { stroke: var(--border2); }
.cov-line { fill: none; stroke: var(--c); stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cov-ytick { position: absolute; left: -44px; width: 36px; text-align: right; transform: translateY(50%); font: 500 11.5px/1 var(--mono); color: var(--text3); font-variant-numeric: tabular-nums; }
.cov-end { position: absolute; left: calc(100% + 8px); transform: translateY(50%); display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cov-end i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--bg); margin-left: -12px; }
.cov-xaxis { position: relative; height: 24px; }
.cov-xtick { position: absolute; top: 6px; font-size: 12px; color: var(--text3); white-space: nowrap; }
.cov-cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--text3); pointer-events: none; }
.cov-cross[hidden] { display: none; }
.cov-dot { position: absolute; left: -5px; width: 10px; height: 10px; margin-bottom: -5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--bg); }
.cov-growth figcaption { font-size: 13.5px; color: var(--text3); margin: 8px 0 0 44px; max-width: 720px; }
.cov-details { margin-top: 18px; }
.cov-details > summary { cursor: pointer; color: var(--accent2); font-weight: 650; font-size: 15px; }
.cov-details[open] > summary { margin-bottom: 4px; }
.cov-log td:nth-child(3) { color: var(--text); font-weight: 500; min-width: 320px; }
.cov-log td:first-child { white-space: nowrap; font-weight: 500; color: var(--text2); }

/* ---- one tooltip for the chart and everything with data-tip ---- */
.cov-tip { position: fixed; left: 0; top: 0; z-index: 60; max-width: 360px; padding: 9px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border2); box-shadow: 0 12px 30px color-mix(in srgb, #000 30%, transparent); font-size: 13px; line-height: 1.45; color: var(--text2); white-space: pre-line; pointer-events: none; }
.cov-tip[hidden] { display: none; }
.cov-tip strong { display: block; color: var(--text); font-weight: 650; margin-bottom: 2px; white-space: normal; }
.cov-tip .cov-tip-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 8px; white-space: normal; margin-top: 3px; }
.cov-tip .cov-tip-row i { width: 12px; height: 2px; border-radius: 2px; background: var(--c); }
.cov-tip .cov-tip-row b { color: var(--text); font-variant-numeric: tabular-nums; padding-left: 8px; }
.cov-tip .cov-tip-meta { display: block; color: var(--text3); margin-top: 4px; white-space: normal; }

/* ---- tiles ---- */
.cov-tiles { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 22px; margin: 24px 0 0; padding: 0; }
.cov-tile { display: flex; flex-direction: column; border-top: 2px solid var(--border2); padding-top: 12px; }
.cov-tile-label { font-size: 14px; color: var(--text2); font-weight: 600; }
.cov-tile-value { font-size: 34px; font-weight: 800; letter-spacing: -1px; color: var(--text); line-height: 1.15; margin-top: 4px; }
.cov-tile-note { font-size: 13px; color: var(--text3); }
.cov-spark { width: 100%; height: 30px; margin-top: 10px; }
.cov-spark-area { fill: var(--tile-area); }
.cov-spark-line { fill: none; stroke: var(--accent); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

/* ---- week by week ---- */
.cov-matrix-scroll { overflow-x: auto; margin-top: 18px; }
.minn-lexicon .cov-matrix { min-width: 820px; table-layout: fixed; }
.minn-lexicon .cov-matrix th { text-transform: none; letter-spacing: 0; font-size: 14.5px; color: var(--text); font-weight: 700; vertical-align: bottom; border-bottom: 2px solid var(--border2); padding: 10px 10px; }
.minn-lexicon .cov-matrix thead th:first-child { width: 150px; }
.minn-lexicon .cov-matrix tbody th { vertical-align: top; border-bottom: 1px solid var(--border); padding: 14px 10px; }
.minn-lexicon .cov-matrix td { padding: 12px 10px; border-top: 0; border-bottom: 1px solid var(--border); }
.minn-lexicon .cov-matrix tbody tr:hover td { background: transparent; }
.cov-col-date, .cov-row-count { display: block; font-size: 12.5px; font-weight: 500; color: var(--text3); margin-top: 3px; }
.cov-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; }
.minn-lexicon .cov-chips li { margin: 0; max-width: 100%; overflow-wrap: anywhere; padding: 2px 6px; border-radius: 6px; background: var(--panel2); color: var(--text); font: 500 11.5px/1.5 var(--mono); cursor: default; }
[data-root-theme="light"] .minn-lexicon .cov-chips li { background: var(--panel); box-shadow: inset 0 0 0 1px var(--border); }
.minn-lexicon .cov-chips li.is-tipped { box-shadow: inset 0 0 0 1px var(--accent); }
.cov-more { margin-top: 6px; }
.cov-more > summary { cursor: pointer; color: var(--accent2); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.cov-count { font-size: 14px; font-weight: 600; color: var(--text); }
.cov-none { color: var(--text3); }

/* ---- the file map ---- */
.cov-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 18px 0 0; font-size: 13px; color: var(--text2); }
.cov-scale span:first-child { color: var(--text3); }
.cov-scale span { display: inline-flex; align-items: center; gap: 6px; }
.cov-scale i { width: 14px; height: 14px; border-radius: 4px; }
.cov-scale .q0, .cov-cell.q0 { background: var(--q0); color: var(--on-q0); }
.cov-scale .q1, .cov-cell.q1 { background: var(--q1); color: var(--on-q1); }
.cov-scale .q2, .cov-cell.q2 { background: var(--q2); color: var(--on-q2); }
.cov-scale .q3, .cov-cell.q3 { background: var(--q3); color: var(--on-q3); }
.cov-scale .q4, .cov-cell.q4 { background: var(--q4); color: var(--on-q4); }
.cov-map-wrap { margin-top: 14px; }
.cov-map { position: relative; aspect-ratio: 1000 / 620; }
.cov-group, .cov-cell { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); }
.cov-group { border-top: 2px solid var(--text2); }
.cov-group-name { display: none; position: absolute; left: 1px; top: 3px; font-size: 12.5px; font-weight: 650; white-space: nowrap; color: var(--text); line-height: 1.2; }
.cov-group-name b { font-weight: 500; color: var(--text3); font-variant-numeric: tabular-nums; }
.cov-cell { border: 1px solid var(--bg); border-radius: 4px; background-clip: padding-box; overflow: hidden; padding: 3px 5px; font: 500 11px/14px var(--mono); }
.cov-cell-name, .cov-cell-pct { display: none; white-space: nowrap; }
.cov-cell-pct { opacity: .85; font-variant-numeric: tabular-nums; }
.cov-cell:hover, .cov-cell.is-tipped { box-shadow: inset 0 0 0 2px var(--text); }
.cov-map.is-fitted .cov-cell.fit-1 .cov-cell-name, .cov-map.is-fitted .cov-cell.fit-2 .cov-cell-pct, .cov-map.is-fitted .cov-group.fit-1 .cov-group-name { display: block; }
.cov-map.is-fitted .cov-group.fit-1:not(.fit-2) .cov-group-name b { display: none; }
.cov-filter { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 14px; color: var(--text3); }
.cov-filter input { flex: 1; max-width: 420px; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; }
.cov-filter input:focus { outline: none; border-color: var(--accent); }
.cov-files td:first-child code { background: transparent; padding: 0; font-weight: 500; }
.cov-gaps { margin-top: 6px; font-weight: 400; }
.cov-gaps > summary { cursor: pointer; color: var(--accent2); font-size: 13px; }
.cov-gaps p { font-size: 13px; color: var(--text2); margin: 8px 0 0; line-height: 1.7; }
.minn-lexicon .cov-gaps code { font-size: 12px; }
.cov-meter { display: inline-block; vertical-align: middle; width: 54px; height: 6px; margin-right: 10px; border-radius: 3px; background: linear-gradient(90deg, var(--st-implemented) calc(var(--f) * 100%), var(--st-missing) 0); }

.cov-more-link { font-size: 15px; margin: 16px 0 0; color: var(--text3); }
.minn-lexicon .cov-more-link a, .minn-lexicon .cov-back a { font-weight: 650; }
.cov-back { margin: 24px 0 72px; }

/* ---- what plugins call ---- */
.cov-stacks { display: grid; gap: 22px; margin-top: 22px; max-width: 860px; }
.cov-stack-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-size: 14.5px; color: var(--text2); margin-bottom: 8px; }
.cov-stack-head strong { color: var(--text); }
.cov-stack-bar { display: flex; gap: 2px; height: 18px; border-radius: 5px; overflow: hidden; background: var(--panel2); }
.cov-seg { flex: 0 0 auto; width: calc(var(--f) * 100%); min-width: 3px; height: 100%; }
.cov-seg.is-implemented, .cov-stack-key .is-implemented { background: var(--st-implemented); }
.cov-seg.is-constant, .cov-stack-key .is-constant { background: var(--st-constant); }
.cov-seg.is-placeholder, .cov-stack-key .is-placeholder { background: var(--st-placeholder); }
.cov-seg.is-missing, .cov-stack-key .is-missing { background: var(--st-missing); }
.cov-seg.is-verified { background: var(--st-verified); }
.cov-seg.is-tipped { box-shadow: inset 0 0 0 2px var(--text); }
.cov-stack-key { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--text2); }
.minn-lexicon .cov-stack-key li { margin: 0; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.cov-stack-key i { width: 10px; height: 10px; border-radius: 3px; }
.cov-queue { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 22px; padding: 0; margin: 14px 0 0; }
.minn-lexicon .cov-queue li { margin: 0; display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.cov-queue li span { color: var(--text3); font-variant-numeric: tabular-nums; }

/* ---- around the engine ---- */
.cov-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 48px; }
.cov-bars { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.minn-lexicon .cov-bars li { margin: 0; display: grid; grid-template-columns: minmax(150px, 210px) 1fr auto; align-items: center; gap: 14px; }
.cov-bars li div { display: flex; flex-direction: column; font-size: 14.5px; }
.cov-bars li div strong { color: var(--text); font-weight: 650; }
.cov-bars li div span { font-size: 12.5px; color: var(--text3); line-height: 1.35; }
.cov-bar { display: block; height: 12px; width: max(4px, calc(var(--f) * 100%)); border-radius: 0 4px 4px 0; background: var(--accent); }
.cov-bars b { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; min-width: 56px; }
.cov-hours { list-style: none; display: grid; grid-template-columns: repeat(24, 1fr); align-items: end; gap: 4px; height: 120px; margin: 18px 0 0; padding: 0; border-bottom: 1px solid var(--border2); }
.minn-lexicon .cov-hours li { margin: 0; height: 100%; display: flex; align-items: flex-end; }
.cov-hours li span { display: block; width: 100%; max-width: 24px; margin: 0 auto; height: max(2px, calc(var(--f) * 100%)); border-radius: 4px 4px 0 0; background: var(--accent); }
.cov-hours li.is-tipped span { background: var(--accent2); }
.cov-hours-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--text3); margin-top: 6px; }
#method { padding-bottom: 72px; }

@media (max-width: 860px) {
  .cov-two { grid-template-columns: 1fr; }
  .cov-figure-value { font-size: 64px; }
}
@media (max-width: 700px) {
  .cov-map { aspect-ratio: 328 / 760; }
  .cov-group, .cov-cell { left: var(--nx); top: var(--ny); width: var(--nw); height: var(--nh); }
  .cov-chart { padding-right: 52px; padding-left: 34px; }
  .cov-ytick { left: -36px; width: 30px; font-size: 10.5px; }
  .cov-end { font-size: 12px; }
  .cov-plot { height: 280px; }
  .cov-xtick.is-wide { display: none; }
  .cov-growth figcaption { margin-left: 0; }
  .cov-ladder li { padding: 0 12px; font-size: 16px; }
  .minn-lexicon .cov-bars li { grid-template-columns: 1fr auto; }
  .cov-bars li div { grid-column: 1 / -1; }
}
