/* The Desk screens sit inside the app's own page (.page supplies the padding). */
.dk { max-width: 1360px; display: grid; gap: 16px; min-width: 0; }
.dk-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; box-shadow: var(--shadow-sm); }
.dk-card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; margin-bottom: 10px; }
.dk-title { display: grid; justify-items: start; gap: 6px; }
.dk-title .dk-sub { font-size: 13.5px; max-width: 80ch; }
.dk-title h1, .dk-title h2 { font-size: 27px; line-height: 1.15; }
.dk-title h2 { font-size: 20px; }
.dk-sub { color: var(--ink-soft); font-size: 13px; }
.dk-empty { color: var(--ink-soft); margin: 0; }
.dk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.dk-tile { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-sunk); }
.dk-tile b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dk-tile span { font-size: 12px; color: var(--ink-soft); }
.dk-tile.good b { color: var(--good); }
.dk-tile.warn b { color: var(--warn); }
.dk-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.dk-col { display: grid; gap: 16px; min-width: 0; }
.dk-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 18px; margin: 8px 0 0; }
.dk-kv dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.dk-kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.dk-list { display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; margin: 0; font-size: 13px; }
.dk-list dt { color: var(--ink-soft); }
.dk-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--neutral-soft); color: var(--neutral); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.dk-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.dk-filters label { display: grid; gap: 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; }
.dk-filters select { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); min-width: 120px; }
.dk-link { all: unset; cursor: pointer; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.dk-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dk-scroll { overflow-x: auto; }
.dk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dk-table th, .dk-table td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.dk-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; white-space: nowrap; }
.dk-table td.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 18px; }
.dk-table tbody tr[data-id] { cursor: pointer; }
.dk-table tbody tr[data-id]:hover { background: var(--surface-sunk); }
.dk-table .co { font-weight: 600; overflow-wrap: anywhere; }
.dk-table .dom { font-size: 12px; color: var(--ink-soft); overflow-wrap: anywhere; }
.dk-wide { min-width: 1020px; }
.dk-bars { display: grid; gap: 7px; margin-top: 6px; }
.dk-bar { display: grid; grid-template-columns: 130px 1fr 54px; align-items: center; gap: 10px; font-size: 13px; }
.dk-bar .track { height: 10px; border-radius: 999px; background: var(--surface-hi); overflow: hidden; }
.dk-bar .fill { display: block; height: 100%; background: var(--accent-fill); border-radius: 999px; }
.dk-bar .pts { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.dk-big { font-size: 34px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dk-big small { font-size: 15px; font-weight: 500; color: var(--ink-faint); }
.dk-quote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--line-strong); background: var(--surface-sunk); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; overflow-wrap: anywhere; }
.dk-post { border-top: 1px solid var(--line); padding: 12px 0 2px; }
.dk-post:first-of-type { border-top: 0; padding-top: 0; }
.dk-post .t { font-weight: 600; overflow-wrap: anywhere; }
.dk-post .m, .dk-sig .m { font-size: 12px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; }
.dk-note { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; }
.dk-warn { border: 1px solid var(--line-strong); border-left: 4px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; margin: 8px 0; }
.dk-block { border: 1px solid var(--line-strong); border-left: 4px solid var(--bad); background: var(--bad-soft); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; margin: 6px 0; }
.dk-ok { border: 1px solid var(--line-strong); border-left: 4px solid var(--good); background: var(--good-soft); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; margin: 6px 0; }
ul.dk-ul { margin: 6px 0 0; padding-left: 18px; }
ul.dk-ul li { margin: 2px 0; overflow-wrap: anywhere; }
.dk-bad { color: var(--bad); }
@media (max-width: 760px) { .dk-two { grid-template-columns: 1fr; } .dk-bar { grid-template-columns: 96px 1fr 48px; } }

