/* Sentinel v2 - report.css
   Report: decision strip, serif memo, outline + scroll-spy, copy summary, print.
   Owned by the 'report' area of the v2 redesign; tokens come from v2/tokens.css (old names are aliased there, so
   every colour below is a token: no literal hex, and every theme gets its own hero).

   Loaded after styles.css: rules here are scoped under `.rpt` so they win over the legacy Report rules without
   !important. Motion follows the v2 rules: one count-up on arrival (an @property integer in ::after, the real value
   in a screen-reader span, never written per frame), productive fades on the menu, nothing loops, the memo body
   never moves. */

/* ---- the page and the reading column ------------------------------------ */
.report-layout.rpt {
  --rpt-brand: var(--brand, var(--accent-ink));
  /* the text ON the brand fill (tokens.css `--on-brand`); `--brand-ink` is the brand AS text - on the Export button
     it painted the label in the fill's own colour, an empty blue pill */
  --rpt-brand-ink: var(--on-brand, var(--text-inverse));
  --rpt-e1: 0 1px 2px color-mix(in srgb, var(--text-primary) 8%, transparent);
  --rpt-e2: 0 8px 22px -14px color-mix(in srgb, var(--text-primary) 38%, transparent);
  --rpt-e3: 0 14px 34px -16px color-mix(in srgb, var(--text-primary) 42%, transparent);
  --rpt-ease: cubic-bezier(.22, 1, .36, 1);
  max-width: 820px;
  padding: 24px 28px 88px;
  counter-reset: memo-sec;
}
.rpt .rpt-outline { display: none; }

/* ---- the hero: a verdict, one sentence, a decision strip (<= 320 px) ---- */
.rpt .rpt-hero {
  --hero-tone: var(--severity-medium);
  position: relative;
  padding: 16px 20px 12px 22px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--hero-tone);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hero-tone) 7%, var(--bg-doc)) 0%, var(--bg-doc) 72%);
  color: var(--text-primary);
  box-shadow: var(--rpt-e1);
  overflow: visible;
}
.rpt .rpt-hero.risk-severe { --hero-tone: var(--severity-critical); }
.rpt .rpt-hero.risk-high   { --hero-tone: var(--severity-high); }
.rpt .rpt-hero.risk-medium { --hero-tone: var(--severity-medium); }
.rpt .rpt-hero.risk-low,
.rpt .rpt-hero.risk-clear  { --hero-tone: var(--severity-success); }
.rpt .rpt-hero.risk-none   { --hero-tone: var(--text-muted); }
.rpt .rpt-hero-top {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.rpt .rpt-eyebrow { color: var(--rpt-brand); font-weight: 700; opacity: 1; }
.rpt .rpt-doc {
  color: var(--text-muted); opacity: 1; text-transform: none; letter-spacing: 0;
  font-size: 12.5px; font-weight: 500; min-width: 0; overflow-wrap: anywhere;
}
.rpt .rpt-hero-advice { margin: 2px 0 8px; font-size: 11.5px; line-height: 16px; color: var(--text-muted); opacity: 1; }
.rpt .rpt-hero-grid { display: block; }
.rpt .rpt-hero-verdict { min-width: 0; }
.rpt .rpt-hero-verdict h1 {
  margin: 0 0 4px; font-family: var(--font-doc); font-size: 28px; line-height: 36px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--text-primary); text-wrap: balance;
}
.rpt .rpt-hero-verdict p { color: var(--text-secondary); opacity: 1; max-width: 72ch; }
.rpt .rpt-hero-line { margin: 0; font-size: 14.5px; line-height: 22px; color: var(--text-secondary); }
.rpt .rhl-k { color: var(--text-primary); font-weight: 600; }
.rpt .rhl-t { color: var(--text-primary); }
.rpt .rhl-w { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); white-space: normal; }
.rpt .rpt-hero-more { margin: 2px 0 0; }
.rpt .rpt-hero-more > summary {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none;
  font-size: 12.5px; font-weight: 550; color: var(--rpt-brand); border-radius: 4px;
}
.rpt .rpt-hero-more > summary::-webkit-details-marker { display: none; }
.rpt .rpt-hero-more > summary::after {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 160ms var(--rpt-ease);
}
.rpt .rpt-hero-more[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.rpt .rpt-hero-more p { margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-secondary); max-width: 72ch; }
.rpt .rpt-hero-count { opacity: 1; }

/* the decision strip: What needs fixing's groups, counted - each a jump to its group */
.rpt .rpt-decide {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin: 12px 0 0;
}
.rpt .rds-item {
  --tone: var(--severity-critical);
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0;
  padding: 8px 12px 9px; border-radius: 10px; cursor: pointer; text-align: left;
  border: 1px solid color-mix(in srgb, var(--tone) 26%, var(--border-subtle));
  background: color-mix(in srgb, var(--tone) 9%, var(--bg-doc));
  color: var(--text-primary); font-family: var(--font-ui);
  transition: border-color 120ms var(--rpt-ease), background-color 120ms var(--rpt-ease), transform 16ms;
}
.rpt .rds-item.is-later { --tone: var(--severity-medium); }
.rpt .rds-item.is-monitor { --tone: var(--severity-low); }
.rpt .rds-item.is-not_yet_in_force { --tone: var(--text-muted); }
.rpt .rds-item:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--tone) 55%, var(--border-subtle));
  background: color-mix(in srgb, var(--tone) 14%, var(--bg-doc));
}
.rpt .rds-item:active:not(:disabled) { transform: translateY(1px); }
.rpt .rds-item:focus-visible { outline: 2px solid var(--rpt-brand); outline-offset: 2px; }
.rpt .rds-item:disabled { cursor: default; opacity: .6; }
.rpt .rds-l { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-secondary); }
@property --rds-v { syntax: "<integer>"; inherits: false; initial-value: 0; }
.rpt .rds-n {
  --rds-v: var(--n);
  counter-reset: rds var(--rds-v);
  font-size: 22px; line-height: 26px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--tone) 70%, var(--text-primary));
}
.rpt .rds-n::after { content: counter(rds); }
.rpt .rds-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rpt .rds-n { animation: rdsCount 560ms var(--rpt-ease, ease-out) both; }
@keyframes rdsCount { from { --rds-v: 0; } to { --rds-v: var(--n); } }

/* the counts strip (glyph, number, label) and the facts row, on one line */
.rpt .rpt-hero-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-subtle);
}
/* THE SEVERITY LEGEND: glyph, count, word - "◆ 1 Critical · ▲ 3 High · ● 3 Medium · ○ 3 Low", the way the Findings
   filter and the contract header write a level (glyph first, colour second, the count in the ink). The label stays
   before the number in the markup (both files print it so); the number is drawn first by `order`. The count is never
   a white digit in a filled square: shell.css's unscoped `.sev-critical > b` paints every such <b> with the severity
   colour, so the reset below names background and colour outright. */
