/* KD Client Hub – UI system (0.4, Oct 2026). One small set of components for the Desk, Review and the hub's wp-admin.
   Rules and the status map: docs/ui-system.md. Every page is built from these classes only (ui-*).
   Loaded after hub.css + hub-next.css. Never style .kdh-pin or .kdh-canvas here (comment pins stay where they are). */

/* ---------- tokens ---------- */
html.kdh-next, body.kdh-next-admin, .ui-root {
	/* neutrals */
	--u-page: #dddddb; --u-shell: #f3f3f1; --u-card: #fbfbfa; --u-sunken: #f0f0ee; --u-raised: #ffffff;
	--u-line: #e6e6e3; --u-line2: #eeeeec;
	--u-ink: #18181a; --u-ink2: #55575c; --u-mut: #8a8c91; --u-faint: #c3c4c7;
	/* one accent: ink. Blue only for focus, link hover and AI */
	--u-primary: #1c1c1e; --u-on-primary: #ffffff;
	--u-blue: #2f5fe8; --u-blue-soft: #e8eefd; --u-blue-ink: #2347b5;
	/* status: dot + text or a soft chip, never a card background */
	--u-green: #1e9a52; --u-green-soft: #e5f3ea; --u-green-ink: #17703d;
	--u-orange: #e5862a; --u-orange-soft: #fcefe0; --u-orange-ink: #a85a10;
	--u-red: #d93a3a; --u-red-soft: #fbe7e6; --u-red-ink: #a82626;
	--u-grey: #9a9ca1; --u-grey-soft: #ededeb; --u-grey-ink: #5e6066;
	/* shape and type */
	--u-r-card: 18px; --u-r: 10px; --u-r-sm: 8px;
	--u-font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--u-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
	--u-ease: cubic-bezier(.2, .7, .2, 1);
	--u-row: 52px;
	--u-shadow-pop: 0 12px 32px -12px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .06);
}
html.kdh-next[data-theme="dark"], .ui-root[data-theme="dark"] {
	--u-page: #0c0d0e; --u-shell: #141517; --u-card: #1b1c1f; --u-sunken: #222326; --u-raised: #26272b;
	--u-line: #2b2d31; --u-line2: #25272a;
	--u-ink: #f1f1f1; --u-ink2: #b4b6bb; --u-mut: #83868c; --u-faint: #4b4e54;
	--u-primary: #f1f1f1; --u-on-primary: #141414;
	--u-blue: #6189f5; --u-blue-soft: #1c2640; --u-blue-ink: #a4bbff;
	--u-green: #3fbf6b; --u-green-soft: #16301f; --u-green-ink: #7fd8a0;
	--u-orange: #f09a45; --u-orange-soft: #33261a; --u-orange-ink: #f3b77a;
	--u-red: #f05f5f; --u-red-soft: #3a1c1c; --u-red-ink: #f59a9a;
	--u-grey: #83868c; --u-grey-soft: #2a2c30; --u-grey-ink: #b4b6bb;
	--u-shadow-pop: 0 16px 40px -12px rgba(0, 0, 0, .7);
}

/* ---------- type ---------- */
.ui-page { color: var(--u-ink); font: 14px/1.45 var(--u-font); font-feature-settings: "cv11", "ss01", "tnum"; }
.ui-h1 { margin: 0; font-size: 40px; line-height: 1.08; font-weight: 400; letter-spacing: -.025em; color: var(--u-ink); }
.ui-h2 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 500; letter-spacing: -.005em; color: var(--u-ink); }
.ui-num { font-size: 40px; line-height: 1; font-weight: 300; letter-spacing: -.03em; color: var(--u-ink); font-variant-numeric: tabular-nums; }
.ui-num-sm { font-size: 28px; line-height: 1.05; font-weight: 300; letter-spacing: -.02em; color: var(--u-ink); font-variant-numeric: tabular-nums; }
.ui-num small, .ui-num-sm small { font-size: .42em; font-weight: 400; letter-spacing: 0; color: var(--u-mut); margin-left: 3px; }
.ui-body { font-size: 14px; color: var(--u-ink); }
.ui-meta { font-size: 12.5px; line-height: 1.4; color: var(--u-mut); }
.ui-mono { font-family: var(--u-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--u-mut); }
.ui-label { font-family: var(--u-mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--u-mut); }
.ui-link { color: var(--u-ink2); text-decoration: none; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ui-link:hover { color: var(--u-blue); }
.ui-link .kdh-ic { width: 14px; height: 14px; }

/* ---------- page header ---------- */
.ui-phead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
.ui-phead-t { flex: 1; min-width: 240px; }
.ui-phead-t .ui-meta { margin-top: 8px; font-size: 13.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ui-phead-a { display: flex; gap: 8px; align-items: center; }

/* ---------- grid: 12 columns, fixed spans, same height per row ---------- */
.ui-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ui-grid + .ui-grid { margin-top: 16px; }
.ui-span-3 { grid-column: span 3; } .ui-span-4 { grid-column: span 4; } .ui-span-6 { grid-column: span 6; } .ui-span-8 { grid-column: span 8; } .ui-span-12 { grid-column: span 12; }
@media (max-width: 1100px) { .ui-span-3 { grid-column: span 6; } .ui-span-4, .ui-span-8 { grid-column: span 12; } }
@media (max-width: 720px) { .ui-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } .ui-grid > * { grid-column: 1 / -1; } }

/* ---------- card: one component ---------- */
.ui-card { display: flex; flex-direction: column; min-width: 0; background: var(--u-card); border: 1px solid var(--u-line); border-radius: var(--u-r-card); overflow: hidden; }
.ui-card-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--u-line2); min-height: 60px; box-sizing: border-box; }
.ui-card-h .ui-h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-icbox { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--u-raised); border: 1px solid var(--u-line); color: var(--u-ink2); box-sizing: border-box; }
.ui-icbox .kdh-ic { width: 16px; height: 16px; }
.ui-icbox.ui-ai { background: var(--u-blue); border-color: transparent; color: #fff; }
.ui-card-b { flex: 1; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ui-card-b.ui-flush { padding: 0; gap: 0; }
.ui-card-b > p, .ui-card-b > div > p, .ui-tile p { margin: 0; }
.ui-card-f { padding: 12px 20px; border-top: 1px solid var(--u-line2); display: flex; align-items: center; gap: 8px; }
a.ui-card, button.ui-card { text-align: left; color: inherit; text-decoration: none; cursor: pointer; transition: border-color .15s, transform .15s var(--u-ease); }
a.ui-card:hover, button.ui-card:hover { border-color: color-mix(in srgb, var(--u-ink) 22%, var(--u-line)); }

/* ---------- stat tile: one component everywhere ---------- */
.ui-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 18px; background: var(--u-card); border: 1px solid var(--u-line); border-radius: var(--u-r-card); color: inherit; text-decoration: none; min-width: 0; box-sizing: border-box; }
.ui-tile-l { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--u-ink2); margin-bottom: 14px; }
.ui-tile-l .kdh-ic { width: 16px; height: 16px; color: var(--u-mut); }
.ui-tile-l .ui-dot { margin-left: auto; }
.ui-tile .ui-meta { margin-top: 2px; }
a.ui-tile:hover { border-color: color-mix(in srgb, var(--u-ink) 22%, var(--u-line)); }

/* ---------- status: dot + text, soft chip ---------- */
.ui-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--u-grey); }
.ui-dot.ui-green { background: var(--u-green); } .ui-dot.ui-orange { background: var(--u-orange); } .ui-dot.ui-red { background: var(--u-red); } .ui-dot.ui-grey { background: var(--u-grey); } .ui-dot.ui-blue { background: var(--u-blue); }
.ui-st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--u-ink2); white-space: nowrap; }
.ui-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--u-grey-soft); color: var(--u-grey-ink); box-sizing: border-box; }
.ui-chip .ui-dot { width: 6px; height: 6px; }
.ui-chip.ui-green { background: var(--u-green-soft); color: var(--u-green-ink); } .ui-chip.ui-green .ui-dot { background: var(--u-green); }
.ui-chip.ui-orange { background: var(--u-orange-soft); color: var(--u-orange-ink); } .ui-chip.ui-orange .ui-dot { background: var(--u-orange); }
.ui-chip.ui-red { background: var(--u-red-soft); color: var(--u-red-ink); } .ui-chip.ui-red .ui-dot { background: var(--u-red); }
.ui-chip.ui-blue { background: var(--u-blue-soft); color: var(--u-blue-ink); } .ui-chip.ui-blue .ui-dot { background: var(--u-blue); }
.ui-chip.ui-plain { background: var(--u-raised); border: 1px solid var(--u-line); color: var(--u-ink2); font-weight: 400; }
.ui-chip .kdh-ic { width: 13px; height: 13px; }
.ui-tag { font-family: var(--u-mono); font-size: 11px; letter-spacing: .02em; padding: 2px 7px; border-radius: 6px; background: var(--u-sunken); color: var(--u-ink2); white-space: nowrap; }

/* ---------- counts and badges (sidebar, bell, tabs) ---------- */
.ui-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--u-primary); color: var(--u-on-primary); box-sizing: border-box; font-variant-numeric: tabular-nums; }
.ui-count.ui-quiet { background: var(--u-sunken); color: var(--u-ink2); }
.ui-unread { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--u-red); box-shadow: 0 0 0 2px var(--u-card); }

