/* The deal file (D2 Task 20): the right pane of the Desk and the full page of a deal. The look is Desk.dc.html's right pane and the colour
   board (2026-11-06-desk-color.html): four tiles, each on its own work colour (green revenue with a bar per month and the rule's line, sky
   balance, purple positions, yellow per day), then the verdict, who is already in, month by month, and three cards. Every colour is a token
   of tokens.css; nothing here names a colour. The host is a size container, so the layout follows the room the pane has (the Desk's pane is
   narrower than the page), not the window. Values a script sets per element are read from custom properties (--r a bar's share of its
   scale, --n the number of bars, --delay an entrance's delay). */

.dfHost { grid-column: 1 / -1; min-width: 0; min-height: 0; overflow-y: auto; container-type: inline-size; container-name: df; }
.deskPane > .dfHost { grid-column: auto; flex: 1 1 0; }
.df { display: flex; flex-direction: column; gap: 16px; width: 100%; padding: 22px 28px 32px; }
.dfPage { max-width: 1240px; margin: 0 auto; }
.dfMuted { color: var(--ink-3); }

/* ---- Header ---------------------------------------------------------------------------------------------------------------------- */
.dfHead { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; }
.dfBack { display: inline-flex; flex: none; align-items: center; gap: 2px; min-height: 44px; margin: -6px 0 -6px -10px; padding: 0 10px 0 6px; border-radius: var(--r-md); color: var(--ink-2); font-size: var(--fs-sm-2); font-weight: 600; text-decoration: none; }
.dfBack:hover { background: var(--nav-hover); color: var(--ink); }
.dfTitle { flex: 1 1 320px; min-width: 0; }
.dfTitle h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 650 26px var(--font-head); letter-spacing: -0.025em; }
.dfPending { color: var(--ink-3); font-weight: 500; }
.dfLine { margin-top: 5px; color: var(--ink-3); font-size: var(--fs-sm-2); }
.dfActions { display: flex; flex: none; gap: 8px; margin-left: auto; }
.dfChip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); background: var(--info-bg); color: var(--info-ink); font: 600 var(--fs-sm-2) var(--font-body); letter-spacing: 0; white-space: nowrap; }
.dfChip.new { background: var(--status-new-bg); color: var(--status-new-ink); }
.dfChip.missing { background: var(--status-missing-bg); color: var(--status-missing-ink); }
.dfChip.ready { background: var(--status-ready-bg); color: var(--status-ready-ink); }
.dfChip.declined { background: var(--status-declined-bg); color: var(--status-declined-ink); }
.dfChip.info { background: var(--info-bg); color: var(--info-ink); }

/* ---- The decision buttons and their two small panels (Task 21) ------------------------------------------------------------------- */
/* The panels hang under the buttons. The mockups show neither, so they are made of the approved parts: the card's surface and shadow, the
   ghost and primary buttons, the pill chips' type. */
.dfActions { position: relative; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.dfPop { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; display: flex; flex-direction: column; gap: 2px; width: min(320px, calc(100vw - 32px)); padding: 10px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-dialog); animation: rise var(--t-ui) var(--ease-out) both; }
.dfPopHead { padding: 2px 8px 6px; color: var(--ink-3); font: 600 var(--fs-sm-2) var(--font-body); }
.dfPopItem { display: block; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); font: 600 13px var(--font-body); text-align: left; cursor: pointer; transition: background var(--t-hover); }
.dfPopItem:hover, .dfPopItem[aria-expanded="true"] { background: var(--nav-hover); }
.dfPopRule { width: 100%; height: 1px; margin: 4px 0; border: 0; background: var(--line-soft); }
.dfPopOther { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 8px; }
.dfPopField { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-field); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: 400 13px var(--font-body); }
.dfPopField:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.dfPopFoot { display: flex; align-items: center; gap: 10px; padding: 6px 8px 0; }
.dfCopied { color: var(--status-ready-ink); font: 600 var(--fs-sm-2) var(--font-body); }
.dfPopNote { padding: 6px 8px 2px; font-size: var(--fs-sm-2); }
.dfAskList { margin: 0; padding: 0 8px 0 26px; font-size: 13px; line-height: 1.5; user-select: text; }
.dfAskList li + li { margin-top: 4px; }