.rpt .rpt-hero-stats, .app:not(.dx) .rpt .rpt-hero-stats {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; width: auto; flex: 0 1 auto;
}
.rpt .rpt-tile, .app:not(.dx) .rpt .rpt-tile {
  display: inline-flex; flex-direction: row; align-items: baseline; gap: 5px;
  min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; backdrop-filter: none;
  white-space: nowrap;
}
.rpt .rpt-tile b {
  order: -1; display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; height: auto; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  font-size: 14px; line-height: 20px; font-weight: 650; color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.rpt .rpt-tile span {
  margin: 0; font-size: 12.5px; line-height: 20px; text-transform: none; letter-spacing: 0;
  color: var(--text-secondary); opacity: 1;
}
/* THE SEPARATORS SIT IN AN 18px GUTTER on each item's left, and the strip is pulled 18px out of the row, which clips:
   the "·" shows between two items on a line and is cut away from an item that starts one (a phone wraps "10 Total"
   under the levels - it must not open with a dot). The facts row below does the same. */
.rpt .rpt-hero-row { overflow: hidden; }
.rpt .rpt-hero-stats, .app:not(.dx) .rpt .rpt-hero-stats { margin-left: -18px; }
.rpt .rpt-tile, .app:not(.dx) .rpt .rpt-tile { position: relative; padding-left: 18px; }
.rpt .rpt-tile::before, .rpt .rpt-hero-facts .rhf::before {
  content: "·"; position: absolute; left: 7px; top: 0; color: var(--text-muted); font-size: 13px; line-height: 20px;
}
.rpt .rpt-tile.sev-critical b::before, .rpt .rpt-tile.sev-high b::before,
.rpt .rpt-tile.sev-medium b::before, .rpt .rpt-tile.sev-low b::before {
  display: inline-block; font-size: 11px; font-weight: 400; line-height: 1; transform: translateY(-1px);
}
.rpt .rpt-tile.sev-critical b::before { content: "◆"; color: var(--severity-critical); }
.rpt .rpt-tile.sev-high b::before { content: "▲"; color: var(--severity-high); }
.rpt .rpt-tile.sev-medium b::before { content: "●"; color: var(--severity-medium); }
.rpt .rpt-tile.sev-low b::before { content: "○"; color: var(--severity-low); }
.rpt .rpt-tile.hot, .rpt .rpt-tile.hot b { background: none; border-color: transparent; }
/* a level with nothing in it is still printed (the files' strip has all four columns) but reads quieter */
.rpt .rpt-tile.is-zero b, .rpt .rpt-tile.is-zero span, .rpt .rpt-tile.is-zero b::before { color: var(--text-muted); font-weight: 500; }
.rpt .rpt-hero-facts {
  flex: 1 1 auto; justify-content: flex-end; margin: 0 0 0 -18px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0;
  font-size: 12.5px; line-height: 20px; color: var(--text-secondary);
}
.rpt .rpt-hero-facts .rhf { position: relative; padding-left: 18px; }
.rpt .rpt-hero-facts .rhf:first-child::before { content: none; }
.rpt .rhf-sep { color: var(--text-muted); padding: 0 6px; }
.rpt .rhf-k { color: var(--text-muted); }
.rpt .rhf-v { color: var(--text-primary); font-weight: 550; }
.rpt .rhf.is-state .rhf-v { color: var(--text-muted); font-weight: 400; font-style: italic; }
.rpt .rpt-hero-note { margin: 8px 0 0; font-size: 12px; color: var(--text-muted); opacity: 1; }
/* what the review did not assess or price: said once, quietly (it was two tiles that held no figure) */
.rpt .rpt-hero-states { display: flex; flex-wrap: wrap; align-items: baseline; margin: 6px 0 0; font-size: 12.5px; line-height: 20px; color: var(--text-muted); }

/* the document type, on the page's surfaces now (it was white on the old gradient) */
.rpt .rpt-doctype { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-subtle); gap: 6px 12px; }
.rpt .rpt-dt-k { color: var(--text-muted); opacity: 1; font-size: 11px; }
.rpt .rpt-dt-v { font-size: 13.5px; color: var(--text-primary); }
.rpt .rpt-dt-conf, .rpt .rpt-dt-src {
  font-size: 11px; background: var(--bg-sunken); border: 1px solid var(--border-subtle); color: var(--text-secondary);
}
.rpt .rpt-dt-conf.is-low { opacity: 1; }
.rpt .rpt-dt-conf.is-high { background: var(--bg-sunken); color: var(--text-primary); }
.rpt .rpt-dt-note { color: var(--text-secondary); opacity: 1; }
.rpt .rpt-dt-ctl select {
  height: 30px; border: 1px solid var(--border-subtle); background: var(--bg-doc); color: var(--text-primary);
}
.rpt .rpt-dt-ctl .rpt-tool { background: var(--bg-doc); border-color: var(--border-subtle); color: var(--text-secondary); }
.rpt .rpt-dt-ctl .rpt-tool:hover:not(:disabled) { background: var(--bg-sunken); color: var(--text-primary); }

/* ---- the memorandum: serif, <= 72ch, numbered sections ----------------- */
.rpt .memo-block > h3,
.rpt .memo-steps-head h3,
.rpt .memo-group-h {
  font-family: var(--font-doc); font-size: 20px; line-height: 28px; font-weight: 600;
  letter-spacing: -0.005em; text-transform: none; color: var(--text-primary);
}
.rpt .memo-block > h3::before,
.rpt .memo-steps-head h3::before {
  counter-increment: memo-sec; content: counter(memo-sec) ".";
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--text-muted);
  margin-right: 10px; letter-spacing: 0;
}
.rpt .memo-group-h { font-size: 17px; line-height: 24px; flex-wrap: wrap; }
.rpt .memo-group-h > span { font-family: var(--font-ui); font-size: 12.5px; line-height: 18px; font-weight: 400; color: var(--text-muted); }
.rpt .memo-prose,
.rpt .rc-block p,
.rpt .rc-tl-text {
  font-family: var(--font-doc); font-size: 15.5px; line-height: 1.62; color: var(--text-primary); max-width: 72ch;
}
.rpt .rc-block.rc-example p { color: var(--text-secondary); }
.rpt .rc-quote blockquote { font-size: 15px; line-height: 1.6; max-width: 72ch; }
.rpt .memo-sub { max-width: 72ch; }
.rpt .memo-made { color: var(--text-muted); white-space: nowrap; }
/* the Term cell is one wrapping line of two items; each item carries its separator in a 14px gutter on its left, and
   the line is pulled 14px out of a clipping cell - so the "·" shows between the range and "made" on one line and is
   cut away when "made" wraps to the start of the next (never a line that opens with a dot) */
.rpt .memo-term-dd { overflow: hidden; }
.rpt .memo-term-line { display: flex; flex-wrap: wrap; align-items: baseline; margin-left: -14px; }
.rpt .memo-term-line > * { position: relative; padding-left: 14px; min-width: 0; }
.rpt .memo-term-line > .memo-made::before { content: "·"; position: absolute; left: 4px; top: 0; }
/* a date never breaks inside itself ("1 March / 2026"); a range breaks only at its dash */
.rpt .rpt-date { white-space: nowrap; }
.rpt .rpt-time { white-space: nowrap; }

/* What needs fixing: the risk's one number, and its level as a glyph */
.rpt .msg-list .ms-n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink-3); } /* was the faint ink: 3.2:1 */

