/* Diligence: the Memo tab, after the older application's run page and memo (research report 65, section 2), in this
   application's cream and indigo. On the left the run's log (one step a section); on the right the writing view or the
   memo itself. No coloured side-stripes: a chosen step or block is a background fill. */
/* the Memo tab is the older application's project Home: the start, the run page, or the memo-ready page */
.home { height: 100%; overflow: auto; }
.home-in { max-width: 940px; margin: 0 auto; padding: 26px 28px 60px; display: flex; flex-direction: column; gap: 18px; }
.home-intro h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 0; }
.home-intro p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.home-panel { padding: 0 18px; }
.home-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 12px 0; font-size: 13px; align-items: baseline; }
.home-row + .home-row { border-top: 1px solid var(--sep); }
.hr-l { color: var(--muted); }
.hr-c { min-width: 0; display: grid; gap: 6px; justify-items: start; }
.hr-c .input { min-width: 260px; max-width: 100%; }
.home-acts { display: flex; justify-content: flex-end; gap: 8px; }
.home-sec { display: grid; gap: 8px; margin-top: 10px; }
.home-h { font-size: 17px; font-weight: 600; }
.home-s { margin: 0; font-size: 13px; color: var(--muted); }
.ready-card { border: 1px solid var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent) 5%, var(--card)); padding: 20px; display: grid; gap: 14px; }
.ready-card.not-yet { border-color: var(--card-stroke); background: var(--card); }
.rd-top { display: flex; gap: 10px; align-items: flex-start; }
.rd-top > span svg { width: 17px; height: 17px; margin-top: 4px; }
.rd-top h2 { margin: 0; font-size: 19px; font-weight: 600; }
.rd-facts { font-size: 12.5px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.rd-body { padding-left: 27px; display: grid; gap: 10px; }
.rd-quality { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rd-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rd-cap { font-size: 12px; color: var(--muted); }
.rd-needs { font-size: 13px; display: flex; gap: 8px; align-items: baseline; border-top: 1px solid var(--sep); padding-top: 10px; }
.rd-needs .ring { width: 8px; height: 8px; border-radius: 50%; border: 1.2px solid var(--text); flex: none; }
.rd-more { display: flex; gap: 12px; align-items: center; }
.memo-card { padding: 26px; }
.memo-card .mm-head { padding-bottom: 14px; }
.memo-card .mm-title { font-family: var(--sans); font-size: 20px; font-weight: 600; }
.mm-prov { text-align: center; font-size: 11.5px; color: var(--muted); margin: 14px 0 0; }
.log-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.log-row { display: flex; align-items: center; gap: 9px; text-align: left; border: 1px solid var(--card-stroke); background: var(--card); border-radius: 10px; padding: 9px 12px; cursor: pointer; color: var(--text); font: inherit; min-width: 0; }
.log-row:hover { border-color: var(--accent); }
.log-row[disabled] { cursor: default; opacity: .6; }
.log-row .lr-t { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row .lr-s { font-size: 12px; color: var(--muted); white-space: nowrap; }
.log-row .lr-i { width: 13px; height: 13px; color: var(--faint); }
.run-boxes { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.mm-run { height: 100%; }

/* ---------- the steps on the left ---------- */
.mm-steps { border-radius: 12px; padding: 12px 8px; overflow: auto; max-height: 64vh; }
.mm-steps > .lbl { padding: 0 6px; }
.st-list { display: grid; gap: 1px; }
.st-row { display: flex; align-items: center; border-radius: 8px; min-width: 0; }
.st-row:hover { background: rgba(27, 23, 20, .04); }
.st-row.cur { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.st-row.on { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.st-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; border: 0; background: none; text-align: left; padding: 7px 8px; cursor: pointer; color: var(--text); font: inherit; }
.st-mark { width: 16px; height: 16px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; font: 700 10px/1 var(--sans); }
.st-mark svg { width: 10px; height: 10px; stroke-width: 3; }
.st-mark.m-done { background: var(--t-good); color: #fff; }
.st-mark.m-now { border: 4px solid var(--accent); }
:root[data-theme="dark"] .st-mark.m-now { border-color: var(--link); }
.st-mark.m-wait { border: 1.5px solid var(--faint); }
.st-mark.m-skip { border: 1.5px dashed var(--faint); }
.st-mark.m-fail { border: 1.5px solid var(--t-bad); color: var(--t-bad); }
.st-name { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.st-row.cur .st-name { font-weight: 600; }
.st-note { font-size: 12px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-note.acc { color: var(--accent); font-weight: 600; }
:root[data-theme="dark"] .st-note.acc { color: var(--link); }
.st-log { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 6px; border-radius: 6px; display: inline-flex; opacity: 0; }
.st-log svg { width: 13px; height: 13px; }
.st-row:hover .st-log, .st-log:focus-visible { opacity: 1; }
.st-log:hover { color: var(--link); background: var(--hover); }
.mm-steps .act-link { padding: 6px; margin-top: 4px; }

/* ---------- the writing view ---------- */
.mm-run { overflow: auto; min-height: 0; }
.mm-run-in { max-width: 1480px; padding: 22px 32px 40px; display: grid; gap: 14px; }
.run-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.run-title h1 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-progress { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--soft); }
.run-progress .pbar { width: 220px; height: 5px; border-radius: 3px; background: var(--chip); overflow: hidden; flex: none; }
.run-progress .pbar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }
.run-calm { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
.step-card { background: var(--card); border: 1px solid var(--card-stroke); border-radius: 12px; padding: 18px 20px; min-height: 470px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.sc-head { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--sep); }
.sc-title { font-size: 16px; font-weight: 600; }
.sc-prog { font-size: 13px; color: var(--muted); }
.sc-log { flex: 1; min-height: 0; max-height: 52vh; overflow: auto; }
.sc-row { display: grid; grid-template-columns: 40px 110px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--sep); align-items: baseline; }
/* only a line that has just arrived comes in softly: the card is drawn again every two seconds, and lines already shown
   must not fade in again (4 December 2026: every line flickered at each redraw) */
.sc-row.new { animation: rowin .25s ease-out; }
@keyframes rowin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sc-t { font-size: 12px; color: var(--faint); }
.sc-topic { font-size: 12px; font-weight: 600; color: var(--soft); }
.sc-text { font-size: 13px; overflow-wrap: anywhere; }
.sc-row.t-grey .sc-text { color: var(--muted); }
.sc-row.t-warn .sc-text { color: var(--t-warn); }
.sc-empty { color: var(--muted); font-size: 13px; padding: 24px 0; }
.sc-done { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--sep); font-size: 13.5px; }
.sc-done.warn { color: var(--t-warn); font-size: 13px; }
.sc-done svg { width: 15px; height: 15px; }
.ready { display: grid; gap: 10px; margin-top: 6px; }
.ready-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ready-card { background: var(--card); border: 1px solid var(--card-stroke); border-radius: 10px; padding: 12px 14px; display: grid; gap: 3px; min-height: 72px; justify-items: start; }
.ready-card .rc-t { font-size: 14px; font-weight: 600; }
.ready-card .rc-s { font-size: 12px; color: var(--muted); }
.ready-card .btn { margin-top: 4px; }

/* ---------- the memo ---------- */
.mm-doc { min-width: 0; overflow: auto; background: var(--bg); }
.mm-head { display: grid; gap: 6px; padding-bottom: 18px; }
.mm-title { font-family: var(--serif); font-size: 30px; line-height: 1.15; }
.mm-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.mm-meta svg { width: 14px; height: 14px; }
/* who the memo is for, as the person typed it: one quiet line under the title */
.mm-for { font-size: 13px; color: var(--soft); display: flex; gap: 8px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.mm-for .lbl { flex: none; }
/* the plan's list: an appendix section keeps its letter */
.mm-list li.appx::marker { content: attr(data-label) ". "; }
.mm-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.mm-measured { font-size: 11.5px; color: var(--faint); }
.mm-pick { font: inherit; font-size: 12.5px; padding: 4px 6px; border: 1px solid var(--rule); border-radius: 7px; background: var(--input); color: var(--text); max-width: 220px; }
.mm-sec { display: flex; flex-direction: column; gap: 10px; padding: 18px 0; border-top: 1px solid var(--sep); scroll-margin-top: 12px; }
.mm-sh { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.mm-sh .mm-n { font-size: 15px; color: var(--faint); font-variant-numeric: tabular-nums; }
.mm-sh h2 { font-size: 17px; font-weight: 600; margin: 0; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.mm-ver { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.mm-ver svg { width: 12px; height: 12px; }
.mm-ver.acc { color: var(--accent); }
.mm-ver .dot-s { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; }
.mm-line { margin: 0; font-size: 12.5px; color: var(--soft); }
.mm-line.muted { color: var(--muted); }
/* the checking pass (FOR-THE-APP.md 11): what the second look did, one short line under the title; a statement the
   check could not settle says so in the text flow, plainly (no stripe, no band, no icon) */
.mm-second { flex-wrap: wrap; overflow-wrap: anywhere; }
.mm-checkline b { font-weight: 600; color: var(--soft); }
.mm-unsettled { font-size: 13px; font-style: normal; color: var(--muted); overflow-wrap: anywhere; }
.mm-unsettled::before { content: " "; }
.mm-unsettled-l { font-weight: 600; color: var(--soft); }
td .mm-unsettled { display: block; font-size: 12px; margin-top: 2px; }
.mm-b { border-radius: 6px; padding: 2px 6px; margin: 0 -6px; }
.mm-b.on { background: var(--sel); color: var(--sel-text); }
.mm-b .mm-text { margin: 0; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; cursor: default; }
.mm-b h3.mm-text { font-size: 14.5px; font-weight: 600; margin-top: 4px; }
.mm-b.k-analyst_view .mm-text { font-style: italic; }
/* an absence (what the documents do not contain): a labelled note apart from the body's claims (report 74, finding 1),
   a light fill and a thin border all round, never a side-stripe */
.mm-b.k-absence { margin: 2px 0; padding: 7px 10px; border: 1px solid var(--card-stroke); border-radius: 8px; background: var(--chip); }
.mm-b.k-absence.on { background: var(--sel); }
.mm-b.k-absence .mm-text { font-size: 13.5px; line-height: 1.5; color: var(--soft); }
.mm-lab { margin-right: 6px; font-style: normal; font-size: 11.5px; font-weight: 600; }
.mm-lab.av { color: var(--link); letter-spacing: .02em; }
.mm-lab.lab-absence, .mm-lab.lab-request { color: var(--soft); letter-spacing: .02em; }
/* the working behind a statement (docs\MEMO.md, 9o): a quiet line under it, closed by default; opened, the steps in
   small type, each on its own line, a light fill all round (no stripe, no band) */
.mm-how { margin: 0 0 2px; font-size: 12px; color: var(--muted); }
.mm-how > summary { cursor: pointer; width: max-content; max-width: 100%; color: var(--faint); list-style-position: inside; }
.mm-how > summary:hover, .mm-how[open] > summary { color: var(--muted); }
.mm-how-b { display: grid; gap: 3px; margin: 4px 0 6px; padding: 7px 10px; border-radius: 8px; background: var(--chip); color: var(--soft);
  font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.mm-how-k { font-weight: 600; color: var(--muted); }
.mm-how-l.gap .mm-how-k { color: var(--t-warn); }
td .mm-how { margin-top: 3px; }
/* a run of requests: a numbered list of its own, set apart from the numbered items around it */
ol.mm-ul.mm-req { margin-top: 4px; }

/* the source viewer's calculation (viewer.js): what was worked out beside what was stated (report 74, finding 2) */
.sv-calc { margin: 24px auto; width: min(760px, calc(100% - 40px)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-content: start; }
.sv-calc-box { background: var(--card); border: 1px solid var(--card-stroke); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.sv-calc-box.warn { background: var(--t-warn-bg); }
.sv-calc-line { font: 13.5px/1.5 var(--mono); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sv-calc-stated { font: 15px/1.5 var(--serif); overflow-wrap: anywhere; }
@media (max-width: 720px) { .sv-calc { grid-template-columns: minmax(0, 1fr); } }
/* a mark in a block's text naming a fact the block does not name: kept where it stands, flagged, never a source */
.cite-stray { font: 600 max(9px, .74em)/1 var(--mono); color: var(--t-warn); background: var(--t-warn-bg); border-radius: 4px; padding: 2px .3em;
  margin: 0 .12em 0 .16em; vertical-align: .18em; text-decoration: underline dotted; text-underline-offset: 2px; font-style: normal; cursor: help; }
.mm-ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.mm-ul > li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; align-items: baseline; }
ul.mm-ul > li::before { content: "•"; color: var(--accent); font-weight: 700; text-align: center; }
ol.mm-ul { counter-reset: mmn; }
ol.mm-ul > li { counter-increment: mmn; }
ol.mm-ul > li::before { content: counter(mmn) "."; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.mm-ul li .mm-b { margin: 0; }
.mm-tools { display: flex; gap: 14px; font-size: 12px; padding: 2px 0 4px; }
.mm-tools .danger { color: var(--t-bad); }
.mm-edit { display: grid; gap: 6px; }
.mm-edit textarea { font: inherit; font-size: 14px; line-height: 1.5; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--input); color: var(--text); width: 100%; box-sizing: border-box; resize: vertical; }
.mm-edit-acts { display: flex; gap: 8px; align-items: center; }
.mm-in .md-table { margin: 4px 0; }
.mm-tbl { table-layout: fixed; width: 100%; min-width: 0; border-collapse: collapse; font-size: 13px; }
.mm-tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 7px 10px; border-bottom: 1px solid var(--sep); }
.mm-tbl td { padding: 7px 10px; border-top: 1px solid var(--sep); overflow-wrap: anywhere; vertical-align: top; font-variant-numeric: tabular-nums; }
.mm-row { cursor: pointer; }
.mm-row.on td { background: var(--sel); color: var(--sel-text); }
.mm-nf { display: grid; gap: 4px; margin-top: 4px; }
.mm-nf .nf { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.mm-nf .nf-ic svg { width: 14px; height: 14px; color: var(--t-warn); margin-top: 2px; }
.mm-nf .nf-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mm-secacts { display: flex; gap: 16px; font-size: 12px; flex-wrap: wrap; align-items: baseline; color: var(--muted); }
.mm-secacts details { font-size: 12px; }
.mm-secacts summary { cursor: pointer; color: var(--muted); }
.mm-refs { margin: 0; padding-left: 22px; font-size: 13px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.mm-sources summary { cursor: pointer; font-size: 13px; font-weight: 600; margin-top: 8px; }
.mm-srclist { margin-top: 8px; background: var(--card); border: 1px solid var(--card-stroke); border-radius: 10px; overflow: hidden; }
.mm-open { width: min(900px, 92vw); height: min(760px, calc(100vh - 48px)); }
.mm-open-in { padding: 18px 26px 30px; max-width: none; gap: 10px; }
.mm-before .mm-secs { margin-top: 10px; }
.mm-before .mm-list { margin: 8px 0 0; padding-left: 22px; text-align: left; display: grid; gap: 3px; font-size: 13px; color: var(--soft); }
.mm-include { display: grid; gap: 6px; max-height: 38vh; overflow: auto; }
.mm-inc { align-items: flex-start; font-size: 13px; }
.mm-inc.sub { margin-left: 22px; }
.mm-inc.disabled { cursor: default; }
.mm-answers summary { cursor: pointer; list-style: none; }
.mm-answers summary::-webkit-details-marker { display: none; }
.mm-problem { margin: 4px 0; }

@media (max-width: 1320px) {
  .run-boxes { grid-template-columns: 260px minmax(0, 1fr); }
  .mm-run-in { padding: 20px 24px 36px; }
}
.mm-secacts .linkish { color: var(--muted); text-decoration: none; }
.mm-secacts .linkish:hover, .mm-secacts .linkish:focus-visible { color: var(--link); text-decoration: underline; }
.rd-top > .good-w svg { color: var(--t-good); }
.rd-more .btn.link { padding-left: 0; }

/* the start page's choice of the second check (2 Dec 2026): two plain options, each with its cost in one line */
.mm-choice { gap: 4px; }
.mm-opt { display: flex; gap: 8px; align-items: baseline; font-size: 13px; cursor: pointer; overflow-wrap: anywhere; }
.mm-opt input { margin: 0; flex: none; position: relative; top: 1px; }
.mm-opt b { font-weight: 600; }
.mm-quick .linkish { margin-left: 6px; }

/* how the memo thinks (2 Dec 2026): the row on the start page, and the principles in the dialog */
.mm-pline { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.mm-puse { margin: 2px 0 4px; font-size: 13px; }
.mm-ptext { font: 13px/1.55 var(--sans); min-height: 260px; resize: vertical; }
.mm-pfoot { display: flex; align-items: center; gap: 10px; margin-top: -4px; }

/* the statements that need a look (2 Dec 2026): one quiet line under the title that opens a short list; each row says
   where and what is open, and jumps there. No stripe, no band: rows are separated by thin rules */
.mm-look { font-size: 12.5px; }
.mm-look > summary { cursor: pointer; width: max-content; max-width: 100%; font-weight: 600; }
.mm-look-list { margin-top: 6px; border: 1px solid var(--card-stroke); border-radius: 10px; background: var(--card); max-height: 40vh; overflow: auto; }
.mm-look-row { display: flex; align-items: baseline; gap: 12px; padding: 7px 12px; min-width: 0; }
.mm-look-row + .mm-look-row { border-top: 1px solid var(--sep); }
.mm-look-go { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; border: 0; background: none; padding: 0; color: var(--text); font: inherit; cursor: pointer; }
.mm-look-go:hover .mm-look-what, .mm-look-go:focus-visible .mm-look-what { color: var(--link); }
.mm-look-where { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-look-what { font-size: 12.5px; color: var(--soft); overflow-wrap: anywhere; }
.mm-look-what b { font-weight: 600; }
.mm-look-settle { flex: none; font-size: 12px; white-space: nowrap; }
tr.mm-row-tools td, tr.mm-row-edit td { border-top: 0; padding-top: 0; }
td > .mm-lab { margin-left: 6px; }   /* a label after a cell's last words ("edited", "Settled by the reader") */

/* a check's quiet mark beside a block's text (30 Nov 2026): it opens its reason; the text stays the model's */
.mm-check { font: 600 max(10px, .8em)/1 var(--mono); color: var(--t-warn); background: none; border: 0; padding: 0 .2em; cursor: pointer; vertical-align: super; }
.mm-check:hover, .mm-check:focus-visible { background: var(--t-warn-bg); border-radius: 3px; }

