/* ── What I can see (#/sources) ────────────────────────────────────────────────────────────────
   Every rule here is prefixed .src- so nothing collides with the .vz-, .close-, .doc- or .co-
   families the other screens carry. Colour, spacing and type come from the operations.css tokens,
   so this page reads as the same system as the cards it sits beside rather than as a second design.

   Two visual rules carry the contract the JSX enforces. A withheld panel is never hidden and never
   dimmed to the point of disappearing: it keeps a left rule and body-weight text, because it is
   evidence about the platform rather than a decoration. And a dash is never styled like a zero —
   the figures are tabular and dark, the dashes are muted and lighter, so a reader scanning the page
   can tell "measured" from "not measured" without reading a word. */

.src-page .ph-row { flex-wrap: wrap; gap: 14px; }
.src-page .sub { max-width: 92ch; }
.src-meta { margin: 10px 0 0; font-size: 11.5px; color: var(--co-text-muted); }
.src-muted { color: var(--co-text-muted) !important; font-size: 12px !important; line-height: 1.7 !important; }
.src-dash { color: var(--co-text-muted); font-weight: 400; }
.src-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px;
  padding: 0 7px; border-radius: 10px; background: var(--co-surface-3); color: var(--co-text-2);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* The top-right slot: the statement of when the platform last looked, with the control that makes
   it look again demoted beside it. */
.src-lastpass { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
/* A grid rather than a flex row, so the note stacks under the statement instead of running along
   beside it: the glyph holds column one, the sentence and its scope share column two. */
.src-lastpass-statement {
  display: inline-grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; max-width: 34ch;
  padding: 7px 13px; border: 1px solid var(--co-line); border-radius: 8px; background: #fff; color: var(--co-text-2);
}
.src-lastpass-statement > svg { grid-column: 1; grid-row: 1; margin-top: 2px; color: var(--co-text-muted); }
.src-lastpass-statement b { grid-column: 2; font-size: 12.5px; }
.src-lastpass-statement small { grid-column: 2; margin-top: 3px; font-size: 11px; line-height: 1.55; color: var(--co-text-muted); }

/* The banner. Protected copy: full length, above the tiles, never an icon and never a tooltip. */
.src-banner {
  display: flex; gap: 14px; align-items: flex-start; margin: 0 0 20px; padding: 18px 20px;
  border: 1px solid #D5E1F5; border-radius: 10px; background: #EDF3FC; color: #33507A;
}
.src-banner > svg { flex: none; margin-top: 2px; }
.src-banner b { font-size: 14px; line-height: 1.5; }
.src-banner p { margin: 6px 0 0; font-size: 13px; line-height: 1.7; color: #33507A; }

/* The tile strip. Four slots, always four, whether or not the figures arrived. */
.src-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; }
.src-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: #fff;
  border: 1px solid var(--co-line); border-radius: 12px; min-width: 0;
}
.src-tile > b { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; color: var(--co-night, #0D1318); font-variant-numeric: tabular-nums; }
.src-tile > b.src-tile-word { font-size: 22px; letter-spacing: -.01em; }
.src-tile small { font-size: 11px; line-height: 1.6; color: var(--co-text-muted); }
.src-tile-off { background: var(--co-surface-3); border-style: dashed; }
.src-tile-warn { color: var(--co-amber-deep) !important; }
.src-denominator {
  display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px;
  font-size: 12px; line-height: 1.7; color: var(--co-text-muted);
}
.src-denominator > svg { flex: none; margin-top: 3px; }

/* The failures behind the failed-jobs count, collapsed: the tile states the number, this states
   which assumption or grant failed each time. */
.src-jobs summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--co-text-2); }
.src-jobs ul { margin: 14px 0 0; padding: 0; list-style: none; }
.src-jobs li { padding: 10px 0; border-top: 1px solid var(--co-line); }
.src-jobs li b { display: block; font-size: 12.5px; font-weight: 500; line-height: 1.6; color: var(--co-text-2); overflow-wrap: anywhere; }
.src-jobs li small { display: block; margin-top: 4px; font-size: 11px; color: var(--co-text-muted); font-variant-numeric: tabular-nums; }

/* A withheld panel. The left rule keeps it on the page as a statement rather than an apology. */
.src-reason { border-left: 3px solid var(--co-line-strong); padding-left: 14px; margin: 10px 0; }
.src-reason p { margin: 0; font-size: 12.5px !important; line-height: 1.7 !important; color: var(--co-text-2) !important; }
.src-reason .src-closes { margin-top: 8px; font-size: 11.5px !important; color: var(--co-text-muted) !important; }
.src-reason-wide { margin: 0 0 18px; }
.src-reason-header { max-width: 92ch; margin: 12px 0 0; }