/* ---------- buttons ---------- */
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--u-r); border: 1px solid var(--u-line); background: var(--u-raised); color: var(--u-ink); font: 500 13.5px var(--u-font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, transform .1s; box-sizing: border-box; }
.ui-btn:hover { border-color: color-mix(in srgb, var(--u-ink) 25%, var(--u-line)); }
.ui-btn:active { transform: scale(.97); }
.ui-btn .kdh-ic { width: 16px; height: 16px; }
.ui-btn-primary { background: var(--u-primary); border-color: transparent; color: var(--u-on-primary); }
.ui-btn-primary:hover { border-color: transparent; filter: brightness(1.15); }
.ui-btn-ghost { background: transparent; border-color: transparent; color: var(--u-ink2); }
.ui-btn-ghost:hover { background: var(--u-sunken); border-color: transparent; }
.ui-btn-ai { background: var(--u-blue-soft); border-color: color-mix(in srgb, var(--u-blue) 25%, transparent); color: var(--u-blue-ink); }
.ui-btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--u-r-sm); }
.ui-btn-icon { width: 36px; padding: 0; } .ui-btn-sm.ui-btn-icon { width: 30px; }
.ui-btn[disabled] { opacity: .45; pointer-events: none; }
.ui-btn-brand { background: var(--kd-accent, var(--u-primary)); border-color: transparent; color: #fff; } /* Review: the reviewer's main call-to-action only */

/* ---------- avatar ---------- */
.ui-ava { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--u-grey-soft); color: var(--u-ink2); font-size: 11px; font-weight: 600; letter-spacing: .02em; overflow: hidden; }
.ui-ava img { width: 100%; height: 100%; object-fit: cover; }
.ui-ava-lg { width: 36px; height: 36px; font-size: 13px; }
.ui-avas { display: inline-flex; } .ui-avas .ui-ava { box-shadow: 0 0 0 2px var(--u-card); } .ui-avas .ui-ava + .ui-ava { margin-left: -7px; }

/* ---------- lists and tables: one row style ---------- */
.ui-list { list-style: none; margin: 0; padding: 0; }
.ui-row { display: flex; align-items: center; gap: 12px; min-height: var(--u-row); padding: 8px 20px; border-top: 1px solid var(--u-line2); box-sizing: border-box; color: inherit; text-decoration: none; }
.ui-list > .ui-row:first-child, .ui-list > li:first-child > .ui-row { border-top: 0; }
a.ui-row, button.ui-row { cursor: pointer; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; text-align: left; }
a.ui-row:hover, button.ui-row:hover { background: var(--u-sunken); }
.ui-row-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ui-row-t { font-size: 14px; font-weight: 500; color: var(--u-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-row-m .ui-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-row-r { display: flex; align-items: center; gap: 10px; flex: none; color: var(--u-ink2); font-size: 13px; }
.ui-row-more { padding: 12px 20px; border-top: 1px solid var(--u-line2); }
.ui-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ui-table th { height: 36px; padding: 0 20px; text-align: left; font: 500 11px var(--u-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--u-mut); border-bottom: 1px solid var(--u-line2); white-space: nowrap; }
.ui-table td { height: var(--u-row); padding: 6px 20px; border-top: 1px solid var(--u-line2); color: var(--u-ink); vertical-align: middle; }
.ui-table tr:first-child td { border-top: 0; }
.ui-table td.ui-num-c, .ui-table th.ui-num-c { text-align: right; font-variant-numeric: tabular-nums; }
.ui-table tbody tr.ui-click { cursor: pointer; } .ui-table tbody tr.ui-click:hover td { background: var(--u-sunken); }

/* ---------- empty state: icon, one sentence, one action, centred ---------- */
.ui-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 28px 20px; color: var(--u-ink2); }
.ui-empty-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--u-sunken); color: var(--u-mut); }
.ui-empty-ic .kdh-ic { width: 18px; height: 18px; }
.ui-empty p { margin: 0; font-size: 13.5px; max-width: 280px; }

/* ---------- bars (hours, outreach, progress) ---------- */
.ui-bar { position: relative; height: 8px; border-radius: 99px; background: var(--u-sunken); overflow: hidden; }
.ui-bar > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--u-ink); }
.ui-bar > i.ui-hatch { background: repeating-linear-gradient(135deg, var(--u-mut) 0 1.5px, transparent 1.5px 5px); }
.ui-bar > i.ui-red { background: var(--u-red); } .ui-bar > i.ui-orange { background: var(--u-orange); } .ui-bar > i.ui-green { background: var(--u-green); }

/* ---------- segmented control and page tabs ---------- */
.ui-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--u-sunken); border: 1px solid var(--u-line2); }
.ui-seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--u-ink2); font: 500 12.5px var(--u-font); cursor: pointer; }
.ui-seg button[aria-pressed="true"] { background: var(--u-raised); color: var(--u-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ui-seg .kdh-ic { width: 14px; height: 14px; }
.ui-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--u-line); margin: 0 0 20px; overflow-x: auto; }
.ui-tabs a, .ui-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 0 0 11px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--u-mut); font: 500 13.5px var(--u-font); text-decoration: none; white-space: nowrap; cursor: pointer; }
.ui-tabs [aria-current="page"], .ui-tabs [aria-selected="true"] { color: var(--u-ink); border-bottom-color: var(--u-ink); }

/* ---------- inputs ---------- */
.ui-input { height: 36px; padding: 0 12px; border-radius: var(--u-r); border: 1px solid var(--u-line); background: var(--u-raised); color: var(--u-ink); font: 13.5px var(--u-font); box-sizing: border-box; }
.ui-input:focus { outline: 3px solid color-mix(in srgb, var(--u-blue) 22%, transparent); border-color: var(--u-blue); }
.ui-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border-radius: var(--u-r); border: 1px solid var(--u-line); background: var(--u-raised); color: var(--u-mut); font-size: 13.5px; box-sizing: border-box; }
.ui-search kbd { margin-left: auto; font: 11px var(--u-mono); padding: 2px 6px; border-radius: 5px; background: var(--u-sunken); color: var(--u-mut); }

/* ---------- popover (user menu, weather) ---------- */
.ui-pop { font: 14px/1.45 var(--u-font); color: var(--u-ink); min-width: 240px; padding: 6px; border-radius: 14px; background: var(--u-raised); border: 1px solid var(--u-line); box-shadow: var(--u-shadow-pop); }
.ui-pop-h { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--u-line2); margin-bottom: 6px; }
.ui-pop-sec { padding: 6px 10px 10px; }
.ui-pop-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--u-ink); font: 13.5px var(--u-font); text-decoration: none; cursor: pointer; box-sizing: border-box; }
.ui-pop-item:hover { background: var(--u-sunken); }
.ui-pop-item .kdh-ic { width: 16px; height: 16px; color: var(--u-mut); }
.ui-pop-item kbd { margin-left: auto; font: 11px var(--u-mono); color: var(--u-mut); }
.ui-usermenu { position: fixed; z-index: 95; width: 260px; animation: ui-fade .14s var(--u-ease); }
.ui-seg-fill { display: flex; } .ui-seg-fill button { flex: 1; justify-content: center; }
.ui-pop hr { border: 0; border-top: 1px solid var(--u-line2); margin: 6px 0; }