/* ---- the lens bar: opaque, inside the column, one row when pinned ------- */
.rpt .rpt-controls,
.app:not(.dx) .rpt .rpt-controls {
  margin: 22px 0 14px; padding: 10px 12px;
  background: var(--bg-app);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 1px solid var(--border-subtle); border-radius: 12px;
}
.rpt .rpt-controls.is-pinned {
  padding-top: 8px; padding-bottom: 8px;
  border-top-left-radius: 0; border-top-right-radius: 0; border-top-color: transparent;
  box-shadow: var(--rpt-e2);
}
.rpt .rpt-controls-inner { gap: 8px; }
.rpt .rpt-controls-top .rpt-control-tools { margin-left: 0; flex: 1 1 auto; justify-content: flex-start; }
.rpt .rpt-controls-top .rpt-chips-sub { padding-left: 10px; }
.rpt .rpt-filter-row { gap: 8px 10px; flex-wrap: wrap; min-width: 0; }
/* the reading level and the exports are one cluster at the row's end: when the row does not fit (long Russian
   labels), the cluster moves under the chips as a whole - the Export button never wraps away on its own */
.rpt .rpt-filter-row > .rpt-chips { flex: 0 1 auto; min-width: 0; flex-wrap: wrap; }
.rpt .rpt-filter-row .rpt-chip { flex: none; padding: 0 9px; }
.rpt .rpt-filter-row .rpt-count { flex: none; }
.rpt .rpt-filter-row .rpt-langmode, .rpt .rpt-filter-row .rpt-export { flex: none; }
.rpt .rpt-lm { padding: 0 9px; }
.rpt .rpt-filter-row .rpt-count { margin-left: 0; }
.rpt .rpt-lens-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.rpt .rpt-chip { height: 28px; }
.rpt .rpt-chip.is-on { border-color: var(--rpt-brand); color: var(--rpt-brand); background: color-mix(in srgb, var(--rpt-brand) 9%, transparent); }
.rpt .rpt-chip.is-on .rpt-chip-n { color: var(--rpt-brand); }
.rpt .rpt-export { position: relative; }
.rpt .rpt-export-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--rpt-brand); border-color: transparent; color: var(--rpt-brand-ink);
}
.rpt .rpt-export-btn:hover { background: color-mix(in srgb, var(--rpt-brand) 86%, var(--text-primary)); color: var(--rpt-brand-ink); }

/* ---- the finding card: title, hook, one meta row; actions at the foot --- */
.rpt .rpt-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px 16px; }
.rpt .rc-num {
  width: auto; min-width: 26px; padding: 0 6px; font-family: var(--font-mono); font-size: 12px;
}
.rpt .rc-titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rpt .rc-title { font-family: var(--font-doc); font-size: 16.5px; line-height: 23px; font-weight: 600; color: var(--text-primary); }
.rpt .rc-oneliner { font-size: 13.5px; line-height: 20px; color: var(--text-secondary); }
.rpt .rc-pills {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px;
  max-width: none; width: auto; padding: 4px 0 0; flex: none;
}
.rpt .rc-pill { font-size: 11.5px; min-height: 22px; padding: 1px 9px; white-space: nowrap; overflow: visible; text-overflow: clip; max-width: 100%; }
.rpt .rc-pill.rc-who { max-width: 100%; white-space: normal; }
.rpt .rc-who .rcp-v { overflow: visible; text-overflow: clip; }
.rpt .rc-glyph { margin-right: 2px; font-size: 10px; }
.rpt .rc-conf { background: var(--bg-sunken); color: var(--text-secondary); }
.rpt .rc-conf.is-sure { background: color-mix(in srgb, var(--severity-success) 12%, transparent); color: var(--severity-success); }
.rpt .rc-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-subtle);
}
.rpt .rc-act, .rpt .rc-cite {
  height: 30px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 550;
  border: 1px solid var(--border-subtle); background: var(--bg-doc); color: var(--text-primary);
  transition: background-color 120ms var(--rpt-ease), border-color 120ms var(--rpt-ease);
}
.rpt .rc-act-play { border-color: color-mix(in srgb, var(--rpt-brand) 40%, var(--border-subtle)); color: var(--rpt-brand); }
.rpt .rc-act:hover, .rpt .rc-cite:hover { background: var(--bg-sunken); }
.rpt .rc-act-k { margin-left: 6px; font-size: 12px; color: var(--text-muted); }
.rpt .rc-cite { height: 26px; padding: 0 9px; font-family: var(--font-mono); font-size: 12px; border-radius: 6px; }