/* ---- The four tiles --------------------------------------------------------------------------------------------------------------- */
.dfTiles { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 12px; }
.dfTile { gap: 6px; align-content: start; padding: 15px 16px; border-radius: var(--r-3xl); }
.dfTile.ready { background: var(--status-ready-bg); color: var(--status-ready-ink); }
.dfTile.sky { background: var(--status-sky-bg); color: var(--status-sky-ink); }
.dfTile.new { background: var(--status-new-bg); color: var(--status-new-ink); }
.dfTile.missing { background: var(--status-missing-bg); color: var(--status-missing-ink); }
.dfTileKey { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm-2); font-weight: 600; }
.dfTileKey i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: color-mix(in srgb, var(--surface) 65%, transparent); }
.dfTileValue { display: block; }
.dfBig { color: var(--ink); font: 650 27px/1.05 var(--font-head); letter-spacing: -0.025em; }
.dfTileValue small { color: inherit; font: 500 13px var(--font-body); letter-spacing: 0; }
.dfTileNote { font-size: var(--fs-sm); }
.dfDash { color: var(--ink-3); cursor: help; }
.dfBig.dfDash { font-size: 22px; }

/* The revenue bars of the tile: one scale, 0 to 700K, and the rule's line across them. */
.dfBars { --plot: 56px; margin-top: 8px; }
.dfPlot { position: relative; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; align-items: end; height: var(--plot); }
.dfBar { display: block; justify-self: center; width: 100%; max-width: 46px; height: calc(var(--plot) * var(--r, 0)); min-height: 2px; border-radius: 8px 8px 4px 4px; background: var(--status-ready-mid); transform-origin: bottom; animation: grow var(--t-grow) var(--ease-grow) both; animation-delay: var(--delay, 0s); }
.dfBar.below { background: var(--status-declined-mid); }
.dfBar.unknown { height: 8px; min-height: 0; border: 1.5px dashed var(--ink-4); background: transparent; }
.dfLine5 { position: absolute; left: 0; right: 0; bottom: calc(var(--plot) * var(--r, 0)); z-index: 1; border-top: 1.5px dashed var(--status-ready-ink); }
.dfLine5 em { position: absolute; top: -9px; left: 0; padding: 0 5px 0 0; background: var(--status-ready-bg); font-size: 10.5px; font-style: normal; font-weight: 600; }
.dfBarNames { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; margin-top: 4px; font-size: 11px; text-align: center; }

/* ---- Cards ------------------------------------------------------------------------------------------------------------------------ */
.dfGrid { display: grid; gap: 12px; }
.dfTop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dfThree { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dfCard { display: grid; gap: 9px; align-content: start; min-width: 0; padding: 15px 17px; border-radius: var(--r-2xl); }
.dfCard h3 { display: flex; align-items: center; gap: 8px; }
.dfAdd { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: -6px -8px -6px auto; padding: 0 10px; border-radius: var(--r-sm); color: var(--brand); font: 600 var(--fs-sm-2) var(--font-body); text-decoration: none; }
.dfAdd:hover { background: var(--brand-soft); color: var(--brand-hover); }
.dfCard h3 small { margin-left: auto; color: var(--ink-3); font: 500 var(--fs-sm) var(--font-body); }
.dfBadge { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--info-bg); color: var(--info-ink); }
.dfBadge.ready { background: var(--status-ready-bg); color: var(--status-ready-ink); }
.dfBadge.declined { background: var(--status-declined-bg); color: var(--status-declined-ink); }
.dfBadge.missing { background: var(--status-missing-bg); color: var(--status-missing-ink); }
.dfNotice { align-self: flex-start; white-space: normal; }