/* ---------- drawer: one shared drawer for details ---------- */
.ui-drawer-bg { position: fixed; inset: 0; z-index: 90; background: rgba(10, 10, 12, .28); animation: ui-fade .18s var(--u-ease); }
.ui-drawer { font: 14px/1.45 var(--u-font); color: var(--u-ink); position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 91; width: min(460px, calc(100vw - 24px)); display: flex; flex-direction: column; background: var(--u-card); border: 1px solid var(--u-line); border-radius: 20px; box-shadow: var(--u-shadow-pop); animation: ui-in .24s var(--u-ease); overflow: hidden; }
.ui-drawer-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--u-line2); }
.ui-drawer-h .ui-h2 { flex: 1; }
.ui-drawer-b { flex: 1; overflow: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.ui-drawer-f { padding: 14px 18px; border-top: 1px solid var(--u-line2); display: flex; gap: 8px; justify-content: flex-end; }
.ui-kv { display: grid; grid-template-columns: 120px 1fr; gap: 0; margin: 0; font-size: 13.5px; }
.ui-kv dt, .ui-kv dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--u-line2); }
.ui-kv dt { color: var(--u-mut); } .ui-kv dd { color: var(--u-ink); }
.ui-kv dt:first-of-type, .ui-kv dt:first-of-type + dd { border-top: 0; }
@keyframes ui-fade { from { opacity: 0; } }
@keyframes ui-in { from { opacity: 0; transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) { .ui-drawer, .ui-drawer-bg { animation: none; } }
.ui-dot.ui-ink { background: var(--u-ink); }

/* ---------- the style page only (#styleguide) ---------- */
.ui-sg { max-width: 1200px; }
.ui-sg-sec { margin: 0 0 40px; }
.ui-sg-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--u-line); }
.ui-sg-head p { margin: 0; }
.ui-sg-sws { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 12px; }
.ui-sg-sw { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ui-sg-sw i { height: 44px; border-radius: 12px; border: 1px solid var(--u-line); margin-bottom: 6px; }
.ui-sg-map td { height: auto; padding: 12px 20px; }
.ui-sg-k { width: 150px; color: var(--u-mut) !important; font-size: 13px; }
.ui-sg-chips { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ui-sg-type { gap: 18px; }
.ui-sg-type p { margin: 4px 0 0; }
.ui-sg-pair { display: flex; gap: 60px; }
.ui-sg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ui-sg-bell { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--u-line); background: var(--u-raised); color: var(--u-ink2); }
.ui-sg-bell .ui-unread { position: absolute; top: 7px; right: 8px; }
.ui-drawer.ui-sg-static { position: static; width: 400px; animation: none; box-shadow: none; }
.ui-sg-shot { height: 150px; border-radius: 12px; background: repeating-linear-gradient(135deg, var(--u-sunken) 0 8px, var(--u-card) 8px 16px); border: 1px solid var(--u-line); display: grid; place-items: center; }

/* ---------- bridge: shared pieces on pages not rebuilt yet follow the system (docs/ui-system.md) ----------
   Avatars neutral, counts ink, priority / request status / website chips from the status map, no blue link text. */
html.kdh-next .kdh-ava, html.kdh-next .kdh-ava-agency, html.kdh-next .kdh-ava-empty { background: var(--u-grey-soft); color: var(--u-ink2); }
html.kdh-next .kdh-avas .kdh-ava + .kdh-ava { box-shadow: 0 0 0 2px var(--u-card); }
html.kdh-next .kdh-count, html.kdh-next .kdh-nx-ct.kdh-nx-hot, html.kdh-next .kdh-bell .kdh-count { background: var(--u-primary); color: var(--u-on-primary); }
html.kdh-next .kdh-count-soft { background: transparent; color: var(--u-mut); }
html.kdh-next .kdh-pg-n { background: var(--u-sunken); color: var(--u-ink2); }
html.kdh-next .kdh-pg-n.kdh-zero { background: transparent; color: var(--u-faint); }
html.kdh-next.kdh-nx-railed .kdh-nx-ct { background: var(--u-ink); }
html.kdh-next.kdh-nx-railed .kdh-nx-ct.kdh-nx-hot, html.kdh-next.kdh-nx-railed .kdh-bell .kdh-count { background: var(--u-red); }
html.kdh-next .kdh-prio, html.kdh-next .kdh-sitecard-bar .kdh-prio { background: var(--u-grey-soft); color: var(--u-grey-ink); }
html.kdh-next .kdh-prio-1, html.kdh-next .kdh-sitecard-bar .kdh-prio-1 { background: var(--u-red-soft); color: var(--u-red-ink); }
html.kdh-next .kdh-prio-2, html.kdh-next .kdh-sitecard-bar .kdh-prio-2 { background: var(--u-orange-soft); color: var(--u-orange-ink); }
html.kdh-next .kdh-tst-new, html.kdh-next .kdh-tst-waiting { background: var(--u-orange-soft); color: var(--u-orange-ink); }
html.kdh-next .kdh-tst-ack, html.kdh-next .kdh-tst-closed { background: var(--u-grey-soft); color: var(--u-grey-ink); }
html.kdh-next .kdh-tst-progress { background: var(--u-raised); color: var(--u-ink); box-shadow: inset 0 0 0 1px var(--u-line); }
html.kdh-next .kdh-tst-resolved { background: var(--u-green-soft); color: var(--u-green-ink); }
html.kdh-next .kdh-site, html.kdh-next[data-theme="dark"] .kdh-site { background: var(--u-sunken); color: var(--u-ink2); border-color: transparent; }
html.kdh-next .kdh-site i { background: var(--u-faint); }
html.kdh-next .kdh-body a:not([class]) { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
html.kdh-next .kdh-body a:not([class]):hover { color: var(--u-blue); }

/* ---------- Start (0.5) ---------- */
.ui-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ui-nums > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ui-wxpop { position: absolute; z-index: 95; width: 300px; animation: ui-fade .14s var(--u-ease); }
.ui-wx { list-style: none; margin: 0; padding: 4px 6px 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; font-size: 12.5px; }
.ui-wx li { padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ui-wx b { font-weight: 500; } .ui-wx em { font-style: normal; color: var(--u-mut); }
.ui-shot { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--u-line); background: var(--u-sunken); aspect-ratio: 16 / 10; }
.ui-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ui-when { width: 84px; text-align: right; }
.kst2 .ui-phead-a .kst-search { width: 300px; }
.kst2 .ui-phead-a .kst-pick select { min-height: 36px; }
.kst2 .ui-phead-t .ui-meta { min-height: 24px; }
@media (max-width: 720px) { .ui-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kst2 .ui-phead-a { flex-wrap: wrap; width: 100%; } .kst2 .ui-phead-a .kst-search { width: 100%; } .ui-when { width: auto; } }

/* ---------- shell (0.4) ---------- */
.ui-pop-item { text-align: left; white-space: nowrap; }
html.kdh-next .kdh-nx-ct { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; box-sizing: border-box; font-size: 11.5px; font-weight: 600; background: var(--u-sunken); color: var(--u-ink2); opacity: 1; }
html.kdh-next .kdh-nx-nav[aria-current="page"] .kdh-nx-ct { background: color-mix(in srgb, var(--u-on-primary) 18%, transparent); color: var(--u-on-primary); opacity: 1; }
html.kdh-next .kdh-nx-ct.kdh-nx-hot { background: var(--u-primary); color: var(--u-on-primary); }
html.kdh-next .kdh-nx-n { border-radius: 10px; background: var(--u-sunken); color: var(--u-ink2); }
html.kdh-next .kdh-nx-n-open { background: var(--u-primary); color: var(--u-on-primary); }
@media (max-width: 900px) { html.kdh-next .kdh-nx-ct { min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--u-ink); } html.kdh-next .kdh-nx-ct.kdh-nx-hot { background: var(--u-red); } }
html.kdh-next .kdh-nx-ct[hidden] { display: none; }
/* the old base rules (hub.css / hub-next.css) style every a and button inside .kdh-body; the system wins here */
html.kdh-next .kdh-body .ui-link, body.kdh-next-admin .ui-link { color: var(--u-ink2); text-decoration: none; }
html.kdh-next .kdh-body .ui-link:hover, body.kdh-next-admin .ui-link:hover { color: var(--u-blue); }
html.kdh-next .kdh-body a.ui-row, html.kdh-next .kdh-body a.ui-tile, html.kdh-next .kdh-body a.ui-card, html.kdh-next .kdh-body a.ui-shot { color: inherit; text-decoration: none; }
html.kdh-next .kdh-body .ui-btn { color: var(--u-ink); text-decoration: none; }
html.kdh-next .kdh-body .ui-btn-primary { color: var(--u-on-primary); }
html.kdh-next .kdh-body .ui-btn-ghost { color: var(--u-ink2); }
html.kdh-next .kdh-body .ui-btn-ai { color: var(--u-blue-ink); }
button.ui-link { background: none; border: 0; padding: 0; min-height: 0; font: inherit; font-size: 13px; cursor: pointer; }
.ui-phead-t { min-width: 360px; }
html.kdh-next .kst2 .kst-search { margin-top: 0; }
html.kdh-next .kst2 .kst-search input[type="search"] { padding-left: 36px; min-height: 36px; height: 36px; border-radius: var(--u-r) !important; }

/* ---------- colour, sparingly (0.6, prompt 6 section 1; rules in docs/ui-system.md) ---------- */
html.kdh-next, body.kdh-next-admin, .ui-root {
	--u-pink: #e2347c; --u-purple: #7c4dcc; --u-yellow: #c99700;
	--u-cat-a: 12%;
	--u-focus-yellow: #fdf3cf; --u-focus-yellow-line: #f1df9a; --u-focus-yellow-ink: #6b5200;
	--u-peach: #fdebd9; --u-peach-line: #f6d4b0; --u-peach-ink: #a85a10;
}
html.kdh-next[data-theme="dark"], .ui-root[data-theme="dark"] {
	--u-pink: #e44c86; --u-purple: #a07ff0; --u-yellow: #e6c14d;
	--u-cat-a: 20%;
	--u-focus-yellow: #352d12; --u-focus-yellow-line: #4d4119; --u-focus-yellow-ink: #f0d47a;
	--u-peach: #36261a; --u-peach-line: #4d3522; --u-peach-ink: #f3b77a;
}
/* 1. category circles: a soft tint, the icon in the full colour, never the card */
.ui-cat { --c: var(--u-blue); display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--c) var(--u-cat-a), transparent); color: var(--c); }
.ui-cat .kdh-ic { width: 15px; height: 15px; }
.ui-cat-pink { --c: var(--u-pink); } .ui-cat-blue { --c: var(--u-blue); } .ui-cat-purple { --c: var(--u-purple); } .ui-cat-green { --c: var(--u-green); } .ui-cat-yellow { --c: var(--u-yellow); }
/* 2. the one focus card per page */
.ui-focus { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin: 0 0 16px; border-radius: var(--u-r-card); border: 1px solid transparent; color: var(--u-ink); text-decoration: none; }
.ui-focus-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .55); }
.ui-focus-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ui-focus-l { font: 500 11px var(--u-mono); letter-spacing: .07em; text-transform: uppercase; opacity: .8; }
.ui-focus-b strong { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-focus-m { font-size: 13px; opacity: .85; }
.ui-focus-yellow { background: var(--u-focus-yellow); border-color: var(--u-focus-yellow-line); color: var(--u-focus-yellow-ink); }
.ui-focus-yellow strong { color: var(--u-ink); }
a.ui-focus:hover { filter: brightness(.98); }
.ui-focus-blue { background: linear-gradient(120deg, #2f5fe8 0%, #3d6ff0 55%, #6a8ff5 100%); color: #fff; }
.ui-focus-blue .ui-focus-ic { background: rgba(255, 255, 255, .18); }
.ui-focus-blue strong { font-size: 22px; font-weight: 400; letter-spacing: -.01em; }
html.kdh-next .kdh-body .ui-focus .ui-btn { color: var(--u-ink); }
/* 4. "Desk noticed": the peach box, only from real data, one action */
.ui-noticed { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 18px; border-radius: var(--u-r-card); background: var(--u-peach); border: 1px solid var(--u-peach-line); }
.ui-noticed-l { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--u-peach-ink); }
.ui-noticed-t { margin: 0; font-size: 14px; line-height: 1.5; color: var(--u-ink); }
/* 3. one chart language: hatched = planned / credited, solid blue = used, pink hatched = over; thin, rounded ends, 2px gaps */
.ui-bar > i { background: var(--u-blue); }
.ui-bar > i.ui-over, .ui-seg-over { background: repeating-linear-gradient(135deg, var(--u-pink) 0 1.6px, transparent 1.6px 5px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--u-pink) 55%, transparent); }
.ui-seg-plan, .ui-bar > i.ui-hatch { background: repeating-linear-gradient(135deg, var(--u-mut) 0 1.4px, transparent 1.4px 5px); }
.ui-seg-used { background: var(--u-blue); }
.ui-seg-free { background: color-mix(in srgb, var(--u-mut) 45%, transparent); }
.ui-seg-plan, .ui-seg-used, .ui-seg-over, .ui-seg-free { display: block; height: 100%; border-radius: 4px; min-width: 3px; }
html.kdh-next .kdh-nx-mline { height: 8px; }
html.kdh-next .kdh-nx-mrow.kdh-on { background: var(--u-sunken); }
.ui-legend .ui-key { width: 14px; height: 8px; border-radius: 3px; display: inline-block; }
.ui-key-plan { background: repeating-linear-gradient(135deg, var(--u-mut) 0 1.4px, transparent 1.4px 5px); box-shadow: inset 0 0 0 1px var(--u-line); }
.ui-key-used { background: var(--u-blue); }
.ui-key-over { background: repeating-linear-gradient(135deg, var(--u-pink) 0 1.6px, transparent 1.6px 5px); }
html.kdh-next .kdh-nx-legend i.ui-key { border-radius: 3px; width: 14px; height: 8px; }
.kdh-list-empty { margin-top: 12px; min-height: 220px; }
/* request rows: a column for the type circle (the row is a fixed grid) */
html.kdh-next .kdh-trow { grid-template-columns: 30px 52px 34px minmax(0, 1fr) auto; }
@media (max-width: 900px) {
	html.kdh-next .kdh-trow { grid-template-columns: 30px 30px minmax(0, 1fr); }
	html.kdh-next .kdh-trow .kdh-tid { display: none; }
	html.kdh-next .kdh-trow .kdh-tside { grid-column: 1 / -1; justify-content: flex-start; }
}
.ui-key-free { background: color-mix(in srgb, var(--u-mut) 45%, transparent); }


/* ---------- shell (0.7, prompt 6 section 2): bell, notifications, profile, wide frame, phone bar ---------- */
/* wide screens: the app sits in a centred rounded frame, at most 1680 px (Desk and Review) */
@media (min-width: 901px) {
	html.kdh-next .kdh-nx-shell { width: calc(100% - 32px); max-width: 1680px; margin: 16px auto; }
}
/* the bell row at the top right of the content */
.ui-topbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 30px 0; min-height: 40px; box-sizing: content-box; }
.ui-topbar:empty { display: none; }
.ui-bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--u-line); background: var(--u-raised); color: var(--u-ink2); cursor: pointer; }
.ui-bell:hover { color: var(--u-ink); border-color: color-mix(in srgb, var(--u-ink) 25%, var(--u-line)); }
.ui-bell .ui-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--u-shell); }
html.kdh-next .kdh-nx-shell .kdh-dmain { padding-top: 8px; }
/* the notification panel */
.ui-notices { position: fixed; z-index: 96; padding: 0; max-height: min(560px, calc(100vh - 80px)); display: flex; flex-direction: column; overflow: hidden; animation: ui-fade .14s var(--u-ease); }
.ui-notices-h { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--u-line2); }
.ui-notices-b { overflow: auto; }
.ui-notice { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--u-line2); color: inherit; text-decoration: none; }
.ui-notice:first-child { border-top: 0; }
.ui-notice:hover { background: var(--u-sunken); }
.ui-notice .ui-row-t { white-space: normal; font-size: 13.5px; }
.ui-notice-x { font-size: 12.5px; color: var(--u-ink2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ui-notice-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.ui-unread-row { background: color-mix(in srgb, var(--u-blue) 4%, transparent); }
html.kdh-next .kdh-body a.ui-notice { color: inherit; text-decoration: none; }
/* avatars: the photo when there is one */
.kdh-ava { overflow: hidden; }
.kdh-ava img, .ui-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.ui-ava-xl { width: 96px; height: 96px; font-size: 30px; }
.ui-photo { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
/* simple forms */
.ui-form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.ui-field { display: flex; flex-direction: column; gap: 6px; }
.ui-field .ui-input { width: 100%; }
.ui-table input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--u-primary); }
/* phone: the bottom bar (4 main pages + More) and the More sheet */
.ui-tabbar { display: none; }
.ui-sheet-bg { position: fixed; inset: 0; z-index: 97; background: rgba(10, 10, 12, .32); animation: ui-fade .18s var(--u-ease); }
.ui-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 98; max-height: 82vh; overflow: auto; padding: 8px 10px calc(14px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: var(--u-raised); border-top: 1px solid var(--u-line); box-shadow: var(--u-shadow-pop); font: 14px/1.45 var(--u-font); color: var(--u-ink); animation: ui-up .22s var(--u-ease); }
.ui-sheet-grip { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--u-faint); margin: 2px auto 10px; }
.ui-sheet .ui-pop-item { height: 46px; font-size: 15px; }
.ui-sheet .ui-pop-item[aria-current="page"] { background: var(--u-sunken); font-weight: 500; }
.ui-sheet hr { border: 0; border-top: 1px solid var(--u-line2); margin: 6px 0; }
@keyframes ui-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ui-sheet, .ui-sheet-bg, .ui-notices { animation: none; } }
@media (max-width: 720px) {
	html.kdh-next .kdh-nx-side { display: none !important; }
	.ui-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--u-raised) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--u-line); }
	.ui-tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; border-radius: 12px; background: none; color: var(--u-mut); font: 500 11px var(--u-font); text-decoration: none; cursor: pointer; }
	.ui-tab[aria-current="page"] { color: var(--u-ink); background: var(--u-sunken); }
	.ui-tab .kdh-ic { width: 20px; height: 20px; }
	.ui-tab-dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--u-ink); }
	html.kdh-next .kdh-body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
	.ui-topbar { padding: 10px 16px 0; }
	.ui-notices { left: 8px !important; right: 8px; width: auto !important; }
}
html.kdh-next .kdh-body .ui-tab { text-decoration: none; }
html.kdh-next .kdh-body .ui-sheet a.ui-pop-item, .ui-sheet a.ui-pop-item, .ui-sheet a.ui-pop-item:visited { color: inherit; text-decoration: none; }