/* Buyer confidence card: label, then Confidence / Reason / Evidence / Missing evidence as a labelled list */
.dk-buyer-head { margin: 4px 0 8px; }
dl.dk-buyer { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 16px; margin: 8px 0 0; }
dl.dk-buyer dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); padding-top: 3px; }
dl.dk-buyer dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
q.dk-quote { display: inline; margin: 0; padding: 0 2px; border: 0; background: transparent; font-style: italic; quotes: "\201C" "\201D"; }
.dk-mark { display: inline-block; min-width: 1ch; font-weight: 700; }
.dk-mark.buyer { color: var(--good); }
.dk-mark.intermediary { color: var(--bad); }
@media (max-width: 640px) { dl.dk-buyer { grid-template-columns: 1fr; gap: 2px; } dl.dk-buyer dd { margin-bottom: 8px; } }
details.dk-how { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
details.dk-how summary { cursor: pointer; }
details.dk-how summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Evidence-to-readiness flow: one step per decision, joined by an arrow */
ol.dk-flow { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
li.dk-step { position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 12px 14px; margin-bottom: 22px; min-width: 0; }
li.dk-step:last-child { margin-bottom: 0; }
.dk-step-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.dk-step-name { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); min-width: 120px; }
.dk-step-value { font-size: 16px; overflow-wrap: anywhere; }
.dk-step-reason { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.dk-meta { margin: 8px 0 0; font-size: 12px; color: var(--ink-faint); }
.dk-arrow { position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%); color: var(--ink-faint); font-size: 16px; line-height: 20px; }
.dk-quote-line { margin: 4px 0 0; }
li.dk-step ul.dk-ul li { margin: 6px 0; }

/* Phase 6H: dashboard groups, pipeline strip, checklist, status banner, templates editor */
.dk-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; align-items: start; }
ol.dk-pipe { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 4px; font-size: 12px; counter-reset: stage; }
ol.dk-pipe li { counter-increment: stage; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-sunk); color: var(--ink-soft); }
ol.dk-pipe li::before { content: counter(stage) ". "; color: var(--ink-faint); }
.dk-status { font-size: 14px; }
.dk-status b { display: block; margin-bottom: 2px; }
ul.dk-check { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 0; }
li.dk-check-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: start; }
li.dk-check-row:last-child { border-bottom: 0; }
.dk-check-mark { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--neutral-soft); color: var(--neutral); }
li.dk-check-row.good .dk-check-mark { background: var(--good-soft); color: var(--good); }
li.dk-check-row.warn .dk-check-mark { background: var(--warn-soft); color: var(--warn); }
li.dk-check-row.bad .dk-check-mark { background: var(--bad-soft); color: var(--bad); }
.dk-check-head { overflow-wrap: anywhere; }
details.dk-fulltrace { padding: 12px 18px; }
details.dk-fulltrace > summary { cursor: pointer; font-weight: 600; }
button.dk-btn { font: inherit; font-size: 13px; padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
button.dk-btn { background: var(--accent-fill); color: #fff; border-color: transparent; font-weight: 600; }
button.dk-btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); font-weight: 500; }
button.dk-tab:focus-visible, button.dk-btn:focus-visible, .dk-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dk-field { display: grid; gap: 4px; margin: 8px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; }
.dk-field input, .dk-field textarea { font: inherit; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); width: 100%; }
.dk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.dk-preview { min-width: 0; }
.dk-subject { font-weight: 600; margin: 6px 0; overflow-wrap: anywhere; }
pre.dk-mail { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14px; margin: 0; padding: 12px 14px; background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.dk-search { min-width: 220px; }
#f-text { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); min-width: 220px; }
.dk-table.dk-wide th, .dk-table.dk-wide td { padding-right: 8px; }
.dk-table.dk-wide .pill { font-size: 11px; padding: 1px 7px; }
details.dk-draft { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin: 8px 0; background: var(--surface); }
details.dk-draft > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
details.dk-draft h2 { margin-top: 8px; }
.dk-edit { margin-top: 10px; }
/* the step-time bar on a day's trace (its own class: .dk-bar is the score row) */
.dk-trace { height: 8px; border-radius: 4px; background: var(--accent-fill); min-width: 2px; }
.dk-table th.num { text-align: right; padding-right: 18px; }
.dk-clear { margin-left: auto; }
.dk-scroll { background: linear-gradient(to right, var(--surface) 30%, transparent), linear-gradient(to left, var(--surface) 30%, transparent) 100% 0,
  radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.14), transparent), radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.14), transparent) 100% 0;
  background-repeat: no-repeat; background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%; background-attachment: local, local, scroll, scroll; }


/* ---- section tabs (the same underlined style as the Leads and Outreach tabs), with a count ---- */
.dk-tabs { display: flex; flex-wrap: wrap; gap: 4px 26px; border-bottom: 1px solid var(--line); margin: 4px 0 4px; }
button.dk-tab { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 9px 1px 11px; margin-bottom: -1px; color: var(--ink-soft); cursor: pointer; border-radius: 0; transition: color .14s ease, border-color .14s ease; }
button.dk-tab:hover { color: var(--ink); }
button.dk-tab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); background: none; }
.dk-count { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 1px 8px; border-radius: 999px; background: var(--surface-sunk); color: var(--ink-soft); }
button.dk-tab[aria-pressed="true"] .dk-count { background: var(--accent-soft); color: var(--accent-ink); }
.dk-lede { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-soft); max-width: 90ch; }
.dk-emptybox { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 28px 22px; text-align: center; background: var(--surface); }
.dk-emptybox b { font-size: 16px; }
.dk-emptybox p { margin: 6px auto 0; max-width: 56ch; color: var(--ink-soft); font-size: 13.5px; }
/* the small "Showing" picker on the screens that depend on which run is read */
.dk-run { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-faint); justify-self: end; }
.dk-run select { font: inherit; font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); max-width: min(320px, 70vw); }
.dk-subnav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 13.5px; font-weight: 600; }
.dk-subnav a { color: var(--ink-soft); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.dk-subnav a:hover { color: var(--ink); }
.dk-subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 760px) { .dk { gap: 12px; } .dk-card { padding: 14px; } .dk-title h1 { font-size: 22px; } .dk-run { justify-self: start; } }
.dk-headrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.dk-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.dk-who label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.dk-who p { margin: 0; }
.dk-who input, .dk-actions input[type="text"] { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); width: 240px; max-width: 100%; }
.dk-actions input[type="text"] { width: min(380px, 100%); }
details.dk-draft h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 600; margin: 10px 0 8px; font-family: inherit; }
