/* ============================================================
   Whisper · v7-docreview.css — Document review (team DR-F, KD_SPEC.md)
   RESTRAINT.md: neutral surfaces, one accent (#1F4FD8 family), status colour only on problem values,
   radius 6 controls / 8 panels / 10 dialogs, 1px borders, no shadows on panels.
   Layout: head 48 · queue mode = table · review mode = rail 48 (or list 300) | viewer 1fr | fields 380 (360 < 1280)
   ============================================================ */

#view-documents > .v7d { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.v7d-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.v7d-grow { flex: 1 1 auto; }
.v7d-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; }
.v7d-muted { color: var(--text-3); }
.v7d-small { font-size: 12px; line-height: 18px; }
.v7d .warn, .v7d-pop .warn, .v7d-drawer .warn { color: var(--warn); }
.v7d .err, .v7d-drawer .err { color: var(--err); }
.v7d-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; border-radius: 4px; }
.v7d-link:hover { text-decoration: underline; }
.v7d-link:focus-visible { outline: none; box-shadow: var(--ring); }
.v7d-link:disabled { color: var(--text-3); cursor: default; text-decoration: none; }
.v7d-kbd { display: inline-flex; align-items: center; height: 18px; min-width: 18px; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 4px;
  background: var(--kbd-bg); color: var(--text-3); font: 500 11px/16px var(--mono); justify-content: center; }
.v7d-kbd.on-accent { background: transparent; border-color: rgba(255, 255, 255, .45); color: rgba(255, 255, 255, .9); margin-left: 8px; }
.v7d-dot { color: var(--text-3); margin: 0 6px; }
.btn.btn-danger-outline { color: var(--err); border-color: var(--err); background: var(--surface); }
.btn.btn-danger-outline:hover { background: var(--err-soft); }

/* ---------------- head ---------------- */
.v7d-head { border-bottom: 1px solid var(--line); gap: 12px; }
.v7d-title { font-size: var(--fs-14); font-weight: 600; margin: 0; white-space: nowrap; }
.v7d-policy { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px;
  font-size: 12px; color: var(--text-2); white-space: nowrap; cursor: default; }
.v7d-policy:focus-visible { outline: none; box-shadow: var(--ring); }
.v7d-today { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.v7d-split { display: inline-flex; }
.v7d-split > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.v7d-split .v7d-split-caret { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; padding: 0 6px; }
.v7d-head .btn svg { margin-right: 6px; }
.v7d-head .v7d-split-caret svg { margin: 0; }

/* ---------------- body grid ---------------- */
.v7d-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.v7d.is-review .v7d-body { grid-template-columns: 48px minmax(0, 1fr); }
.v7d.is-review.list-open .v7d-body { grid-template-columns: 300px minmax(0, 1fr); }
.v7d-queue { position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); }
.v7d.is-queue .v7d-queue { border-right: 0; }
.v7d-rail { display: none; }
.v7d.is-review:not(.list-open) .v7d-qhead, .v7d.is-review:not(.list-open) .v7d-qlist, .v7d.is-review:not(.list-open) #v7d-uploads { display: none; }
.v7d.is-review:not(.list-open) .v7d-rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; }
.v7d-rail .icon-btn { width: 32px; height: 32px; color: var(--text-3); }
.v7d-rail .icon-btn:hover:not(:disabled) { color: var(--text); }
.v7d-rail [data-rail="prev"] svg { transform: rotate(-90deg); }
.v7d-rail [data-rail="next"] svg { transform: rotate(90deg); }
.v7d-rail-sep { width: 20px; height: 1px; background: var(--line); margin: 4px 0; }
.v7d-rail-pos { font-size: 11px; line-height: 14px; color: var(--text-3); text-align: center; padding: 2px 0; }
.v7d-collapse svg { transform: rotate(180deg); }

/* queue head: tabs + toolbar */
.v7d-qhead { flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.v7d .v7d-tabs { padding: 0 16px; border-bottom: 1px solid var(--line); }
.v7d-tabs .ptab { gap: 6px; }
.v7d-tcount { font: 500 11px/16px var(--mono); color: var(--text-3); font-variant-numeric: tabular-nums; }
.v7d-tcount.err { color: var(--err); }
.v7d-qtools { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; min-width: 0; }
.v7d-qtools[hidden] { display: none; }
.v7d-search { position: relative; display: flex; align-items: center; flex: 0 1 320px; min-width: 120px; }
.v7d-search > svg { position: absolute; left: 8px; color: var(--text-3); pointer-events: none; }
.v7d-search input { width: 100%; height: 28px; padding: 0 8px 0 28px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); font: inherit; font-size: 13px; }
.v7d-search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.v7d-qtools .btn svg { margin-right: 4px; }
.v7d-fcount { font: 500 11px/16px var(--mono); color: var(--accent); margin-left: 4px; }
.v7d-fcount:empty { display: none; }
.v7d-sort { height: 28px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); font: inherit; font-size: 13px; padding: 0 24px 0 8px; }
.v7d-sort:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.v7d-qcount { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.v7d-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 16px 10px; }
.v7d-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; }
.v7d-chip:hover { border-color: var(--line-hover); color: var(--text); }
.v7d-chip:focus-visible { outline: none; box-shadow: var(--ring); }
.v7d-chip svg { color: var(--text-3); }
.v7d-chips .v7d-link { font-size: 12px; margin-left: 4px; }
.v7d-bulk { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; background: var(--accent-soft); border-top: 1px solid var(--line); flex-wrap: wrap; }
.v7d-bulk-n { font-weight: 600; font-size: 13px; }
.v7d-bulk .v7d-muted { font-size: 12px; }