/* A basis that is not the current one: a line under the header says so, and the figures lose their colour so they do not read as fresh. */
.dfBasis { padding: 8px 12px; border-radius: var(--r-md); background: var(--status-missing-bg); color: var(--status-missing-ink); font-size: var(--fs-sm-2); font-weight: 500; }
.dfDated .dfTile { filter: saturate(.45); }
.dfDated .dfBar { opacity: .7; }

.dfRuleRow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; }
.dfRuleRow + .dfRuleRow { border-top: 1px solid var(--line); }
.dfRuleRow.flag { margin: 0 -8px; padding: 7px 8px; border-radius: var(--r-md); background: var(--status-missing-bg); }
.dfRuleRow.flag + .dfRuleRow, .dfRuleRow + .dfRuleRow.flag { border-top-color: transparent; }
.dfRuleText { min-width: 0; overflow-wrap: anywhere; }
.dfRuleVal { color: var(--ink-3); font-size: var(--fs-sm-2); text-align: right; }

/* Who is already in */
.dfPos { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 1px 10px; align-items: center; padding: 7px 0; animation: rowIn var(--t-enter) var(--ease-out) both; animation-delay: var(--delay, 0s); }
.dfPos + .dfPos { border-top: 1px solid var(--line); }
.dfPos.stopped { opacity: .65; }
.dfAvatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--status-new-bg); color: var(--status-new-ink); font: 700 10.5px var(--font-head); }
.dfPosText { min-width: 0; }
.dfPosText b { display: flex; flex-wrap: wrap; gap: 4px 7px; align-items: center; font-weight: 600; }
.dfPosText span { color: var(--ink-3); font-size: var(--fs-sm); }
.dfPosText .dfChip { padding: 1px 8px; color: var(--status-new-ink); font-size: var(--fs-xs); }
.dfPosText .dfChip.info { color: var(--info-ink); }
.dfPosText .dfChip.missing { color: var(--status-missing-ink); }
.dfAmount { font: 600 14.5px var(--font-head); }
.dfNone { padding: 14px; border-radius: var(--r-lg); background: var(--tint-green-from); color: var(--tint-green-ink); font-size: 13px; font-weight: 500; }
.dfFoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 4px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-3); font-size: 13px; }
.dfFoot span { color: var(--ink-2); }

/* Month by month: the bars, then the table */
.dfChart { --plot: 96px; --names: 18px; --values: 18px; position: relative; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; align-items: end; height: calc(var(--plot) + var(--names) + var(--values) + 6px); }
.dfChart .dfLine5 { bottom: calc(var(--names) + 3px + var(--plot) * var(--r, 0)); }
.dfCol { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; min-width: 0; height: 100%; }
.dfBarValue { color: var(--ink-2); font-size: 11px; line-height: var(--values); }
.dfBarName { color: var(--ink-3); font-size: 11px; line-height: var(--names); }
.dfTableWrap { overflow-x: auto; }
.dfTable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dfTable th { padding: 5px 8px; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; text-align: right; white-space: nowrap; }
.dfTable td { padding: 8px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.dfTable th:first-child, .dfTable td:first-child { text-align: left; }
.dfTable tbody th { color: var(--ink); font-size: 14px; font-weight: 600; }
.dfTable td.rev { color: var(--ink); font-weight: 600; }
.dfFlag { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 6px; background: var(--status-missing-bg); color: var(--status-missing-ink); font-weight: 600; text-align: center; }

/* What the system did */
.dfTimeline { position: relative; margin: 0; padding: 0 0 0 4px; list-style: none; }
.dfTimeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 8px; width: 2px; border-radius: 2px; background: var(--line-axis); }
.dfStep { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 5px 0; font-size: 13px; animation: rise .4s var(--ease-out) both; animation-delay: var(--delay, 0s); }
.dfDot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: var(--r-pill); background: var(--ink-4); }
.dfDot.brand { background: var(--brand); }
.dfDot.ready { background: var(--status-ready-mid); }
.dfDot.new { background: var(--status-new-mid); }
.dfDot.declined { background: var(--status-declined-mid); }
.dfStepText { flex: 1; min-width: 0; }
.dfAt { color: var(--ink-3); font-size: var(--fs-sm); }