/* staging only: the note at the top of the menu, the icon rail and the More sheet (0.7, prompt 6 section 2) */
.ui-stg { display: flex; align-items: flex-start; gap: 9px; margin: 2px 0 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, #e5862a 40%, var(--u-line)); background: color-mix(in srgb, #e5862a 9%, var(--u-raised)); font: 12px/1.3 var(--u-font); color: var(--u-ink); }
.ui-stg-dot { flex: none; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #e5862a; }
.ui-stg-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ui-stg-t strong { font-weight: 600; letter-spacing: .06em; font-size: 11.5px; }
.ui-stg-t small { color: var(--u-mut); font-size: 11.5px; }
.ui-stg-s { display: none; font: 600 10px/1 var(--u-mono, ui-monospace, monospace); letter-spacing: .04em; }
html.kdh-nx-railed .kdh-nx-side .ui-stg { flex-direction: column; align-items: center; gap: 4px; padding: 7px 0; margin: 2px 4px 10px; }
html.kdh-nx-railed .kdh-nx-side .ui-stg-t { display: none; }
html.kdh-nx-railed .kdh-nx-side .ui-stg-s { display: block; }
.ui-sheet .ui-stg { margin: 0 6px 8px; }

/* ---------- Plan (0.9, prompt 6 section 3): a timeline per person, Today or Week ----------
   neutral cards with a tinted icon circle (colour rules 1b); a blue dashed "now" line; hatched outside service hours and at weekends */
.kpl-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.kpl-nav { display: inline-flex; gap: 4px; }
.kpl-sp { flex: 1; }
.kpl-stack { display: flex; flex-direction: column; gap: 14px; }
.kpl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.kpl-main { padding: 0; overflow: hidden; }
.kpl-side { display: flex; flex-direction: column; gap: 16px; }
.kpl-scroll { overflow-x: auto; }
.kpl-grid { min-width: 760px; }
.kpl-who { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-width: 0; position: sticky; left: 0; z-index: 5; background: var(--u-card); }
.kpl-who .kdh-ava, .kpl-who .ui-cat { flex: none; }
.kpl-who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.kpl-who strong { font-weight: 500; font-size: 13.5px; }
.kpl-who small { font-size: 11.5px; color: var(--u-mut); }
.kpl-hatch, .kpl-off, .kpl-track-off, .kpl-cell-off { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--u-mut) 22%, transparent) 0 1.2px, transparent 1.2px 7px); }
/* day view */
.kpl-head, .kpl-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.kpl-head { border-bottom: 1px solid var(--u-line2); }
.kpl-axis { position: relative; height: 36px; }
.kpl-axis span { position: absolute; top: 12px; transform: translateX(-50%); font: 500 10.5px var(--u-mono); color: var(--u-mut); letter-spacing: .04em; }
.kpl-now-t { position: absolute; top: 10px; transform: translateX(-50%); padding: 1px 6px; border-radius: 6px; background: var(--u-blue); color: #fff; font: 600 10.5px var(--u-mono); z-index: 2; }
.kpl-row { border-top: 1px solid var(--u-line2); }
.kpl-row:first-of-type { border-top: 0; }
.kpl-row > .kpl-who { border-right: 1px solid var(--u-line2); }
.kpl-track { position: relative; min-height: 60px; }
.kpl-off { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.kpl-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--u-line2); pointer-events: none; }
.kpl-now { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--u-blue); z-index: 3; pointer-events: none; }
.kpl-dayview .kpl-b { position: absolute; height: 44px; }
.kpl-dayview .kpl-b { container-type: inline-size; }
@container (max-width: 230px) { .kpl-bx .kdh-tst { display: none; } }
.kpl-cell .kpl-now { z-index: 0; }
/* week view */
.kpl-whead, .kpl-wrow { display: grid; grid-template-columns: 150px repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, .6fr)); }
.kpl-whead { border-bottom: 1px solid var(--u-line2); }
.kpl-wday { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border: 0; border-left: 1px solid var(--u-line2); background: none; font: inherit; color: var(--u-ink); cursor: pointer; text-align: left; }
.kpl-wday:hover { background: var(--u-sunken); }
.kpl-wday strong { font-size: 12.5px; font-weight: 500; } .kpl-wday small { font: 500 10.5px var(--u-mono); color: var(--u-mut); }
.kpl-wday.kpl-today strong { color: var(--u-blue); }
.kpl-wrow { border-top: 1px solid var(--u-line2); }
.kpl-wrow:first-of-type { border-top: 0; }
.kpl-wrow > .kpl-who { padding-top: 12px; align-items: flex-start; }
.kpl-cell { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 96px; padding: 8px 6px; border-left: 1px solid var(--u-line2); }
.kpl-cell-today { background-color: color-mix(in srgb, var(--u-blue) 4%, transparent); }
.kpl-weekview .kpl-b { position: relative; }
.kpl-weekview .kpl-b .kpl-bx { display: none; }
/* blocks: neutral, with the category circle */
.kpl-b { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 8px; border-radius: 10px; border: 1px solid var(--u-line); background: var(--u-raised); color: var(--u-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); cursor: pointer; overflow: hidden; z-index: 1; box-sizing: border-box; }
.kpl-weekview .kpl-b { padding: 6px 7px; }
.kpl-b:hover { border-color: color-mix(in srgb, var(--u-ink) 25%, var(--u-line)); z-index: 4; }
.kpl-b:focus-visible { outline: 3px solid color-mix(in srgb, var(--u-blue) 30%, transparent); }
.kpl-b .ui-cat { width: 24px; height: 24px; }
.kpl-b .ui-cat .kdh-ic { width: 13px; height: 13px; }
.kpl-bt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.kpl-bt strong { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpl-bt small { font-size: 11px; color: var(--u-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpl-bx { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.kpl-bx .kdh-tst { font-size: 11px; }
.kpl-prio { width: 7px; height: 7px; border-radius: 50%; background: var(--u-mut); flex: none; }
.kpl-prio-1 { background: var(--u-red); } .kpl-prio-2 { background: var(--u-orange); } .kpl-prio-3 { background: var(--u-blue); }
.kpl-due { border-style: dashed; background: color-mix(in srgb, var(--u-raised) 70%, transparent); }
.kpl-late { border-color: color-mix(in srgb, var(--u-red) 45%, var(--u-line)); }
.kpl-late .kpl-bt small { color: var(--u-red-ink); }
.kpl-done { opacity: .55; } .kpl-done .kpl-bt strong { text-decoration: line-through; }
.kpl-movable { cursor: grab; touch-action: none; }
.kpl-dragging { cursor: grabbing; box-shadow: var(--u-shadow-pop); z-index: 20; opacity: .92; transition: none; }
.kpl-rs { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.kpl-rs::after { content: ""; position: absolute; right: 2px; top: 30%; bottom: 30%; width: 2px; border-radius: 2px; background: var(--u-line); }
.kpl-b:hover .kpl-rs::after { background: var(--u-mut); }
.kpl-ghost { position: fixed; z-index: 120; width: 240px; height: 44px; pointer-events: none; box-shadow: var(--u-shadow-pop); }
/* footer legend */
.kpl-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--u-line2); }
.kpl-key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.kpl-key-now { width: 0; height: 12px; border-left: 2px dashed var(--u-blue); border-radius: 0; }
.kpl-key-slot { border: 1px solid var(--u-line); background: var(--u-raised); }
.kpl-key-due { border: 1px dashed var(--u-mut); }
/* side lists */
.kpl-cmeta { margin-left: auto; }
.kpl-side-list { display: flex; flex-direction: column; }
.kpl-srow { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--u-line2); cursor: pointer; border-radius: 8px; }
.kpl-srow:first-child { border-top: 0; }
.kpl-srow:hover { background: var(--u-sunken); }
.kpl-srow .ui-cat { width: 26px; height: 26px; }
.kpl-srow .kdh-sla { flex: none; font-size: 11px; }
.kpl-un { touch-action: none; cursor: grab; }
.kpl-planbtn { flex: none; }
.kpl-side-h { margin: 14px 4px 4px; }
.kpl-side-empty { padding: 6px 4px; font-size: 13px; }
.kpl-tick { width: 17px; height: 17px; flex: none; accent-color: var(--u-green); }
/* the form */
.kpl-form { max-width: none; }
.kpl-f3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.kpl-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpl-chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.kpl-chk input { width: 16px; height: 16px; accent-color: var(--u-primary); }
.kpl-who-pick { display: flex; gap: 14px; flex-wrap: wrap; }
.kpl-who-pick .kdh-ava { width: 24px; height: 24px; font-size: 10px; }
/* the timeline gets the full width; Today and Unplanned sit below it until there is room beside it */
@media (max-width: 1699px) { .kpl-layout { grid-template-columns: minmax(0, 1fr); } .kpl-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } }
@media (max-width: 720px) {
	.kpl-side { grid-template-columns: minmax(0, 1fr); }
	.kpl-head, .kpl-row { grid-template-columns: 96px minmax(0, 1fr); }
	.kpl-whead, .kpl-wrow { grid-template-columns: 96px repeat(5, minmax(120px, 1fr)) repeat(2, minmax(80px, .6fr)); }
	.kpl-grid { min-width: 860px; }
	.kpl-who { padding: 0 8px; }
	.kpl-who .kdh-ava, .kpl-who .ui-cat { display: none; }
	.kpl-f3 { grid-template-columns: 1fr 1fr; } .kpl-f3 > :first-child { grid-column: 1 / -1; }
	.kpl-f2 { grid-template-columns: 1fr; }
	.kpl-tools { justify-content: flex-start; }
}

/* ---------- Projects (0.10, prompt 6 section 4): cards, the step track (ref 10 "What happened"), steps table ---------- */
.kpj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.kpj-group { margin-bottom: 24px; }
.kpj-group-h { margin: 0 0 10px; }
.kpj-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; color: inherit; text-decoration: none; }
html.kdh-next .kdh-body a.kpj-card { color: inherit; text-decoration: none; }
.kpj-card:hover { border-color: color-mix(in srgb, var(--u-ink) 22%, var(--u-line)); }
.kpj-card-h { display: flex; align-items: center; gap: 10px; }
.kpj-card-h .kpl-bt strong { font-size: 14.5px; white-space: normal; }
.kpj-next { margin: 0; font-size: 13px; color: var(--u-ink2); }
.kpj-prog { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.kpj-bar { position: relative; display: flex; gap: 2px; flex: 1; height: 8px; border-radius: 6px; background: var(--u-sunken); overflow: hidden; }
.kpj-bar > i { display: block; height: 100%; border-radius: 4px; }
.kpj-crumb { display: flex; align-items: center; gap: 4px; margin: 0 0 -6px; font-size: 13px; color: var(--u-mut); }
.kpj-crumb a { color: var(--u-mut); }
.kpj-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; margin-bottom: 16px; }
.kpj-top > :only-child { grid-column: 1 / -1; }
.kpj-page > .ui-card, .kpj-page > .ui-noticed { margin-bottom: 16px; }
/* the step track: dots on a line, date, title, one line */
.kpj-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 0; margin: 4px 0 0; padding: 0 0 6px; list-style: none; overflow-x: auto; }
.kpj-step { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 22px 14px 0 0; min-width: 0; }
.kpj-step::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--u-line); }
.kpj-step:last-child::before { right: auto; width: 12px; }
.kpj-dot { position: absolute; top: 1px; left: 0; width: 12px; height: 12px; border-radius: 50%; box-sizing: border-box; background: var(--u-raised); border: 2px solid var(--u-faint); z-index: 1; }
.kpj-done .kpj-dot { background: var(--u-blue); border-color: var(--u-blue); }
.kpj-done::before { background: color-mix(in srgb, var(--u-blue) 45%, var(--u-line)); }
.kpj-late .kpj-dot { background: var(--u-pink); border-color: var(--u-pink); }
.kpj-date { font: 500 11px var(--u-mono); color: var(--u-mut); letter-spacing: .02em; }
.kpj-late .kpj-date { color: var(--u-pink-ink, var(--u-red-ink)); }
.kpj-step strong { font-size: 13.5px; font-weight: 500; }
.kpj-line { font-size: 12.5px; color: var(--u-ink2); line-height: 1.35; }
.kpj-round { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--u-blue-ink); }
/* estimate vs actual */
.kpj-est { display: flex; flex-direction: column; gap: 12px; }
.kpj-est-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 13px; }
.kpj-est-row b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.kpj-est .ui-meta { margin: 0; }
/* steps table */
.kpj-tablewrap { overflow-x: auto; }
.kpj-table td { vertical-align: middle; }
.kpj-table td:first-child { min-width: 260px; }
.kpj-dot-s { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; border: 2px solid var(--u-faint); box-sizing: border-box; vertical-align: middle; }
.kpj-dot-s.kpj-done { background: var(--u-blue); border-color: var(--u-blue); } .kpj-dot-s.kpj-late { background: var(--u-pink); border-color: var(--u-pink); }
.kpj-stepcell { display: grid; grid-template-columns: 17px minmax(0, 1fr); align-items: center; row-gap: 4px; }
.kpj-stepcell .kpj-line-in { grid-column: 2; }
.kpj-donecell { display: flex; align-items: center; gap: 4px; }
.kpj-title-in { width: 100%; height: 30px; font-weight: 500; }
.kpj-line-in { width: 100%; height: 28px; font-size: 12.5px; color: var(--u-ink2); }
.kpj-date-in { width: 150px; height: 30px; }
.kpj-round-in { width: 210px; height: 30px; }
.kpj-st-in, .kpj-link-in { height: 32px; width: auto; max-width: 280px; }
.kpj-ml { display: block; margin-left: 17px; }
.kpj-late { color: var(--u-pink-ink, var(--u-red-ink)); font-weight: 500; }
.kpj-trow { display: flex; align-items: center; gap: 6px; padding-right: 10px; }
.kpj-trow > .ui-row { flex: 1; }
/* Plan: project milestones */
.kpl-milestone { border-style: dotted; }
@media (max-width: 1100px) { .kpj-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .kpj-grid { grid-template-columns: minmax(0, 1fr); } .kpj-track { grid-auto-columns: 140px; } }