/* ---- >= 1280: the sticky outline beside a <= 72ch memo ----------------- */
@media (min-width: 1280px) {
  .report-layout.rpt {
    max-width: 1080px;
    display: grid; grid-template-columns: 208px minmax(0, 1fr); column-gap: 40px; align-items: start;
  }
  .report-layout.rpt > * { grid-column: 2; min-width: 0; }
  .rpt .rpt-outline {
    display: flex; flex-direction: column; gap: 1px;
    grid-column: 1; grid-row: 1 / span 40; align-self: start;
    position: sticky; top: 16px; max-height: calc(100vh - 140px); overflow: auto;
    padding: 4px 0 8px 14px; font-family: var(--font-ui);
  }
  .rpt .rpt-jump { display: none; }
}
.rpt .rpt-ol-progress {
  position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px;
  background: var(--border-subtle); overflow: hidden;
}
.rpt .rpt-ol-progress i {
  position: absolute; inset: 0; background: var(--rpt-brand); transform: scaleY(0); transform-origin: top;
}
.rpt .rol-sec {
  display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; cursor: pointer;
  text-align: left; font-size: 13px; font-weight: 600; line-height: 18px; color: var(--text-secondary);
  transition: color 120ms var(--rpt-ease), background-color 120ms var(--rpt-ease);
}
.rpt .rol-sec:hover { color: var(--text-primary); background: var(--bg-sunken); }
.rpt .rol-sec.is-current { color: var(--rpt-brand); }
.rpt .rol-rows { list-style: none; margin: 0 0 4px; padding: 0 0 0 6px; display: flex; flex-direction: column; }
.rpt .rol-row {
  display: grid; grid-template-columns: 12px 20px minmax(0, 1fr); align-items: baseline; gap: 4px; width: 100%;
  padding: 4px 6px; border: 0; border-radius: 6px; background: none; cursor: pointer; text-align: left;
  font-size: 12.5px; line-height: 17px; color: var(--text-secondary);
}
.rpt .rol-row:hover { background: var(--bg-sunken); color: var(--text-primary); }
.rpt .rol-g { font-size: 9px; color: var(--text-muted); }
.rpt .rol-row.sev-critical .rol-g { color: var(--severity-critical); }
.rpt .rol-row.sev-high .rol-g { color: var(--severity-high); }
.rpt .rol-row.sev-medium .rol-g { color: var(--severity-medium); }
.rpt .rol-row.sev-low .rol-g { color: var(--severity-low); }
.rpt .rol-n { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); }
.rpt .rol-t { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rpt .rpt-outline :focus-visible { outline: 2px solid var(--rpt-brand); outline-offset: 1px; }

/* ---- phones ------------------------------------------------------------- */
@media (max-width: 720px) {
  .report-layout.rpt { padding: 14px 16px 64px; }
  .rpt .rpt-controls, .app:not(.dx) .rpt .rpt-controls { margin-left: 0; margin-right: 0; padding: 8px 10px; }
  .rpt .rpt-hero { padding: 14px 14px 10px 16px; }
  .rpt .rpt-hero-verdict h1 { font-size: 22px; line-height: 30px; }
  .rpt .rpt-decide { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
  .rpt .rds-item { padding: 7px 10px 8px; }
  .rpt .rds-l { font-size: 11.5px; }
  .rpt .rpt-controls.is-pinned .rpt-count { display: none; }
  .rpt .rpt-hero-facts { justify-content: flex-start; }
  .rpt .rpt-card-head { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px; }
  .rpt .rc-pills { padding-left: 0; }
  .rpt .rpt-filter-row { flex-wrap: wrap; }
  .rpt .rpt-filter-row > .rpt-chips { flex: 1 1 100%; }
  .rpt .rpt-lens-tools { margin-left: 0; flex-wrap: wrap; }
  .rpt .rpt-search { max-width: none; }
}

/* ---- structured text (v2/prose.js; the owner, 2026-10-22: "one continuous block of plain text") ----------------------
   A finding's text, the memo's prose and a redline drawn as the structure they carry: paragraphs of about two sentences, a
   quoted clause as a quote under its lead line and § chip, a sub-clause list or a chain of reasons as a list (each item
   keeping its own "(a)"), a fee table as a table with its lines. The words keep the type of the place they are in (the
   card's serif, the hero's small sans, the detail's 14.5 px); these rules space them and draw the outlines. Tokens only.
   Unscoped: the Findings detail (findings.css) and the Report share them. */
.pz { min-width: 0; }
.pz > * { margin: 0; }
.pz > * + * { margin-top: 10px; }
.pz > .pz-lead { margin-top: 16px; }
.pz > .pz-lead:first-child { margin-top: 0; }
.pz > .pz-lead + .pz-quote { margin-top: 6px; }
.pz > .pz-quote + *, .pz > .pz-list + *, .pz > .pz-table + * { margin-top: 12px; }
.pz > .pz-in + .pz-list { margin-top: 6px; }
/* the base sheets zero a card paragraph's margin with a stronger selector (styles.css `.rc-block p`), which closed the gap
   between two paragraphs of a card; a paragraph after a paragraph, and one inside a quote, keep theirs */
.pz > p + p { margin-top: 10px; }
.pz .pz-quote > * + p { margin-top: 6px; }
/* the line a quote hangs from - "Under §7.3", "§9.4 says" - in the text's own type, the clause it names as a chip */
.pz .pz-lead { font-weight: 400; font-style: normal; }
.pz-ref {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin: 0 1px; vertical-align: 1px;
  border: 1px solid var(--border-subtle); border-radius: 6px; background: var(--bg-sunken);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; line-height: 1; font-style: normal;
  color: var(--text-primary); white-space: nowrap;
}
button.pz-ref { cursor: pointer; transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease; }
button.pz-ref:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border-subtle)); color: var(--brand);
  background: color-mix(in srgb, var(--brand) 7%, var(--bg-sunken));
}
button.pz-ref:focus-visible { outline: 2px solid var(--focus, var(--brand)); outline-offset: 1px; }
/* the quoted clause: a rule on its left, a quiet ground, its own (smaller) measure */
.pz .pz-quote {
  margin: 0; padding: 9px 14px 10px 15px;
  border-left: 3px solid color-mix(in srgb, var(--brand) 36%, var(--border-subtle));
  border-radius: 0 8px 8px 0; background: var(--bg-sunken); color: var(--text-primary); font-style: normal;
}
.pz .pz-quote.is-lines { padding: 6px 8px 6px 9px; }
.pz-quote > * { margin: 0; }
.pz-quote > * + * { margin-top: 6px; }
.pz-quote > .pz-in + .pz-list { margin-top: 4px; }
.pz .pz-src, .rpt .pz .pz-quote .pz-src { font-family: var(--font-ui); font-size: 11.5px; line-height: 18px; color: var(--text-muted); font-style: normal; }
/* a list inside a timeline step is a list, not more steps (styles.css `.rc-tl li` / `.dd-timeline li` draw the steps) */
.rc-tl .pz-list > li, .dd-timeline .pz-list > li {
  display: list-item; position: static; gap: 0; padding: 0; border: 0; font-size: inherit; line-height: inherit;
}
.rc-tl .pz-list > li::before, .dd-timeline .pz-list > li::before, .dd-timeline .pz-list > li:not(:last-child)::before { content: none; }
.rc-tl .pz-list.is-marked > li, .dd-timeline .pz-list.is-marked > li { display: grid; }
/* lists: a bullet for a chain of reasons, the text's own marker for "(a) … (b) …", aligned in one column */
.pz-list { margin: 0; padding-left: 1.3em; list-style: disc; }
ol.pz-list { list-style: decimal; }
.pz-list > li + li { margin-top: 5px; }
.pz-list > li::marker { color: var(--text-muted); }
.pz-list.is-marked {
  list-style: none; padding-left: 0;
  display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 10px; row-gap: 5px;
}
.pz-list.is-marked > li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; margin: 0; }
@supports not (grid-template-columns: subgrid) {
  .pz-list.is-marked > li { grid-template-columns: 2.8em minmax(0, 1fr); column-gap: 10px; }
}
.pz .pz-mk {
  font-family: var(--font-mono); font-size: .8em; font-weight: 500; font-style: normal; line-height: inherit;
  color: var(--text-muted); white-space: nowrap;
}
.pz .pz-li { min-width: 0; }
.pz .pz-in { font-weight: 500; }
.pz .pz-h { font-weight: 650; color: var(--text-primary); }
/* a table: its lines drawn, its header grounded, an amount set to the right of its column */
.pz-table { max-width: 100%; overflow-x: auto; }
.pz-table table {
  border-collapse: collapse; min-width: min(100%, 440px); font-family: var(--font-ui); font-size: 13px; line-height: 1.45;
  font-style: normal; color: var(--text-primary);
}
.pz-table th, .pz-table td { border: 1px solid var(--border-subtle); padding: 6px 12px; text-align: left; vertical-align: top; }
.pz-table th { background: var(--bg-sunken); font-weight: 600; }
.pz-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-sunken) 45%, transparent); }
.pz-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* contract wording laid out as the contract lays it out: each paragraph under its own number or "(a)", indented by level */
.pz .pz-cp { display: flex; align-items: baseline; gap: 8px; }
.pz .pz-cp > .pz-mk { flex: none; min-width: 2.6em; }
.pz .pz-cp.is-l0 > .pz-mk { color: var(--text-primary); font-weight: 650; }
.pz .pz-cp.is-l1 { padding-left: 1.4em; }
.pz .pz-cp.is-l2 { padding-left: 2.8em; }
.pz .pz-cp.is-l3 { padding-left: 4.2em; }