/* Documents and the application */
.dfFolder { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.dfFolder + .dfFolder { border-top: 1px solid var(--line-soft); }
.dfFolderName { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.dfChips { display: flex; flex-wrap: wrap; gap: 6px; }
.dfDoc { border: 0; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand); font-size: var(--fs-sm-2); font-weight: 500; text-decoration: none; }
.dfDoc:hover { background: var(--brand-tint); color: var(--brand-hover); }
.dfDoc.failed { background: var(--fail-bg); color: var(--fail-ink); }
.dfDocWhy { margin-left: 4px; font-weight: 400; }
.dfFacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; font-size: 13px; }
.dfFacts dt { color: var(--ink-3); font-size: var(--fs-sm); }
.dfFacts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.dfFacts dd.dfMuted { font-weight: 400; }
.dfNote { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--ink-2); font-size: 13px; }
.dfNote b { color: var(--ink); }

/* ---- Loading, failed, merged ------------------------------------------------------------------------------------------------------ */
.dfState { align-items: center; gap: 10px; padding: 64px 24px; text-align: center; }
.dfState .dfBack { align-self: flex-start; margin: 0 0 8px -10px; }   /* the way back stays at the left, above the centred message */
.dfStateIcon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--info-bg); color: var(--info-ink); }
.dfLoading { align-items: stretch; padding: 22px 28px; text-align: left; }
.dfSkel { display: block; border-radius: var(--r-md); background: var(--line-soft); animation: dfPulse 1.2s ease-in-out infinite alternate; }
.dfSkel.title { width: 280px; max-width: 70%; height: 30px; }
.dfSkel.line { width: 360px; max-width: 90%; height: 14px; margin-top: 8px; }
.dfSkel.tile { height: 112px; border-radius: var(--r-3xl); }
@keyframes dfPulse { from { opacity: .45; } to { opacity: 1; } }

/* A redraw after a refresh is quiet: the entrance is for the first time a deal is shown. */
.dfStill .card, .dfStill .dfBar, .dfStill .dfStep, .dfStill .dfPos { animation: none; }

