/* ==================================================================
   review-decision.css - Applicant File > Review & decision: the review
   workspace, the decision area, the offer, the deposit and the fee.

   Loads AFTER threshold-tokens.css, threshold-chrome.css (.cc-pill,
   .cc-btn), th-grid.css, all-files.css and af-requirements.css. The
   shell (.af-file-*), the effective-application reader (.af-section,
   .af-field, .af-rev-chip ...), the document viewer (.af-doc-viewer-*),
   the row sheet (.af-req-sheet) and its controls (.af-req-radio,
   .af-req-input, .af-req-textarea) are CONSUMED, never redeclared.

   Every rule here is scoped by an `rd-` class. Where a consumed class
   needs a different value inside this destination, the rule is written
   under an `rd-` ancestor and listed in README "Amendments to existing
   canon".

   TOKENS: no `--token:` declaration and no hex. Every colour resolves
   through --th-*; the only literals are sizes and three shadows / one
   scrim (oklch with alpha). Dark sits beside the light rule it retunes.

   Breakpoints are container queries on .af-file (the shell's own
   container), as in all-files.css:
     (max-width: 1320px)  1280 class: narrower navigator and panel
     (max-width: 1100px)  1000 class: navigator drawn collapsed by default
     (720px < width < 966px)  the navigator is never a column while the
                          panel is docked; Show contents opens it over
                          the evidence pane
     (max-width: 720px)   narrow: one pane, Evidence | Your recommendation
   Convert to @media at lift, adding the 232px sidenav (1320 -> 1552,
   1100 -> 1332, 966 -> 1198, 720 -> 952), as the All Files README says.
   ================================================================== */

/* ------------------------------------------------------------------
   Destination root and views
   ------------------------------------------------------------------ */
.rd-dest {
    padding: 14px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    position: relative;
    font-family: var(--th-font-sans);
    color: var(--th-ink);
}
.rd-dest svg { flex: none; }
.rd-dest :where(button, a, [tabindex]):focus-visible { outline: 2px solid var(--th-advant); outline-offset: 2px; }

/* Three views of the destination. Each link carries its own fact; the
   facts are never merged into one status. */
.rd-views { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.rd-dest a.rd-view,
.rd-view {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 150px;
    padding: 6px 12px 7px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius-5);
    background: var(--th-paper);
    color: var(--th-ink-2);
    text-decoration: none;
}
.rd-dest a.rd-view:hover { border-color: var(--th-line-2); color: var(--th-ink); background: var(--th-paper-2); }
.rd-dest a.rd-view[aria-current="page"] { border-color: var(--th-advant-deep); background: var(--th-paper-sunk); color: var(--th-ink); box-shadow: inset 0 -2px 0 var(--th-advant-deep); }
.rd-view-label { font-size: 13px; font-weight: 500; }
.rd-view-fact { font-size: 11.5px; color: var(--th-ink-2); }
.rd-view[aria-current="page"] .rd-view-label { font-weight: 600; }

/* Visually hidden polite live region (save and change notices). */
.rd-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------
   Card: every fact's panel (review, decision, offer, deposit, fee)
   ------------------------------------------------------------------ */
.rd-card {
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius-5);
    background: var(--th-paper-sunk);
    min-width: 0;
    position: relative;
}
.rd-card-head {
    padding: 10px 16px;
    border-bottom: 1px solid var(--th-line);
    display: flex;
    align-items: baseline;
    gap: 4px 12px;
    flex-wrap: wrap;
}
.rd-card-title { margin: 0; font-family: var(--th-font-serif); font-weight: 600; font-size: var(--th-size-15); line-height: 1.3; color: var(--th-ink); }
.rd-card-title:focus-visible { outline: 2px solid var(--th-advant); outline-offset: 2px; border-radius: var(--th-radius-2); }
.rd-card-sub { font-size: 12px; color: var(--th-ink-2); }
.rd-card-head-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-self: center; }
.rd-card-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 12px; }
.rd-card-foot { padding: 8px 16px; border-top: 1px solid var(--th-line-soft); font-size: 11px; color: var(--th-ink-2); line-height: 1.45; }
/* A panel the viewer may not read: its name and "Not available to you", nothing else. */
.rd-card.is-withheld .rd-card-head { border-bottom: 0; }
.rd-card.is-withheld .rd-card-sub { display: inline-flex; align-items: center; gap: 5px; color: var(--th-ink-2); }

.rd-subhead { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--th-ink-2); }
.rd-subhead-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rd-subhead-meta { font-size: 11px; color: var(--th-ink-2); }