/* The sources the header sentence names, repeated as chips so the two named estates are visible
   before a reader reaches the source list itself. */
.src-header-sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.src-source-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 11px;
  border: 1px solid var(--co-line); background: #fff; color: var(--co-text-2);
  font-size: 11px; font-weight: 600;
}
.src-closes { margin: 8px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--co-text-muted); }

/* ── Sources ─────────────────────────────────────────────────────────────────────────────── */
.src-sources article { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--co-line); }
.src-sources article:first-child { padding-top: 0; }
.src-sources article:last-child { padding-bottom: 0; border-bottom: 0; }
.src-source-icon { display: flex; padding: 10px; border-radius: 8px; background: var(--co-surface-3); color: var(--co-text-muted); align-self: flex-start; }
.src-source-body { flex: 1; min-width: 0; }
.src-source-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.src-source-head h3 { margin: 0; font-size: 14.5px; letter-spacing: -.2px; color: var(--co-night, #0D1318); }
.src-source-body p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.75; color: var(--co-text-2); max-width: 92ch; }
.src-connection { font-variant-numeric: tabular-nums; color: var(--co-text-2) !important; }
.src-observed { display: block; margin-top: 10px; font-size: 11px; color: var(--co-text-muted); font-variant-numeric: tabular-nums; }

/* Read and write are two axes; the caption names both and so does every row. */
.src-access { display: flex !important; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px !important; }
.src-access > span {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; border: 1px solid var(--co-line);
}
.src-access > span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.src-access .src-yes { color: var(--co-green-deep); background: #EAF5F0; border-color: #CDE7DC; }
.src-access .src-no { color: var(--co-text-muted); background: var(--co-surface-3); }
/* The write note is a sentence, not a caption, so it takes its own line under the two pills. */
.src-access small { flex: 1 1 100%; font-size: 11.5px; line-height: 1.7; color: var(--co-text-muted); }

/* Badges. The badge says which state the row is in; the colour says whether that state can support
   a conclusion. Nothing here is red, because none of these states is a failure — they are limits. */
.src-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 11px;
  font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
  background: var(--co-surface-3); color: var(--co-text-muted);
}
.src-badge-downloaded { background: #EDF3FC; color: var(--co-blue); border-color: #D5E1F5; }
.src-badge-partial { background: #FDF4E3; color: var(--co-amber-deep); border-color: #F0DDB6; }
.src-badge-idle { background: #EAF5F0; color: var(--co-green-deep); border-color: #CDE7DC; }
.src-badge-current { background: #EAF5F0; color: var(--co-green-deep); border-color: #CDE7DC; }
.src-badge-stale { background: #FDF4E3; color: var(--co-amber-deep); border-color: #F0DDB6; }
.src-badge-off, .src-badge-not_connected, .src-badge-not_imported { background: var(--co-surface-3); color: var(--co-text-muted); }
.src-badge-unverified { background: #fff; color: var(--co-text-muted); border-color: var(--co-line); letter-spacing: .06em; }

/* The measured panels that hang off a source row. */
.src-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 14px; }
.src-fact { padding: 12px 14px; border: 1px solid var(--co-line); border-radius: 8px; min-width: 0; }
.src-fact-off { background: var(--co-surface-3); border-style: dashed; }
.src-fact-label { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--co-text-muted); }
.src-fact > b { display: block; margin: 5px 0 4px; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; color: var(--co-night, #0D1318); font-variant-numeric: tabular-nums; }
.src-fact small { display: block; font-size: 11px; line-height: 1.65; color: var(--co-text-muted); }
.src-fact .src-closes { font-size: 11px; }

/* The four shared mailboxes, nested under the group row they belong to. */
.src-children { display: grid; gap: 10px; margin-top: 14px; }
.src-child { padding: 12px 14px; border: 1px solid var(--co-line); border-radius: 8px; background: #fff; }
.src-child-off { background: var(--co-surface-3); }
.src-child-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.src-child-head b { font-size: 12.5px; color: var(--co-night, #0D1318); }
.src-child p { margin: 6px 0 0 !important; font-size: 11.5px !important; line-height: 1.7 !important; }
.src-child .src-reason { margin: 8px 0 0; border-left-width: 2px; padding-left: 12px; }
.src-child-route { color: var(--co-text-muted) !important; }
.src-child .btn { margin-top: 10px; }

/* ── What I will not conclude ────────────────────────────────────────────────────────────── */
.src-worked {
  display: flex; gap: 14px; align-items: flex-start; margin: 0 0 14px; padding: 18px 20px;
  border: 1px solid #F0DDB6; border-radius: 10px; background: #FDF4E3; color: var(--co-amber-deep);
}
.src-worked > svg { flex: none; margin-top: 2px; }
.src-worked b { font-size: 13.5px; }
.src-worked p { margin: 7px 0 0; font-size: 12.5px; line-height: 1.75; color: var(--co-amber-deep); }
.src-worked small { display: block; margin-top: 8px; font-size: 11.5px; line-height: 1.7; opacity: .85; }

.src-limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.src-limits .co-card { margin: 0; }
.src-limit h3 { margin: 0 0 8px; font-size: 14.5px; letter-spacing: -.2px; color: var(--co-night, #0D1318); }
.src-limit-because { margin: 0 !important; font-size: 12.5px !important; line-height: 1.75 !important; color: var(--co-text-2) !important; }
.src-limit-behaviour { display: grid; gap: 10px; margin: 14px 0 0; }
.src-limit-behaviour > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.src-limit-behaviour dt { font-size: 9.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--co-text-muted); }
.src-limit-behaviour dd { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--co-text-2); }
.src-limit-behaviour dd small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.65; color: var(--co-text-muted); }
.src-limit-behaviour .src-reason { margin: 0; }
.src-falls { font-size: 17px; letter-spacing: -.01em; color: var(--co-night, #0D1318); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* ── Unverified ──────────────────────────────────────────────────────────────────────────── */
.src-shared-condition { margin: 14px 0 4px; }
.src-shared-lead { margin: 0 0 6px !important; font-size: 12px !important; color: var(--co-text-muted) !important; }
.src-unverified-rows { margin-top: 14px; }
.src-unverified-row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 16px;
  align-items: center; padding: 13px 0; border-top: 1px solid var(--co-line);
}
.src-unverified-account { font-size: 13.5px; font-weight: 600; color: var(--co-night, #0D1318); overflow-wrap: anywhere; }
.src-unverified-condition { font-size: 12.5px; line-height: 1.6; color: var(--co-text-2); }
.src-unverified-condition small { display: block; margin-top: 3px; font-size: 11px; color: var(--co-text-muted); }
.src-unverified-condition i { font-style: normal; }
.src-unverified-end { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.src-stage-vocab { margin-top: 14px !important; }
.src-stage-vocab b { color: var(--co-text-2); font-variant-numeric: tabular-nums; }

/* ── If a source fails ───────────────────────────────────────────────────────────────────── */
.src-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.src-modes .co-card { margin: 0; padding: 18px 20px; }
.src-mode h3 { margin: 0 0 8px; font-size: 13.5px; letter-spacing: -.15px; color: var(--co-night, #0D1318); }
.src-mode-policy { margin: 0 !important; font-size: 12.5px !important; line-height: 1.75 !important; color: var(--co-text-2) !important; }
.src-mode .src-muted { margin-top: 10px !important; }
.src-mode-state { margin-top: 10px !important; font-size: 12px !important; line-height: 1.7 !important; color: var(--co-text-2) !important; }
.src-state-pill {
  display: inline-flex; align-items: center; height: 19px; padding: 0 9px; margin-right: 6px;
  border-radius: 10px; background: #EAF5F0; border: 1px solid #CDE7DC; color: var(--co-green-deep);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.src-assumptions { margin: 12px 0 0; padding: 0; list-style: none; }
.src-assumptions li { padding: 9px 0; border-top: 1px solid var(--co-line); }
.src-assumptions li b { display: block; font-size: 11.5px; font-weight: 500; line-height: 1.6; color: var(--co-text-2); overflow-wrap: anywhere; }
.src-assumptions li small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--co-text-muted); font-variant-numeric: tabular-nums; }
.src-modes-note { margin: 12px 0 0 !important; }

/* ── Relationship gaps ───────────────────────────────────────────────────────────────────── */
.src-gap { padding: 16px 0; border-bottom: 1px solid var(--co-line); }
.src-gap:first-child { padding-top: 0; }
.src-gap-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.src-gap-head b { font-size: 13.5px; color: var(--co-night, #0D1318); }
.src-gap-head .btn { margin-left: auto; }
.src-field { font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--co-text-muted); background: var(--co-surface-3); padding: 2px 7px; border-radius: 4px; overflow-wrap: anywhere; }
.src-gap-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.src-gap-cell { padding: 11px 13px; border: 1px solid var(--co-line); border-radius: 8px; min-width: 0; }
.src-gap-cell-off { background: var(--co-surface-3); border-style: dashed; }
.src-gap-cell > span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--co-text-muted); }
.src-gap-cell > b { display: block; margin: 4px 0 2px; font-size: 19px; line-height: 1.2; letter-spacing: -.02em; color: var(--co-night, #0D1318); font-variant-numeric: tabular-nums; }
.src-gap-cell small { display: block; font-size: 10.5px; line-height: 1.6; color: var(--co-text-muted); font-variant-numeric: tabular-nums; }
.src-gap-both, .src-gap-owners { margin-top: 14px !important; font-size: 12.5px !important; line-height: 1.75 !important; color: var(--co-text-2) !important; }
.src-gap-both b, .src-gap-owners b { color: var(--co-night, #0D1318); font-variant-numeric: tabular-nums; }
.src-gaps .btn { margin-top: 14px; }

/* ── Not exposed, and what was downloaded ────────────────────────────────────────────────── */
.src-blocked dl { margin: 0; }
.src-blocked dl > div { padding: 14px 0; border-bottom: 1px solid var(--co-line); }
.src-blocked dl > div:first-child { padding-top: 0; }
.src-blocked dl > div:last-child { border-bottom: 0; }
.src-blocked dt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--co-night, #0D1318); overflow-wrap: anywhere; }
.src-kind, .src-register {
  display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border-radius: 9px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--co-surface-3); color: var(--co-text-muted);
}
.src-register { background: #FDF4E3; color: var(--co-amber-deep); }
.src-blocked dd { margin: 6px 0 0; }
.src-blocked dd p { margin: 4px 0 0 !important; font-size: 12.5px !important; line-height: 1.7 !important; color: var(--co-text-2) !important; }
.src-blocked dd p b { font-size: 9.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--co-text-muted); margin-right: 6px; }

.src-objects .src-object {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--co-line);
}
.src-objects .src-object:first-child { padding-top: 0; }
.src-object b { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--co-text-2); overflow-wrap: anywhere; }
.src-object-records { font-size: 12.5px; color: var(--co-night, #0D1318); font-variant-numeric: tabular-nums; }
.src-object small { font-size: 11px; color: var(--co-text-muted); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.src-objects .src-muted { margin-top: 14px !important; }

.src-mailbox .src-facts { margin-top: 0; }
.src-premium .src-reason { margin: 0; }

@media (max-width: 1100px) {
  .src-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .src-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .src-limits { grid-template-columns: 1fr; }
  .src-gap-cells { grid-template-columns: 1fr; }
  .src-unverified-row { grid-template-columns: 1fr; gap: 6px; }
  .src-unverified-end { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .src-tiles, .src-modes { grid-template-columns: 1fr; }
  .src-sources article { flex-wrap: wrap; }
  .src-limit-behaviour > div { grid-template-columns: 1fr; gap: 4px; }
}

/* What I can see, laid out as the prototype (session 18). */
.src-page-v2 .src-ph-side { align-items: flex-end; gap: 8px; }
.src-page-v2 .src-badge-quiet { background: var(--surface-2); color: var(--text-muted); border-color: var(--line); }
.src-page-v2 .src-rule { margin-bottom: 22px; }
.src-page-v2 .src-lrow { cursor: pointer; }
.src-page-v2 .src-lrow-still { cursor: default; }
.src-page-v2 .src-lrow-still:hover { background: transparent; }
.src-page-v2 .src-lrow-child { padding-left: 48px; }
.src-page-v2 .src-lrow .lm { white-space: normal; }
.src-page-v2 .src-lrow-more { padding: 4px 18px 14px 62px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); line-height: 1.6; background: var(--surface-2); }
.src-page-v2 .src-lrow-more p { margin: 8px 0 0; }
.src-page-v2 .src-worked-note { display: block; margin-bottom: 12px; }
.src-page-v2 .src-worked-head { gap: 10px; margin-bottom: 7px; }
.src-page-v2 .src-worked-says { font-size: 13.5px; line-height: 1.6; }
.src-page-v2 .src-limits-ledger { margin-bottom: 14px; }
.src-page-v2 .src-lc-unit { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.src-page-v2 .src-sub { font-size: 12px; color: var(--text-muted); margin: 4px 0 8px; }
.src-page-v2 .src-mrow { color: inherit; text-decoration: none; }
.src-page-v2 .src-sig-policy { line-height: 1.55; }
.src-page-v2 .src-more { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.src-page-v2 .src-more > summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 12px; }
.src-page-v2 .src-more > summary .st { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.src-page-v2 .src-more > summary .snote { font-size: 12px; color: var(--text-dim); }