/* ---------- Hours, Reports, Fleet (0.11, prompt 6 section 5) ---------- */
.kin-page > section, .kin-page > .ui-card, .kin-page > .kdh-noprint { margin-bottom: 16px; }
.kin-month { min-width: 120px; text-align: center; font-weight: 500; font-size: 13.5px; }
.kin-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.kin-top > :only-child { grid-column: 1 / -1; }
/* Result: big number, slider with the alert mark */
.kin-left { margin: 0 0 18px; }
.kin-left small { font-size: .38em; }
.kin-over { color: var(--u-pink-ink, var(--u-red-ink)); }
.kin-slider { position: relative; height: 54px; margin: 0 4px 6px; }
.kin-track { position: absolute; left: 0; right: 0; top: 24px; height: 8px; border-radius: 6px; background: var(--u-sunken); overflow: hidden; }
.kin-track > i { display: block; height: 100%; border-radius: 6px; }
.kin-mark { position: absolute; top: 16px; width: 0; height: 24px; border-left: 2px dashed var(--u-pink); }
.kin-mark small { position: absolute; top: 28px; left: 0; transform: translateX(-50%); white-space: nowrap; font: 500 10.5px var(--u-mono); color: var(--u-pink-ink, var(--u-red-ink)); }
.kin-thumb { position: absolute; top: 19px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--u-raised); border: 3px solid var(--u-blue); box-sizing: border-box; }
.kin-thumb.kin-hot { border-color: var(--u-pink); }
.kin-thumb small { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 500 10.5px var(--u-mono); color: var(--u-ink2); }
.kin-kv { margin-top: 12px; }
.kin-kv dd .ui-meta { margin-left: 2px; }
.kin-tops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.kin-x { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--u-mut); cursor: pointer; }
.kin-x:hover { background: var(--u-sunken); color: var(--u-ink); }
/* where the hours went */
.kin-split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kin-split { display: flex; flex-direction: column; gap: 9px; margin-top: 8px; }
.kin-split-row { display: grid; grid-template-columns: minmax(70px, 130px) minmax(0, 1fr) 52px; gap: 10px; align-items: center; font-size: 13px; }
.kin-split-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--u-ink2); }
.kin-split-row b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.kin-legend { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; }
.kin-legend .ui-key { margin-left: 8px; } .kin-legend .ui-key:first-child { margin-left: 0; }
.kin-topseg { background: repeating-linear-gradient(135deg, var(--u-blue) 0 1.4px, transparent 1.4px 5px) !important; margin-left: 2px; }
.kin-note { display: block; }
.kin-free { margin-left: 6px; height: 20px; font-size: 11px; }
tr.kin-cur td { background: var(--u-sunken); }
/* drill path: four columns */
.kin-path { margin: -4px 0 12px; }
.kin-drill { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kin-col { padding: 12px; display: flex; flex-direction: column; gap: 4px; min-height: 220px; }
.kin-col-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 6px; border-bottom: 1px solid var(--u-line2); margin-bottom: 4px; }
.kin-col-h b { font-weight: 500; font-variant-numeric: tabular-nums; }
.kin-drow { display: grid; grid-template-columns: minmax(0, 1fr) 54px 46px; gap: 8px; align-items: center; padding: 8px 6px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 13px; color: var(--u-ink); text-align: left; cursor: pointer; }
.kin-drow:hover:not([disabled]) { background: var(--u-sunken); }
.kin-col .kin-drow[aria-pressed="true"], .kin-col .kin-drow[aria-pressed="true"]:hover, .kin-col .kin-drow[aria-pressed="true"]:focus { background: var(--u-ink); color: var(--u-raised); }
.kin-drow[aria-pressed="true"] .kpj-bar { background: color-mix(in srgb, var(--u-raised) 22%, transparent); }
.kin-drow[disabled] { cursor: default; }
.kin-drow b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.kin-dl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kin-dempty { padding: 8px 6px; }
/* the dark "Suggested fix" card (ref 22) */
.kin-fix { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px; border-radius: var(--u-r-card); background: var(--u-ink); color: var(--u-raised); }
.kin-fix-l { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; opacity: .8; }
.kin-fix p { margin: 0; font-size: 14.5px; line-height: 1.45; max-width: 720px; }
.kin-fix .ui-btn { background: var(--u-raised); color: var(--u-ink); border-color: transparent; }
/* report */
.kin-care { margin-top: 4px; }
textarea.ui-input { height: auto; min-height: 92px; padding: 9px 12px; line-height: 1.45; resize: vertical; }
.kin-pre { white-space: pre-wrap; margin: 0; font-size: 14px; line-height: 1.5; }
.kin-formfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kin-bottom { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.kin-review { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kin-revlist { padding: 10px 20px 14px; border-top: 1px solid var(--u-line2); }
.kin-revlist .ui-meta { margin: 4px 0 0; }
.kdh-report .kpj-track { margin: 6px 0 10px; }
/* fleet */
.kin-fleet td { white-space: nowrap; }
.kin-fleet td:first-child { white-space: normal; min-width: 200px; }
.kin-score { font-weight: 600; }
.kin-score.kin-green { color: var(--u-green-ink); } .kin-score.kin-orange { color: var(--u-orange-ink); } .kin-score.kin-red { color: var(--u-red-ink); }
.kin-shot { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--u-line); }
.kin-shot-none { display: flex; align-items: center; justify-content: center; gap: 8px; height: 160px; background: var(--u-sunken); color: var(--u-mut); font-size: 13px; }
@media (max-width: 1100px) { .kin-top, .kin-bottom { grid-template-columns: minmax(0, 1fr); } .kin-drill { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .kin-split2, .kin-review { grid-template-columns: minmax(0, 1fr); } .kin-drill { grid-template-columns: minmax(0, 1fr); } .kin-col { min-height: 0; } }
@media print { .kin-bottom, .kin-page .ui-phead { display: none !important; } }

/* ---------- Outreach page by page (0.12, prompt 6 section 6) ---------- */
.kor2 > .ui-card, .kor2 > .ui-focus, .kor2 > section, .kor2 > .kor-warn, .kor2 > .kor-fu-msg { margin-bottom: 16px; }
.kor2-pnav { display: none; }
.kor2-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.kor2-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kor2-pad { padding: 14px 18px; margin: 0; }
.kor2-note { margin: 12px 0 0; }
/* funnel: hatched what we made, solid what they did */
.kor2-funnel { display: flex; flex-direction: column; gap: 10px; }
.kor2-frow { display: grid; grid-template-columns: 150px minmax(0, 1fr) 56px 54px; gap: 12px; align-items: center; font-size: 13.5px; }
.kor2-frow .kpj-bar { height: 14px; }
.kor2-frow b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.kor2-frow small { color: var(--u-mut); text-align: right; font: 500 11px var(--u-mono); }
.kor2-conv tbody tr { cursor: pointer; }
.kor2-conv td { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
.kor2-next { min-width: 240px; white-space: normal; font-size: 12.5px; color: var(--u-ink2); }
.kor2-group { padding: 12px 18px; border-top: 1px solid var(--u-line2); }
.kor2-group:first-child { border-top: 0; }
.kor2-group h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 500; }
.kor2-group h4 a { color: inherit; }
.kor2-group ul { margin: 0; padding-left: 16px; color: var(--u-ink2); font-size: 12.5px; line-height: 1.6; }
.kor2-call { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--u-line2); }
.kor2-call:first-child { border-top: 0; }
.kor2-call .kpl-bt { flex: 1; min-width: 0; }
.kor2-call .kpl-bt a { color: inherit; }
.kor2-every .ui-card-b { padding-top: 6px; }
.kor2-mail { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--u-sunken); font-size: 13px; }
.kor2-mail small { color: var(--u-mut); }
.kor2-mail q { display: block; color: var(--u-ink2); font-size: 12.5px; line-height: 1.45; quotes: none; }
.kor2-tasks { margin: 0; padding-left: 18px; font-size: 13px; color: var(--u-ink2); }
/* follow-ups: sections and lanes */
.kor2-sec { margin-bottom: 18px; }
.kor2-sec-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.kor2-sec-h h2 { margin: 0; font-size: 18px; font-weight: 500; }
.kor2-lane { margin-bottom: 10px; overflow: hidden; }
.kor2-lane-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--u-line2); font-size: 13.5px; }
.kor2-lane-h strong { font-weight: 500; }
.kor2 .kor-fu-list { display: flex; flex-direction: column; }
.kor2-more { display: block; width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--u-line2); background: none; font: 500 13px var(--u-font); color: var(--u-ink2); cursor: pointer; }
.kor2-more:hover { background: var(--u-sunken); color: var(--u-ink); }
.kor2-hint { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--u-ink2); }
.kor2-fu .kdh-dfilters { margin-bottom: 14px; }
/* queue: the board with its hints */
.kor2-board .kor-col { min-height: 300px; }
.kor2-colhint { margin: -4px 6px 8px; font-size: 12px; color: var(--u-mut); }
.kor2-qa { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.kor2-qa select { width: 100% !important; min-height: 30px !important; font-size: 12.5px; }
.kor2-working { margin-top: 16px; }
/* LinkedIn */
.kor2-li { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 18px; border-top: 1px solid var(--u-line2); }
.kor2-li:first-of-type { border-top: 0; }
.kor2-msg { margin: 6px 0 4px !important; font-size: 13px; color: var(--u-ink2); line-height: 1.45; background: var(--u-sunken); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; }
.kor2-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.kor2-det { margin-bottom: 10px; }
.kor2-det > summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; }
.kor2-det > summary::-webkit-details-marker { display: none; }
.kor2-det[open] > summary { border-bottom: 1px solid var(--u-line2); }
/* lists: chips, table and map */
.kor2-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.kor2-q { width: 240px; height: 32px; margin-left: auto; }
.kor2-split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.kor2-scroll { max-height: 640px; overflow: auto; }
.kor2-name { white-space: normal; min-width: 200px; }
.kor2-web { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kor2-office { white-space: normal; font-size: 12.5px; color: var(--u-ink2); min-width: 180px; }
.kdh-body .kor2-tag { min-height: 30px; height: 30px; width: auto; min-width: 156px; font-size: 12.5px; padding: 0 26px 0 8px; border-radius: 8px; border-color: var(--u-line); background-color: var(--u-raised); color: var(--u-ink); }
.kor2-mapwrap { position: sticky; top: 16px; }
.kor2-map { height: 520px; border-radius: 16px; overflow: hidden; border: 1px solid var(--u-line); z-index: 0; }
.kor2-mapwrap .ui-meta { margin: 8px 2px 0; }
/* tenders: the deadline line */
.kor2-tl { position: relative; height: 74px; margin: 8px 6px 22px; border-bottom: 1px solid var(--u-line); }
.kor2-tl-dot { position: absolute; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--u-blue); border: 2px solid var(--u-raised); box-sizing: border-box; }
.kor2-tl-dot.kor2-tl-mk { background: var(--u-pink); }
.kor2-tl-tick { position: absolute; bottom: -22px; transform: translateX(-50%); font: 500 10.5px var(--u-mono); color: var(--u-mut); white-space: nowrap; }
.kor2-tl-tick:first-of-type { transform: none; }
.kor2-tl-now { position: absolute; left: 0; top: 0; bottom: -4px; border-left: 2px dashed var(--u-blue); }
@media (max-width: 1240px) { .kor2-grid, .kor2-split { grid-template-columns: minmax(0, 1fr); } .kor2-mapwrap { position: static; } .kor2-map { height: 380px; } }
@media (max-width: 900px) {
	.kor2-pnav { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 4px; scrollbar-width: none; }
	.kor2-pnav a { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--u-line); background: var(--u-raised); color: var(--u-ink2); font-size: 13px; text-decoration: none; }
	html.kdh-next .kdh-body .kor2-pnav a { color: var(--u-ink2); text-decoration: none; }
	html.kdh-next .kdh-body .kor2-pnav a[aria-current="page"] { background: var(--u-ink); color: var(--u-raised); border-color: transparent; }
}
@media (max-width: 720px) {
	.kor2-conv thead { display: none; }
	.kor2-conv tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 4px 0; border-top: 1px solid var(--u-line2); }
	.kor2-conv td { border: 0; padding: 4px 14px; }
	.kor2-conv td:nth-child(3) { grid-column: 2; grid-row: 2; font-size: 12px; color: var(--u-mut); }
	.kor2-conv .kor2-next { grid-column: 1 / -1; min-width: 0; }
	.kor2-frow { grid-template-columns: 110px minmax(0, 1fr) 44px 40px; gap: 8px; }
	.kor2-li { grid-template-columns: minmax(0, 1fr); }
	.kor2-acts { flex-direction: row; flex-wrap: wrap; }
	.kor2-q { width: 100%; margin-left: 0; }
}