/* ---- The room the pane has -------------------------------------------------------------------------------------------------------- */
@container df (max-width: 980px) {
  .dfTiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dfThree { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container df (max-width: 700px) {
  .df { padding: 16px; }
  .dfTop, .dfThree, .dfFacts { grid-template-columns: minmax(0, 1fr); }
  .dfActions { flex-basis: 100%; margin-left: 0; }
}
@container df (max-width: 460px) {
  .dfTiles { grid-template-columns: minmax(0, 1fr); }
}

/* ---- True revenue by account, the corrections line, and the Transactions drawer (Task 30) ----------------------------------------- */
/* Transactions.dc.html (approved 07/11): a month of an account is a button in the brand's ink; the drawer slides in from the right over the
   scrim with three tiles (sky deposits, neutral grey not revenue, green true revenue), Credits and Debits, a category per credit and the
   way to leave the account out. "Not revenue" is neutral grey: orange means declined. */
.dfCardHead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.dfCardHead > span { font-size: var(--fs-sm); }
.dfAccTable tbody th { white-space: nowrap; }
.dfAccTable tr.dfOff th, .dfAccTable tr.dfOff td { color: var(--ink-3); }
.dfAccOut { margin-left: 8px; }
.dfAccDeal th, .dfAccDeal td { color: var(--ink); font-weight: 650; }
.dfCellBtn { min-height: 44px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-md); background: transparent; color: var(--brand); font: 600 14px var(--font-body); cursor: pointer; transition: background var(--t-hover), border-color var(--t-hover); }
.dfCellBtn:hover { background: var(--brand-soft); border-color: var(--brand-line); }
.dfCorrections { padding: 8px 10px; border-radius: var(--r-md); background: var(--status-sky-bg); color: var(--status-sky-ink); font-size: var(--fs-sm-2); font-weight: 500; }
.dfFixRow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.dfFixRow label { flex: 1 1 200px; font-weight: 500; }
.dfFixField { width: 200px; min-height: 44px; }

.dfDrawer { position: fixed; inset: 0 0 0 auto; width: min(600px, 100vw); max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--hair); border-radius: var(--r-3xl) 0 0 var(--r-3xl); background: var(--surface); color: var(--ink); box-shadow: var(--sh-dialog); animation: dfSlide .4s var(--ease-out) both; }
.dfDrawer[open] { display: flex; flex-direction: column; }
.dfDrawer::backdrop { background: var(--scrim); animation: fadeIn .25s ease both; }
@keyframes dfSlide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.dfDrawHead { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; border-bottom: 1px solid var(--line); }
.dfDrawTitles { flex: 1; min-width: 0; }
.dfDrawTitles h2 { font: 650 20px var(--font-head); letter-spacing: -0.02em; }
.dfDrawTitles p { font-size: var(--fs-sm-2); }
.dfDrawClose { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-lg); color: var(--ink-2); }
.dfDrawBody { flex: 1; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding: 16px 24px 20px; }
.dfDrawBanner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--info-bg); }
.dfDrawBanner > div { display: flex; flex: 1 1 260px; flex-direction: column; min-width: 0; }
.dfDrawBanner span { color: var(--ink-2); font-size: var(--fs-sm-2); }
.dfDrawTiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dfDrawTile.sky { background: var(--status-sky-bg); color: var(--status-sky-ink); }
.dfDrawTile.info { background: var(--info-bg); color: var(--info-ink); }
.dfDrawTile.ready { background: var(--status-ready-bg); color: var(--status-ready-ink); }
.dfDrawKey { font-size: var(--fs-sm); font-weight: 500; }
.dfDrawNum { color: var(--ink); font: 600 20px var(--font-head); }
.dfDrawNote { font-size: var(--fs-xs); }
.dfSegs .seg { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 5px; min-height: 38px; border: 0; background: transparent; color: var(--ink); font-family: inherit; }
.dfSegs .seg span { color: var(--ink-2); font-weight: 500; }
.dfSegs .seg.segOn { background: var(--surface); }
.dfTxList { display: flex; flex-direction: column; }
.dfTxRow { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-top: 1px solid var(--line); border-radius: var(--r-sm); transition: background var(--t-hover); }
.dfTxRow:hover { background: var(--brand-soft); }
.dfTxRow.debit { flex-direction: row; align-items: center; gap: 10px; padding: 12px 8px; }
.dfTxLine { display: flex; align-items: baseline; gap: 10px; }
.dfTxDate { flex: none; width: 44px; color: var(--ink-3); font-size: var(--fs-sm-2); }
.dfTxDesc { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.dfTxAmt { color: var(--ink); font: 600 14.5px var(--font-head); }
.dfTxAmt.off { color: var(--ink-3); }
.dfTxMeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-left: 54px; }
.dfTxCat { width: 200px; min-height: 44px; padding: 0 10px; }
.dfTxCatText { font-size: 13px; font-weight: 600; }
.dfTxCounts { color: var(--ink-3); font-size: var(--fs-sm-2); }
.dfTxCounts.yes { color: var(--status-ready-ink); }
.dfTxTag { padding: 1px 8px; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 600; }
.dfTxTag.sky { background: var(--status-sky-bg); color: var(--status-sky-ink); }
.dfTxTag.missing { background: var(--status-missing-bg); color: var(--status-missing-ink); }
.dfTxTag.new { background: var(--status-new-bg); color: var(--status-new-ink); }
.dfDrawFoot { display: flex; flex-direction: column; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid var(--line); }
.dfDrawAsk { display: flex; flex-direction: column; gap: 6px; }
.dfDrawAsk label { font-weight: 600; }
.dfDrawAsk .fld { width: 100%; min-height: 44px; }
.dfDrawActs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dfDrawLog { flex: 1 1 200px; color: var(--ink-3); font-size: var(--fs-sm-2); text-align: right; }
@container df (max-width: 560px) { .dfDrawTiles { grid-template-columns: 1fr; } }

