/* Module 16 (TQM) — page styles. Design tokens only (design-system/tokens.css); Cloud font from journey.css. */
.tq-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tq-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); background: var(--white);
  border: 1px solid var(--border-soft); border-radius: 8px; padding: 20px 22px; border-top: 4px solid var(--dept);
  transition: transform .12s ease, box-shadow .12s ease; min-height: 150px; }
.tq-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px var(--black-10); }
.tq-card .ic { font-size: 26px; color: var(--dept-deep); }
.tq-card h3 { margin: 0; font-size: 19px; font-weight: 700; color: var(--dept-deep); }
.tq-card .fig { margin-top: auto; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.tq-card .fig b { font-size: 30px; line-height: 1; color: var(--sapphire-deep); }
.tq-card .fig span { font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.tq-card .fig .due { color: var(--ruby); }
.tq-bar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.tq-bar label.f { min-width: 150px; }
.tq-bar .grow { flex: 1; min-width: 220px; }
.tq-warn td, td.tq-warn, .tq-warn { color: var(--ruby); font-weight: 700; }
tr.tq-warn td { background: var(--ruby-muted); }
.tq-pill-due { background: var(--ruby-muted); color: var(--ruby-dark); box-shadow: inset 0 0 0 1.5px var(--ruby); }
.tq-kv { display: grid; grid-template-columns: 220px 1fr; gap: 8px 16px; font-size: 15px; }
.tq-kv > b { color: var(--ink-soft); font-weight: 700; }
.tq-pages { display: flex; flex-direction: column; gap: 14px; align-items: center; background: var(--gray-100); padding: 16px; border-radius: 6px; }
.tq-pages img { width: min(900px, 100%); box-shadow: 0 2px 10px var(--black-10); background: var(--white); }
.tq-md { font-size: 15px; line-height: 1.6; color: var(--ink-body); overflow-wrap: anywhere; }
.tq-md h1, .tq-md h2, .tq-md h3, .tq-md h4 { color: var(--sapphire-deep); margin: 14px 0 6px; }
.tq-md table { border-collapse: collapse; margin: 8px 0; }
.tq-md th, .tq-md td { border: 1px solid var(--border-soft); padding: 5px 9px; text-align: left; }
.tq-md th { background: var(--sapphire-muted); }
.tq-md code { background: var(--gray-100); padding: 1px 4px; border-radius: 4px; }
.tq-md pre { background: var(--gray-100); padding: 10px; border-radius: 6px; overflow-x: auto; }
.tq-md blockquote { border-left: 3px solid var(--sapphire); margin: 6px 0; padding: 2px 12px; color: var(--ink-soft); }
.tq-sec { border: 1px solid var(--border-soft); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; background: var(--white); }
.tq-sec .hd { display: grid; grid-template-columns: 70px 1fr 1fr auto; gap: 8px; align-items: end; }
.tq-block { border-left: 3px solid var(--sapphire-muted); padding: 8px 0 8px 12px; margin: 10px 0; }
.tq-block .bh { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.tq-block textarea, .tq-sec textarea { width: 100%; min-height: 64px; font-family: inherit; font-size: 14.5px; }
.tq-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tq-sticky { position: sticky; top: 12px; }
.tq-preview { width: 100%; height: 80vh; border: 1px solid var(--border-soft); border-radius: 6px; background: var(--white); }
.tq-matrix { border-collapse: separate; border-spacing: 4px; }
.tq-matrix td, .tq-matrix th { text-align: center; font-size: 13px; }
.tq-matrix td.cell { width: 92px; height: 62px; border-radius: 6px; font-size: 22px; font-weight: 700; cursor: pointer; }
.tq-matrix td.cell.low { background: var(--emerald-muted); color: var(--emerald-dark); }
.tq-matrix td.cell.moderate { background: var(--sapphire-muted); color: var(--sapphire-deep); }
.tq-matrix td.cell.high { background: var(--ruby-muted); color: var(--ruby-dark); box-shadow: inset 0 0 0 1.5px var(--ruby-light); }
.tq-matrix td.cell.extreme { background: var(--ruby); color: var(--white); }
.tq-matrix td.cell.on { outline: 3px solid var(--sapphire-deep); }
.tq-matrix td.cell.zero { font-weight: 500; opacity: .75; }
.tq-lvl { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.tq-lvl.low { background: var(--emerald-muted); color: var(--emerald-dark); }
.tq-lvl.moderate { background: var(--sapphire-muted); color: var(--sapphire-deep); }
.tq-lvl.high { background: var(--ruby-muted); color: var(--ruby-dark); }
.tq-lvl.extreme { background: var(--ruby); color: var(--white); }
.tq-chart { width: 100%; height: auto; display: block; }
.tq-chart text { font-family: 'Cloud', system-ui, sans-serif; }
.tq-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; color: var(--ink-body); }
.tq-legend i { display: inline-block; width: 24px; border-top: 3px solid; margin-right: 6px; vertical-align: middle; }
.tq-legend .comp { border-color: var(--sapphire); border-top-style: dashed; } .tq-legend .bench { border-color: var(--emerald); }
.tq-legend .ctr { border-color: var(--gray-500); } .tq-legend .ucl { border-color: var(--sapphire-light); border-top-style: dotted; }
.tq-legend .bad { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--ruby); margin-right: 6px; }
.tq-fish { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tq-fish > div { border: 1px solid var(--border-soft); border-radius: 6px; padding: 10px; }
.tq-list-edit { display: flex; flex-direction: column; gap: 6px; }
.tq-list-edit .row { display: flex; gap: 6px; align-items: center; }
.tq-list-edit input { flex: 1; }
.tq-ai { border: 1.5px dashed var(--sapphire-light); border-radius: 8px; padding: 12px 14px; background: var(--sapphire-muted); }
.tq-num { text-align: right; font-variant-numeric: tabular-nums; }
.tq-small { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.tq-na { color: var(--gray-500); font-style: italic; }
@media (max-width: 1100px) { .tq-split { grid-template-columns: 1fr; } .tq-fish { grid-template-columns: 1fr 1fr; } }
tr.sel td { background: var(--sapphire-muted); }
.grid > .card + .card { margin-top: 0; }