.kor2 .kor-fu-h { padding-left: 18px; padding-right: 18px; }
.kor2 .kor-fu-d { padding: 0 18px 16px; }
.kor2-every > summary { cursor: pointer; list-style: none; }
.kor2-every > summary::-webkit-details-marker { display: none; }
.kor2-every:not([open]) > summary { border-bottom: 0; }
.kor2 .kor-tw { margin: 0; }
.kor2 .kor-tw .kdh-dtable { min-width: 0; }
.kor2 .kor-tw th:first-child, .kor2 .kor-tw td:first-child { padding-left: 18px; }
.kor2 .kor-tw td small { display: block; }
.kor2-conv { table-layout: auto; width: 100%; }
.kor2-conv .kor2-next { min-width: 200px; overflow-wrap: anywhere; padding-right: 18px; }
.kor2-split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.kor2-name { min-width: 170px; }
.kor2-web { max-width: 150px; }
.kdh-body .kor2-tag { min-width: 128px; }
.kor2-split .ui-table td:last-child, .kor2-split .ui-table th:last-child { padding-right: 18px; }
@media (max-width: 720px) {
	.kor2-conv td { display: block; height: auto; padding: 3px 14px; }
	.kor2-conv tr { padding: 8px 0; align-items: start; }
	.kor2-conv td:first-child { grid-row: 1 / 3; }
	.kor2-conv td:nth-child(2) { text-align: right; }
	.kor2-conv td:nth-child(3) { text-align: right; padding-top: 0; }
	.kor2-conv .kor2-next { min-width: 0; padding-right: 14px; }
	.kor2 .ui-card-h > .ui-meta { display: none; }
}