/* on the Report: the card's serif at its measure, the quote a step smaller, the hero's "More" in its small sans */
.rpt .rc-block .pz, .rpt div.rc-tl-text, .rpt .memo-block .pz {
  font-family: var(--font-doc); font-size: 15.5px; line-height: 1.62; color: var(--text-primary); max-width: 72ch;
}
.rpt .rc-block .pz-quote p, .rpt .rc-block .pz-quote li, .rpt .memo-block .pz-quote p { font-size: 14.5px; line-height: 1.58; }
/* the overview sits under its heading as its one paragraph did (`.memo-prose`'s 6 px) */
.rpt .memo-block > .pz { margin-top: 6px; }
.rpt .rc-block.rc-example .pz { color: var(--text-secondary); font-style: italic; }
.rpt .rpt-hero-verdict .pz { color: var(--text-secondary); max-width: 72ch; }
.rpt .rpt-hero-more .pz { margin-top: 6px; font-size: 13px; line-height: 1.55; }
.rpt .rpt-hero-more .pz > * + * { margin-top: 6px; }
.rpt .rpt-hero-more .pz-list > li + li { margin-top: 3px; }
/* a key fact that is a chain of reasons: a short list across the whole row, never clamped */
.rpt .rc-fact.is-list, .rc-fact.is-list { grid-column: 1 / -1; }
.rpt .rc-fact .pz { font: inherit; color: inherit; max-width: none; }
.rc-fact.is-list dd { display: block; -webkit-line-clamp: none; line-clamp: none; overflow: visible; }
.rc-fact.is-list .pz-list > li + li { margin-top: 2px; }
/* what the review did not cover: one bullet per note */
.rpt .memo-cover { margin: 6px 0 0; padding-left: 1.2em; max-width: 72ch; }
.rpt .memo-cover > li + li { margin-top: 6px; }
.rpt .memo-cover > li::marker { color: var(--text-muted); }
.rpt .memo-cover .memo-sub { margin: 0; }

/* a finding measured as it prints (report.js, just before a print): open, and laid out even off screen */
.report-layout.rpt.paper-measure .rpt-card { content-visibility: visible !important; }
.report-layout.rpt.paper-measure .rpt-card-body { display: block !important; }
.report-layout.rpt.paper-measure .rpt-card-inner { overflow: visible !important; padding: 2px 18px 18px !important; }
.report-layout.rpt.paper-measure .rc-oneliner, .report-layout.rpt.paper-measure .rc-actions { display: none !important; }

/* ---- print, and the exported PDF: the Report as the page shows it (the owner, 2026-10-15) -----------------------
   The paper is the website: the same type, hero, cards, rails, pills and colours, in the parchment theme whatever the
   screen's (v2/report.js switches it for the print and back), every finding open as Expand all shows it. Only what does
   nothing on paper goes: the outline, the controls and the export menu, a card's buttons and chevrons, the filters'
   shortcut. The server's PDF (backend/report_paper.py) is Chromium printing this very page, so the downloaded file and
   a browser's print are one design.
   PAGE BREAKS fall between the findings and between a finding's blocks - never inside a block, a row of the key terms,
   a step, a fact or a heading's first line; a finding short enough to sit on a page is never split (.paper-whole,
   report.js), and a split finding is drawn as a card on both pages (box-decoration-break: clone).
   THE COLUMN keeps the page's own width (776 px) and is set at .9, so it fits A4 and wraps its lines where the screen
   does. Every ancestor of the stage is unwrapped (block, auto height, visible overflow) and every sibling on the way
   down - rail, library, mode bar, sidebar, dock, toasts, ambient canvases - is not printed. */
