/* Quality page. Colours and type come from site.css; the numbers are bars and tiles in the site's one hue. */

.masthead .status-line { margin: 14px 0 0; }

main section h2 { max-width: 34ch; text-wrap: balance; }

/* Headline tiles. */
.tiles { list-style: none; margin: 1.4em 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; max-width: 1180px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 0 12px; border-top: 3px solid var(--ink); }
.tile-value { font-size: clamp(1.9rem, 3.6vw, 2.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; }
.tile-label { font-weight: 700; line-height: 1.3; }
.tile-note { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.45; }
.q-sources { color: var(--ink-faint); font-size: 0.875rem; margin: 1.4em 0 0; max-width: 90ch; }
@media (max-width: 980px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }

/* The method: reuses the numbered steps from site.css, with room for longer paragraphs. */
.method-steps { max-width: var(--wide); }
.method-steps p { max-width: 70ch; }
.limits { margin: 0.6em 0 0; max-width: var(--wide); display: grid; gap: 0; }
.limits > div { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-top: 1px solid var(--rule); }
.limits > div:last-child { border-bottom: 1px solid var(--rule); }
.limits dt { font-weight: 700; }
.limits dd { margin: 0; color: var(--ink-soft); max-width: 70ch; }
@media (max-width: 720px) { .limits > div { grid-template-columns: 1fr; } }

/* Bar charts: one per figure, in a two-column grid. */
.q-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 48px; margin-top: 1.6em; max-width: 1180px; }
.q-figure { margin: 0; min-width: 0; }
.q-figure figcaption h3 { margin-bottom: 0.25em; }
.q-figure figcaption p { color: var(--ink-soft); font-size: 0.9375rem; margin: 0 0 12px; max-width: 52ch; }
@media (max-width: 860px) { .q-grid { grid-template-columns: 1fr; } }

.qbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: baseline; }
.qbar-label { grid-column: 1; grid-row: 1; line-height: 1.3; }
.qbar-value { grid-column: 2; grid-row: 1; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qbar-track { grid-column: 1 / -1; grid-row: 2; display: block; height: 12px; border-radius: 0 4px 4px 0; background: var(--meter-track); box-shadow: inset 0 0 0 1px var(--rule); overflow: hidden; }
.qbar-fill { display: block; height: 100%; background: var(--meter-fill); border-radius: 0 4px 4px 0; }
.qbars-empty { color: var(--ink-faint); }
.q-facts { margin-top: 2em; }

.q-more { margin-top: 1.8em; max-width: 720px; }
.q-more summary { cursor: pointer; color: var(--link); width: fit-content; }
.q-more summary:focus-visible { outline: 3px solid var(--sodium); outline-offset: 3px; }
.q-more .qbars { margin-top: 14px; }

/* The seven classes. */
.qcards { list-style: none; margin: 1.6em 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; max-width: 1180px; }
.qcard { display: flex; flex-direction: column; padding: 18px 20px 16px; background: var(--paper); border: 1px solid var(--rule); border-top: 4px solid var(--meter-fill); border-radius: 0 0 6px 6px; }
.qcard h3 { font-size: 1.1875rem; margin-bottom: 0.45em; }
.qcard p { color: var(--ink-soft); font-size: 0.9875rem; margin: 0 0 0.8em; }
.qcard .qcard-count { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.qcard .qcard-count:empty { display: none; }
.qcard .qcard-doing { margin: auto 0 0; padding-top: 10px; border-top: 1px dashed var(--rule); font-size: 0.9375rem; }
.qcard .qcard-doing strong { color: var(--ink); }

.systemic { list-style: none; margin: 1em 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px 40px; max-width: 1180px; }
.systemic-item h4 { font-size: 1.0625rem; margin: 0 0 4px; }
.systemic-share { margin: 0 0 8px; color: var(--ink-soft); }
.systemic-share strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.systemic-track { margin-bottom: 10px; }
.systemic-detail { color: var(--ink-soft); font-size: 0.9375rem; margin: 0; max-width: 70ch; }

.doing { max-width: var(--measure); padding-left: 1.1em; margin: 0 0 1.2em; }
.doing li { margin-bottom: 0.6em; }