/* ---------- Billing (0.13, team only): client billing details, my company ---------- */
.kbl { display: flex; flex-direction: column; gap: 16px; }
.kbl .kbl-lab { margin: 0 0 10px; }
.kbl-sub { display: block; }
.kbl-clients td { vertical-align: middle; }
.kbl-clients .kbl-mail { max-width: 230px; overflow-wrap: anywhere; }
.kbl-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.kbl-kv dd { overflow-wrap: anywhere; }
.kbl-line, .kbl-acc > * { display: block; }
.kbl-logo { max-height: 36px; max-width: 160px; }
.kbl-note { margin: 12px 0 0; }
.kbl-form { display: flex; flex-direction: column; gap: 12px; }
.kbl-form textarea.ui-input { height: auto; padding: 8px 12px; line-height: 1.45; resize: vertical; }
.kbl-form .ui-field small { display: block; margin-top: 4px; }
.kbl-sec { margin: 8px 0 -2px; }
.kbl-f3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.kbl-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kbl-sp { flex: 1; }
.kbl-clients td.ui-mono { white-space: nowrap; }
.kbl .ui-focus strong { white-space: normal; overflow: visible; text-overflow: clip; }
@media (max-width: 900px) { .kbl-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
	.kbl-clients th:nth-child(3), .kbl-clients td:nth-child(3), .kbl-clients th:nth-child(4), .kbl-clients td:nth-child(4),
	.kbl-clients th:nth-child(5), .kbl-clients td:nth-child(5), .kbl-clients th:nth-child(6), .kbl-clients td:nth-child(6) { display: none; }
	.kbl-f3 { grid-template-columns: 1fr 1fr; } .kbl-f3 > :first-child { grid-column: 1 / -1; }
	.kbl-f2 { grid-template-columns: 1fr; }
}

/* ---------- Billing step 2 (0.13): invoices, unbilled time, one invoice ---------- */
.kbl-hchip { display: inline-flex; vertical-align: middle; margin-left: 12px; font-size: 13px; letter-spacing: 0; }
.kbl-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: -4px; }
.kbl-n { margin-left: 6px; font: 11px var(--u-mono, monospace); color: var(--u-mut); }
.kbl-inv td, .kbl-ub td, .kbl-lines td { vertical-align: middle; }
.kbl-inv td.ui-mono, .kbl-ub td.ui-mono, .kbl-lines td.ui-mono { white-space: nowrap; }
.kbl-pad { padding: 14px 20px 0; }
.kbl-pad .ui-focus { margin: 0; }
.kbl-cardf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--u-line2); }
.kbl-pick { width: 16px; height: 16px; }
.kbl-ub td:first-child, .kbl-ub th:first-child { width: 28px; padding-right: 0; }
.kbl-totals { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 6px 28px; margin: 0; padding: 14px 20px 18px; font-variant-numeric: tabular-nums; }
.kbl-totals dd { margin: 0; text-align: right; font-family: var(--u-mono, monospace); }
.kbl-totals dt { color: var(--u-ink2); }
.kbl-totals .kbl-tt { font-weight: 650; color: var(--u-ink); font-size: 15px; padding-top: 6px; border-top: 1px solid var(--u-line); }
.kbl-edit td { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
.kbl-edit .ui-input { width: 100%; }
.kbl-edit textarea.ui-input { height: auto; min-height: 56px; padding: 8px 10px; line-height: 1.4; resize: vertical; }
.kbl-ltext { min-width: 280px; width: 50%; }
.kbl-num { min-width: 80px; text-align: right; }
.kbl-unit { min-width: 56px; }
.kbl-lact { white-space: nowrap; }
.kbl-free { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--u-ink2); margin-right: 4px; }
@media (max-width: 720px) {
	.kbl-inv th:nth-child(3), .kbl-inv td:nth-child(3), .kbl-inv th:nth-child(4), .kbl-inv td:nth-child(4), .kbl-inv th:nth-child(6), .kbl-inv td:nth-child(6),
	.kbl-ub th:nth-child(4), .kbl-ub td:nth-child(4), .kbl-ub th:nth-child(6), .kbl-ub td:nth-child(6) { display: none; }
	.kbl .ui-card-h .ui-seg { overflow-x: auto; max-width: 100%; }
	.kbl .ui-card-h { flex-wrap: wrap; }
	.kbl-hchip { display: flex; margin: 8px 0 0; }
}
.kbl-pdfwait { align-self: center; }
.kbl-edit td.ui-num-c .ui-mono { white-space: nowrap; }
@media (max-width: 720px) {
	.kbl .ui-phead-a { flex-wrap: wrap; }
	.kbl-lines:not(.kbl-edit) th:nth-child(3), .kbl-lines:not(.kbl-edit) td:nth-child(3), .kbl-lines:not(.kbl-edit) th:nth-child(4), .kbl-lines:not(.kbl-edit) td:nth-child(4) { display: none; }
}