/* The one-line current state of a panel. */
.rd-state { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.rd-state-text { margin: 0; font-family: var(--th-font-serif); font-weight: 600; font-size: var(--th-size-17); line-height: 1.35; color: var(--th-ink); }
.rd-state-meta { font-size: 12.5px; color: var(--th-ink-2); line-height: 1.45; flex-basis: 100%; }

/* Label / value facts. */
.rd-facts { margin: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 7px 14px; font-size: 13px; }
.rd-facts > dt { color: var(--th-ink-2); font-size: 12px; line-height: 1.5; }
.rd-facts > dd { margin: 0; color: var(--th-ink); line-height: 1.45; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.rd-fact-sub { font-size: 11.5px; color: var(--th-ink-2); line-height: 1.45; }
.rd-retained-fact { display: block; }
.rd-when { font-family: var(--th-font-mono); font-size: 12px; }
.rd-amount { font-family: var(--th-font-mono); font-size: var(--th-size-17); font-weight: 600; color: var(--th-ink); }

.rd-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rd-actions-note { flex-basis: 100%; font-size: 12px; color: var(--th-ink-2); line-height: 1.45; }
.rd-unavail { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--th-ink-2); }

/* Why something is blocked: a bounded list of reasons, warn-toned. */
.rd-reasons { border: 1px solid var(--th-warn); background: var(--th-warn-soft); border-radius: 4px; padding: 9px 12px; display: flex; flex-direction: column; gap: 5px; }
.rd-reasons-head { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--th-warn-ink); }
.rd-reasons-list { margin: 0; padding-left: 22px; font-size: 12.5px; color: var(--th-ink); line-height: 1.5; display: flex; flex-direction: column; gap: 2px; }

/* A status line: neutral by default, info / warn / risk by modifier. */
.rd-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid var(--th-line-2);
    background: var(--th-paper-2);
    border-radius: 4px;
    font-size: 12.5px;
    color: var(--th-ink);
    line-height: 1.45;
}
.rd-notice > svg { margin-top: 2px; color: var(--th-ink-3); }
.rd-notice.is-info { border-color: var(--th-advant); background: var(--th-advant-soft); }
.rd-notice.is-info > svg { color: var(--th-advant-deep); }
.rd-notice.is-warn { border-color: var(--th-warn); background: var(--th-warn-soft); }
.rd-notice.is-warn > svg { color: var(--th-warn-ink); }
.rd-notice.is-risk { border-color: var(--th-risk); background: var(--th-risk-soft); }
.rd-notice.is-risk > svg { color: var(--th-risk-ink); }
.rd-notice-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rd-notice-head { font-weight: 600; }
.rd-notice-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
/* A primary action inside a notice keeps its own fill (round 4 corrections, B2: it was white on paper). */
.rd-notice .cc-btn:not(.is-primary) { background: var(--th-paper); }

/* ------------------------------------------------------------------
   The three questions and needs-affirmation: text labels, each with
   its own shape, never colour alone.
     changed      solid border, advant tint
     unseen       outlined, filled dot
     unavailable  dashed border, no fill
     affirm       warn tint
     covers       ok tint, check
   ------------------------------------------------------------------ */
.rd-mark {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.6;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: var(--th-radius-3);
    white-space: nowrap;
    font-family: var(--th-font-sans);
}
.rd-mark.is-changed { color: var(--th-advant-deep); background: var(--th-advant-soft); border-color: var(--th-advant); }
.rd-mark.is-unseen { color: var(--th-ink); background: var(--th-paper); border-color: var(--th-ink-3); }
.rd-mark-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--th-ink); display: inline-block; }
.rd-mark.is-unavailable { color: var(--th-ink-2); background: transparent; border-color: var(--th-ink-4); border-style: dashed; }
.rd-mark.is-affirm { color: var(--th-warn-ink); background: var(--th-warn-soft); border-color: var(--th-warn); }
.rd-mark.is-covers { color: var(--th-ok-ink); background: var(--th-ok-soft); border-color: var(--th-ok); }
.rd-mark.is-quiet { color: var(--th-ink-2); background: var(--th-paper-2); border-color: var(--th-line-2); }
.rd-marks { display: flex; flex-wrap: wrap; gap: 4px; }
.rd-nav .rd-marks { max-width: 100%; }

/* Neutral kind tag on a history entry (Proposal, Release, Retraction ...). */
.rd-tag { font-family: var(--th-font-mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--th-ink-2); border: 1px solid var(--th-line-2); border-radius: var(--th-radius-2); padding: 0 5px; line-height: 1.7; white-space: nowrap; }

/* ------------------------------------------------------------------
   Review card: assignments, coverage, disagreement, information
   requests, and other reviewers' completed recommendations. Above the
   workspace; collapsed to its summary line by default.
   ------------------------------------------------------------------ */
.rd-review-toggle {
    display: flex;
    align-items: center;
    gap: 6px 10px;
    flex-wrap: wrap;
    width: 100%;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    color: var(--th-ink);
    cursor: pointer;
    border-radius: var(--th-radius-5);
}
.rd-review-toggle:hover { background: var(--th-paper-2); }
.rd-review-chevron { color: var(--th-ink-4); transition: transform .12s; }
.rd-review-toggle[aria-expanded="true"] .rd-review-chevron { transform: rotate(90deg); }
.rd-review-toggle[aria-expanded="true"] { border-bottom: 1px solid var(--th-line); border-radius: var(--th-radius-5) var(--th-radius-5) 0 0; }
.rd-review-name { font-family: var(--th-font-serif); font-weight: 600; font-size: var(--th-size-15); }
.rd-review-summary { font-size: 12.5px; color: var(--th-ink-2); flex: 1 1 260px; min-width: 0; }
.rd-review-marks { display: flex; gap: 4px; flex-wrap: wrap; }

