/* Coverage facts said once per project (templates/_coverage_macros.html, DESIGN.md "ORM calls", "Which engine"):
   the account of calls through an ORM or query builder, which engine a project was analysed as, and a route
   name cut in the middle. Tokens only; both themes. */

/* --- ORM calls: seen = translated + not translated ------------------------------------------------- */
.cov { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-width: 0; font-size: var(--fs-2); color: var(--ink-2); }
.cov-row { display: flex; align-items: center; gap: var(--sp-2) var(--sp-5); min-height: 26px; min-width: 0; padding: 0 var(--sp-2); white-space: nowrap; }
.cov-row b, .cov-line b, .cov-note b, .cov-reasons b { font: 600 var(--fs-2)/1 var(--font-mono); color: var(--ink); }
.eng-line b, .eng-scope .eng-part b { font: 600 var(--fs-2)/1.3 var(--font-sans); color: var(--ink); }
.cov-caret { color: var(--ink-3); font-size: var(--fs-1); }
.cov-row.is-quiet { color: var(--ink-3); }
.cov-row.is-quiet b { color: var(--ink-2); font-weight: 500; }
.cov-name { flex: none; min-width: 7.5rem; color: var(--ink); font-weight: 500; }
.cov-row.is-quiet > .cov-name { color: var(--ink-2); font-weight: 400; }
.cov-n, .cov-sites, .cov-tests { flex: none; }
.cov-n.is-zero, .cov-sites, .cov-tests, .cov-pct { color: var(--ink-3); }
.cov-n.is-zero b { color: var(--ink-3); font-weight: 500; }
.cov-n.is-counted { padding: 0 var(--sp-3); border: 1px dashed var(--unverified); border-radius: var(--r-1); }
.cov-note { color: var(--ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cov-why { flex: 1 1 4rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); }
.cov-why b { color: var(--ink-2); font-weight: 500; }
/* The split bar: translated solid, not translated hatched; a library that was only counted is an outline. */
.cov-split { display: inline-flex; flex: none; gap: 1px; width: 96px; height: 8px; border-radius: 2px; overflow: hidden; background: var(--surface-3); }
.cov-split > i { height: 100%; min-width: 0; }
.cov-split > .is-done { background: var(--accent); }
.cov-split > .is-missed { background: var(--warn); background-image: repeating-linear-gradient(135deg, transparent 0 2px, rgba(255, 255, 255, .55) 2px 4px); }
.cov-split > i[style*="width: 0%"], .cov-split > i[style*="width: 0.0%"] { display: none; }
.cov-split.is-unknown { background: none; box-shadow: inset 0 0 0 1px var(--line-strong); background-image: repeating-linear-gradient(135deg, transparent 0 3px, var(--surface-3) 3px 5px); }
.cov-lib > summary { list-style: none; cursor: pointer; border-radius: var(--r-2); }
.cov-lib > summary::-webkit-details-marker { display: none; }
.cov-lib > summary:hover, .cov-lib[open] > summary { background: var(--surface-2); }
.cov-lib > summary > .icon { flex: none; margin-left: auto; color: var(--ink-3); transition: transform .12s; }
.cov-lib[open] > summary > .icon { transform: rotate(180deg); }
.cov-lib[open] > summary > .cov-why { visibility: hidden; }
.cov-detail { display: grid; gap: var(--sp-2); padding: var(--sp-2) var(--sp-2) var(--sp-4) calc(7.5rem + var(--sp-5) + var(--sp-2)); min-width: 0; }
.cov-reasons { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.cov-reasons > li { display: grid; grid-template-columns: 3.5rem auto minmax(0, 1fr); align-items: center; gap: var(--sp-4); min-height: 20px; min-width: 0; }
.cov-reasons > li > b { text-align: right; }
.cov-reasons > li.is-more { color: var(--ink-3); }
.cov-rbar { display: block; width: 64px; height: 6px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.cov-rbar > i { display: block; height: 100%; min-width: 2px; background: var(--warn); opacity: .8; }
.cov-rtext { grid-column: -2 / -1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
/* Under a funnel or in a panel: a labelled section. */
.cov-section { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: start; gap: var(--sp-2) var(--sp-5); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--line); font-size: var(--fs-2); color: var(--ink-2); }
.cov-section > .label { margin: 0; line-height: 26px; }
.cov-section > .eng-line { min-height: 26px; }

/* The one-line form: a summary that opens the account. The popover hangs from the line's container (the list
   head, the Map bar, the section), not from the line, so it never leaves the page at the right edge. */
.cov-menu, .eng-scope, .eng-how { position: static; min-width: 0; max-width: 100%; }
.list-head, .atlas-bar, .cov-section, .cov-foot { position: relative; }
.cov-foot { align-items: center; }
.cov-pop .cov-why { display: none; }
.menu > summary.cov-line { height: auto; min-height: var(--ctl-sm); padding: 0 var(--sp-3); gap: var(--sp-2) var(--sp-4); font-weight: 400; font-size: var(--fs-2); color: var(--ink-2); flex-wrap: wrap; white-space: normal; }
.cov-line > * { white-space: nowrap; }
.cov-line > .cov-name { min-width: 0; }
.cov-line > .cov-split { width: 56px; }
.cov-pop { min-width: min(34rem, calc(100vw - 2 * var(--gutter))); max-width: min(46rem, calc(100vw - 2 * var(--gutter))); padding: var(--sp-3); }
.cov-pop .cov-row { white-space: nowrap; }
.cov-pop .cov-sites { display: none; }
.cov-brief { color: var(--ink-3); }

/* --- Which engine a project was analysed as -------------------------------------------------------- */
.eng-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); min-width: 0; font-size: var(--fs-2); color: var(--ink-2); }
.eng-part { min-width: 0; }
.eng-part + .eng-part::before { content: "·"; margin-right: var(--sp-4); color: var(--line-strong); }
.menu.eng-how > summary { height: var(--ctl-sm); padding: 0 var(--sp-2) 0 var(--sp-3); gap: var(--sp-1); font-size: var(--fs-2); color: var(--accent); font-weight: 500; }
.eng-pop { min-width: min(26rem, calc(100vw - 2 * var(--gutter))); padding: var(--sp-3); }
.eng-pop.is-wide { min-width: min(30rem, calc(100vw - 2 * var(--gutter))); max-width: min(40rem, calc(100vw - 2 * var(--gutter))); }
.eng-pop > .cli { margin: var(--sp-1) var(--sp-2); }
.eng-item > .menu-name { flex: 0 0 9rem; }
.eng-item > .eng-list { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: var(--fs-2); }
.eng-item > .menu-note > b { font: 600 var(--fs-2)/1 var(--font-mono); color: var(--ink); }
/* In a table: a call site or table with no engine shows a dash; the project line says why. */
.eng-none { color: var(--ink-3); }

/* --- A name cut in the middle (m.route): the start shrinks, the end always shows -------------------- */
.mid { display: inline-flex; max-width: 100%; min-width: 0; vertical-align: bottom; white-space: nowrap; }
.mid-head { flex: 0 1000 auto; min-width: 5ch; overflow: hidden; text-overflow: ellipsis; white-space: pre; }
/* The end gives way only when the start is down to its first characters (a cell narrower than the end itself). */
.mid-tail { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: pre; }
/* Beside a kind chip in a block that is not a flex row: leave the chip its room, so the end is not clipped. */
.flow-node .mid { max-width: calc(100% - 5.5rem); }
.route-cut { color: var(--ink-3); padding: 0 1px; }

/* --- The Map bar: the same two lines, drawn by map.js (ormMenu, engineMenu) -------------------------- */
.atlas-bar > .menu > summary.cov-line { padding-left: 0; }
.atlas-cov .cov-reasons { padding: 0 0 var(--sp-3) calc(7.5rem + var(--sp-5) + var(--sp-2)); }
.atlas-cov .cov-reasons > li { grid-template-columns: 3.5rem minmax(0, 1fr); }
@media (max-width: 720px) {
  .cov-row { flex-wrap: wrap; white-space: normal; padding: var(--sp-1) var(--sp-2); }
  .cov-detail { padding-left: var(--sp-5); }
  .cov-section { grid-template-columns: minmax(0, 1fr); }
}
/* The engine menu opens toward the page: its right edge on the summary, so it never runs past a 1054 window. */
.eng-how > .menu-pop { left: auto; right: 0; }

/* --- Repository coverage (templates/_repo_coverage.html): the judged share of D, its funnel and reasons ---------- */
.rcov-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-4); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line); min-width: 0; }
.rcov-share { font: 500 var(--fs-6)/1 var(--font-mono); letter-spacing: -.02em; color: var(--ink); }
.rcov-of { color: var(--ink-2); font-size: var(--fs-2); min-width: 0; }
.rcov-of b { color: var(--ink); font-weight: 600; }
.rcov-of .is-up { color: var(--win); }
.rcov-of .is-down { color: var(--fail); }
.rcov-outcomes { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--line); }
.rcov-outcomes > .label { margin: 0 var(--sp-2) 0 0; }
.rcov-outcomes b { font-weight: 600; }
.rcov-reasons { table-layout: fixed; }
.rcov-reasons .clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