/* ---------- Billing step 3 (0.13): reports ---------- */
.kbl { --kbl-c1: var(--u-blue); --kbl-c2: var(--u-green); }
html.kdh-next[data-theme="dark"] .kbl, .ui-root[data-theme="dark"] .kbl { --kbl-c2: #2ea85b; } /* a step darker than the token: checked for colour-blind contrast */
.kbl-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kbl-plabel { min-width: 104px; text-align: center; font-weight: 600; }
.kbl-chartw { position: relative; }
.kbl-chart { width: 100%; height: auto; display: block; overflow: visible; }
.kbl-chart .kbl-grid { stroke: var(--u-line2); stroke-width: 1; }
.kbl-chart .kbl-ax { fill: var(--u-mut); font: 10.5px var(--u-mono); }
.kbl-chart .kbl-axin { fill: var(--u-ink); font-weight: 600; }
.kbl-chart .kbl-hit { fill: transparent; }
.kbl-chart .kbl-col:hover .kbl-hit { fill: var(--u-sunken); }
.kbl-chart .kbl-col:not(.kbl-in) path { opacity: .55; }
.kbl-c1 { fill: var(--kbl-c1); background: var(--kbl-c1); }
.kbl-c2 { fill: var(--kbl-c2); background: var(--kbl-c2); }
.kbl-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.kbl-legend { display: inline-flex; gap: 14px; font-size: 12.5px; color: var(--u-ink2); }
.kbl-tip { position: absolute; top: 4px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; background: var(--u-raised); border: 1px solid var(--u-line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); font-size: 12px; white-space: nowrap; pointer-events: none; color: var(--u-ink); }
.kbl-tview { margin-top: 10px; } .kbl-tview summary { cursor: pointer; color: var(--u-ink2); font-size: 12.5px; }
.kbl-age dt { display: flex; align-items: center; gap: 2px; }
.kbl-late { margin-top: 10px; }
.kbl-meter { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; margin: 2px 0 12px; }
.kbl-meter span { min-width: 3px; }
.kbl-h-inv { background: var(--u-blue); }
.kbl-h-wait { background: repeating-linear-gradient(135deg, var(--u-blue) 0 2px, var(--u-blue-soft) 2px 6px); }
.kbl-h-ret { background: var(--u-faint); }
.kbl-h-free { background: repeating-linear-gradient(45deg, var(--u-mut) 0 2px, var(--u-sunken) 2px 6px); }
.kbl-htab td { vertical-align: middle; }
.kbl-exp { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
@media (max-width: 720px) { .kbl-pc th:nth-child(2), .kbl-pc td:nth-child(2), .kbl-pc th:nth-child(4), .kbl-pc td:nth-child(4) { display: none; } .kbl-legend { display: none; } }
.kbl-tip[hidden] { display: none; }
@media (max-width: 720px) { .kbl-picker { width: 100%; flex-wrap: nowrap; } .kbl-plabel { flex: 1; min-width: 0; } }

/* ---------- Billing step 4 (0.13): in the Desk ---------- */
html.kdh-next .kdh-kpis.kbl-kpi5 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kdh-chip-inv { text-decoration: none; background: var(--u-blue-soft); color: var(--u-blue-ink); }
.kin-inv { margin-left: 6px; text-decoration: none; }
.kin-invline { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 12px 20px 0; margin: 0; }
.kdh-labw { display: block; width: 100%; }
.kdh-labin { width: 100%; height: 32px; }
/* the toast's Undo label: .kdh-body button { color: inherit } made it white on white */
.kdh-body .kdh-nx-toast-act { color: #18181a; }

/* ---------- Clients workspace (0.14, team only) ---------- */
.kcl-mark { width: 30px; height: 30px; border-radius: 8px; flex: none; display: inline-grid; place-items: center; background: var(--u-primary); color: var(--u-on-primary); font: 700 11px var(--u-font); letter-spacing: .02em; }
.kcl-mark-s { width: 20px; height: 20px; border-radius: 6px; font-size: 8.5px; }
.kcl-mark-l { width: 52px; height: 52px; border-radius: 14px; font-size: 17px; }
.kcl-switch { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; position: relative; }
.kcl-switch .kcl-chev { margin-left: auto; color: var(--u-mut); display: inline-flex; }
.kcl-switch .kcl-eye { display: none; position: absolute; left: 30px; top: 28px; width: 16px; height: 16px; border-radius: 50%; background: var(--u-raised); border: 1px solid var(--u-line); place-items: center; color: var(--u-ink); }
html.kdh-nx-railed .kcl-switch .kcl-chev { display: none; }
html.kdh-nx-railed .kcl-switch .kcl-eye { display: grid; }
.kcl-asinfo { display: flex; gap: 9px; align-items: flex-start; margin: -4px 0 12px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--u-line); background: var(--u-sunken); font-size: 12.5px; line-height: 1.35; }
.kcl-asinfo > .kdh-icw { color: var(--u-mut); margin-top: 1px; }
.kcl-asinfo b { display: block; font-weight: 600; color: var(--u-ink); } .kcl-asinfo small { display: block; color: var(--u-mut); font-size: 12px; }
.kcl-exit { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 3px 8px; border-radius: 7px; border: 1px solid var(--u-line); background: var(--u-raised); color: var(--u-ink); font: 500 12px var(--u-font); cursor: pointer; }
.kcl-exit kbd { font: 10.5px var(--u-mono); color: var(--u-mut); }
html.kdh-nx-railed .kcl-asinfo { display: none; }
.kcl-pop { position: fixed; z-index: 400; width: 300px; max-height: 70vh; overflow-y: auto; }
.kcl-pop > .ui-input { width: calc(100% - 8px); margin: 4px 4px 6px; height: 34px; }
.kcl-pop .ui-pop-item small { margin-left: auto; color: var(--u-mut); font-size: 12px; }
.kcl-pop .kcl-psub { padding-left: 40px; height: 32px; font-size: 13px; color: var(--u-ink2); }
.kcl-pop .kcl-check { margin-left: auto; display: inline-flex; }
.kcl-plab { margin: 6px 10px 4px; }
.kcl-pfoot { margin: 6px 0 0; padding: 8px 10px 6px; font-size: 12px; color: var(--u-mut); border-top: 1px solid var(--u-line2); }
.kcl-navh { display: flex; align-items: center; } .kcl-navh a { color: inherit; text-decoration: none; }
.kcl-plus { margin-left: auto; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--u-mut); border: 0; background: none; cursor: pointer; }
.kcl-plus:hover { background: var(--u-sunken); color: var(--u-ink); }
html.kdh-nx-railed .kcl-plus { display: none; }
.kcl-dot { margin-left: auto; display: inline-flex; }
html.kdh-nx-railed .kcl-dot { display: none; }
.kcl { display: flex; flex-direction: column; gap: 16px; }
.kcl .kcl-lab { margin: 0 0 8px; }
.kcl-who { display: flex; align-items: center; gap: 10px; } .kcl-who small { display: block; }
.kcl-late { display: block; color: var(--u-red, #d33); font-size: 11.5px; }
.kcl-wsh { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.kcl-wsh .ui-h1 { margin: 0; }
.kcl-acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.kcl-tabs { margin-bottom: 4px; }
.kcl-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.kcl-sub { display: block; }
.kcl-rowacts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.kcl-focus { margin: 0; }
.kcl-set { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px 28px; }
.kcl-sh h3 { margin: 0; font-size: 14px; font-weight: 600; } .kcl-sh p { margin: 4px 0 0; }
.kcl-sb { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kcl-f3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kcl-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kcl-f3 .ui-input, .kcl-f2 .ui-input, .kcl-sb > .ui-field .ui-input { width: 100%; }
.kcl-ta { height: auto; padding: 8px 12px; line-height: 1.45; width: 100%; resize: vertical; }
.kcl-form { display: flex; flex-direction: column; gap: 12px; }
.kcl-sp { flex: 1; }
@media (max-width: 720px) {
	.kcl-wsh { flex-wrap: wrap; } .kcl-acts { margin-left: 0; width: 100%; }
	.kcl-set, .kcl-f3, .kcl-f2 { grid-template-columns: 1fr; }
	.kcl-list th:nth-child(n+6), .kcl-list td:nth-child(n+6), .kcl-list th:nth-child(4), .kcl-list td:nth-child(4), .kcl-ppl th:nth-child(3), .kcl-ppl td:nth-child(3), .kcl-ppl th:nth-child(5), .kcl-ppl td:nth-child(5) { display: none; }
}
.kcl-pop { width: 330px; }
.kcl-pop .kcl-pn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.kcl-pop .ui-pop-item small { flex: none; }
.kdh-body .kcl-pop a.ui-pop-item, .kdh-body .kcl-pop a.ui-pop-item:visited, .kcl-pop a.ui-pop-item { color: var(--u-ink); text-decoration: none; }
@media (max-width: 720px) { .kcl .ui-card-h > .ui-meta { display: none; } }