.rd-assigns { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.rd-assign {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) auto;
    gap: 4px 14px;
    padding: 9px 0;
    border-top: 1px solid var(--th-line-soft);
    align-items: baseline;
}
.rd-assign:first-child { border-top: 0; }
.rd-assign-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rd-assign-name { font-size: 13px; font-weight: 500; color: var(--th-ink); }
.rd-assign-role { font-size: 11.5px; color: var(--th-ink-2); }
.rd-assign-state { font-size: 12.5px; color: var(--th-ink-2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-width: 0; line-height: 1.45; }
.rd-assign-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rd-assign.is-open .rd-assign-name { color: var(--th-ink-2); font-weight: 400; font-style: italic; }

/* A completed recommendation, readable by authorized review staff. */
.rd-rec { border: 1px solid var(--th-line); border-radius: 4px; background: var(--th-paper); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rd-rec-head { display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; }
.rd-rec-outcome { font-weight: 600; font-size: 13.5px; color: var(--th-ink); }
.rd-rec-code { font-family: var(--th-font-mono); font-size: 11px; color: var(--th-ink-2); }
.rd-rec-meta { font-size: 11.5px; color: var(--th-ink-2); }
.rd-rec-narr { margin: 0; font-size: 13px; color: var(--th-ink-2); line-height: 1.55; white-space: pre-line; max-width: 72ch; overflow-wrap: anywhere; }
.rd-rec-cover { font-size: 11.5px; color: var(--th-ink-2); line-height: 1.45; }
.rd-rec.is-superseded { border-style: dashed; background: transparent; }
.rd-rec.is-superseded .rd-rec-outcome, .rd-rec.is-superseded .rd-rec-narr { color: var(--th-ink-2); }
.rd-recs { display: flex; flex-direction: column; gap: 8px; }
.rd-rec-toggle { align-self: flex-start; }

/* Eligible / not eligible people in an assignment or resolver choice. */
.rd-people { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rd-person-why { font-size: 11.5px; color: var(--th-ink-2); line-height: 1.4; }
.rd-person.is-ineligible { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px dashed var(--th-line-2); border-radius: 4px; }
.rd-person.is-ineligible .rd-person-name { font-size: 13px; color: var(--th-ink-2); font-weight: 500; }

/* ------------------------------------------------------------------
   Workspace: navigator | evidence | recommendation panel.
   The navigator collapses to a strip; the panel docks and collapses
   to a strip. Never four permanent columns.
   ------------------------------------------------------------------ */
.rd-ws {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr) 380px;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius-5);
    background: var(--th-paper-sunk);
    min-height: 720px;
    min-width: 0;
}
.rd-ws.is-nav-collapsed { grid-template-columns: 44px minmax(0, 1fr) 380px; }
.rd-ws.is-panel-collapsed { grid-template-columns: 232px minmax(0, 1fr) 48px; }
.rd-ws.is-nav-collapsed.is-panel-collapsed { grid-template-columns: 44px minmax(0, 1fr) 48px; }

/* Narrow-only pane switch (Evidence | Your recommendation). */
.rd-ws-switch { display: none; }

/* Navigator */
.rd-nav {
    align-self: start;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 10px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.rd-nav-head { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 14px; min-height: 26px; }
.rd-nav-title { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--th-ink-2); }
.rd-iconbtn {
    font: inherit;
    width: 28px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--th-line-2);
    border-radius: var(--th-radius-3);
    background: var(--th-paper);
    color: var(--th-ink-2);
    cursor: pointer;
    padding: 0;
    flex: none;
}
.rd-iconbtn:hover { color: var(--th-ink); border-color: var(--th-ink-4); }
.rd-iconbtn.is-flip svg { transform: rotate(180deg); }
.rd-nav-head .rd-iconbtn { margin-left: auto; }
/* The band control (Show contents over the evidence pane) exists only between 720 and 966. */
.rd-nav-head > .rd-nav-band { display: none; }
.rd-nav-group { display: flex; flex-direction: column; }
.rd-nav-group-title { margin: 0; padding: 4px 14px 3px; font-size: 11px; font-weight: 600; color: var(--th-ink-2); }
.rd-nav-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.rd-nav-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    width: 100%;
    padding: 6px 12px 6px 12px;
    border: 0;
    border-left: 2px solid transparent;
    background: transparent;
    font: inherit;
    text-align: left;
    color: var(--th-ink-2);
    cursor: pointer;
}
.rd-nav-item:hover { background: var(--th-paper-2); color: var(--th-ink); }
.rd-nav-item[aria-current="true"] { background: var(--th-advant-soft); color: var(--th-ink); border-left-color: var(--th-advant-deep); }
.rd-nav-item[aria-current="true"] .rd-nav-label { font-weight: 600; }
.rd-dest .rd-nav-item:focus-visible { outline-offset: -2px; }
.rd-nav-label { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.rd-nav-meta { font-size: 11px; color: var(--th-ink-2); line-height: 1.35; }
.rd-nav-item.is-unavailable .rd-nav-label { color: var(--th-ink-2); }
.rd-nav-strip { display: none; }
/* Collapsed: a 44px strip with the expand control and a vertical name. The head stacks inside the
   strip, centred, so nothing overflows and no scrollbar appears (round 4 corrections, B4). */
.rd-ws.is-nav-collapsed .rd-nav { padding: 10px 0; align-items: center; overflow-x: hidden; }
.rd-ws.is-nav-collapsed .rd-nav-head { padding: 0; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.rd-ws.is-nav-collapsed .rd-nav-head .rd-iconbtn { margin: 0; }
.rd-ws.is-nav-collapsed .rd-nav-title,
.rd-ws.is-nav-collapsed .rd-nav-group { display: none; }
.rd-ws.is-nav-collapsed .rd-nav-strip { display: block; writing-mode: vertical-rl; font-size: 11.5px; color: var(--th-ink-2); letter-spacing: 0.04em; margin-top: 0; white-space: nowrap; }

/* Evidence */
.rd-evidence {
    min-width: 0;
    border-left: 1px solid var(--th-line);
    border-right: 1px solid var(--th-line);
    background: var(--th-paper);
    padding: 14px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rd-ev-head { display: flex; flex-direction: column; gap: 5px; }
.rd-ev-title-row { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.rd-ev-title { margin: 0; font-family: var(--th-font-serif); font-weight: 600; font-size: var(--th-size-17); color: var(--th-ink); }
.rd-ev-title:focus-visible { outline: 2px solid var(--th-advant); outline-offset: 2px; border-radius: var(--th-radius-2); }
.rd-ev-context { margin: 0; font-size: 12.5px; color: var(--th-ink-2); line-height: 1.45; }
.rd-ev-seen { margin: 0; font-size: 11.5px; color: var(--th-ink-2); line-height: 1.45; }
.rd-ev-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rd-ev-pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--th-line-soft); font-size: 12px; color: var(--th-ink-2); }
.rd-ev-pager .cc-btn { white-space: nowrap; }
.rd-ev-pager-gap { flex: 1; }

/* Answers inside the evidence area: the reader's classes, plus the
   change marks under a changed value and its previous value. */
.rd-evidence .af-field { flex-wrap: wrap; }
.rd-field-changed { box-shadow: inset 3px 0 0 var(--th-advant); }
.rd-field-marks { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-left: 204px; }
.rd-was { font-size: 11.5px; color: var(--th-ink-2); }
.rd-was-value { font-family: var(--th-font-mono); }
.rd-evidence .af-instance.rd-field-changed { box-shadow: inset 3px 0 0 var(--th-advant); }
.rd-instance-marks { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }

/* The document viewer inside the evidence column: the column is the
   scroller, so the viewer is not sticky and takes a fixed reading
   height. Read-only here (no Accept / Reject / Supersede). */
.rd-evidence .af-doc-viewer { position: static; height: 860px; }

/* An item the viewer may not read or that cannot be shown: said beside
   the item, never openable, never "seen". */
.rd-ev-blocked { border: 1px dashed var(--th-line-2); border-radius: var(--th-radius-5); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rd-ev-blocked-head { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--th-ink); }
.rd-ev-blocked-body { margin: 0; font-size: 12.5px; color: var(--th-ink-2); line-height: 1.5; max-width: 560px; }

/* Recommendation panel */
.rd-panel {
    align-self: start;
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding: 12px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.rd-panel-head { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.rd-panel-title { margin: 0; font-family: var(--th-font-serif); font-weight: 600; font-size: var(--th-size-15); color: var(--th-ink); }
.rd-panel-title:focus-visible { outline: 2px solid var(--th-advant); outline-offset: 2px; border-radius: var(--th-radius-2); }
.rd-panel-head .rd-iconbtn { margin-left: auto; }
.rd-panel-assign { margin: 0; font-size: 12px; color: var(--th-ink-2); line-height: 1.5; }
.rd-panel-section { display: flex; flex-direction: column; gap: 6px; }
.rd-panel-strip { display: none; }
.rd-ws.is-panel-collapsed .rd-panel { padding: 10px 0; align-items: center; }
.rd-ws.is-panel-collapsed .rd-panel > :not(.rd-panel-head) { display: none; }
.rd-ws.is-panel-collapsed .rd-panel-head { flex-direction: column; gap: 8px; }
.rd-ws.is-panel-collapsed .rd-panel-head .rd-iconbtn { margin: 0; order: -1; }
.rd-ws.is-panel-collapsed .rd-panel-title { display: none; }
.rd-ws.is-panel-collapsed .rd-panel-strip { display: block; writing-mode: vertical-rl; font-size: 11.5px; color: var(--th-ink-2); letter-spacing: 0.04em; white-space: nowrap; }

.rd-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rd-legend, .rd-label { padding: 0; font-size: 12px; font-weight: 600; color: var(--th-ink-2); }
.rd-label-opt { font-weight: 400; color: var(--th-ink-2); }
.rd-hint { margin: 0; font-size: 11.5px; color: var(--th-ink-2); line-height: 1.45; }
.rd-error { margin: 0; display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: var(--th-risk-ink); line-height: 1.45; font-weight: 500; }
.rd-error > svg { margin-top: 2px; }
.rd-select {
    font: inherit;
    font-size: 13px;
    padding: 6px 9px;
    border: 1px solid var(--th-line-2);
    border-radius: var(--th-radius-3);
    background: var(--th-paper);
    color: var(--th-ink);
    width: 100%;
}
.rd-select:focus-visible { outline: 2px solid var(--th-advant); outline-offset: 1px; }
.rd-textarea { width: 100%; min-height: 168px; line-height: 1.5; box-sizing: border-box; }
:is(.rd-dest, .rd-dialog-body) .af-req-input[aria-invalid="true"], :is(.rd-dest, .rd-dialog-body) .af-req-textarea[aria-invalid="true"] { border-color: var(--th-risk); }
.rd-count { font-family: var(--th-font-mono); font-size: 11px; color: var(--th-ink-2); align-self: flex-end; }
.rd-save { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--th-ink-2); }
.rd-save.is-problem { color: var(--th-warn-ink); }
.rd-visibility { margin: 0; display: flex; align-items: flex-start; gap: 6px; font-size: 11.5px; color: var(--th-ink-2); line-height: 1.45; }
.rd-visibility > svg { margin-top: 2px; }
.rd-complete { display: flex; flex-direction: column; gap: 7px; padding-top: 12px; border-top: 1px solid var(--th-line-soft); }
.rd-complete-note { margin: 0; font-size: 12px; color: var(--th-ink-2); line-height: 1.45; }
.rd-complete .cc-btn.is-primary { align-self: flex-start; }
.rd-dest .cc-btn.is-primary[aria-disabled="true"] { background: var(--th-advant-deep); border-color: var(--th-advant-deep); color: var(--th-advant-fg); opacity: 0.45; cursor: not-allowed; }
.rd-done { display: flex; flex-direction: column; gap: 6px; }
.rd-done-head { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--th-ink); }
.rd-done-head > svg { color: var(--th-ok); }
.rd-covers { margin: 0; padding-left: 18px; font-size: 12px; color: var(--th-ink-2); line-height: 1.5; }

/* ------------------------------------------------------------------
   Decision area
   ------------------------------------------------------------------ */
.rd-decision-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.rd-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rd-coverage { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.rd-coverage-item { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; border-top: 1px solid var(--th-line-soft); }
.rd-coverage-item:first-child { border-top: 0; padding-top: 0; }
.rd-coverage-head { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 13px; }
.rd-coverage-who { font-weight: 500; }
.rd-coverage-what { font-size: 11.5px; color: var(--th-ink-2); line-height: 1.45; }

/* History and the revision list: newest first, bounded, "Show earlier". */
.rd-history { display: flex; flex-direction: column; gap: 6px; }
.rd-hist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.rd-hist-item { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 2px 14px; padding: 8px 0; border-top: 1px solid var(--th-line-soft); }
.rd-hist-when { min-width: 0; overflow-wrap: anywhere; font-family: var(--th-font-mono); font-size: 11px; color: var(--th-ink-2); line-height: 1.6; }
.rd-hist-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rd-hist-what { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 13px; color: var(--th-ink); line-height: 1.45; }
.rd-hist-why { font-size: 12.5px; color: var(--th-ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.rd-hist-meta { font-size: 11.5px; color: var(--th-ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.rd-hist-more { align-self: flex-start; }
.rd-hist-empty { margin: 0; font-size: 12.5px; color: var(--th-ink-2); }

/* ------------------------------------------------------------------
   Offer and money
   ------------------------------------------------------------------ */
.rd-money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
/* Request, authorization and confirmation: three lines, never one. */
.rd-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0; }
.rd-step { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--th-line-soft); }
.rd-step:first-child { border-top: 0; }
.rd-step-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; border: 1.5px solid var(--th-ink-3); background: var(--th-ink-3); }
.rd-step.is-waiting .rd-step-dot { background: transparent; border-style: dashed; }
.rd-step.is-none .rd-step-dot { background: transparent; border-color: var(--th-line-2); }
.rd-step-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rd-step-label { font-size: 13px; font-weight: 500; color: var(--th-ink); }
.rd-step-state { font-size: 12px; color: var(--th-ink-2); line-height: 1.45; }
.rd-step.is-none .rd-step-label { color: var(--th-ink-2); font-weight: 400; }

/* The deposit checklist row's only content: where the deposit lives. */
.rd-req-link { font-size: 12.5px; }
.rd-req-note { margin: 0; font-size: 12px; color: var(--th-ink-2); line-height: 1.45; }

/* The fee panel, opened inline from its checklist row. */
.rd-fee { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--th-line); border-radius: var(--th-radius-5); background: var(--th-paper); }
.rd-fee-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-fee-title { margin: 0; font-family: var(--th-font-serif); font-weight: 600; font-size: 14px; }

/* ------------------------------------------------------------------
   Dialog bodies (finalize, reschedule, retract, affirm, money confirmations)
   The frame, focus, dismissal and notices are ThresholdDialog's
   (threshold-dialog.css). Its body renders at the layout root, outside
   .rd-dest, inside .rd-dialog-body; rules the destination scopes also
   apply there.
   ------------------------------------------------------------------ */
.rd-dialog-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* An action inside the body (Propose decision beside a refused offer) keeps its own width. */
.rd-dialog-body > .cc-btn { align-self: flex-start; }
.rd-summary { border: 1px solid var(--th-line); border-radius: 4px; background: var(--th-paper); padding: 10px 12px; }
.rd-summary .rd-facts { grid-template-columns: 138px minmax(0, 1fr); }
.rd-when-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: 10px; }
.rd-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rd-field > .af-req-input, .rd-field > .af-req-textarea { width: 100%; box-sizing: border-box; }
.rd-instant { margin: 0; display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 4px 14px; font-size: 12.5px; padding: 9px 12px; border: 1px solid var(--th-line); border-radius: 4px; background: var(--th-paper-2); }
.rd-instant > dt { color: var(--th-ink-2); font-size: 12px; }
.rd-instant > dd { margin: 0; color: var(--th-ink); font-family: var(--th-font-mono); font-size: 12px; line-height: 1.5; }
.rd-instant.is-refused { border-color: var(--th-risk); background: var(--th-risk-soft); }
/* Round 4 corrections, A5 and A7: the zone is a fact beside Date and Time; "UTC-4" stays whole. */
.rd-zone { min-height: 32px; display: flex; align-items: center; font-size: 13px; color: var(--th-ink); }
/* Round 4 corrections, fourth note, item 5: every file reference, date and clock time is an rd-nobreak run
   too (the generator wraps them); rd-nobreak-host carries no style and keeps the sentence around a run one
   inline box inside a flex or grid parent. */
.rd-nobreak { white-space: nowrap; }
.rd-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.45; color: var(--th-ink); }
.rd-check-box { width: 15px; height: 15px; flex: none; margin-top: 2px; border: 1.5px solid var(--th-line-2); border-radius: 3px; background: var(--th-paper); display: inline-grid; place-items: center; color: var(--th-advant-fg); }
.rd-check[aria-checked="true"] .rd-check-box { background: var(--th-advant-deep); border-color: var(--th-advant-deep); }
button.rd-check { font: inherit; font-size: 13px; text-align: left; background: transparent; border: 0; padding: 0; cursor: pointer; color: var(--th-ink); }
button.rd-check:focus-visible, .rd-fee :where(button, a):focus-visible { outline: 2px solid var(--th-advant); outline-offset: 2px; }
.rd-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--th-ink-2); line-height: 1.55; display: flex; flex-direction: column; gap: 2px; }