@media print {
  @page { size: A4; margin: 14mm 12mm 16mm; }
  html, body { background: #fff !important; height: auto !important; overflow: visible !important; }
  /* only while the Report's area is the one on screen: on the Docs pages (an insight's memo printed to PDF) the stage is in the page
     but hidden, and unwrapping it there hid the whole Docs area - the memo printed as an empty page */
  html:not(:has(.app[data-mode="docs"])) *:has(#modeStage) {
    display: block !important; position: static !important; height: auto !important; min-height: 0 !important;
    max-height: none !important; overflow: visible !important; transform: none !important; background: #fff !important;
  }
  html:not(:has(.app[data-mode="docs"])) *:has(#modeStage) > :not(:has(#modeStage)):not(#modeStage) { display: none !important; }
  #modeStage { display: block !important; position: static !important; height: auto !important; overflow: visible !important; background: #fff !important; }
  .rpt-outline, .rpt-controls, .rpt-sticky-sentinel, .rpt-export, .rpt-genbar, .rc-actions, .rpt-dt-ctl, .rcw-more, .rc-chev,
  .msf-quick, .ms-go, .rpt-explainer-loading, .memo-loading, .rpt-hero-more > summary, [data-ambient], canvas, .sfx-beam { display: none !important; }
  .report-layout.rpt {
    display: block !important; width: 776px !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
    zoom: .9; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .rpt * { animation: none !important; transition: none !important; }
  .rpt .rds-n { --rds-v: var(--n); }
  .rpt .msg-list li.is-folded { display: flex !important; }
  /* every finding open, a card on each page it reaches */
  .rpt .rpt-findings { display: block !important; }
  .rpt .rpt-findings > * + * { margin-top: 12px; }
  .rpt .rpt-card { overflow: visible; box-shadow: none !important; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .rpt .rpt-card-body { display: block !important; }
  .rpt .rpt-card-inner { overflow: visible !important; padding: 2px 18px 18px !important; }
  .rpt .rc-oneliner { display: none !important; }
  .rpt .rpt-hero, .rpt .memo-head, .rpt .memo-step-group { box-shadow: none !important; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  /* where a page may break, and where it may not */
  .rpt .rpt-hero, .rpt .memo-particular, .rpt .memo-side, .rpt .memo-table tr, .rpt .msg-head, .rpt .msg-list li,
  .rpt .rpt-card-head, .rpt .rc-where, .rpt .rc-verdictline, .rpt .rc-block:not(:has(.rc-tl)), .rpt .rc-fact, .rpt .rc-quote,
  .rpt .rc-tl li, .rpt .rpt-card.paper-whole, .rpt .rpt-findings > p, .rpt .rpt-disclaimer { break-inside: avoid; }
  .rpt h3, .rpt h4, .rpt .memo-group-h, .rpt .memo-steps-head, .rpt .msg-head, .rpt .msg-note, .rpt .rpt-card-head,
  .rpt .rc-where, .rpt .rc-verdictline { break-after: avoid; }
  .rpt p, .rpt li, .rpt blockquote { orphans: 3; widows: 3; }
}
/* STRUCTURED TEXT ON PAPER: a block that carries quotes and lists may break between them (held whole, a long one pushed the
   whole block to the next page and left half a page empty); a quote, a list item, a table row never break inside, and a lead
   line or a list's lead-in stays with what it introduces. */
@media print {
  .rpt .rc-block:has(.pz) { break-inside: auto; }
  .rpt .pz-quote, .rpt .pz-list > li, .rpt .pz-table tr, .rpt .pz-cp { break-inside: avoid; }
  .rpt .pz-lead, .rpt .pz-in { break-after: avoid; }
}
/* the memorandum could not be built: said so, with Try again (app.js memoFailedHtml) */
.memo-loading.is-failed { color: var(--text-secondary, inherit); }
.memo-loading.is-failed .btn { margin-left: 2px; }

/* ==== THE REPORT IS GENERATED ON DEMAND (the owner, 2026-10-22, item 5) ===================================================
   Three surfaces: the "Generate report" step (and the not-analysed invitation in the same card), the bar over a built report,
   and the "Build the report" dialog (v2/report.js openBuilder). Generous spacing, the page's tokens, every theme. */

/* ---- the "Generate report" step ---------------------------------------------------------------------------------------- */
.report-layout.rpt-genwrap { max-width: 760px; margin: 0 auto; padding: 64px 28px 96px; }
.rpt-gen {
  --tone: var(--severity-medium);
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 48px 52px 44px; border-radius: 22px; border: 1px solid var(--border-subtle);
  background:
    radial-gradient(120% 85% at 50% 0%, color-mix(in srgb, var(--tone) 10%, var(--bg-doc)) 0%, var(--bg-doc) 64%);
  box-shadow: var(--e1), 0 28px 56px -36px color-mix(in srgb, var(--text-primary) 42%, transparent);
  color: var(--text-primary); font-family: var(--font-ui); overflow: hidden;
  animation: rgnIn 460ms cubic-bezier(.22, 1, .36, 1) both;
}
.rpt-gen.risk-severe { --tone: var(--severity-critical); }
.rpt-gen.risk-high { --tone: var(--severity-high); }
.rpt-gen.risk-medium { --tone: var(--severity-medium); }
.rpt-gen.risk-low, .rpt-gen.risk-clear { --tone: var(--severity-success); }
.rpt-gen.is-empty { --tone: var(--brand); }
@keyframes rgnIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rgn-top { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rgn-eyebrow { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.rgn-doc { max-width: 52ch; font-size: 13.5px; line-height: 20px; font-weight: 500; color: var(--text-muted); overflow-wrap: anywhere; }
.rgn-h {
  margin: 20px 0 0; max-width: 22ch; font-family: var(--font-doc); font-size: 31px; line-height: 39px; font-weight: 600;
  letter-spacing: -.012em; color: var(--text-primary); text-wrap: balance;
}
.rgn-sk { display: inline-block; width: 360px; max-width: 78vw; height: 30px; border-radius: 8px; vertical-align: middle; }
.rgn-sub { margin: 12px 0 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-muted); }
/* the findings by level, as a bar that grows once */
.rgn-bar { display: flex; gap: 5px; width: min(460px, 100%); height: 10px; margin: 34px 0 0; }
.rgn-seg {
  --seg: var(--severity-low);
  flex: var(--w) 1 0; min-width: 10px; border-radius: 999px; background: var(--seg); transform-origin: left center;
  animation: rgnGrow 760ms cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(160ms + var(--i) * 110ms);
}
.rgn-seg.sev-critical { --seg: var(--severity-critical); }
.rgn-seg.sev-high { --seg: var(--severity-high); }
.rgn-seg.sev-medium { --seg: var(--severity-medium); }
.rgn-seg.sev-low { --seg: color-mix(in srgb, var(--severity-low) 70%, var(--bg-doc)); }
.rgn-seg.is-clear { --seg: var(--severity-success); }
@keyframes rgnGrow { from { transform: scaleX(0); opacity: .25; } to { transform: none; opacity: 1; } }
.rgn-counts {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 10px 24px; margin: 18px 0 0;
  font-size: 13.5px; line-height: 20px; color: var(--text-secondary);
}
.rgn-c { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.rgn-c b { padding: 0; background: none; font-weight: 650; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rgn-g { font-size: 10px; line-height: 1; transform: translateY(-1px); }
.rgn-c.is-critical .rgn-g { color: var(--severity-critical); }
.rgn-c.is-high .rgn-g { color: var(--severity-high); }
.rgn-c.is-medium .rgn-g { color: var(--severity-medium); }
.rgn-c.is-low .rgn-g { color: var(--severity-low); }
.rgn-c.is-zero { opacity: .5; }
.rgn-c.is-total { padding-left: 24px; border-left: 1px solid var(--border-subtle); }
.rgn-cta { margin: 38px 0 0; }
.rgn-go {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 28px 0 22px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--brand); color: var(--on-brand); font-family: var(--font-ui); font-size: 15.5px; font-weight: 600; line-height: 1;
  box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--brand) 75%, transparent);
  transition: transform 160ms cubic-bezier(.22, 1, .36, 1), box-shadow 160ms ease, background-color 160ms ease;
}
.rgn-go:hover {
  transform: translateY(-1px); background: var(--brand-hover, var(--brand));
  box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--brand) 80%, transparent);
}
.rgn-go:active { transform: translateY(0); }
/* focus lightens the fill - no ring round a primary button (the owner's rule) */
.rgn-go:focus-visible { outline: none; background: color-mix(in srgb, var(--brand) 80%, var(--on-brand)); }
.rgn-go > * { position: relative; z-index: 1; }
/* a slow sheen across the button: the one thing on the step that moves after it lands */
.rgn-go::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, color-mix(in srgb, var(--on-brand) 26%, transparent) 50%, transparent 68%);
  transform: translateX(-130%); animation: rgnSheen 4.8s ease-in-out 1.4s infinite;
}
@keyframes rgnSheen { 0%, 72% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }

/* ---- the bar over a built report: what it holds, its criteria, Change / Copy summary / Export report ----------------- */
.rpt .rpt-genbar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px;
  margin: 0 0 20px; padding: 12px 14px 12px 18px; border-radius: 14px;
  border: 1px solid var(--border-subtle); background: var(--bg-app); font-family: var(--font-ui);
  animation: rgbIn 320ms cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes rgbIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.rpt .rgb-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.rpt .rgb-n { margin-right: 6px; font-size: 13.5px; line-height: 20px; font-weight: 650; color: var(--text-primary); white-space: nowrap; }
.rpt .rgb-chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--border-subtle); background: var(--bg-sunken); color: var(--text-secondary);
  font-size: 12.5px; line-height: 1; font-weight: 550;
}
.rpt .rgb-chip.is-preset {
  border-color: color-mix(in srgb, var(--brand) 30%, transparent); background: color-mix(in srgb, var(--brand) 9%, transparent);
  color: var(--rpt-brand); font-weight: 650;
}
.rpt .rgb-chip.is-out, .rpt .rgb-chip.is-none {
  border-style: dashed; background: transparent; color: var(--text-muted);
  text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-muted) 75%, transparent);
}
.rpt .rgb-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.rpt .rgb-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border-subtle); background: var(--bg-doc); color: var(--text-primary);
  font-family: var(--font-ui); font-size: 13px; font-weight: 550; line-height: 1; white-space: nowrap;
  transition: background-color 120ms var(--rpt-ease), border-color 120ms var(--rpt-ease), transform 120ms var(--rpt-ease);
}
.rpt .rgb-btn:hover { background: var(--bg-sunken); border-color: var(--border-strong); }
.rpt .rgb-btn:active { transform: translateY(1px); }
.rpt .rgb-btn:focus-visible { outline: 2px solid var(--rpt-brand); outline-offset: 2px; }
.rpt .rgb-btn.is-primary { border-color: transparent; background: var(--rpt-brand); color: var(--rpt-brand-ink); }
.rpt .rgb-btn.is-primary:hover { background: color-mix(in srgb, var(--rpt-brand) 86%, var(--text-primary)); }
.rpt .rgb-btn.is-primary:focus-visible { outline: none; background: color-mix(in srgb, var(--rpt-brand) 80%, var(--rpt-brand-ink)); }
.rpt .rpt-export-btn svg { flex: none; }
/* a report built without its summary: the masthead and the disclaimer only */
.rpt .rpt-hero.is-masthead { padding-bottom: 14px; }