/* ---- The warnings: Reopen, the possible duplicate, the broker, and the owner's reveal (Task 31) ----------------------------------- */
/* Duplicate.dc.html (approved 07/11): the duplicate card wears the yellow of a deal that waits for a person (its border and kicker); the
   merge panel and the reopen panel are the card's own parts; Cancel and Hide are quiet text buttons. A revealed value is the ink's own. */
.dfWarn { gap: 12px; padding: 18px 20px; }
.dfDup { border-color: var(--status-missing-mid); }
.dfWarnKicker { color: var(--status-missing-ink); font-size: var(--fs-sm-2); font-weight: 600; }
.dfWarnField { display: flex; flex-direction: column; gap: 6px; }
.dfWarnField label { font-weight: 600; }
.dfWarnField .fld { width: 100%; min-height: 44px; }
.dfWarnActs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dfWarnActs .btn { min-height: 44px; }
.dfWarnLink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 500; text-decoration: none; }
.dfWarnPanel { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface-3); }
.dfDupTable th:first-child { width: 22%; }
.dfDupTable tbody th { color: var(--ink-3); font-weight: 500; }
.dfDupTable td { font-weight: 500; text-align: left; }
.dfReopened { padding: 8px 10px; border-radius: var(--r-md); background: var(--status-ready-bg); color: var(--status-ready-ink); font-size: var(--fs-sm-2); font-weight: 500; }
.dfPii dd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; }
.dfPiiValue { font-weight: 500; }
.dfPiiValue.on { color: var(--ink); font-weight: 650; user-select: text; }
.dfPiiLeft { color: var(--ink-3); font-size: var(--fs-sm-2); }
.dfPiiHide { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--brand); font: 600 13px var(--font-body); cursor: pointer; }

