/* views.css - styles of the detail views (module, feature, action, release, risk, decisions). The forms in the feature
   and release views use the i- classes of interact.css.
   Own classes only, all prefixed v-. Tokens only, so the report view (paper tokens) and print turn out right.
   No fixed dark backgrounds; blocks avoid page breaks. Shared classes (.card .pill .tbl .sec ...) belong to the shell. */

.v-view { min-width: 0; }
:where(.v-view) > * + * { margin-top: 24px; }
:where(.v-view) :where(p, dl, dd, ul, ol, h4) { margin: 0; }
:where(.v-view) :where(ul, ol) { padding: 0; list-style: none; }

/* text pieces */
.v-lead { font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.v-none { font-size: 13px; line-height: 18px; color: var(--muted); }
.v-sub { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.v-cap { margin-top: 8px; }
.v-id { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; }
.v-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v-warn { color: var(--warn); font-weight: 500; }
.v-crit { color: var(--crit); font-weight: 500; }
.v-ok { color: var(--ok); font-weight: 500; }
.v-sh { margin: 0; font-size: 13px; line-height: 18px; font-weight: 600; }
.v-sh:not(:first-child) { margin-top: 20px; }
.v-sh + .v-rows { margin-top: 8px; }
.v-after { margin-top: 12px; }
.v-hl { padding: 1px 6px; margin-inline: -6px; border-radius: 4px; background: var(--accent-soft); }
.v-state { border: 1px dashed var(--line); border-radius: var(--r-sm); }
.v-kvv { display: inline-flex; align-items: center; gap: 8px; }
.v-capf { display: inline-block; }
.v-capf::first-letter { text-transform: uppercase; }
.v-line { display: block; }
.v-line + .v-line { margin-top: 4px; }
.v-open { margin: 0; }

/* summary block: lead text and facts */
.v-top > * + * { margin-top: 16px; }
.v-facts { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.v-facts > div { min-width: 0; break-inside: avoid; }
.v-facts dt { font-size: 12px; line-height: 16px; color: var(--muted); }
.v-facts dd { margin-top: 2px; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.v-facts dd .v-sub { margin-top: 2px; }

/* figures */
.v-fit { break-inside: avoid; }
.v-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.v-stat { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); break-inside: avoid; }
.v-stat-n { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 28px; font-size: 20px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v-stat-l { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--muted); }
.v-stat-warn .v-stat-n { color: var(--warn); }
.v-stat-crit .v-stat-n { color: var(--crit); }
.v-stat-ok .v-stat-n { color: var(--ok); }
.v-meter { margin-top: 12px; }
.v-meter .v-sub { margin-top: 6px; }
.v-legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; font-size: 12px; line-height: 16px; color: var(--muted); }
.v-legend span { display: inline-flex; align-items: center; gap: 8px; }
.v-share { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.v-share .bar { flex: 1 1 auto; min-width: 48px; }
.v-share-n { flex: none; min-width: 3.5em; font-size: 12px; line-height: 16px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* compact rows: related actions, decisions and risks */
.v-rows { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.v-rows > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 14px; break-inside: avoid; }
.v-rows > li + li { border-top: 1px solid var(--line); }
.v-row-main { flex: 1 1 220px; min-width: 0; }
.v-row-t { display: block; font-weight: 500; overflow-wrap: anywhere; }
.v-row-s { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--muted); overflow-wrap: anywhere; }
.v-row-end { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* client review block */
.v-review { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); break-inside: avoid; }
.v-review-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; }
.v-review-t { font-size: 14px; line-height: 20px; font-weight: 600; }
.v-review-a { margin-top: 12px; font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }

/* work packages */
.v-wp { display: grid; gap: 10px; }
.v-wp > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); break-inside: avoid; }
.v-wp-t { min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.v-wp-prog { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.v-wp-prog .bar { flex: 1 1 140px; min-width: 0; }
.v-wp-n { flex: none; font-size: 13px; line-height: 18px; color: var(--muted); }

/* action: options and what it blocks */
.v-opts { display: grid; gap: 8px; }
.v-opts > li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); line-height: 24px; break-inside: avoid; }
.v-opt-k { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-family: var(--font-mono); font-size: 12px; line-height: 1; font-weight: 500; }
.v-opt-t { min-width: 0; overflow-wrap: anywhere; }
.v-blocks { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--warn-soft); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; break-inside: avoid; }
.v-blocks strong { color: var(--warn); font-weight: 600; }
.v-try { margin-top: 8px; }

/* decisions: filter and the two tables (live for the screen, full for report view and print) */
.v-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.v-filter label { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; line-height: 18px; color: var(--muted); }
.v-filter .v-sub { margin-top: 0; }
.v-select { height: 34px; max-width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; line-height: 18px; cursor: pointer; }
.v-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v-dec-all { display: none; }
.sheet.rv .v-filter, .sheet.rv .v-dec-live { display: none; }
.sheet.rv .v-dec-all { display: block; }
.v-view > .v-filter + .v-dec-live { margin-top: 0; }
.v-view > .v-dec-live + .v-dec-all { margin-top: 0; }

@media (max-width: 559px) {
  .v-facts { gap: 12px 24px; }
  .v-stats { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
  .v-wp > li { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .v-filter, .v-dec-live { display: none; }
  .v-dec-all { display: block; }
  .v-view > .v-filter + .v-dec-live { margin-top: 0; }
  .v-hl { background: none; padding: 0; margin: 0; font-weight: 600; }
  .v-select { display: none; }
}