/* ---- a card's decision stamp and the reader's own notes (the reader's choice) ------------------------------------------- */
.rpt .rc-stamp { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.rpt .rc-stamp-g { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rpt .rc-stamp.is-accepted { background: color-mix(in srgb, var(--severity-success) 13%, transparent); color: var(--severity-success); }
.rpt .rc-stamp.is-dismissed { background: var(--bg-sunken); color: var(--text-muted); }
.rpt .rc-stamp.is-resolved { background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--rpt-brand); }
.rpt .rc-block.rc-notes {
  padding: 12px 16px 14px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--severity-medium) 22%, var(--border-subtle));
  background: color-mix(in srgb, var(--severity-medium) 6%, var(--bg-doc));
}
.rpt .rc-notes .rc-comments {
  margin: 6px 0 0; padding-left: 18px; font-family: var(--font-doc); font-size: 14.5px; line-height: 1.55; color: var(--text-secondary);
}
.rpt .rc-notes .rc-comments li + li { margin-top: 4px; }

/* ---- "Build the report": the criteria dialog ---------------------------------------------------------------------------- */
dialog.rbx {
  --rbx-ease: cubic-bezier(.22, 1, .36, 1);
  --rbx-brand: var(--brand);
  --rbx-on-brand: var(--on-brand);
  padding: 0; margin: auto; border: 1px solid var(--border-subtle); border-radius: 22px;
  width: min(920px, calc(100vw - 48px)); max-width: none; height: auto; max-height: min(900px, calc(100vh - 40px));
  background: var(--bg-doc); color: var(--text-primary); font-family: var(--font-ui);
  box-shadow: var(--e4, 0 32px 64px -16px rgba(26, 35, 48, .32)); overflow: hidden;
}
dialog.rbx[open] { display: flex; animation: rbxIn 260ms var(--rbx-ease) both; }
dialog.rbx::backdrop { background: rgba(14, 18, 26, .44); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: rbxFade 260ms var(--rbx-ease) both; }
dialog.rbx.is-closing { animation: rbxOut 180ms ease-in both; }
dialog.rbx.is-closing::backdrop { animation: rbxFadeOut 180ms ease-in both; }
@keyframes rbxIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rbxOut { to { opacity: 0; transform: translateY(10px) scale(.99); } }
@keyframes rbxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rbxFadeOut { to { opacity: 0; } }
.rbx-panel { display: flex; flex-direction: column; flex: 1 1 auto; width: 100%; min-height: 0; margin: 0; }
.rbx :focus-visible { outline: 2px solid var(--focus, var(--rbx-brand)); outline-offset: 2px; }

.rbx-head { display: flex; align-items: flex-start; gap: 24px; padding: 28px 28px 22px 34px; }
.rbx-head-t { flex: 1 1 auto; min-width: 0; }
.rbx-title { margin: 0; font-family: var(--font-doc); font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.012em; }
.rbx-doc { margin: 4px 0 0; font-size: 13.5px; line-height: 20px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbx-format { flex: none; padding-top: 2px; }
.rbx-format .rbx-seg-row { flex-direction: row; align-items: center; gap: 12px; }
.rbx-x {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; margin: -2px -4px 0 0; border: 0; border-radius: 11px;
  background: transparent; color: var(--text-secondary); cursor: pointer; transition: background-color 120ms ease, color 120ms ease;
}
.rbx-x:hover { background: var(--bg-sunken); color: var(--text-primary); }

.rbx-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px 34px 30px; }

/* the four presets */
.rbx-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rbx-preset {
  --pc: var(--rbx-brand);
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; min-height: 116px;
  padding: 16px 16px 15px; border-radius: 16px; border: 1px solid var(--border-subtle); background: var(--bg-app);
  color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
  transition: border-color 160ms var(--rbx-ease), background-color 160ms var(--rbx-ease), box-shadow 160ms var(--rbx-ease), transform 160ms var(--rbx-ease);
}
.rbx-preset.is-accepted { --pc: var(--severity-success); }
.rbx-preset.is-signing { --pc: var(--severity-critical); }
.rbx-preset.is-confident { --pc: var(--party-a, var(--rbx-brand)); }
.rbx-preset:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--e2); }
.rbx-preset:active { transform: translateY(0); }
.rbx-preset.is-on {
  border-color: var(--rbx-brand); background: color-mix(in srgb, var(--rbx-brand) 6%, var(--bg-doc));
  box-shadow: inset 0 0 0 1px var(--rbx-brand), 0 10px 24px -18px color-mix(in srgb, var(--rbx-brand) 80%, transparent);
}
.rbx-preset-i {
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 10px; border-radius: 11px;
  background: color-mix(in srgb, var(--pc) 12%, transparent); color: var(--pc);
  transition: transform 240ms var(--rbx-ease);
}
.rbx-preset.is-on .rbx-preset-i { transform: scale(1.06); }
.rbx-preset-t { font-size: 14.5px; line-height: 20px; font-weight: 650; }
.rbx-preset-n { min-height: 18px; font-size: 12.5px; line-height: 18px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rbx-preset-n.is-zero { color: var(--severity-medium); }
.rbx-preset-ok {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--rbx-brand); color: var(--rbx-on-brand); opacity: 0; transform: scale(.4);
  transition: opacity 180ms var(--rbx-ease), transform 260ms var(--rbx-ease);
}
.rbx-preset.is-on .rbx-preset-ok { opacity: 1; transform: none; }

/* the grouped cards */
.rbx-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 24px; }
.rbx-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rbx-card { min-width: 0; padding: 20px 22px 22px; border-radius: 16px; border: 1px solid var(--border-subtle); background: var(--bg-doc); }
.rbx-card-t { margin: 0 0 16px; font-size: 15.5px; line-height: 22px; font-weight: 650; color: var(--text-primary); }
.rbx-group + .rbx-group { margin-top: 20px; }
.rbx-group[data-group="who"].is-off { display: none; }
.rbx-group-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; margin-bottom: 10px; }
.rbx-group-t, .rbx-seg-t {
  font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted);
}
.rbx-all {
  padding: 2px 8px; border: 0; border-radius: 7px; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; line-height: 16px; font-weight: 600; color: var(--rbx-brand);
}
.rbx-all:hover { background: color-mix(in srgb, var(--rbx-brand) 9%, transparent); }
.rbx-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.rbx-chip {
  display: inline-flex; align-items: center; gap: 9px; min-height: 38px; max-width: 100%; padding: 0 12px 0 10px;
  border-radius: 11px; border: 1px solid var(--border-subtle); background: var(--bg-app); color: var(--text-secondary);
  font: inherit; font-size: 13.5px; line-height: 18px; font-weight: 500; text-align: left; cursor: pointer;
  transition: background-color 150ms var(--rbx-ease), border-color 150ms var(--rbx-ease), color 150ms var(--rbx-ease), transform 120ms var(--rbx-ease);
}
.rbx-chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.rbx-chip:active { transform: scale(.97); }
.rbx-chip[aria-checked="true"] {
  border-color: color-mix(in srgb, var(--rbx-brand) 42%, var(--border-subtle));
  background: color-mix(in srgb, var(--rbx-brand) 8%, var(--bg-doc)); color: var(--text-primary);
}
.rbx-box {
  display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--border-strong); background: var(--bg-doc); color: transparent;
  transition: background-color 150ms var(--rbx-ease), border-color 150ms var(--rbx-ease), color 150ms var(--rbx-ease);
}
.rbx-chip[aria-checked="true"] .rbx-box { border-color: var(--rbx-brand); background: var(--rbx-brand); color: var(--rbx-on-brand); }
.rbx-chip[aria-checked="true"] .rbx-box svg { animation: rbxTick 280ms var(--rbx-ease) both; }
@keyframes rbxTick { from { opacity: 0; transform: scale(.3) rotate(-12deg); } to { opacity: 1; transform: none; } }
.rbx-chip.is-flip { animation: rbxFlip 380ms var(--rbx-ease); }
@keyframes rbxFlip { 40% { transform: scale(1.045); } }
.rbx-chip-l { min-width: 0; overflow-wrap: anywhere; }
.rbx-chip-n {
  min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--bg-sunken); color: var(--text-secondary);
  font-size: 11.5px; line-height: 16px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums;
}
.rbx-chip-n:empty { display: none; }
.rbx-chip[aria-checked="true"] .rbx-chip-n { background: color-mix(in srgb, var(--rbx-brand) 13%, transparent); color: var(--rbx-brand); }
/* AN OPTION NO FINDING HAS ("Dismissed 0") STAYS READABLE (the owner's review, 2026-10-22: it was faded to 2.5:1): its frame is
   dashed and its count quiet instead - the words keep their full colour */