/* The document window (approved mockup docs/mockups/2026-11-08-document-viewer.html). */
.dfv { width: min(1240px, calc(100vw - 48px)); height: calc(100vh - 48px); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid var(--hair); border-radius: var(--r-3xl); background: var(--surface); color: var(--ink); box-shadow: var(--sh-dialog); overflow: hidden; animation: dfvRise .35s var(--ease-out) both; }
.dfv[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.dfv::backdrop { background: var(--scrim); }
@keyframes dfvRise { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.dfvHead { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 22px; border-bottom: 1px solid var(--line); }
.dfvTitles { flex: 1; min-width: 0; }
.dfvTitles h2 { margin: 0; font: 650 18px/1.25 var(--font-head); letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfvTitles p { margin: 0; color: var(--ink-3); font-size: 12.5px; }
.dfvZoom { display: inline-flex; align-items: center; padding: 3px; border-radius: var(--r-lg); background: var(--seg-track); }
.dfvZoom[data-off] { visibility: hidden; }
.dfvZoom button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: var(--r-md); background: transparent; color: inherit; cursor: pointer; }
.dfvZoom button:hover { background: var(--surface); }
.dfvZoom span { min-width: 46px; text-align: center; font-size: 12.5px; font-weight: 600; }
.dfvGetSlot { display: inline-flex; }
.dfvGet { text-decoration: none; }
.dfvClose { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-lg); background: transparent; color: var(--ink-2); cursor: pointer; }
.dfvClose:hover { background: var(--nav-hover); }
.dfvBody { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 0; }
.dfvRail { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg-list); }
.dfvList { flex: 1; min-height: 0; overflow: auto; padding: 12px 10px; }
.dfvGroup + .dfvGroup { margin-top: 12px; }
.dfvGroup h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; padding: 0 8px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.dfvItem { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); font: 500 13px var(--font-body); text-align: left; cursor: pointer; }
.dfvItem:hover { background: var(--nav-hover); }
.dfvItem[aria-current=true] { background: var(--brand-tint); color: var(--brand-hover); font-weight: 600; }
.dfvItem.failed { color: var(--fail-ink); }
.dfvName { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfvAcc { display: none; color: var(--ink-3); font-weight: 400; }
.dfvMeta { flex: none; color: var(--ink-3); font-size: 11.5px; font-weight: 400; }
.dfvKeys { padding: 10px 18px 12px; border-top: 1px solid var(--line-soft); color: var(--ink-3); font-size: 11.5px; }
.dfvKeys kbd { padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font: 600 10.5px var(--font-body); }
.dfvWrap { position: relative; min-width: 0; min-height: 0; }
.dfvStage { position: absolute; inset: 0; overflow: auto; padding: 24px; background: var(--bg); }
.dfvPages { display: flex; flex-direction: column; align-items: center; gap: 16px; width: max-content; min-width: 100%; }
.dfvPaper { display: grid; place-items: center; width: var(--pw, 860px); aspect-ratio: 8.5 / 11; border-radius: 2px; background: var(--surface); box-shadow: var(--sh-card-lg); }
.dfvPaper.on { display: block; aspect-ratio: auto; }
.dfvPaper img { display: block; width: 100%; height: auto; border-radius: 2px; }
.dfvWait { color: var(--ink-4); font-size: 12.5px; }
.dfvPageFail { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13.5px; }
.dfvMore { max-width: 860px; margin: 0 auto 14px; color: var(--ink-3); font-size: 12.5px; text-align: center; }
.dfvOver:empty { display: none; }
.dfvSay { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.dfvSay > div { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(400px, 100%); padding: 30px 28px; border: 1px solid var(--hair); border-radius: var(--r-3xl); background: var(--surface); box-shadow: var(--sh-card); text-align: center; }
.dfvSay h3 { margin: 0; font: 600 18px var(--font-head); text-wrap: balance; }
.dfvSay p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.dfvSay .btn { margin-top: 8px; }
.dfvIc { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r-xl); background: var(--brand-soft); color: var(--brand); }
.dfvIc.warn { background: var(--fail-bg); color: var(--fail-ink); }
.dfvIc.lock { background: var(--unknown-bg); color: var(--unknown-ink); }
.dfvPill { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--toast-bg); color: var(--surface); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.dfvPill button { padding: 0; border: 0; background: transparent; color: var(--brand-tint); font: 600 12.5px var(--font-body); cursor: pointer; }
@media (max-width: 760px) {
  .dfv { width: 100vw; height: 100%; border: 0; border-radius: 0; }
  .dfvHead { gap: 6px; padding: calc(8px + env(safe-area-inset-top, 0px)) max(6px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
  .dfvTitles h2 { font-size: 16px; }
  .dfvZoom { display: none; }
  .dfvGet span { display: none; }
  .dfvBody { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .dfvRail { min-width: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .dfvAcc { display: inline; }
  .dfvList { display: flex; gap: 4px; overflow-x: auto; padding: 8px max(12px, env(safe-area-inset-left, 0px)); }
  .dfvGroup { display: flex; align-items: center; gap: 4px; }
  .dfvGroup + .dfvGroup { margin-top: 0; }
  .dfvGroup h4, .dfvKeys, .dfvMeta { display: none; }
  .dfvItem { flex: none; width: auto; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); }
  .dfvName { overflow: visible; }
  .dfvStage { padding: 12px; }
  .dfvPill { bottom: 60px; }
}