/* list review-mode: compact head */
.v7d.is-review.list-open .v7d-tabs { padding: 0 8px; }
.v7d.is-review.list-open .v7d-tabs .ptab { padding-left: 6px; padding-right: 6px; }
.v7d.is-review.list-open .v7d-qtools { padding: 0 8px; }
.v7d.is-review.list-open .v7d-qtools .btn span:not(.v7d-fcount), .v7d.is-review.list-open .v7d-sortl, .v7d.is-review.list-open .v7d-qcount { display: none; }
.v7d.is-review.list-open .v7d-search { flex: 1 1 auto; }
.v7d.is-review.list-open .v7d-chips { padding: 0 8px 8px; }

.v7d-qlist { flex: 1 1 auto; min-height: 0; overflow: auto; }

/* ---------------- queue table (56px rows) ---------------- */
.v7d-qt { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.v7d-qt th { position: sticky; top: 0; z-index: 1; height: 34px; padding: 0 12px; background: var(--table-head); border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 500; color: var(--text-2); text-align: left; white-space: nowrap; }
.v7d-qt th.num, .v7d-qt td.num { text-align: right; }
.v7d-th { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 4px; }
.v7d-th:hover { color: var(--text); }
.v7d-th:focus-visible { outline: none; box-shadow: var(--ring); }
.v7d-qt td { height: 56px; padding: 0 12px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.v7d-qt tr.v7d-tr { cursor: pointer; }
.v7d-qt tr.v7d-tr:hover td { background: var(--row-hover); }
.v7d-qt tr.sel td { background: var(--accent-soft); }
.v7d-qt tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.v7d-qt tr.checked td { background: var(--accent-soft); }
.v7d-qt .c-sel { width: 40px; padding: 0 0 0 14px; }
.v7d-qt .c-doc { width: auto; }
.v7d-qt .c-why { width: 26%; }
.v7d-qt .c-cls { width: 128px; }
.v7d-qt .c-pg { width: 64px; }
.v7d-qt .c-conf { width: 104px; }
.v7d-qt .c-st { width: 96px; }
.v7d-qt .c-age { width: 72px; }
.v7d-qt .c-age .v7d-mono { font-family: var(--font); font-size: 13px; }
.v7d-qt .c-asg { width: 168px; }
.v7d-qt .c-doc .v7d-open { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; text-decoration: none; border-radius: 4px; line-height: 20px; }
.v7d-qt .c-doc .v7d-open:hover { text-decoration: underline; }
.v7d-open:focus-visible { outline: none; box-shadow: var(--ring); }
.v7d-sub { display: block; font-size: 12px; line-height: 18px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7d-msub { display: none; }
.v7d-check { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); opacity: 0; cursor: pointer; }
.v7d-qt tr:hover .v7d-check, .v7d-qt tr:focus-within .v7d-check, .v7d-check:checked, .v7d-qt:has(.v7d-check:checked) .v7d-check { opacity: 1; }
.v7d-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-left: 6px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 11px; color: var(--text-2); }
.v7d-lock { color: var(--text-3); font-size: 12px; }

/* ---------------- compact list (review mode, expanded) ---------------- */
.v7d-li { border-bottom: 1px solid var(--line); }
.v7d-li .v7d-open { display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 56px; padding: 0 12px; color: var(--text); text-decoration: none; }
.v7d-li .v7d-open:hover { background: var(--row-hover); }
.v7d-li.sel .v7d-open { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.v7d-li .v7d-open:focus-visible { box-shadow: var(--ring-inset); }
.v7d-li1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.v7d-li-t { flex: 1 1 auto; min-width: 0; font-weight: 500; font-size: 13px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7d-li-age { flex: 0 0 auto; font-size: 11px; color: var(--text-3); }
.v7d-li-age.warn { color: var(--warn); } .v7d-li-age.err { color: var(--err); }
.v7d-li2 { font-size: 12px; line-height: 18px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7d-li2 .v7d-mono { font-size: 11px; }

/* states */
.v7d-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 24px; text-align: center; color: var(--text-3); }
.v7d-empty-t { font-size: 14px; font-weight: 600; color: var(--text); margin: 4px 0 0; }
.v7d-empty-l { font-size: 13px; color: var(--text-2); max-width: 420px; margin: 0; }
.v7d-empty .btn { margin-top: 8px; }
.v7d-skel { padding: 4px 0; }
.v7d-skrow { display: flex; flex-direction: column; justify-content: center; gap: 8px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.v7d-sk { display: block; height: 10px; border-radius: 4px; background: var(--surface-3); }
.v7d-sk.w40 { width: 40%; } .v7d-sk.w25 { width: 25%; height: 8px; }
@media (prefers-reduced-motion: no-preference) { .v7d-sk { animation: v7d-pulse 1.4s ease-in-out infinite; } }
@keyframes v7d-pulse { 50% { opacity: .55; } }
.v7d-notice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; padding: 6px 12px; margin: 0 0 8px; border-radius: 6px;
  background: var(--surface-2); box-shadow: inset 2px 0 0 var(--line-strong); font-size: 12px; line-height: 18px; color: var(--text-2); }
.v7d-notice.warn { box-shadow: inset 2px 0 0 var(--warn); color: var(--text-2); }
.v7d-notice.err { box-shadow: inset 2px 0 0 var(--err); color: var(--text); }
.v7d-notice.info { box-shadow: inset 2px 0 0 var(--accent); }
.v7d-notice > span { flex: 1 1 200px; }
.v7d-notice .v7d-quote { flex-basis: 100%; color: var(--text-3); }
.v7d-qlist > .v7d-notice { margin: 12px 16px; }
.v7d-denied { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 520px; margin: 64px auto; padding: 0 24px; text-align: center; color: var(--text-3); }
.v7d-denied h2 { margin: 6px 0 0; }
.v7d-denied-act { margin-top: 10px; }
.v7d.is-denied .v7d-body { display: block; overflow: auto; }

/* uploads + drop */
.v7d-up { border-bottom: 1px solid var(--line); padding: 8px 16px; font-size: 12px; }
.v7d-up-h { display: flex; justify-content: space-between; color: var(--text-2); font-weight: 500; margin-bottom: 4px; }
.v7d-up ul { list-style: none; margin: 0; padding: 0; }
.v7d-up li { display: flex; gap: 8px; align-items: center; min-height: 24px; }
.v7d-up-n { flex: 0 1 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.v7d-dropveil { display: none; position: absolute; inset: 8px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent-soft);
  align-items: center; justify-content: center; gap: 8px; color: var(--accent); z-index: 5; pointer-events: none; }
.v7d-queue.drag .v7d-dropveil { display: flex; }

/* filter popover */
.v7d-pop { position: fixed; z-index: 1200; width: 280px; max-height: 70vh; overflow: auto; padding: 8px 0; background: var(--pop-bg); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-pop); font-size: 13px; color: var(--text); }
.v7d-pop-sec { padding: 4px 12px 8px; border-bottom: 1px solid var(--line); }
.v7d-pop-sec:last-child { border-bottom: 0; }
.v7d-pop-h { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 4px 0; }
.v7d-pop-opt { display: flex; align-items: center; gap: 8px; min-height: 28px; cursor: pointer; }
.v7d-pop-opt input { accent-color: var(--accent); margin: 0; }
.v7d-pop-n { margin-left: auto; font: 11px var(--mono); color: var(--text-3); }
.v7d-pop-gap { margin-top: 4px; }

/* ---------------- review mode ---------------- */
.v7d-review { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.v7d-review[hidden] { display: none; }
.v7d-rhead { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--line); min-width: 0; }
.v7d-back { color: var(--text-3); flex: 0 0 auto; }
.v7d-rtitle { min-width: 0; display: flex; flex-direction: column; flex: 0 1 auto; }
.v7d-h2 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7d-h2:focus { outline: none; }
.v7d-rmeta { font-size: 12px; line-height: 18px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7d-rmeta .v7d-link { font-size: 12px; }
.v7d-rstatus { flex: 0 0 auto; font-size: 12px; color: var(--text-2); padding: 0 8px; border-left: 1px solid var(--line); }
.v7d-rstatus.failed { color: var(--err); }
.v7d-rpos { color: var(--text-3); white-space: nowrap; font-size: 12px; }
.v7d-rbody { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 368px; }
.v7d-rerr { padding: 16px; }

/* viewer */
.v7d-viewer { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); }
.v7d-vbar { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 8px; border-bottom: 1px solid var(--line); min-width: 0; overflow: hidden; }
.v7d-tb { display: inline-flex; align-items: center; justify-content: center; height: 28px; min-width: 28px; padding: 0 6px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-3); font: inherit; font-size: 12px; cursor: pointer; flex: 0 0 auto; }
.v7d-tb:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.v7d-tb:focus-visible { outline: none; box-shadow: var(--ring); }
.v7d-tb[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.v7d-tb:disabled { opacity: .45; cursor: default; }
.v7d-tbt { color: var(--text-2); }
.v7d-tb[data-v="pprev"] svg { transform: rotate(180deg); }
.v7d-vsep { width: 1px; height: 16px; background: var(--line); margin: 0 4px; flex: 0 0 auto; }
.v7d-pgno { display: inline-flex; align-items: center; color: var(--text-3); white-space: nowrap; }
.v7d-pgin { width: 28px; height: 24px; padding: 0 2px; text-align: center; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--field-bg); color: var(--text); font: 12px var(--mono); }
.v7d-pgin:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.v7d-pgin[readonly] { border-color: transparent; background: transparent; }
.v7d-zval { min-width: 40px; text-align: center; color: var(--text-2); }
.v7d-viewed { color: var(--text-3); white-space: nowrap; margin-right: 8px; }
#v7d-maskctl { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
#v7d-maskctl:empty { display: none; }
.v7d-mstate { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.v7d-mstate svg { color: var(--text-3); }
.v7d-vmain { flex: 1 1 auto; min-height: 0; display: flex; min-width: 0; }
.v7d-thumbs { flex: 0 0 88px; overflow: auto; padding: 8px; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.v7d-thumbs[hidden] { display: none; }
.v7d-thumb { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; color: var(--text-3); }
.v7d-thumb img { width: 56px; height: auto; display: block; background: #fff; }
.v7d-thumbs.enh .v7d-thumb img { filter: grayscale(1) contrast(1.6); }
.v7d-thumb[aria-current="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.v7d-thumb:focus-visible { outline: none; box-shadow: var(--ring); }
.v7d-thumb .v7d-mono { font-size: 11px; }
.v7d-thumb-x { width: 56px; height: 72px; background: var(--surface-3); }
.v7d-canvas { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; background: var(--surface-3); padding: 12px; position: relative; }
.v7d-canvas:focus-visible { outline: none; box-shadow: var(--ring-inset); }
.v7d-canvas-empty { display: flex; align-items: center; justify-content: center; }
.v7d-pages { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: min-content; }
.v7d-pg { position: relative; flex: 0 0 auto; width: 612px; height: 792px; max-width: none; background: #FFFFFF; border: 1px solid var(--line-strong); overflow: hidden; }
.v7d-pg-skel { width: 70%; height: auto; aspect-ratio: 8.5 / 11; border-color: var(--line); background: var(--surface); }
.v7d-pg-in { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; }
.v7d-pg-img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.v7d-canvas.enh .v7d-pg-img { filter: grayscale(1) contrast(1.6) brightness(1.04); }
.v7d-pg-load { position: absolute; inset: 0; background: var(--surface); }
@media (prefers-reduced-motion: no-preference) { .v7d-pg-load { animation: v7d-pulse 1.4s ease-in-out infinite; } }
.v7d-pg.ready .v7d-pg-load { display: none; }
.v7d-pg-fail { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--surface); color: var(--text-2); font-size: 13px; }
.v7d-ov { position: absolute; inset: 0; }
/* regions (D-3): accent family only */
.v7d-box { position: absolute; box-sizing: content-box; padding: 4px; margin: -5px 0 0 -5px; border: 1px solid transparent; border-radius: 2px; background: transparent; cursor: pointer; z-index: 2; }
.v7d-canvas.regions .v7d-box { border-color: rgba(31, 79, 216, .35); }
.v7d-box:hover, .v7d-box.hov { border-color: #1F4FD8; }
.v7d-box.on { border: 2px solid #1F4FD8; margin: -6px 0 0 -6px; background: rgba(31, 79, 216, .10); z-index: 3; }
.v7d-box:focus-visible { outline: none; border-color: #1F4FD8; }
.v7d-box-l { display: none; position: absolute; left: -1px; bottom: calc(100% + 4px); padding: 2px 6px; border-radius: 4px; background: var(--tip-bg); color: #fff; font: 500 11px/16px var(--font); white-space: nowrap; pointer-events: none; }
.v7d-box:hover .v7d-box-l, .v7d-box.hov .v7d-box-l, .v7d-box.on .v7d-box-l { display: block; }
.v7d-w { position: absolute; cursor: pointer; z-index: 1; border-radius: 2px; }
.v7d-w:hover { background: rgba(31, 79, 216, .10); }
.v7d-mask { position: absolute; z-index: 2; background: #E6E9EE; display: flex; align-items: center; justify-content: center; pointer-events: none; overflow: hidden; }
.v7d-mask span { font: 600 10px/12px var(--font); color: #5F6B7C; letter-spacing: .04em; }
.v7d-hl { position: absolute; z-index: 1; background: rgba(31, 79, 216, .14); border-radius: 2px; pointer-events: none; }
.v7d-drag { position: absolute; z-index: 4; border: 1px solid #1F4FD8; background: rgba(31, 79, 216, .08); pointer-events: none; }
.v7d-text { flex: 0 0 300px; overflow: auto; padding: 12px; border-left: 1px solid var(--line); background: var(--surface); font-size: 12px; }
.v7d-text[hidden] { display: none; }
.v7d-text-h { font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.v7d-text-p { font-size: 11px; color: var(--text-3); margin: 10px 0 4px; }
.v7d-tl { margin: 0; padding: 2px 4px; border-radius: 4px; color: var(--text); font-family: var(--mono); font-size: 12px; line-height: 18px; }
.v7d-tl:hover { background: var(--accent-soft); }
.v7d-text-pre { white-space: pre-wrap; font: 12px/18px var(--mono); margin: 0; }
.v7d-wpop { position: fixed; z-index: 1200; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: var(--pop-bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); max-width: 360px; }
.v7d-wpop .btn { justify-content: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* compare (D-13) */
.v7d-cmp { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px; background: var(--surface-3); }
.v7d-cmp-t { font-size: 13px; }
b.v7d-cmp-t { margin: 0 8px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v7d-vbar .btn { flex: 0 0 auto; margin-left: 6px; }
.v7d-cmp-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.v7d-cmp-pages figure { margin: 0; min-width: 0; }
.v7d-cmp-pages figcaption { font-size: 12px; color: var(--text-2); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7d-cmp-pages img { width: 100%; display: block; background: #fff; border: 1px solid var(--line-strong); }
.v7d-cmp-pages .v7d-pg-fail { position: static; min-height: 200px; border: 1px solid var(--line); }
table.v7d-cmp-t { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table.v7d-cmp-t th, table.v7d-cmp-t td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; overflow-wrap: anywhere; }
table.v7d-cmp-t thead th { background: var(--table-head); color: var(--text-2); font-weight: 500; }
table.v7d-cmp-t tbody th { color: var(--text-2); font-weight: 500; width: 28%; }
table.v7d-cmp-t tr.diff th { box-shadow: inset 2px 0 0 var(--warn); }

/* fields pane */
.v7d-fields { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.v7d-fhead { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.v7d-fh-t { font-weight: 600; font-size: 13px; }
.v7d-cls { height: 28px; max-width: 180px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--field-bg); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; padding: 0 22px 0 8px; }
.v7d-cls:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.v7d-cls:disabled { opacity: 1; background: var(--surface-2); }
.v7d-clsconf { color: var(--text-3); font-size: 11px; }
.v7d-overall { font-size: 12px; color: var(--text-2); white-space: nowrap; border-radius: 4px; }
.v7d-overall b { font-weight: 600; font-size: 12px; color: var(--text); }
.v7d-overall b.warn { color: var(--warn); }
.v7d-overall:focus-visible { outline: none; box-shadow: var(--ring); }
#v7d-tocheck { font-size: 12px; white-space: nowrap; }
#v7d-tocheck.done { color: var(--text-3); }
.v7d-fsub { flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; min-height: 28px; padding: 4px 16px; font-size: 11px; line-height: 16px; color: var(--text-3); border-bottom: 1px solid var(--line); }
.v7d-fsub .v7d-link { font-size: 11px; }
.v7d-fsub[hidden] { display: none; }
.v7d-kh { font: 10px var(--mono); color: var(--text-3); margin-left: 4px; }
.v7d-notices { flex: 0 0 auto; padding: 8px 16px 0; }
.v7d-notices:empty { display: none; }
.v7d-fbody { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px 16px 16px; }
.v7d-pad { padding: 16px 0; }
.v7d-grp { margin-top: 12px; }
.v7d-grp-h { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 8px; padding-top: 4px; }
.v7d-f { margin-bottom: 12px; border-radius: 6px; }
.v7d-fl { display: flex; align-items: baseline; gap: 8px; min-height: 18px; margin-bottom: 4px; }
.v7d-flabel { font-size: 12px; line-height: 18px; color: var(--text-2); font-weight: 500; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7d-req { color: var(--text-3); margin-left: 2px; }
.v7d-fstate { font-size: 11px; line-height: 16px; color: var(--text-3); white-space: nowrap; }
.v7d-fstate:empty { display: none; }
.v7d-fstate.warn { color: var(--warn); } .v7d-fstate.err { color: var(--err); }
.v7d-fconf { margin-left: auto; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.v7d-fconf.warn { color: var(--warn); } .v7d-fconf.err { color: var(--err); }
.v7d-fi { position: relative; display: flex; gap: 6px; align-items: center; }
.v7d-in { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--field-border); border-radius: 6px; background: var(--field-bg); color: var(--text); font: inherit; font-size: 13px; min-width: 0; }
.v7d-in:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.v7d-in[readonly] { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.v7d-f.is-flag .v7d-in { box-shadow: inset 2px 0 0 var(--warn); }
.v7d-f.is-low .v7d-in, .v7d-f.is-missing .v7d-in, .v7d-f.is-err .v7d-in { box-shadow: inset 2px 0 0 var(--err); }
.v7d-f.is-flag .v7d-in:focus, .v7d-f.is-low .v7d-in:focus, .v7d-f.is-missing .v7d-in:focus, .v7d-f.is-err .v7d-in:focus { box-shadow: inset 2px 0 0 var(--warn), var(--ring); }
.v7d-f.is-active .v7d-flabel { color: var(--text); }
@media (prefers-reduced-motion: no-preference) { .v7d-f.is-active { animation: v7d-target 1.2s ease-out 1; } }
@keyframes v7d-target { from { box-shadow: 0 0 0 4px var(--accent-soft); } to { box-shadow: 0 0 0 4px transparent; } }
.v7d-fi.masked .v7d-in { font-family: var(--mono); letter-spacing: .02em; color: var(--text-2); }
.v7d-reveal { flex: 0 0 auto; }
.v7d-fmsg { display: flex; flex-direction: column; }
.v7d-fmsg:empty { display: none; }
.v7d-fmsg span { font-size: 12px; line-height: 18px; margin-top: 4px; }
.v7d-fmsg .v7d-note { color: var(--text-3); }
.v7d-fmeta { font-size: 11px; line-height: 16px; color: var(--text-3); margin-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; }
.v7d-fmeta:empty { display: none; }
.v7d-fmeta .v7d-link { font-size: 11px; }
.v7d-focr { margin-top: 4px; padding: 6px 8px; border-radius: 6px; background: var(--surface-2); font-size: 11px; line-height: 16px; color: var(--text-2); white-space: pre-wrap; }
.v7d-list-f { display: flex; flex-direction: column; gap: 4px; }
.v7d-li-row { display: flex; gap: 4px; align-items: center; }
.v7d-li-x { width: 28px; height: 28px; flex: 0 0 auto; color: var(--text-3); }
.v7d-li-add { font-size: 12px; align-self: flex-start; margin-top: 2px; }
.v7d-grid-w { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.v7d-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
.v7d-grid th { padding: 4px 6px; background: var(--table-head); color: var(--text-2); font-weight: 500; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.v7d-grid td { padding: 2px; border-bottom: 1px solid var(--line); }
.v7d-cell { width: 100%; min-width: 56px; height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text); font: inherit; font-size: 12px; }
.v7d-cell.num { text-align: right; font-family: var(--mono); }
.v7d-cell:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--field-bg); }
.v7d-foot { font-size: 11px; color: var(--text-3); margin: 16px 0 0; }
.v7d-failed { padding: 12px 0; }
.v7d-failed-t { font-size: 13px; color: var(--text); margin: 0 0 6px; }
.v7d-failed p { margin: 0 0 8px; }

/* sticky action bar (56) + hint line (24) */
.v7d-abar { flex: 0 0 56px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-top: 1px solid var(--line); background: var(--surface); min-width: 0; }
.v7d-abar:empty { display: none; }
.v7d-approve { white-space: nowrap; flex: 0 0 auto; }
.v7d-approve .v7d-kbd { margin-left: 6px; height: 16px; font-size: 10px; padding: 0 3px; }
.v7d-approve.is-blocked { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.v7d-approve.is-blocked:hover { background: var(--accent-soft); }
.v7d-hints { flex: 0 0 24px; display: flex; align-items: center; gap: 12px; padding: 0 16px 4px; font-size: 11px; color: var(--text-3); overflow: hidden; white-space: nowrap; }
.v7d-hints span { display: inline-flex; align-items: center; gap: 4px; }
.v7d-hints .v7d-kbd { height: 16px; font-size: 10px; }
.v7d-hints .v7d-link { font-size: 11px; margin-left: auto; }

/* dialogs: reveal reasons, reject taxonomy, shortcuts */
.v7r-lead, .v7d-lead { margin: 0 0 12px; color: var(--text-2); font-size: 13px; }
.v7r-reasons, .v7d-rj { border: 0; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.v7r-opt, .v7d-rj-opt { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px; border-radius: 6px; cursor: pointer; }
.v7r-opt:hover, .v7d-rj-opt:hover { background: var(--surface-2); }
.v7r-opt input, .v7d-rj-opt input { accent-color: var(--accent); margin: 0; }
.v7r-opt span, .v7d-rj-l { flex: 1 1 auto; font-size: 13px; }
.v7r-note { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.v7r-note[hidden] { display: none; }
.v7r-note input, .v7d-rj-extra select, .modal textarea#v7d-rj-note, .modal textarea#v7d-ro-r, .modal textarea#v7d-req-r { width: 100%; }
.v7d-rj-modal { max-width: 440px; }
.v7d-rj-help { min-height: 18px; font-size: 12px; color: var(--text-3); margin: 0 0 8px; padding-left: 8px; }
.v7d-rj-help.warn { color: var(--warn); }
.v7d-rj-extra { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.v7d-rj-extra[hidden] { display: none; }
.v7d-rj-count { font-size: 11px; text-align: right; margin-top: 2px; }
.v7d-rj-hint { white-space: nowrap; }
.v7d-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.v7d-keyrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; border-bottom: 1px solid var(--line); font-size: 13px; }
.v7d-keyrow > span:last-child { display: inline-flex; gap: 4px; flex: 0 0 auto; }

/* history drawer */
.v7d-dwrap { position: fixed; inset: 0; z-index: 1100; }
.v7d-scrim { position: absolute; inset: 0; background: rgba(11, 18, 32, .28); }
.v7d-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%; display: flex; flex-direction: column; background: var(--surface);
  border-left: 1px solid var(--line); border-radius: 10px 0 0 10px; box-shadow: var(--shadow-modal); }
.v7d-drawer-h { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.v7d-drawer-h h2 { margin: 0; font-size: 14px; font-weight: 600; }
.v7d-drawer-h .v7d-small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.v7d-drawer-b { flex: 1 1 auto; overflow: auto; padding: 12px 16px; }
.v7d-drawer-f { padding: 10px 16px; border-top: 1px solid var(--line); }
.v7d-hist { list-style: none; margin: 0; padding: 0; }
.v7d-hist li { display: grid; grid-template-columns: 96px 1fr; column-gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.v7d-hts { grid-row: span 3; font-size: 11px; color: var(--text-3); padding-top: 1px; }
.v7d-hk { font-weight: 500; color: var(--text); }
.v7d-ha, .v7d-hs { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.v7d-hs { color: var(--text-3); }

/* ---------------- 1024–1279: fields stay beside the page ---------------- */
@media (max-width: 1279.98px) {
  .v7d-rbody { grid-template-columns: minmax(0, 1fr) 360px; }
  .v7d.is-review.list-open .v7d-body { grid-template-columns: 260px minmax(0, 1fr); }
  .v7d-qt .c-why { width: 30%; }
  .v7d-qt .c-pg, .v7d-qt .c-asg { display: none; }
  .v7d-today { display: none; }
  .v7d-text { flex-basis: 240px; }
  .v7d-rmeta { max-width: 52vw; }
  .v7d-mstate { display: none; }
  .v7d-viewed { margin-right: 4px; }
}
@media (max-width: 1099.98px) {
  .v7d-qt .c-cls { display: none; }
  .v7d-vbar .v7d-tbt { display: none; }
}
@media (max-width: 899.98px) and (min-width: 720px) {
  .v7d-rbody { grid-template-columns: minmax(0, 1fr) 320px; }
  .v7d-rpos, .v7d-viewed { display: none; }
}

/* ---------------- ≤719: pushed views, document scrolls ---------------- */
@media (max-width: 719.98px) {
  #view-documents > .v7d { min-height: calc(100dvh - var(--topbar-h, 48px)); }
  .v7d-head { flex-wrap: nowrap; padding: 0 12px; }
  .v7d-policy { display: none !important; }
  .v7d-head .btn span:not(.v7d-sr) { display: none; }
  .v7d-head .btn svg { margin: 0; }
  #v7d-getnext { padding: 0 10px; }
  .v7d-body, .v7d.is-review .v7d-body, .v7d.is-review.list-open .v7d-body { display: block; }
  .v7d.is-review .v7d-queue { display: none; }
  .v7d-queue { border-right: 0; }
  .v7d-qtools { flex-wrap: wrap; height: auto; padding: 8px 12px; }
  .v7d-search { flex: 1 1 100%; }
  .v7d-search input, .v7d-sort, .v7d-qtools .btn { height: 40px; }
  .v7d-qcount { display: none; }
  .v7d-tabs { padding: 0 8px; }
  .v7d-qlist { overflow: visible; }
  .v7d-qt, .v7d-qt tbody { display: block; }
  .v7d-qt thead, .v7d-qt caption { display: none; }
  .v7d-qt tr.v7d-tr { display: block; border-bottom: 1px solid var(--line); }
  .v7d-qt td { display: none; height: auto; border: 0; }
  .v7d-qt td.c-doc { display: block; padding: 10px 16px; min-height: 64px; white-space: normal; }
  .v7d-qt .c-doc .v7d-open { font-size: 14px; line-height: 22px; min-height: 24px; }
  .v7d-qt .v7d-sub { display: none; }
  .v7d-qt .v7d-msub { display: block; font-size: 12px; line-height: 18px; color: var(--text-3); white-space: normal; }
  .v7d-review { display: block; }
  .v7d-rhead { height: auto; min-height: 52px; padding: 8px 12px; flex-wrap: wrap; }
  .v7d-back, .v7d-rpos { display: none; }
  .v7d-rmeta { white-space: normal; }
  .v7d-rbody { display: block; }
  .v7d-viewer { border-right: 0; border-bottom: 1px solid var(--line); }
  .v7d-vbar { overflow-x: auto; scrollbar-width: none; }
  .v7d-vbar .v7d-tb { min-width: 40px; height: 40px; }
  .v7d-vbar [data-v="zin"], .v7d-vbar [data-v="zout"], .v7d-vbar .v7d-zval, .v7d-vbar [data-v="thumbs"], .v7d-vbar [data-v="text"], .v7d-vbar .v7d-vsep { display: none; }
  .v7d-vmain { display: block; }
  .v7d-thumbs, .v7d-text { display: none !important; }
  .v7d-canvas { overflow: visible; padding: 8px; }
  .v7d-fields { display: block; }
  .v7d-fhead { height: auto; min-height: 48px; flex-wrap: wrap; padding: 8px 16px; }
  .v7d-fbody { overflow: visible; }
  .v7d-in { height: 44px; font-size: 16px; }
  .v7d-abar { position: sticky; bottom: 0; z-index: 20; height: auto; min-height: 64px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); }
  .v7d-abar .btn { height: 44px; }
  .v7d-hints, .v7d-fsub { display: none !important; }
  .v7d-keys { grid-template-columns: 1fr; }
  .v7d-drawer { width: 100%; border-radius: 0; }
  .v7d-cmp-pages { grid-template-columns: 1fr; }
}

/* D-9: the undo toast sits bottom-left in this view so it never covers the sticky action bar */
@media (min-width: 720px) {
  body:has(#view-documents.active) .toasts { right: auto; left: calc(var(--rail-w, 232px) + 16px); right: auto; align-items: flex-start; }
  body:has(.shell.rail-collapsed):has(#view-documents.active) .toasts { left: calc(var(--rail-w-collapsed, 60px) + 16px); }
}

/* compare caption: keep "n fields differ · 98% similar" on one line */
.v7d-vbar .v7d-small { white-space: nowrap; }

/* round 2: nothing in the fields pane may scroll sideways (1440 / 1024 / 390) */
.v7d-fields, .v7d-review, .v7d-rbody { min-width: 0; }
.v7d-abar > * { min-width: 0; }
.v7d-abar .btn { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7d-approve { flex: 0 1 auto; min-width: 0; }
.v7d-approve > span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1599.98px) { .v7d-approve .v7d-kbd { display: none; } }
.v7d-fhead > * { min-width: 0; }
.v7d-cls { flex: 0 1 auto; }
.v7d-notice, .v7d-fmsg span, .v7d-fmeta, .v7d-focr, .v7d-failed p, .v7d-quote { overflow-wrap: anywhere; }
.v7d-fl { min-width: 0; }
/* the review surface holds focus between edits */
.v7d-fields:focus { outline: none; }
.v7d-fields:focus-visible, .v7d-fields:focus:not(:focus-visible) { box-shadow: var(--ring-inset); }

/* ---- round 2 review (D-1to5-r2 / D-6to10-r2) ---- */
/* the canvas is the review surface: visible ring when it holds focus (also after programmatic focus) */
.v7d-canvas:focus { outline: none; box-shadow: var(--ring-inset); }
/* G8: script-focused buttons and radios show a ring too, scoped to this view and its dialogs */
#view-documents .btn:focus, #view-documents .icon-btn:focus, #view-documents .v7d-tb:focus, .v7r-opt input:focus, .v7d-rj-opt input:focus { outline: none; box-shadow: var(--ring); }
#view-documents .btn:focus:not(:focus-visible).is-loading { box-shadow: none; }
/* G4: unsaved-decision badge on the rail */
.v7d-rail-err { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 6px; margin-top: 4px; border: 1px solid var(--err); border-radius: 6px; background: var(--surface); color: var(--err); cursor: pointer; font: inherit; }
.v7d-rail-err .v7d-mono { font-size: 11px; color: var(--err); }
.v7d-rail-err:focus-visible { outline: none; box-shadow: var(--ring); }
/* L2-c: under 1600px the expanded list is an overlay drawer, the viewer keeps its width */
.v7d-body { position: relative; }
@media (max-width: 1599.98px) {
  .v7d.is-review.list-open .v7d-body { grid-template-columns: 48px minmax(0, 1fr); }
  .v7d.is-review.list-open .v7d-review { grid-column: 2; grid-row: 1; }
  .v7d.is-review.list-open .v7d-queue { position: absolute; left: 0; top: 0; bottom: 0; width: 320px; z-index: 40; box-shadow: var(--shadow-pop); border-right: 1px solid var(--line); }
}
@media (max-width: 1279.98px) { .v7d.is-review.list-open .v7d-body { grid-template-columns: 48px minmax(0, 1fr); } }
/* L2-b: viewer under 640px folds secondary tools into a ⋯ menu */
.v7d-tb[data-v="vmore"] { display: none; }
.v7d-viewer.narrow .v7d-tb[data-v="rot"], .v7d-viewer.narrow .v7d-tb[data-v="enh"], .v7d-viewer.narrow .v7d-tb[data-v="text"], .v7d-viewer.narrow .v7d-tb[data-v="thumbs"] { display: none; }
.v7d-viewer.narrow .v7d-tb[data-v="vmore"] { display: inline-flex; }
.v7d-viewer.narrow .v7d-tbt, .v7d-viewer.narrow .v7d-mstate { display: none; }
/* L5-b/c: labels only for the hovered box; above the box, or below when it touches the top; none while focused */
.v7d-box.on .v7d-box-l { display: none; }
.v7d-box.lb .v7d-box-l { bottom: auto; top: calc(100% + 4px); }
/* L2-d: folded empty optional fields; single-field groups need no label */
.v7d-empties { display: block; width: 100%; min-height: 28px; margin: 4px 0 8px; padding: 4px 0; border: 0; border-top: 1px dashed var(--line); background: none; text-align: left; font: inherit; font-size: 12px; color: var(--text-2); cursor: pointer; overflow-wrap: anywhere; }
.v7d-empties:hover { color: var(--text); }
.v7d-empties:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
.v7d-grp-1 { margin-top: 12px; }
/* L2-e: reason column capped; space goes to Document */
.v7d-qt .c-why { width: 260px; max-width: 260px; }
/* G14: short tab labels on phones, scroll fade */
.v7d-ts { display: none; }
@media (max-width: 719.98px) {
  .v7d-tl { display: none; } .v7d-ts { display: inline; }
  .v7d .v7d-tabs { scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-right: 24px; }
  .v7d .v7d-tabs .ptab { padding-left: 8px; padding-right: 8px; scroll-snap-align: start; }
}
/* G10: history filter + pinned decision */
.v7d-hfilter { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.v7d-hfilter button { height: 26px; padding: 0 10px; border: 0; background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; }
.v7d-hfilter button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }
.v7d-hfilter button:focus-visible { outline: none; box-shadow: var(--ring-inset); }
.v7d-hpin { margin-bottom: 8px; padding: 8px 10px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.v7d-hpin-row { display: grid; grid-template-columns: 96px 1fr; column-gap: 12px; font-size: 13px; }
/* G7: nav item when the role cannot read Document Scanning */
body.v7d-nav-locked #nav-documents { opacity: .6; }
body.v7d-nav-locked #nav-documents::after { content: ""; width: 12px; height: 12px; margin-left: auto; background: currentColor; flex: 0 0 auto;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='5' y='10.5' width='14' height='10' rx='2'/><path d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'><rect x='5' y='10.5' width='14' height='10' rx='2'/><path d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/></svg>") center / contain no-repeat; }
.v7d-fstate { white-space: normal; }
.v7d-canvas.v7d-surface-on { box-shadow: var(--ring-inset); }
#v7d-tocheck { margin-left: 4px; }
.v7d-box.lf { border-style: dashed; border-color: #1F4FD8; }
.v7d-tabsel-l { display: none; }
@media (max-width: 719.98px) {
  .v7d .v7d-tabs { display: none; }
  .v7d-tabsel-l { display: block; flex: 1 1 100%; }
  .v7d-tabsel-l select { width: 100%; }
}
.v7d-son { color: var(--text-3); font-weight: 500; }

/* ---- open document types (DOMAIN_SPEC §8) ---- */
.v7d-sugg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; padding: 6px 16px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.v7d-sugg[hidden] { display: none; }
.v7d-sugg .v7d-link { font-size: 12px; }
.v7d-gen { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.v7d-gen-h { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; text-align: left; }
.v7d-gen-h[aria-expanded="true"] svg { transform: rotate(90deg); }
.v7d-gen-h .v7d-muted { font-weight: 400; margin-left: auto; }
.v7d-gen-h:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
.v7d-gen-sum { margin: 4px 0 8px; font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
.v7d-gen-kv { list-style: none; margin: 0 0 8px; padding: 0; }
.v7d-gen-row { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.v7d-gen-l { border: 0; background: none; padding: 0; font: inherit; color: var(--text-2); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.v7d-gen-l:hover { color: var(--text); text-decoration: underline; }
.v7d-gen-l:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
.v7d-gen-v { color: var(--text); overflow-wrap: anywhere; }
.v7d-gen-use { font-size: 12px; white-space: nowrap; }
.v7d-gen-t { margin: 8px 0; font-size: 12px; }
.v7d-gen-t td.num { text-align: right; font-family: var(--mono); }
.v7d-gen-ents { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.v7d-gen-ek { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.v7d-gen-ek .v7d-flabel { min-width: 96px; }
.v7d-gen-e { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v7d-box.g, .v7d-box.t { pointer-events: none; }
.v7d-sg-thumbs { display: flex; gap: 8px; margin: 0 0 12px; overflow-x: auto; }
.v7d-sg-thumb { width: 72px; height: auto; border: 1px solid var(--line-strong); background: #fff; flex: 0 0 auto; }
.v7d-sg-tw { margin: 12px 0; }
.v7d-sg-t td, .v7d-sg-t th { white-space: nowrap; }
.v7d-teach-h { margin: 8px 0 2px; font-weight: 600; font-size: 13px; }
.v7d-teach-rows { list-style: none; margin: 12px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.v7d-tr { padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.v7d-tr.on { border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
.v7d-tr-1 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.v7d-tr-1 .v7d-in { flex: 1 1 140px; }
.v7d-tr-1 .v7d-sort { flex: 0 1 auto; height: 32px; }
.v7d-tr-id { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.v7d-tr-2 { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; font-size: 12px; flex-wrap: wrap; }
.v7d-tr-v { color: var(--text); overflow-wrap: anywhere; }
.v7t { padding: 0 0 24px; }
.v7t-imp { cursor: pointer; }
.v7t-t td { height: 48px; }
.v7t-d { margin-top: 16px; }
.v7t-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
.v7t-vals { margin: 0 0 8px; padding-left: 18px; font-size: 13px; }
.v7t-vadd { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.v7t-vp { width: 200px; height: 30px; }
.v7t-save { margin-top: 16px; }
.v7t-acc-n { margin: 0 0 8px; font-size: 13px; }
.v7t-acc-n b { font-size: 20px; }
.v7t-auto { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; font-size: 13px; }
.v7t-ft { margin: 8px 0; max-width: 360px; }
.v7t-ev { margin: 4px 0 0; padding-left: 18px; font-size: 12px; }
@media (max-width: 1099.98px) { .v7t-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 719.98px) { .v7d-gen-row { grid-template-columns: minmax(0, 1fr); } .v7t-vp { width: 100%; } }

/* R3 D: tab labels in the UI font (they rendered in the mono face), table edges line up with the 16px toolbar */
.v7d-tabs .ptab, .v7d-tabs .v7d-tl { font-family: var(--font); }
/* .v7d-tl is also the mono timeline class (line 268); inside tabs it is just the label */
.v7d-tabs .v7d-tl { margin: 0; padding: 0; font-size: inherit; line-height: inherit; color: inherit; background: none; border-radius: 0; }
.v7d-qt th:first-child, .v7d-qt td:first-child { padding-left: 16px; }
.v7d-qt th:last-child, .v7d-qt td:last-child { padding-right: 16px; }