/* ------------------------------------------------------------------
   Shared operation states, drawn once and reused in every panel
   ------------------------------------------------------------------ */
.rd-op { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.rd-op-head { margin: 0; display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--th-ink); line-height: 1.4; }
.rd-op-head > svg { margin-top: 2px; color: var(--th-ink-3); }
.rd-op-body { margin: 0 0 0 22px; font-size: 12.5px; color: var(--th-ink-2); line-height: 1.5; max-width: 560px; }
.rd-op-actions { margin-left: 22px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rd-op-actions .cc-btn:not(.is-primary) { background: var(--th-paper); }
.rd-skel { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.rd-skel-line { height: 11px; border-radius: var(--th-radius-2); background: var(--th-paper-2); }
.rd-skel-a { width: 62%; } .rd-skel-b { width: 80%; } .rd-skel-c { width: 45%; } .rd-skel-d { width: 70%; }

/* ------------------------------------------------------------------
   Held events from the integration (External authority, 2026-10-09).
   A conflict is drawn dashed warn, a waiting event dashed neutral; each
   also carries its text label (Held · conflict, Held · waiting).
   ------------------------------------------------------------------ */
.rd-events { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rd-event { border: 1px dashed var(--th-warn); border-radius: 4px; background: var(--th-paper); padding: 10px 12px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.rd-event.is-waiting { border-color: var(--th-line-2); }
.rd-event-head { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.rd-event-title { font-size: 13px; font-weight: 600; color: var(--th-ink); }
.rd-event .rd-facts { grid-template-columns: 140px minmax(0, 1fr); }

/* ------------------------------------------------------------------
   1280 class
   ------------------------------------------------------------------ */
@media (max-width: 1552px) {
    .rd-ws { grid-template-columns: 208px minmax(0, 1fr) 344px; }
    .rd-ws.is-nav-collapsed { grid-template-columns: 44px minmax(0, 1fr) 344px; }
    .rd-ws.is-panel-collapsed { grid-template-columns: 208px minmax(0, 1fr) 48px; }
    .rd-decision-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* ------------------------------------------------------------------
   1000 class: the navigator is drawn collapsed by default (component
   rule); expanded it narrows to 196px. The panel narrows to 320px.
   ------------------------------------------------------------------ */
@media (max-width: 1332px) {
    .rd-ws { grid-template-columns: 196px minmax(0, 1fr) 320px; }
    .rd-ws.is-nav-collapsed { grid-template-columns: 44px minmax(0, 1fr) 320px; }
    .rd-ws.is-panel-collapsed { grid-template-columns: 196px minmax(0, 1fr) 48px; }
    .rd-field-marks { padding-left: 0; }
    .rd-decision-grid { grid-template-columns: minmax(0, 1fr); }
    .rd-money { grid-template-columns: minmax(0, 1fr); }
    .rd-evidence { padding: 12px 14px 20px; }
}

/* ------------------------------------------------------------------
   Above narrow, below 966 (round 4 corrections, seventh note). With
   the panel docked, three full columns would leave the evidence pane
   under 400px (155px at 721), and the viewer's toolbar needs 200px.
   So here the navigator is never a column: it is the 44px rail
   whatever NavCollapsed says, and the evidence pane keeps the room
   (307px at 721, 386px at 800, 551px at 965). Show contents
   (.rd-nav-band) opens it over the evidence pane (.is-nav-open); the
   evidence pane does not narrow. With the panel collapsed to its strip
   the docked navigator still leaves 427px or more, so nothing changes.
   ------------------------------------------------------------------ */
@media (952px < width < 1198px) {
    .rd-ws:not(.is-panel-collapsed) { grid-template-columns: 44px minmax(0, 1fr) 320px; }
    .rd-ws:not(.is-panel-collapsed) .rd-nav-dock { display: none; }
    .rd-ws:not(.is-panel-collapsed) .rd-nav-band { display: inline-grid; }
    .rd-ws:not(.is-panel-collapsed):not(.is-nav-open) .rd-nav { padding: 10px 0; align-items: center; overflow-x: hidden; }
    .rd-ws:not(.is-panel-collapsed):not(.is-nav-open) .rd-nav-head { padding: 0; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
    .rd-ws:not(.is-panel-collapsed):not(.is-nav-open) .rd-nav-head .rd-iconbtn { margin: 0; }
    .rd-ws:not(.is-panel-collapsed):not(.is-nav-open) .rd-nav-title,
    .rd-ws:not(.is-panel-collapsed):not(.is-nav-open) .rd-nav-group { display: none; }
    .rd-ws:not(.is-panel-collapsed):not(.is-nav-open) .rd-nav-strip { display: block; writing-mode: vertical-rl; font-size: 11.5px; color: var(--th-ink-2); letter-spacing: 0.04em; margin-top: 0; white-space: nowrap; }
    /* Open: 232px wide from the rail's track, over the evidence pane; the tracks do not move. */
    .rd-ws.is-nav-open:not(.is-panel-collapsed) .rd-nav {
        width: 232px;
        justify-self: start;
        z-index: 6;
        background: var(--th-paper-sunk);
        border-right: 1px solid var(--th-line-2);
        box-shadow: 8px 0 24px oklch(20% 0.01 255 / 0.16);
    }
    [data-theme="dark"] .rd-ws.is-nav-open:not(.is-panel-collapsed) .rd-nav { box-shadow: 8px 0 24px oklch(2% 0.01 255 / 0.55); }
}

/* ------------------------------------------------------------------
   Narrow (400; also 320 and 200% zoom): one pane with two explicit
   controls. The other pane stays mounted (display: none), so its
   section, page, scroll and draft are kept exactly.
   ------------------------------------------------------------------ */
@media (max-width: 952px) {
    .rd-dest { padding: 12px 16px 24px; gap: 12px; }
    .rd-views { gap: 4px; }
    .rd-dest a.rd-view, .rd-view { min-width: 0; flex: 1 1 30%; padding: 6px 9px; min-height: 44px; }
    .rd-card-head, .rd-card-body, .rd-card-foot { padding-left: 12px; padding-right: 12px; }
    .rd-review-toggle { padding: 10px 12px; }
    .rd-facts { grid-template-columns: minmax(0, 1fr); gap: 1px 0; }
    .rd-facts > dd { margin-bottom: 7px; }
    .rd-assign { grid-template-columns: minmax(0, 1fr); gap: 3px; }
    .rd-assign-actions { justify-content: flex-start; }
    .rd-hist-item { grid-template-columns: minmax(0, 1fr); gap: 2px; }

    .rd-ws, .rd-ws.is-nav-collapsed, .rd-ws.is-panel-collapsed, .rd-ws.is-nav-collapsed.is-panel-collapsed { display: block; border: 0; background: transparent; min-height: 0; }
    .rd-ws-switch {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 5;
        background: var(--th-paper);
        padding: 0 0 10px;
    }
    .rd-ws-tab {
        flex: 1 1 50%;
        min-height: 44px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        border: 1px solid var(--th-line-2);
        background: var(--th-paper-sunk);
        color: var(--th-ink-2);
        font: inherit;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        padding: 4px 8px;
    }
    .rd-ws-tab:first-child { border-radius: var(--th-radius-5) 0 0 var(--th-radius-5); }
    .rd-ws-tab:last-child { border-radius: 0 var(--th-radius-5) var(--th-radius-5) 0; border-left: 0; }
    .rd-ws-tab[aria-selected="true"] { background: var(--th-advant-soft); color: var(--th-advant-deep); font-weight: 600; border-color: var(--th-advant); }
    .rd-ws-tab:last-child[aria-selected="true"] { border-left: 1px solid var(--th-advant); }
    .rd-ws-tab:first-child[aria-selected="true"] + .rd-ws-tab { border-left: 0; }
    .rd-ws-tab-sub { font-size: 11px; font-weight: 400; color: var(--th-ink-2); }
    .rd-ws-tab[aria-selected="true"] .rd-ws-tab-sub { color: var(--th-advant-deep); }
    .rd-dest .rd-ws-tab:focus-visible { outline-offset: -3px; }

    .rd-ws.is-pane-rec .rd-nav, .rd-ws.is-pane-rec .rd-evidence { display: none; }
    .rd-ws.is-pane-evidence .rd-panel { display: none; }

    /* Navigator: the contents disclosure at the head of the Evidence pane. */
    .rd-nav, .rd-ws.is-nav-collapsed .rd-nav {
        position: static;
        max-height: none;
        overflow: visible;
        border: 1px solid var(--th-line);
        border-radius: var(--th-radius-5);
        background: var(--th-paper-sunk);
        padding: 8px 0 10px;
        margin-bottom: 10px;
        align-items: stretch;
    }
    .rd-ws.is-nav-collapsed .rd-nav { padding: 6px 0; }
    .rd-ws.is-nav-collapsed .rd-nav-head { padding: 0 8px 0 12px; flex-direction: row; width: auto; }
    .rd-ws.is-nav-collapsed .rd-nav-head .rd-iconbtn { margin-left: auto; }
    .rd-ws.is-nav-collapsed .rd-nav-title { display: block; }
    .rd-ws.is-nav-collapsed .rd-nav-strip { writing-mode: horizontal-tb; margin: 0; font-size: 11.5px; letter-spacing: 0; }
    .rd-ws.is-nav-collapsed .rd-nav-head { flex-wrap: nowrap; }
    .rd-nav-item { min-height: 44px; justify-content: center; }
    .rd-iconbtn { width: 44px; height: 40px; }

    .rd-evidence { border: 0; padding: 0; background: transparent; }
    .rd-evidence .af-doc-viewer { height: 620px; }
    .rd-evidence .af-section { margin: 0; }
    .rd-field-marks { padding-left: 0; }

    .rd-panel, .rd-ws.is-panel-collapsed .rd-panel { position: static; max-height: none; overflow: visible; padding: 12px; border: 1px solid var(--th-line); border-radius: var(--th-radius-5); background: var(--th-paper-sunk); align-items: stretch; }
    .rd-ws.is-panel-collapsed .rd-panel > :not(.rd-panel-head) { display: flex; }
    .rd-ws.is-panel-collapsed .rd-panel-head { flex-direction: row; }
    .rd-ws.is-panel-collapsed .rd-panel-title { display: block; }
    .rd-ws.is-panel-collapsed .rd-panel-strip { display: none; }
    /* The dock control has no meaning in one pane; the switch replaces it. */
    .rd-panel-head .rd-iconbtn { display: none; }

    .rd-when-row { grid-template-columns: minmax(0, 1fr); }
    /* Round 4 corrections, B3: a repeating-group instance head wraps, the title on its own line. */
    .rd-evidence .af-instance-head { flex-wrap: wrap; }
    .rd-evidence .af-instance-title { flex: 1 0 100%; }
    .rd-summary .rd-facts, .rd-instant { grid-template-columns: minmax(0, 1fr); }
    .rd-actions .cc-btn, .rd-op-actions .cc-btn, .rd-notice-actions .cc-btn { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .rd-review-chevron { transition: none; }
}

/* Positioned root contains the polite live region. Narrow event facts preserve their text. */
.rd-dest { position: relative; }
@media (max-width: 952px) { .rd-event .rd-facts { grid-template-columns: minmax(0, 1fr); } }

/* All offers on this file (AD-O14 to O18): one row per offer, newest first. */
.rd-offers { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.rd-offers-row {
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(0, 1fr) auto;
    gap: 4px 14px;
    padding: 9px 0;
    border-top: 1px solid var(--th-line-soft);
    align-items: baseline;
}
.rd-offers-row:first-child { border-top: 0; }
.rd-offers-what { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rd-offers-name { font-size: 13px; font-weight: 500; color: var(--th-ink); }
.rd-offers-meta { font-size: 11.5px; color: var(--th-ink-2); }
.rd-offers-state { font-size: 12.5px; color: var(--th-ink-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.45; }
.rd-offers-money { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.rd-offers-go { display: flex; justify-content: flex-end; }
.rd-offers-shown { font-size: 12px; color: var(--th-ink-3); }
.rd-offers-row.is-shown .rd-offers-name { font-weight: 600; }
@media (max-width: 952px) {
    .rd-offers-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
    .rd-offers-go { justify-content: flex-start; }
}