.rbx-chip.is-empty { border-style: dashed; }
.rbx-chip.is-empty .rbx-chip-n { background: transparent; }
.rbx-sev { font-size: 10px; line-height: 1; }
.rbx-sev.sev-critical { color: var(--severity-critical); }
.rbx-sev.sev-high { color: var(--severity-high); }
.rbx-sev.sev-medium { color: var(--severity-medium); }
.rbx-sev.sev-low { color: var(--severity-low); }

/* your side and the reading level, and the export's format: segmented */
.rbx-seg-row { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rbx-seg-row + .rbx-seg-row { margin-top: 20px; }
.rbx-seg { display: inline-flex; flex-wrap: wrap; align-self: flex-start; gap: 4px; max-width: 100%; padding: 4px; border-radius: 12px; background: var(--bg-sunken); }
.rbx-seg-b {
  max-width: 100%; height: 34px; padding: 0 15px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
  color: var(--text-secondary); font: inherit; font-size: 13.5px; font-weight: 550; line-height: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background-color 160ms var(--rbx-ease), color 160ms var(--rbx-ease), box-shadow 160ms var(--rbx-ease);
}
.rbx-seg-b:hover { color: var(--text-primary); }
.rbx-seg-b.is-on { background: var(--bg-doc); color: var(--text-primary); box-shadow: var(--e1); }

/* the foot: the report counted as it is built, then the two buttons */
.rbx-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 28px 18px 34px; border-top: 1px solid var(--border-subtle); background: var(--bg-app);
}
.rbx-live { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rbx-meter { position: relative; flex: none; width: 128px; height: 6px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; }
.rbx-meter i {
  position: absolute; inset: 0; border-radius: inherit; background: var(--rbx-brand); transform-origin: left center; transform: scaleX(0);
  transition: transform 340ms var(--rbx-ease), background-color 200ms ease;
}
.rbx-live-t { font-size: 14.5px; line-height: 20px; font-weight: 650; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rbx-live-t.is-bump { animation: rbxBump 320ms var(--rbx-ease); }
@keyframes rbxBump { 40% { transform: translateY(-2px); } }
.rbx-live.is-zero .rbx-meter i { background: var(--severity-medium); }
.rbx-live.is-zero .rbx-live-t { color: var(--severity-medium); }
.rbx.is-loading .rbx-live-t::before,
.rbx.is-loading .rbx-preset-n::before {
  content: ""; display: inline-block; width: 96px; height: 12px; border-radius: 6px; vertical-align: middle;
  background: linear-gradient(90deg, var(--bg-sunken) 0%, color-mix(in srgb, var(--bg-sunken) 40%, var(--bg-doc)) 50%, var(--bg-sunken) 100%);
  background-size: 200% 100%; animation: rbxShim 1.2s linear infinite;
}
.rbx.is-loading .rbx-preset-n::before { width: 64px; }
@keyframes rbxShim { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.rbx-foot-b { display: flex; align-items: center; gap: 10px; flex: none; }
.rbx-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border-subtle); background: var(--bg-doc); color: var(--text-primary);
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background-color 140ms ease, box-shadow 160ms ease, transform 140ms var(--rbx-ease);
}
.rbx-btn:hover { background: var(--bg-sunken); }
.rbx-btn.rbx-go {
  padding: 0 24px 0 19px; border-color: transparent; background: var(--rbx-brand); color: var(--rbx-on-brand);
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--rbx-brand) 75%, transparent);
}
.rbx-btn.rbx-go:hover { background: var(--brand-hover, var(--rbx-brand)); transform: translateY(-1px); }
.rbx-btn.rbx-go:active { transform: translateY(0); }
.rbx .rbx-btn.rbx-go:focus-visible { outline: none; background: color-mix(in srgb, var(--rbx-brand) 80%, var(--rbx-on-brand)); }
.rbx-btn.rbx-go[aria-busy="true"] { cursor: progress; }
.rbx.is-busy .rbx-body { pointer-events: none; opacity: .75; transition: opacity 160ms ease; }

/* narrower screens: one column of cards; a phone: a full-screen sheet, the presets two by two */
@media (max-width: 900px) {
  .rbx-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rbx-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .report-layout.rpt-genwrap { padding: 24px 16px 64px; }
  .rpt-gen { padding: 34px 22px 30px; border-radius: 18px; }
  .rgn-h { font-size: 24px; line-height: 31px; }
  .rgn-counts { gap: 8px 16px; }
  .rgn-c.is-total { padding-left: 16px; }
  .rgn-go { width: 100%; justify-content: center; }
  .rpt .rpt-genbar { padding: 12px; }
  /* three buttons do not fit one phone line (Export report was cut at the edge - the owner's review, 2026-10-22): they wrap,
     the primary first and the width of the bar, the other two side by side under it */
  .rpt .rgb-actions { width: 100%; flex-wrap: wrap; }
  .rpt .rgb-actions .rgb-btn { flex: 1 1 auto; justify-content: center; }
  .rpt .rgb-actions .rgb-btn.is-primary { flex-basis: 100%; order: -1; }
  dialog.rbx { width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .rbx-head { flex-wrap: wrap; gap: 14px; padding: 18px 16px 14px 20px; }
  .rbx-head-t { flex: 1 1 0; }
  .rbx-format { order: 3; flex: 1 1 100%; }
  .rbx-title { font-size: 21px; line-height: 28px; }
  .rbx-body { padding: 2px 16px 22px; }
  .rbx-presets { gap: 10px; }
  .rbx-preset { min-height: 104px; padding: 14px; }
  .rbx-preset-i { width: 34px; height: 34px; margin-bottom: 8px; }
  .rbx-grid { gap: 14px; margin-top: 18px; }
  .rbx-card { padding: 16px 16px 18px; }
  .rbx-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); gap: 12px; }
  .rbx-meter { width: 48px; }
  .rbx-cancel { display: none; }
}
/* a narrow phone: the count on its own line, the button the width of the foot under it - never pressed against each other */
@media (max-width: 480px) {
  .rbx-foot { flex-wrap: wrap; }
  .rbx-foot-b { flex: 1 1 100%; }
  .rbx-foot-b .rbx-go { flex: 1 1 auto; justify-content: center; }
}
