/* Sacred Command Center · documents module styles. Owned by the new-modules agent. Semantic tokens only: no hex, no rgba (tests/static.mjs S-a2). */
.module--documents .rp-id { flex: 0 1 17rem; }
.module--documents .rp-facts { flex: 1 1 26rem; gap: var(--s-2) var(--s-4); }
.module--documents .rs-grid:empty { display: none; }
.view:has(.module--documents .rp .lv-main) { height: auto; overflow: visible; display: block; }

/* A document's body: markdown read as text, in the page's own type */
.doc-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-3) var(--s-4); }
.doc-md { max-width: var(--measure); color: var(--text-2); }
.doc-md h2, .doc-md h3, .doc-md h4, .doc-md h5 { color: var(--text); font-weight: 700; margin: var(--s-3) 0 var(--s-1); }
.doc-md h2 { font-size: var(--fs-h2); }
.doc-md h3 { font-size: var(--fs-h3); }
.doc-md h4, .doc-md h5 { font-size: var(--fs-body); }
.doc-md > :first-child { margin-top: 0; }
.doc-md p { margin: 0 0 var(--s-2); }
.doc-md ul { margin: 0 0 var(--s-2); padding-left: var(--s-4); list-style: disc; }
.doc-md li { margin: 0 0 var(--s-1); }
.doc-md b { color: var(--text); }
.doc-editor { min-height: 22rem; }
.rs-chips { display: inline-flex; align-items: center; gap: var(--s-2); }

/* ── Transcripts (F6): the list, the card viewer, the sheets ─────────────────────────────────────────────────────────────── */
.doc-search { flex: 1 1 14rem; max-width: 22rem; min-width: 0; }
.doc-search .input { min-height: 36px; padding-right: 40px; }
.doc-search > .icon-btn { position: absolute; right: 4px; top: 50%; translate: 0 -50%; }
.doc-mode { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); min-width: 0; }
.doc-snip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.doc-dim { color: var(--text-3); font-weight: 500; }

.doc-tv { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.doc-facts { margin: 0; }
.doc-warns { display: flex; flex-direction: column; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.doc-warns li { display: flex; align-items: flex-start; gap: var(--s-2); padding: var(--s-2) var(--s-3); background: var(--surface-2); border-radius: var(--r-button); color: var(--text); font-weight: 600; }
.doc-warns .i, .doc-warns .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--accent-mark); stroke-width: 1.75; }
.doc-limit { max-width: var(--measure); margin: 0; }
.doc-find { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); }
.doc-find .search { flex: 1 1 14rem; max-width: 22rem; min-width: 0; }
.doc-find-n { min-width: 5ch; font-variant-numeric: tabular-nums; }
.doc-sec { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); min-width: 0; }
.doc-sec .eyebrow + * { margin-top: 0; }
.doc-sum { margin: 0; max-width: var(--measure); color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.doc-writer { align-self: flex-start; }
.doc-lines { display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.doc-line { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); }
.doc-line:last-child { border-bottom: 0; }
.doc-line-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-line-who { display: inline-flex; align-items: baseline; gap: var(--s-2); color: var(--text-3); font-size: var(--fs-caption); }
.doc-line-who b { color: var(--text); font-weight: 700; }
.doc-line-x { color: var(--text); overflow-wrap: anywhere; }
.doc-line-acts { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: var(--s-2); flex: none; }
mark.doc-hit { background: transparent; color: inherit; font-weight: 700; box-shadow: inset 0 -2px 0 var(--link-line); border-radius: 2px; }
mark.doc-hit.is-cur { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 -2px 0 var(--accent-mark); }
.doc-note { margin: 0; }
.doc-tv-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }

.doc-todo-chips { display: flex; flex-direction: column; gap: var(--s-1); }
.doc-todo-chips .chips { margin: 0; padding: 0; list-style: none; }

/* File a card, How transcripts get here */
.doc-steps { display: flex; flex-direction: column; gap: var(--s-3); margin: 0 0 var(--s-3); padding-left: var(--s-5); list-style: decimal; max-width: var(--measure); color: var(--text-2); }
.doc-steps li { padding-left: var(--s-1); }
.doc-steps b { color: var(--text); }
.doc-steps code, .doc-template { font-family: inherit; font-weight: 700; }
.doc-steps code { white-space: nowrap; }
.doc-template { margin: 0 0 var(--s-3); padding: var(--s-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-card); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-weight: 500; font-size: var(--fs-cell); line-height: 1.55; }
.doc-path-lead { margin: 0 0 var(--s-3); max-width: var(--measure); color: var(--text-2); }
.doc-path-lead b { color: var(--text); }
.doc-path { display: flex; flex-direction: column; margin: 0 0 var(--s-3); padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.doc-path-row { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3); border-bottom: 1px solid var(--line); }
.doc-path-row:last-child { border-bottom: 0; }
.doc-path-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
.doc-path-n { color: var(--text); }
.doc-path-row .caption { max-width: var(--measure); }

@media (max-width: 719px) {
  .doc-line { flex-direction: column; }
  .doc-line-acts { justify-content: flex-start; }
}
.doc-rec .doc-why-p { display: none; }
@media (max-width: 719px) {
  .doc-mode { display: none; }
  .doc-rec .doc-why-w { display: none; }
  .doc-rec .doc-why-p { display: inline; }
}

/* ── Briefings (M18): the card, the form that files one, the sheet that approves one ───────────────────────────────── */
.doc-gen { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); min-width: 0; }
.doc-status.is-approved { color: var(--text); font-weight: 700; }
.doc-status .i { margin-right: 4px; }
.doc-strike .doc-line-who .chip { margin-left: var(--s-1); }
.doc-why { color: var(--text-2); }
.doc-made .i { margin-right: 4px; }
.doc-bullets { margin: 0; padding-left: var(--s-4); list-style: disc; max-width: var(--measure); color: var(--text-2); }
.doc-bullets li + li { margin-top: var(--s-1); }

.doc-form { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.doc-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.doc-strikes { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); min-width: 0; margin: 0; padding: 0; border: 0; }
.doc-strikes > legend { padding: 0; margin-bottom: var(--s-1); }
.doc-strike-in { display: flex; flex-direction: column; gap: var(--s-2); width: 100%; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.doc-pick { display: flex; flex-direction: column; gap: var(--s-2); margin: 0 0 var(--s-3); padding: 0; list-style: none; }
.doc-would { margin: 0; padding-left: var(--s-4); list-style: disc; color: var(--text); }
.doc-would li + li { margin-top: 2px; }
@media (max-width: 599px) { .doc-form-row { grid-template-columns: minmax(0, 1fr); } }
