/* Verdikt — on top of wallpaper.vision's tokens and controls (/app.css): the same Geist type,
   colors, radii, translucent surfaces and calm motion, laid out as an app with a sidebar. */

:root {
  --side-w: 252px;
  --head-h: 60px;
  --st-backlog: #8e8e93;
  --st-todo: #0090ff;
  --st-progress: #f5a524;
  --st-done: #30a46c;
  --ms: #8e4ec6;
  --late: #e5484d;
}
:root[data-theme="dark"] { --st-backlog: #8e8e93; --st-todo: #3b9eff; --st-progress: #ffb224; --st-done: #3dd68c; --ms: #b18ce8; --late: #ff6369; }

body.vd { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--fg); background: var(--bg); }
:where(body.vd) :is(h1, h2, h3, h4) { margin: 0; letter-spacing: -0.01em; }
:where(body.vd) p { margin: 0; }
:where(body.vd) a { color: var(--accent); text-decoration: none; }
:where(body.vd) textarea, :where(body.vd) select { font: inherit; color: inherit; }
.subtle { color: var(--muted); }
.vd-grow { flex: 1; }
.vd-row { display: flex; align-items: center; gap: 10px; }
.vd-row.tight { gap: 4px; }
.vd-row.wrap { flex-wrap: wrap; }
.vd-row.end { justify-content: flex-end; }
.vd-row.between { justify-content: space-between; }
.vd-col { display: flex; flex-direction: column; gap: 8px; }
.vd-col.tight { gap: 0; min-width: 0; }
.vd-col.tight > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Controls ---------- */

.vd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0;
  height: 34px; padding: 0 13px; border-radius: var(--r-md);
  background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), 0 1px 2px rgba(0, 0, 0, 0.04);
  font-size: 13.5px; font-weight: 550; color: var(--fg); white-space: nowrap;
  transition: background 0.12s ease, transform 0.2s var(--ease), box-shadow 0.15s ease;
}
.vd-btn:hover { background: color-mix(in srgb, var(--card) 92%, var(--fg)); }
.vd-btn:active { transform: scale(0.97); }
.vd-btn.sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.vd-btn.on { background: var(--active); box-shadow: none; }
.vd-btn.primary-sm, .vd-btn.primary-sm:hover { background: var(--fg); color: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.1); }
.vd-btn.primary-sm:hover { opacity: 0.9; }
.vd-btn.danger { color: var(--danger); }
.vd-btn:disabled { opacity: 0.5; pointer-events: none; }
a.vd-btn { text-decoration: none; }
.vd-link-btn { font-size: 12.5px; color: var(--accent); padding: 2px 4px; border-radius: var(--r-xs); }
.vd-link-btn:hover { background: var(--accent-soft); }
.vd-x { width: 24px; height: 24px; border-radius: var(--r-sm); color: var(--muted); font-size: 17px; line-height: 1; flex-shrink: 0; }
.vd-x:hover { background: var(--hover); color: var(--fg); }

.vd-input {
  width: 100%; min-width: 0; height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-md);
  background: var(--field); color: var(--fg); font-size: 14px; outline: none;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
textarea.vd-input { height: auto; padding: 9px 12px; resize: none; line-height: 1.45; }
select.vd-input { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.vd-input:focus { box-shadow: 0 0 0 2px var(--accent-soft), inset 0 0 0 1px var(--accent); background: var(--card); }
.vd-input.key { text-transform: uppercase; font-weight: 600; letter-spacing: 0.04em; max-width: 120px; }
.vd-date { height: 30px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: var(--field); color: var(--fg); font: inherit; font-size: 13px; }
.vd-date::-webkit-calendar-picker-indicator { opacity: 0.55; cursor: pointer; }
:root[data-theme="dark"] .vd-date::-webkit-calendar-picker-indicator { filter: invert(1); }
.vd-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.vd-field > span:first-child { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.vd-field small { font-size: 12px; }
.vd-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.vd-check input { accent-color: var(--accent); width: 15px; height: 15px; }
.vd-seg.sm button { height: 26px; font-size: 12.5px; padding: 0 9px; }
.vd-seg button { display: inline-flex; align-items: center; gap: 6px; }

.vd-avatar {
  position: relative; flex-shrink: 0; display: inline-grid; place-items: center;
  border-radius: 50%; color: #fff; font-weight: 650; letter-spacing: 0.01em; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.vd-avatar.empty { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--fill); }
.vd-presence { position: absolute; right: -1px; bottom: -1px; width: 32%; height: 32%; min-width: 7px; min-height: 7px; border-radius: 50%; background: var(--edge); box-shadow: 0 0 0 2px var(--bg); }
.vd-presence.on { background: var(--on); }
.swatch-dot.sm { width: 10px; height: 10px; }

.vd-status-dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--c); --c: var(--st-todo); }
.vd-status-dot.s-backlog { --c: var(--st-backlog); box-shadow: inset 0 0 0 1.5px var(--c); background: none; border: 1.5px dashed transparent; }
.vd-status-dot.s-todo { --c: var(--st-todo); }
.vd-status-dot.s-progress { --c: var(--st-progress); background: conic-gradient(var(--c) 0 50%, transparent 50% 100%); }
.vd-status-dot.s-done { --c: var(--st-done); background: var(--c); }
.vd-status-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; flex-shrink: 0;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); --c: var(--st-todo);
}
.vd-status-pill.s-backlog { --c: var(--st-backlog); }
.vd-status-pill.s-progress { --c: color-mix(in srgb, var(--st-progress) 80%, var(--fg)); }
.vd-status-pill.s-done { --c: var(--st-done); }
button.vd-status-pill:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }

.vd-prio { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 12px; flex-shrink: 0; }
.vd-prio i { width: 3px; border-radius: 1px; background: var(--fill); }
.vd-prio i:nth-child(1) { height: 5px; } .vd-prio i:nth-child(2) { height: 8px; } .vd-prio i:nth-child(3) { height: 12px; }
.vd-prio.p-low i:nth-child(1) { background: var(--muted); }
.vd-prio.p-medium i:nth-child(-n+2) { background: var(--st-todo); }
.vd-prio.p-high i { background: var(--important); }
.vd-prio.p-urgent i { background: var(--danger); }
.vd-type { flex-shrink: 0; color: var(--muted); }
.vd-type.t-bug { color: var(--danger); }
.vd-type.t-epic { color: var(--ms); }
.vd-ms-ic { color: var(--ms); fill: color-mix(in srgb, var(--ms) 25%, transparent); }

.vd-label { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 550; color: var(--muted); background: var(--field); white-space: nowrap; }
.vd-label.epic { color: var(--ms); background: color-mix(in srgb, var(--ms) 14%, transparent); }
.vd-label button { color: inherit; opacity: 0.6; font-size: 14px; line-height: 1; margin-right: -3px; }
.vd-label button:hover { opacity: 1; }
.vd-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vd-chip-add { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.vd-chip-add:hover { color: var(--fg); background: var(--hover); }
.vd-dep { display: inline-flex; align-items: center; gap: 2px; }
.vd-dep > button:last-child { color: var(--muted); font-size: 15px; padding: 0 4px; }

.vd-task-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 24px; padding: 0 8px 0 7px; margin: 0 1px;
  border-radius: 7px; vertical-align: middle; background: var(--field); font-size: 12.5px; color: var(--fg);
  transition: background 0.12s ease;
}
.vd-task-chip:hover { background: var(--active); }
.vd-task-chip .key { font-weight: 650; color: var(--muted); }
.vd-task-chip .ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.vd-task-chip.s-done .ttl { text-decoration: line-through; color: var(--muted); }
.vd-mention { color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent); padding: 0 4px; border-radius: 5px; font-weight: 600; }
.vd-due { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.vd-due.late { color: var(--late); font-weight: 600; }
.vd-due.soon { color: var(--important); font-weight: 600; }
.vd-progress { height: 6px; border-radius: 3px; background: var(--field); overflow: hidden; margin: 4px 0 6px; }
.vd-progress i { display: block; height: 100%; background: var(--st-done); border-radius: inherit; transition: width 0.4s var(--ease); }

/* Menus and pickers (wallpaper.vision's .menu) */
.vd-menu { max-width: 360px; max-height: min(460px, calc(100vh - 24px)); overflow: auto; z-index: 80; }
.vd-menu button.danger { color: var(--danger); }
.vd-menu .vd-avatar { margin-left: -2px; }
.vd-menu-head { padding: 6px 10px 4px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.vd-picker { display: flex; flex-direction: column; gap: 6px; }
.vd-picker .vd-input { height: 34px; }
.vd-picker-list { display: flex; flex-direction: column; max-height: 300px; overflow: auto; }
.vd-picker-list button.active { background: var(--hover); }
.vd-empty-small { padding: 10px; color: var(--muted); font-size: 13px; text-align: center; }

/* Dialogs */
.vd-dialog-wrap { position: fixed; inset: 0; z-index: 70; display: grid; place-items: start center; padding: 10vh 16px 16px; background: rgba(0, 0, 0, 0.22); animation: fade 0.18s ease; overflow: auto; }
.vd-dialog {
  width: min(460px, 100%); padding: 22px; border-radius: var(--r-xl);
  background: var(--panel); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow-lg);
  animation: pop 0.26s var(--ease); transform-origin: top center;
}
.vd-dialog.wide { width: min(640px, 100%); }
.vd-dialog.palette { width: min(640px, 100%); padding: 0; overflow: hidden; }
.vd-form { display: flex; flex-direction: column; gap: 14px; }
.vd-form h2 { font-size: 19px; font-weight: 650; }
.vd-confirm { display: flex; flex-direction: column; gap: 18px; font-size: 15px; }
@keyframes fade { from { opacity: 0; } }

.vd-toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px;
  border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow-lg);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  font-size: 14px; animation: pop 0.25s var(--ease);
}
.vd-toast[hidden] { display: none; }
.vd-toast button { height: 30px; padding: 0 12px; border-radius: var(--r-sm); background: var(--fg); color: var(--bg); font-weight: 600; font-size: 13px; }

/* ---------- Signing in ---------- */

.vd-auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; }
.vd-auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 10px; }
.vd-auth-card h1 { font-size: 26px; font-weight: 650; margin-top: 18px; }
.vd-auth-sub { color: var(--muted); font-size: 15px; margin-bottom: 14px !important; }
.vd-auth-form { display: flex; flex-direction: column; gap: 14px; }
.vd-auth-btn { justify-content: center; margin-top: 6px; }
.vd-auth-err { color: var(--danger); font-size: 13.5px; }
.vd-auth-foot { opacity: 0.8; }

/* The CI logo (public/v/brand.js): #05080B on light, #EAF3F7 on dark. */
.vd-logo { display: inline-flex; align-items: center; color: #05080B; line-height: 0; }
:root[data-theme="dark"] .vd-logo { color: #EAF3F7; }
.vd-logo svg { display: block; width: 116px; height: auto; }
.vd-logo.big svg { width: 220px; }
.vd-auth-card .vd-logo { margin-bottom: 4px; }

/* ---------- Layout ---------- */

.vd-app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) auto; height: 100vh; height: 100dvh; }
.vd-side { display: flex; flex-direction: column; min-height: 0; padding: 12px 10px 10px; border-right: 0.5px solid var(--border); background: color-mix(in srgb, var(--bg) 60%, var(--grouped)); }
:root[data-theme="dark"] .vd-side { background: color-mix(in srgb, var(--bg) 70%, #000); }
.vd-side-top { display: flex; flex-direction: column; gap: 10px; padding: 2px 4px 10px; }
.vd-side-logo { padding: 8px 8px 6px; border-radius: var(--r-sm); align-self: flex-start; }
.vd-proj-btn { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px; border-radius: var(--r-md); background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), 0 1px 2px rgba(0, 0, 0, 0.04); font-size: 13.5px; font-weight: 600; }
.vd-proj-btn .label { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-proj-btn svg { color: var(--muted); }
.vd-side-scroll { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 18px; padding: 4px 0; margin: 0 -4px; padding-inline: 4px; }
.vd-side-nav { display: flex; flex-direction: column; gap: 1px; }
.vd-side-gap { height: 10px; }
.vd-nav {
  position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r-md);
  color: var(--fg) !important; font-size: 14px; font-weight: 500; text-align: left; width: 100%;
  transition: background 0.12s ease;
}
.vd-nav svg { flex-shrink: 0; color: var(--muted); }
.vd-nav .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-nav:hover { background: var(--hover); }
.vd-nav.active { background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), 0 1px 3px rgba(0, 0, 0, 0.06); font-weight: 600; }
.vd-nav.active svg { color: var(--fg); }
.vd-nav.unread .label { font-weight: 650; }
.vd-nav.subtle { color: var(--muted) !important; }
.vd-badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 650; }
.vd-live { color: var(--on) !important; animation: vd-pulse 1.6s ease-in-out infinite; }
@keyframes vd-pulse { 50% { opacity: 0.45; } }
.vd-side-sec { display: flex; flex-direction: column; gap: 1px; }
.vd-side-h { display: flex; align-items: center; justify-content: space-between; height: 26px; padding: 0 4px 0 10px; font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.vd-side-add { width: 24px; height: 24px; border-radius: var(--r-sm); color: var(--muted); }
.vd-person .vd-avatar { margin-left: -1px; }
.vd-me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); text-align: left; }
.vd-me:hover { background: var(--hover); }
.vd-me > svg { color: var(--muted); flex-shrink: 0; }
.vd-me-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.vd-me-txt .subtle { font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vd-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; }
.vd-head { position: sticky; top: 0; z-index: 20; padding: 0 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.vd-head-row { display: flex; align-items: center; gap: 12px; min-height: var(--head-h); }
.vd-head-title { flex: 1; min-width: 0; display: flex; align-items: center; }
.vd-head-title h1 { font-size: 20px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-head-actions { display: flex; align-items: center; gap: 8px; }
.vd-head-global { display: flex; align-items: center; gap: 4px; padding-left: 8px; margin-left: 4px; border-left: 0.5px solid var(--border); }
.vd-head-global .vd-new { margin-left: 6px; }
.vd-head-sub { padding: 0 0 12px; }
.vd-head-sub[hidden] { display: none; }
.vd-burger { display: none; }
.vd-view { flex: 1; min-height: 0; padding: 8px 28px 40px; }
.vd-view.v-kanban, .vd-view.v-gantt, .vd-view.v-chat, .vd-view.v-boards:has(.vd-board-frame) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 20px; }
.vd-main:has(.v-kanban), .vd-main:has(.v-gantt), .vd-main:has(.v-chat), .vd-main:has(.vd-board-frame) { overflow: hidden; }
.vd-dock { width: 400px; border-left: 0.5px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.vd-dock[hidden] { display: none; }
.dock-btn.on { background: var(--active); }
.vd-scrim { display: none; }

@media (max-width: 1100px) { .vd-dock { width: 340px; } }
@media (max-width: 860px) {
  .vd-app { grid-template-columns: minmax(0, 1fr); }
  .vd-side { position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 0.3s var(--ease); background: var(--bg); box-shadow: var(--shadow-lg); }
  body.vd-side-open .vd-side { transform: none; }
  body.vd-side-open .vd-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.25); }
  .vd-burger { display: grid; }
  .vd-dock { position: fixed; inset: 0 0 0 auto; z-index: 50; width: min(420px, 100vw); box-shadow: var(--shadow-lg); }
  .vd-head, .vd-view { padding-left: 14px; padding-right: 14px; }
  .vd-head-global .vd-new span, .dock-btn { display: none; }
  .vd-head-row { flex-wrap: wrap; }
}

/* ---------- Common view parts ---------- */

.vd-panel { padding: 16px; border-radius: calc(var(--r-md) + 8px); background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow); }
.vd-sec-h { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 12px !important; }
.vd-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 12vh 20px; color: var(--muted); }
.vd-empty h3 { color: var(--fg); font-size: 18px; font-weight: 650; }
.vd-empty p { max-width: 36em; }
.vd-empty .vd-btn { margin-top: 10px; }
.vd-empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--field); color: var(--fg); margin-bottom: 6px; }
.vd-empty-line { padding: 6px 2px; font-size: 13.5px; }

.vd-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vd-people-filter { display: flex; padding-left: 4px; }
.vd-pf { margin-left: -5px; border-radius: 50%; transition: transform 0.2s var(--ease); box-shadow: 0 0 0 2px var(--bg); }
.vd-pf:hover { transform: translateY(-2px); z-index: 1; }
.vd-pf.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); z-index: 2; }
.vd-pf .vd-avatar.empty { background: var(--bg); }
.vd-search { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-md); background: var(--field); color: var(--muted); width: 200px; }
.vd-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13px; color: var(--fg); }
.vd-search:focus-within { box-shadow: 0 0 0 2px var(--accent-soft); }

/* Task card (Kanban, Home) */
.vd-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 11px 12px 10px; border-radius: var(--r-card);
  background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow); cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); outline: none;
}
.vd-card:hover { box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow-lift); transform: translateY(-1px); }
.vd-card:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.vd-card.dragging { opacity: 0.35; transform: scale(0.98); }
.vd-card.s-done .vd-card-title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.vd-card-title { font-size: 14px; font-weight: 520; line-height: 1.35; overflow-wrap: anywhere; }
.vd-card-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.vd-card-foot { display: flex; align-items: center; gap: 7px; min-height: 22px; }
.vd-card-key { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.vd-blocked { color: var(--important); display: inline-flex; }
.vd-card.adding { padding: 6px; cursor: default; }
.vd-card.adding:hover { transform: none; }
.vd-card-list { display: flex; flex-direction: column; gap: 8px; }
.vd-mini-task { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 8px; border-radius: var(--r-sm); text-align: left; font-size: 13.5px; }
.vd-mini-task:hover { background: var(--hover); }
.vd-mini-task .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-mini-task .subtle { font-size: 12px; flex-shrink: 0; }

/* ---------- Home ---------- */

.vd-home { display: flex; flex-direction: column; gap: 30px; max-width: 1200px; }
.vd-home-sec { min-width: 0; }
.vd-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.vd-person-card { display: flex; flex-direction: column; gap: 12px; }
.vd-person-top { display: flex; align-items: center; gap: 12px; }
.vd-person-top strong { font-size: 15.5px; }
.vd-person-note { font-size: 13.5px; padding: 8px 11px; border-radius: var(--r-md); background: var(--field); }
.vd-person-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vd-person-stats div { display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--r-md); background: color-mix(in srgb, var(--field) 60%, transparent); }
.vd-person-stats b { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.vd-person-stats span { font-size: 12px; color: var(--muted); }
.vd-person-stats .warn b { color: var(--late); }
.vd-person-tasks { display: flex; flex-direction: column; margin: -4px -8px -6px; }
.vd-person-idle { font-size: 13px; }
.vd-invite-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; justify-content: center; }
.vd-home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.vd-home-col h3 { font-size: 14px; font-weight: 650; margin-bottom: 10px !important; }
@media (max-width: 1000px) { .vd-home-cols { grid-template-columns: 1fr; } }
.vd-agenda { display: flex; flex-direction: column; gap: 2px; }
.vd-agenda-day { font-size: 13px; font-weight: 650; padding: 10px 4px 4px; }
.vd-agenda-day:first-child { padding-top: 0; }
.vd-agenda-row { display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 3px 8px; border-radius: var(--r-sm); font-size: 13.5px; cursor: pointer; }
.vd-agenda-row:hover { background: var(--hover); }
.vd-agenda-row .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-agenda-row.late .vd-agenda-time { color: var(--late); }
.vd-agenda-time { width: 70px; flex-shrink: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vd-ev-ic { color: var(--accent); }
.vd-recent { display: flex; flex-direction: column; gap: 2px; align-items: stretch; }

/* ---------- Inbox ---------- */

.vd-inbox { display: flex; flex-direction: column; gap: 2px; max-width: 820px; }
.vd-inbox-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: var(--r-card); text-align: left; width: 100%; }
.vd-inbox-row:hover { background: var(--hover); }
.vd-inbox-row.unread { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.vd-inbox-row.unread strong::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin: 0 7px 1px 0; }
.vd-inbox-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.vd-inbox-main p { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13.5px; }
.vd-inbox-ref { color: var(--muted); }
.vd-inbox-side { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; flex-shrink: 0; }

/* ---------- Task list ---------- */

.vd-list { display: flex; flex-direction: column; gap: 14px; max-width: 1200px; }
.vd-group-h { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 650; }
.vd-group-h:hover { background: var(--hover); }
.vd-group-h .subtle { font-weight: 500; }
.vd-group-list { display: flex; flex-direction: column; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow); overflow: hidden; margin-top: 4px; }
.vd-row-task {
  display: grid; grid-template-columns: 18px 70px minmax(0, 1fr) auto 10px 110px 92px 14px 24px; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 14px; cursor: pointer; border-bottom: 0.5px solid var(--border); outline: none; font-size: 14px;
}
.vd-row-task:hover, .vd-row-task:focus-visible { background: var(--hover); }
.vd-row-task.done .vd-rt-title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.vd-rt-key { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.vd-rt-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.vd-rt-labels { display: flex; gap: 4px; }
.vd-rt-due { font-size: 12.5px; color: var(--muted); text-align: right; }
.vd-rt-due.late { color: var(--late); font-weight: 600; }
@media (max-width: 860px) { .vd-row-task { grid-template-columns: 18px minmax(0, 1fr) auto 24px; } .vd-rt-key, .vd-rt-labels, .vd-row-task > .swatch-dot, .vd-row-task > span:nth-child(5), .vd-rt-due, .vd-row-task .vd-prio { display: none; } }
.vd-quick { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; color: var(--muted); cursor: text; }
.vd-quick-input { flex: 1; border: 0; background: none; outline: none; font-size: 14px; color: var(--fg); }
.vd-quick:focus-within { background: color-mix(in srgb, var(--accent) 5%, transparent); }

/* ---------- Kanban ---------- */

.vd-kanban { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.vd-kanban > .vd-col { display: flex; flex-direction: column; gap: 0; min-height: 0; border-radius: calc(var(--r-card) + 6px); background: color-mix(in srgb, var(--fg) 3.5%, transparent); }
:root[data-theme="dark"] .vd-kanban > .vd-col { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.vd-col-h { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 10px 0 14px; font-size: 13.5px; font-weight: 650; }
.vd-col-count { font-weight: 500; color: var(--muted); font-size: 13px; }
.vd-col-add { width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); }
.vd-col-add:hover { background: var(--hover); color: var(--fg); }
.vd-col-list { flex: 1; min-height: 60px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 10px 12px; }
.vd-col-input { min-height: 56px; }
.vd-drop { height: 4px; margin: -2px 4px; border-radius: 2px; background: var(--accent); flex-shrink: 0; }

/* ---------- Gantt ---------- */

.vd-gantt {
  flex: 1; min-height: 0; overflow: auto; position: relative; border-radius: var(--r-card);
  background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow); overscroll-behavior: contain;
}
.g-inner { position: relative; min-height: 100%; }
.g-head { position: sticky; top: 0; z-index: 6; display: flex; height: 56px; background: var(--card); box-shadow: 0 0.5px 0 var(--border); }
.g-corner { position: sticky; left: 0; z-index: 7; flex-shrink: 0; width: 300px; display: flex; align-items: flex-end; gap: 6px; padding: 0 14px 9px; background: var(--card); box-shadow: 0.5px 0 0 var(--border); font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.g-scale { position: relative; flex-shrink: 0; }
.g-scale-top, .g-scale-bot { position: absolute; left: 0; right: 0; }
.g-scale-top { top: 0; height: 26px; }
.g-scale-bot { top: 26px; height: 30px; }
.g-month { position: absolute; top: 0; height: 100%; display: flex; align-items: center; padding-left: 8px; font-size: 12.5px; font-weight: 650; box-shadow: inset 0.5px 0 0 var(--border); overflow: clip; white-space: nowrap; }
.g-month span { position: sticky; left: 308px; }
.g-day, .g-week { position: absolute; top: 0; height: 100%; display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: var(--muted); }
.g-day b { font-weight: 600; color: var(--fg); }
.g-day span { font-size: 10px; }
.g-day.we { opacity: 0.6; }
.g-day.today b { color: #fff; background: var(--danger); border-radius: 6px; padding: 1px 4px; }
.g-week { justify-content: flex-start; padding-left: 5px; box-shadow: inset 0.5px 0 0 var(--border); }
.g-row { display: flex; height: 38px; position: relative; }
.g-row:hover > .g-track { background: color-mix(in srgb, var(--fg) 2.5%, transparent); }
.g-row:hover > .g-left { background: color-mix(in srgb, var(--card) 96%, var(--fg)); }
.g-left {
  position: sticky; left: 0; z-index: 4; flex-shrink: 0; width: 300px; display: flex; align-items: center; gap: 8px;
  padding: 0 12px 0 14px; background: var(--card); box-shadow: 0.5px 0 0 var(--border); cursor: pointer; font-size: 13.5px; min-width: 0;
}
.g-left.child { padding-left: 36px; }
.g-left .g-key { font-size: 12px; color: var(--muted); font-weight: 600; flex-shrink: 0; }
.g-left .g-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-fold { width: 20px; height: 20px; margin-left: -6px; border-radius: 5px; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.g-fold:hover { background: var(--hover); }
.g-ms-left { font-weight: 650; font-size: 12.5px; cursor: default; }
.g-sep-left { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; cursor: default; }
.g-left.unsched { cursor: grab; color: var(--muted); }
.g-left.unsched:hover { color: var(--fg); }
.g-track {
  position: relative; flex-shrink: 0;
  /* weekends shaded: the timeline starts on a Monday */
  background-image: repeating-linear-gradient(to right, transparent 0 calc(var(--dw) * 5), color-mix(in srgb, var(--fg) 3.5%, transparent) calc(var(--dw) * 5) calc(var(--dw) * 7));
}
.g-head .g-scale, .g-ms-row { background-image: none; }
.g-ms-row { height: 44px; box-shadow: 0 0.5px 0 var(--border); }
.g-body { position: relative; }
.g-deps { position: absolute; left: 300px; top: 0; z-index: 2; pointer-events: none; overflow: visible; }
.g-deps path { fill: none; stroke: var(--edge); stroke-width: 1.5; }
.g-deps path.bad { stroke: var(--late); stroke-dasharray: 4 3; }
.g-lines { position: absolute; left: 300px; top: 56px; bottom: 0; z-index: 1; pointer-events: none; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--danger); opacity: 0.75; }
.g-ms-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed color-mix(in srgb, var(--ms) 55%, transparent); }
.g-ms-line.done { border-color: color-mix(in srgb, var(--st-done) 50%, transparent); }

.g-bar {
  position: absolute; top: 7px; height: 24px; z-index: 3; border-radius: 7px; cursor: grab; touch-action: none; user-select: none;
  --c: var(--st-todo); background: color-mix(in srgb, var(--c) 22%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent);
  display: flex; align-items: center; transition: box-shadow 0.15s ease;
}
.g-bar.s-backlog { --c: var(--st-backlog); }
.g-bar.s-progress { --c: var(--st-progress); }
.g-bar.s-done { --c: var(--st-done); opacity: 0.7; }
.g-bar.late { box-shadow: inset 0 0 0 1.5px var(--late); }
.g-bar.point { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, var(--card)) 0 6px, color-mix(in srgb, var(--c) 8%, var(--card)) 6px 12px); }
.g-bar.epic { --c: var(--ms); height: 14px; top: 12px; border-radius: 4px; background: color-mix(in srgb, var(--ms) 25%, var(--card)); }
.g-bar.summary { cursor: pointer; }
.g-bar .g-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: color-mix(in srgb, var(--ms) 60%, transparent); }
.g-bar.dragging { cursor: grabbing; box-shadow: inset 0 0 0 1.5px var(--c), var(--shadow-lg); z-index: 8; }
.g-bar.drop { box-shadow: 0 0 0 2.5px var(--accent); }
.g-bar-label { position: relative; padding: 0 9px; font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; color: color-mix(in srgb, var(--c) 45%, var(--fg)); }
.g-bar.epic .g-bar-label { position: absolute; left: 100%; padding-left: 8px; overflow: visible; color: var(--ms); font-weight: 650; }
.g-bar .g-h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.g-bar .g-h.l { left: -2px; }
.g-bar .g-h.r { right: -2px; }
.g-bar .g-link {
  position: absolute; right: -16px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%;
  background: var(--card); box-shadow: inset 0 0 0 2px var(--accent); cursor: crosshair; opacity: 0; transition: opacity 0.15s ease;
}
.g-bar:hover .g-link { opacity: 1; }
.g-bar.dragging[data-tip]::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 0; padding: 3px 8px; border-radius: 6px;
  background: var(--fg); color: var(--bg); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.g-who { position: absolute; top: 10px; z-index: 3; pointer-events: none; }
.g-linkline { position: absolute; z-index: 9; height: 2px; background: var(--accent); transform-origin: 0 50%; pointer-events: none; border-radius: 1px; }
.g-ms {
  position: absolute; top: 9px; z-index: 5; display: flex; align-items: center; gap: 6px; transform: translateX(-9px);
  cursor: grab; touch-action: none; white-space: nowrap; font-size: 12.5px; font-weight: 650; color: var(--ms);
}
.g-ms i { width: 18px; height: 18px; flex-shrink: 0; background: var(--ms); transform: rotate(45deg) scale(0.75); border-radius: 3px; box-shadow: 0 2px 6px color-mix(in srgb, var(--ms) 40%, transparent); }
.g-ms.done { color: var(--st-done); }
.g-ms.done i { background: var(--st-done); }
.g-ms span { padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--card) 85%, transparent); }
.g-ms.dragging { cursor: grabbing; z-index: 9; }
.g-ms.flash span { animation: vd-flash 1.6s ease 2; }
.g-schedule { position: absolute; top: 8px; height: 22px; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 6px; font-size: 12px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); background: var(--card); opacity: 0; }
.g-row:hover .g-schedule { opacity: 1; }
.g-schedule:hover { color: var(--fg); }
.vd-ms-pop { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
@keyframes vd-flash { 30% { background: color-mix(in srgb, var(--accent) 30%, transparent); } }

/* ---------- Calendar ---------- */

.vd-cal-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vd-cal { flex: 1; }
.vd-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: var(--r-card); overflow: hidden; background: var(--border); gap: 1px; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.vd-wd { padding: 9px 10px; font-size: 12px; font-weight: 650; color: var(--muted); background: var(--card); text-transform: uppercase; letter-spacing: 0.04em; }
.vd-day { min-height: 118px; padding: 6px; background: var(--card); display: flex; flex-direction: column; gap: 4px; cursor: default; min-width: 0; transition: background 0.12s ease; }
.vd-day:hover { background: color-mix(in srgb, var(--card) 97%, var(--fg)); }
.vd-day.other { background: color-mix(in srgb, var(--card) 70%, var(--bg)); }
.vd-day.other .vd-day-num { opacity: 0.45; }
.vd-day.we:not(.other) { background: color-mix(in srgb, var(--card) 96%, var(--fg)); }
.vd-day.over { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.vd-day-num { font-size: 13px; font-weight: 600; padding: 2px 4px; }
.vd-day.today .vd-day-num span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; background: var(--danger); color: #fff; }
.vd-day-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vd-ev {
  display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 6px; border-radius: 6px; min-width: 0; width: 100%; text-align: left;
  font-size: 12px; color: color-mix(in srgb, var(--c) 55%, var(--fg)); background: color-mix(in srgb, var(--c) 14%, transparent); cursor: pointer;
}
.vd-ev:hover { background: color-mix(in srgb, var(--c) 22%, transparent); }
.vd-ev.allday { background: var(--c); color: #fff; }
.vd-ev-time { font-variant-numeric: tabular-nums; font-weight: 650; flex-shrink: 0; }
.vd-ev-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; font-weight: 550; }
.vd-cal-task { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 12px; width: 100%; text-align: left; min-width: 0; box-shadow: inset 0 0 0 1px var(--border); }
.vd-cal-task:hover { background: var(--hover); }
.vd-cal-task .key { font-weight: 650; color: var(--muted); flex-shrink: 0; }
.vd-cal-task .ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-cal-task.s-done .ttl { text-decoration: line-through; color: var(--muted); }
.vd-cal-ms { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 650; color: var(--ms); background: color-mix(in srgb, var(--ms) 12%, transparent); width: 100%; text-align: left; min-width: 0; }
.vd-cal-ms span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-cal-ms svg { fill: currentColor; flex-shrink: 0; }
.vd-cal-ms.done { color: var(--st-done); background: color-mix(in srgb, var(--st-done) 12%, transparent); }
.vd-more { font-size: 12px; color: var(--muted); text-align: left; padding: 1px 6px; border-radius: 5px; }
.vd-more:hover { background: var(--hover); color: var(--fg); }

.vd-week { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 420px; border-radius: var(--r-card); overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow); }
.vd-week-head, .vd-week-allday, .vd-week-grid { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); }
.vd-week-head { box-shadow: 0 0.5px 0 var(--border); }
.vd-week-day { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.vd-week-day b { font-size: 19px; color: var(--fg); letter-spacing: -0.02em; }
.vd-week-day.today b { color: var(--danger); }
.vd-week-allday { box-shadow: 0 0.5px 0 var(--border); min-height: 34px; }
.vd-week-gutter { display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 11px; }
.vd-week-adcell { display: flex; flex-direction: column; gap: 3px; padding: 4px; box-shadow: inset 0.5px 0 0 var(--border); min-width: 0; }
.vd-week-adcell.over { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.vd-week-scroll { flex: 1; overflow-y: auto; }
.vd-week-gutter.hours { flex-direction: column; align-items: stretch; padding: 0; }
.vd-hour { position: relative; font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-7px); }
.vd-week-col { position: relative; box-shadow: inset 0.5px 0 0 var(--border); background-image: repeating-linear-gradient(to bottom, transparent 0 43px, var(--border) 43px 44px); }
.vd-week-col.today { background-color: color-mix(in srgb, var(--accent) 3%, transparent); }
.vd-wev {
  position: absolute; padding: 3px 7px; border-radius: 7px; overflow: hidden; cursor: grab; touch-action: none;
  display: flex; flex-direction: column; font-size: 12px; line-height: 1.3; z-index: 2;
  background: color-mix(in srgb, var(--c) 18%, var(--card)); box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 0.5px color-mix(in srgb, var(--c) 40%, transparent);
  color: color-mix(in srgb, var(--c) 45%, var(--fg));
}
.vd-wev strong { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-wev span { font-size: 11px; opacity: 0.85; }
.vd-wev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.vd-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; }
.vd-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.vd-event-form .vd-when { gap: 8px; }
.vd-event-form .vd-when .vd-input { width: auto; height: 34px; }
.vd-event-form .vd-when .vd-input[hidden] { display: none; }
.vd-link-edit .vd-input { height: 34px; }
.vd-person-toggle { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 5px; border-radius: 999px; font-size: 13px; box-shadow: inset 0 0 0 1px var(--border); opacity: 0.55; }
.vd-person-toggle.on { opacity: 1; background: var(--field); box-shadow: inset 0 0 0 1.5px var(--accent); }
.vd-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.vd-color { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); transition: transform 0.15s var(--ease); }
.vd-colors.sm .vd-color { width: 22px; height: 22px; }
.vd-color.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--fg); }
.vd-color:hover { transform: scale(1.1); }

/* ---------- Task sheet ---------- */

.vd-sheet-wrap { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.vd-sheet-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.12); opacity: 0; transition: opacity 0.25s ease; pointer-events: auto; }
.vd-sheet-wrap.open .vd-sheet-scrim { opacity: 1; }
.vd-sheet {
  position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(600px, calc(100vw - 20px));
  display: flex; flex-direction: column; border-radius: var(--r-xl); overflow: hidden; pointer-events: auto;
  background: var(--panel); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow-lg);
  transform: translateX(calc(100% + 20px)); transition: transform 0.38s var(--ease);
}
.vd-sheet-wrap.open .vd-sheet { transform: none; }
.vd-sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 20px; box-shadow: 0 0.5px 0 var(--border); font-size: 13px; }
.vd-sheet-proj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.vd-key-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: var(--r-sm); font-weight: 650; }
.vd-key-btn:hover { background: var(--hover); }
.vd-sheet-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; display: flex; flex-direction: column; gap: 18px; }
.vd-sheet-body > * { flex-shrink: 0; }
.vd-title-input { width: 100%; border: 0; resize: none; background: none; outline: none; font-size: 22px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; padding: 4px 6px; margin: -4px -6px; border-radius: var(--r-sm); color: var(--fg); }
.vd-title-input:hover { background: var(--hover); }
.vd-title-input:focus { background: var(--field); }
.vd-props { display: flex; flex-direction: column; gap: 4px; }
.vd-prop { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 36px; }
.vd-prop-l { font-size: 13px; color: var(--muted); }
.vd-prop-v { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.vd-prop-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 9px; border-radius: var(--r-sm); font-size: 13.5px; max-width: 100%; }
.vd-prop-btn > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-prop-btn:hover { background: var(--hover); }
.vd-prop-btn.chip { box-shadow: inset 0 0 0 1px var(--border); }
.vd-status-seg button { padding: 0 9px; }
.vd-date-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.vd-date-wrap.late .vd-date { color: var(--late); box-shadow: inset 0 0 0 1px var(--late); }
.vd-meta { font-size: 12px; margin-top: 6px !important; }
.vd-sec { display: flex; flex-direction: column; gap: 8px; }
.vd-sec h3, .vd-sec > summary { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.vd-sec > summary { cursor: pointer; list-style: none; }
.vd-sec > summary::-webkit-details-marker { display: none; }
.vd-sec > summary::before { content: "▸ "; }
.vd-sec[open] > summary::before { content: "▾ "; }
.vd-sec[hidden] { display: none; }
.vd-desc { font-size: 14.5px; }
.vd-placeholder { width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r-md); color: var(--muted); background: var(--field); }
.vd-rich { cursor: text; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.vd-rich p { line-height: 1.55; }
.vd-rich p.gap { height: 8px; }
.vd-rich p.h { font-weight: 650; font-size: 15.5px; margin-top: 6px; }
.vd-rich p.li { padding-left: 16px; position: relative; }
.vd-rich p.li::before { content: ""; position: absolute; left: 4px; top: 0.68em; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.vd-rich p.todo { display: flex; align-items: flex-start; gap: 8px; }
.vd-rich p.todo input { margin-top: 4px; accent-color: var(--st-done); width: 15px; height: 15px; flex-shrink: 0; }
.vd-rich p.todo.done { color: var(--muted); text-decoration: line-through; }
.vd-rich code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; padding: 1px 5px; border-radius: 5px; background: var(--field); }
.vd-desc-input { min-height: 120px; }
.vd-hint { font-size: 12px; }
.vd-child-list { display: flex; flex-direction: column; }
.vd-child { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 8px; border-radius: var(--r-sm); text-align: left; font-size: 13.5px; }
.vd-child:hover { background: var(--hover); }
.vd-child .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-links { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.vd-link-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 0 6px; border-radius: var(--r-sm); color: var(--muted); }
.vd-link-row a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-link-row:hover { background: var(--hover); }
.vd-backlinks { display: flex; flex-direction: column; }
.vd-back { display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 4px 8px; border-radius: var(--r-sm); text-align: left; font-size: 13.5px; }
.vd-back svg { color: var(--muted); flex-shrink: 0; }
.vd-back > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-back:hover { background: var(--hover); }
.vd-comments { display: flex; flex-direction: column; gap: 14px; }
.vd-comment { display: flex; gap: 10px; }
.vd-comment-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vd-comment-top { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.vd-comment-top .vd-x { margin-left: auto; opacity: 0; }
.vd-comment:hover .vd-x { opacity: 1; }
.vd-comment-compose { display: flex; align-items: flex-end; gap: 10px; }
.vd-comment-input { flex: 1; min-height: 38px; }
.vd-act { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.vd-act > span:nth-child(2) { flex: 1; }
.vd-activity { display: flex; flex-direction: column; padding-top: 6px; }

.vd-new-task .vd-new-title, .vd-event-form .vd-new-title { height: 46px; font-size: 17px; font-weight: 600; }
.vd-new-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-new-chips .vd-date { height: 24px; background: none; padding: 0 2px; }

/* ---------- ⌘K ---------- */

.vd-palette-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; box-shadow: 0 0.5px 0 var(--border); color: var(--muted); }
.vd-palette-input { flex: 1; border: 0; background: none; outline: none; font-size: 17px; color: var(--fg); }
.vd-palette kbd { font: inherit; font-size: 11px; padding: 2px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); }
.vd-palette-list { max-height: min(60vh, 480px); overflow-y: auto; padding: 6px; }
.vd-palette-h { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.vd-palette-row { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border-radius: var(--r-md); text-align: left; font-size: 14px; }
.vd-palette-row svg { color: var(--muted); flex-shrink: 0; }
.vd-palette-row .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-palette-row .subtle { font-size: 12.5px; flex-shrink: 0; }
.vd-palette-row.active { background: var(--hover); }

/* ---------- Settings ---------- */

.vd-settings { gap: 16px; }
.vd-set-group { display: flex; flex-direction: column; gap: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--grouped); }
:root[data-theme="dark"] .vd-set-group { background: var(--grouped-card); }
.vd-set-group > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.vd-team { display: flex; flex-direction: column; gap: 8px; }
.vd-team-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.vd-set-group .vd-btn { align-self: flex-start; }

/* ---------- Chat ---------- */

.vd-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; max-width: 980px; width: 100%; position: relative; }
.vd-chat.docked { max-width: none; height: 100%; }
.vd-chat.drop::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); pointer-events: none; }
.vd-chat-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 10px; box-shadow: 0 0.5px 0 var(--border); }
.vd-dock-switch { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: var(--r-md); min-width: 0; }
.vd-dock-switch:hover { background: var(--hover); }
.vd-chat-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vd-chat-title strong { font-size: 16px; }
.vd-chat.docked .vd-chat-title strong { font-size: 14px; }
.vd-chat-title .subtle { font-size: 12.5px; font-weight: 400; }
.vd-chat-note { display: inline-block; font-size: 13px; color: var(--muted); padding: 4px 10px; border-radius: var(--r-sm); background: var(--field); }
.vd-call-wrap { position: relative; display: inline-flex; }
.vd-chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 0 6px; overscroll-behavior: contain; }
.vd-chat.docked .vd-chat-scroll { padding: 8px 6px; }
.vd-chat-list { display: flex; flex-direction: column; }
.vd-load-older { align-self: center; margin: 4px 0 12px; font-size: 13px; color: var(--accent); padding: 4px 10px; border-radius: var(--r-sm); }
.vd-chat-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10vh 20px 30px; color: var(--muted); }
.vd-chat-empty h3 { color: var(--fg); font-size: 18px; }
.vd-day-sep { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; font-size: 12px; font-weight: 650; color: var(--muted); }
.vd-day-sep::before, .vd-day-sep::after { content: ""; flex: 1; height: 0.5px; background: var(--border); }
.vd-msg { position: relative; display: flex; gap: 12px; padding: 6px 10px; border-radius: var(--r-md); }
.vd-msg.compact { padding-top: 1px; padding-bottom: 1px; }
.vd-msg:hover { background: color-mix(in srgb, var(--fg) 3%, transparent); }
.vd-msg-time { width: 34px; flex-shrink: 0; font-size: 10.5px; color: var(--muted); text-align: right; padding-top: 4px; opacity: 0; font-variant-numeric: tabular-nums; }
.vd-msg:hover .vd-msg-time { opacity: 1; }
.vd-msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vd-msg-top { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.vd-msg-top .subtle { font-size: 12px; }
.vd-msg .vd-rich { cursor: auto; font-size: 14.5px; }
.vd-msg .vd-rich p { line-height: 1.5; }
.vd-msg-tools {
  position: absolute; right: 10px; top: -14px; display: none; gap: 1px; padding: 3px; border-radius: var(--r-md);
  background: var(--surface); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); z-index: 3;
}
.vd-msg:hover .vd-msg-tools { display: flex; }
.vd-msg-tools .icon-btn { width: 28px; height: 28px; }
.vd-msg-tools .icon-btn svg { width: 16px; height: 16px; }
.vd-msg.flash { animation: vd-flash 1.6s ease 2; }
.vd-msg-sys { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 10px 4px 18px; font-size: 13px; color: var(--muted); }
.vd-msg-sys strong { color: var(--fg); font-weight: 600; }
.vd-msg-sys .vd-task-chip { height: 22px; font-size: 12px; }
.vd-msg-sys > .subtle { font-size: 11.5px; }
.vd-msg-sys .vd-btn { height: 26px; }
.vd-reacts { display: flex; gap: 4px; flex-wrap: wrap; }
.vd-react { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); }
.vd-react.mine { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.vd-embeds { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.vd-embed { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow); cursor: pointer; }
.vd-embed:hover { box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow-lift); }
.vd-embed-top { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.vd-embed-top .subtle { font-size: 12px; font-weight: 650; flex-shrink: 0; }
.vd-embed-title { font-weight: 550; }
.vd-embed-foot { display: flex; align-items: center; gap: 8px; }
.vd-embed-status { display: flex; gap: 1px; padding: 2px; border-radius: 8px; background: var(--field); }
.vd-embed-status button { width: 24px; height: 22px; display: grid; place-items: center; border-radius: 6px; opacity: 0.5; }
.vd-embed-status button:hover { opacity: 1; }
.vd-embed-status button.on { opacity: 1; background: var(--thumb); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.vd-files { display: flex; flex-wrap: wrap; gap: 8px; }
.vd-file-img img { display: block; max-width: min(360px, 100%); max-height: 280px; border-radius: var(--r-md); box-shadow: inset 0 0 0 0.5px var(--border); }
.vd-file { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--r-md); background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow); color: var(--fg) !important; font-size: 13.5px; max-width: 340px; }
.vd-file .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-voice { display: flex; flex-direction: column; gap: 6px; max-width: 380px; padding: 8px 12px; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow); }
.vd-tx { font-size: 13.5px; }
.vd-tx summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.vd-tx p { margin-top: 4px !important; }
.vd-seen { align-self: flex-end; font-size: 11.5px; color: var(--muted); padding: 2px 12px; }
.vd-edit { display: flex; flex-direction: column; gap: 4px; }
.vd-edit .subtle { font-size: 11.5px; }
.vd-typing { min-height: 18px; padding: 0 14px; font-size: 12px; color: var(--muted); }
.vd-composer { position: relative; padding: 0 0 2px; }
.vd-chat.docked .vd-composer { padding: 0 8px 8px; }
.vd-composer-row {
  display: flex; align-items: flex-end; gap: 4px; padding: 6px; border-radius: var(--r-lg);
  background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow);
}
.vd-composer-row:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent), 0 0 0 3px var(--accent-soft); }
.vd-composer-row[hidden] { display: none; }
.vd-composer-input { flex: 1; min-height: 36px; max-height: 240px; padding: 8px 6px; border: 0; background: none; outline: none; resize: none; font-size: 14.5px; line-height: 1.45; color: var(--fg); }
.vd-send { color: var(--accent); }
.vd-tray { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 6px; }
.vd-tray[hidden] { display: none; }
.vd-tray-file { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 9px; border-radius: var(--r-sm); background: var(--field); font-size: 12.5px; }
.vd-tray-file button { width: 20px; height: 20px; border-radius: 5px; color: var(--muted); }
.vd-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--fill); border-top-color: var(--accent); animation: vd-rot 0.8s linear infinite; }
@keyframes vd-rot { to { transform: rotate(360deg); } }
.vd-suggest { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 10; width: min(380px, 100%); padding: 5px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow-lg); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); display: flex; flex-direction: column; }
.vd-suggest[hidden] { display: none; }
.vd-suggest button { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 9px; border-radius: var(--r-md); font-size: 13.5px; text-align: left; }
.vd-suggest button .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-suggest button.active { background: var(--hover); }
.vd-rec-bar { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 8px 0 14px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 40%, transparent), var(--shadow); }
.vd-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: vd-pulse 1.2s ease-in-out infinite; }
.vd-rec-time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 36px; }
.vd-rec-meter { display: flex; align-items: center; gap: 2px; height: 26px; }
.vd-rec-meter i { width: 3px; height: 8%; border-radius: 2px; background: var(--danger); opacity: 0.75; transition: height 0.08s linear; }

.vd-status-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow); max-width: 720px; }
.vd-st-head { display: flex; align-items: center; gap: 10px; }
.vd-st-head strong { font-size: 14.5px; }
.vd-st-head .subtle { font-size: 12.5px; font-weight: 400; }
.vd-st-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.vd-chat.docked .vd-st-grid { grid-template-columns: 1fr; }
@media (max-width: 860px) { .vd-st-grid { grid-template-columns: 1fr; } }
.vd-st-sec { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: var(--r-md); background: color-mix(in srgb, var(--field) 55%, transparent); min-width: 0; }
.vd-st-sec h4 { font-size: 12px; font-weight: 650; color: var(--muted); padding: 0 4px; }
.vd-st-sec.warn h4 { color: var(--late); }
.vd-st-sec .vd-mini-task { min-height: 28px; font-size: 13px; padding: 3px 4px; }
.vd-st-sec p { padding: 0 4px; }

/* The call panel (from wallpaper.vision) sits above everything */
body.vd .call-panel { z-index: 75; }

/* ---------- Boards ---------- */

.vd-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; max-width: 1200px; }
.vd-board-grid > .vd-empty { grid-column: 1 / -1; }
.vd-bcard { cursor: pointer; }
.vd-bthumb { color: var(--fg); background: var(--bg); background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 14px 14px; }
.vd-bthumb svg { display: block; width: 100%; height: 100%; }
.vd-bcard .card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vd-bcard .icon-btn { position: relative; z-index: 2; }
.vd-board-frame { flex: 1; min-height: 0; width: 100%; border: 0; border-radius: var(--r-card); background: var(--bg); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow); }

/* Bare inputs that sit inside a styled box keep the box's focus look only. */
.vd-palette-input:focus, .vd-palette-input:focus-visible,
.vd-search input:focus, .vd-search input:focus-visible,
.vd-quick-input:focus, .vd-quick-input:focus-visible,
.vd-composer-input:focus, .vd-composer-input:focus-visible,
.vd-title-input:focus-visible { outline: none; box-shadow: none; }

@media (max-width: 860px) {
  .vd-kanban { grid-template-columns: repeat(4, 84vw); scroll-snap-type: x mandatory; }
  .vd-kanban > .vd-col { scroll-snap-align: start; }
}

/* ---------- Goals, focus, logbook, review ---------- */

.vd-badge.dot { min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--important); }
.vd-badge.live { display: inline-flex; gap: 3px; height: 18px; padding: 0 6px; font-size: 11px; background: color-mix(in srgb, var(--on) 18%, transparent); color: color-mix(in srgb, var(--on) 70%, var(--fg)); }
.swatch-dot.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px var(--edge); }
.vd-row.gap { gap: 14px; align-items: flex-start; }
.vd-row.center { justify-content: center; }
.vd-btn.primary { background: var(--fg); color: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.1); height: 42px; padding: 0 18px; font-size: 14.5px; }
.vd-btn.primary:hover { background: var(--fg); opacity: 0.9; }
.vd-btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.vd-btn.ghost:hover { background: var(--hover); color: var(--fg); }
.vd-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--r-sm); font-size: 13px; color: var(--muted); }
.vd-link:hover { background: var(--hover); color: var(--fg); }
.vd-warn { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: color-mix(in srgb, var(--important) 75%, var(--fg)); background: color-mix(in srgb, var(--important) 10%, var(--card)); }
.vd-time { width: 110px; }
.vd-select { appearance: none; padding-right: 28px; }
.vd-hours { width: 84px; text-align: right; }
.vd-plan-row .late, .vd-plan-cand .late { color: var(--danger); }
.vd-live-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--on); box-shadow: 0 0 0 3px color-mix(in srgb, var(--on) 25%, transparent); animation: vd-pulse 2s ease-in-out infinite; }
@keyframes vd-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--on) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .vd-live-dot { animation: none; } }

/* Goal colour on cards, rows and bars */
.vd-card.has-goal { box-shadow: inset 3px 0 0 var(--goal), inset 0 0 0 0.5px var(--border), var(--note-shadow); }
.vd-goal-tag { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 120px; font-size: 11.5px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vd-goal-tag .swatch-dot { flex-shrink: 0; }
.vd-rt-title .swatch-dot { display: inline-block; margin-right: 7px; vertical-align: 1px; }
.g-bar.has-goal::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 7px 0 0 7px; background: var(--goal); }

/* Focus */
.vd-focus { display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 720px; margin: 10px auto 0; }
.vd-focus > * { width: 100%; }
.vd-focus-date { font-weight: 450; font-size: 0.6em; }
.vd-review-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.vd-review-banner > svg { color: var(--important); flex-shrink: 0; }
.vd-focus-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 26px 28px 18px; border-radius: calc(var(--r-card) + 10px);
  background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--shadow); overflow: hidden;
}
.vd-focus-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--goal); }
.vd-focus-card.other::before { background: repeating-linear-gradient(90deg, var(--edge) 0 6px, transparent 6px 12px); opacity: 0.6; }
.vd-focus-card.running { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--goal) 55%, transparent), var(--shadow-lg); }
.vd-focus-card.empty { align-items: center; text-align: center; padding: 48px 28px; gap: 10px; }
.vd-focus-card.empty::before { display: none; }
.vd-focus-empty-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--field); color: var(--muted); margin-bottom: 6px; }
.vd-focus-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.vd-chain-item { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--field); color: var(--fg); max-width: 260px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
button.vd-chain-item:hover { background: var(--active); }
.vd-chain-item.goal { font-weight: 600; background: color-mix(in srgb, var(--goal) 14%, var(--card)); }
.vd-chain-item.other { color: var(--muted); }
.vd-chain-sep { color: var(--edge); }
.vd-focus-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.vd-focus-status, .vd-focus-due { display: inline-flex; align-items: center; gap: 6px; }
.vd-focus-due.late { color: var(--danger); }
.vd-focus-title { font-size: clamp(24px, 3.4vw, 32px); font-weight: 650; letter-spacing: -0.02em; line-height: 1.18; overflow-wrap: anywhere; margin: 0; }
.vd-focus-card.empty .vd-focus-title { font-size: 22px; }
.vd-focus-desc { max-height: 280px; overflow: auto; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--fg) 3%, transparent); font-size: 14.5px; }
.vd-focus-timer { display: flex; align-items: center; gap: 16px; padding-top: 6px; }
.vd-play {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--goal); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--goal) 40%, transparent);
  transition: transform 0.2s var(--ease);
}
.vd-play:hover { transform: scale(1.05); }
.vd-play:active { transform: scale(0.95); }
.vd-focus-card.other .vd-play { background: var(--fg); color: var(--bg); box-shadow: var(--shadow); }
.vd-clock { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.vd-focus-card:not(.running) .vd-clock { color: var(--muted); }
.vd-focus-actions { display: flex; align-items: center; gap: 4px; margin: 0 -10px; padding-top: 6px; border-top: 0.5px solid var(--border); }
.vd-focus-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.vd-focus-done h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; margin: 6px 0 8px; color: var(--muted); }
.vd-focus-line { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; margin: 4px 0; padding: 6px 10px; border-radius: var(--r-md); background: color-mix(in srgb, var(--on) 9%, transparent); text-align: left; font-size: 13.5px; }
.vd-focus-line .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.vd-focus-line .subtle { flex-shrink: 0; font-size: 12.5px; }

/* Done lists */
.vd-done-list { display: flex; flex-direction: column; gap: 1px; }
.vd-done-row { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 4px 8px; border-radius: var(--r-sm); text-align: left; font-size: 13.5px; }
button.vd-done-row:hover { background: var(--hover); }
.vd-done-row .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-done-row .subtle { font-size: 12px; flex-shrink: 0; }
.vd-done-row .icon-btn { width: 24px; height: 24px; opacity: 0; }
.vd-done-row:hover .icon-btn { opacity: 1; }
.vd-done-ic { color: var(--on); flex-shrink: 0; }
.vd-done-add { margin-top: 8px; }
.vd-home-done .vd-panel { display: flex; flex-direction: column; gap: 6px; }
.vd-week-mini .vd-link-btn { align-self: flex-start; margin-top: 4px; }

/* Stats */
.vd-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.vd-stat { display: flex; flex-direction: column; gap: 2px; }
.vd-stat > b { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.vd-stat > .subtle { font-size: 12.5px; }
.vd-stat-row.sm { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-bottom: 6px; }
.vd-stat-row.sm .vd-stat > b { font-size: 19px; }

/* Planner */
.vd-planner-dlg.vd-dialog.wide { width: min(980px, 100%); }
.vd-planner { display: flex; flex-direction: column; gap: 16px; }
.vd-planner h2 { margin: 0; }
.vd-plan-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; min-height: 0; }
.vd-plan-day, .vd-plan-pick { display: flex; flex-direction: column; gap: 6px; max-height: min(62vh, 620px); overflow: auto; padding: 2px; }
.vd-plan-pick { padding: 12px; border-radius: var(--r-card); background: color-mix(in srgb, var(--fg) 3%, transparent); }
.vd-plan-pick-list { display: flex; flex-direction: column; gap: 2px; }
.vd-plan-head { display: flex; align-items: baseline; gap: 10px; }
.vd-plan-head h3 { margin: 0; font-size: 16px; }
.vd-planner h4 { margin: 10px 0 4px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.vd-plan-sec.other h4 .subtle { text-transform: none; letter-spacing: 0; font-weight: 450; }
.vd-plan-sec { display: flex; flex-direction: column; gap: 4px; }
.vd-plan-row { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px 4px 4px; border-radius: var(--r-md); background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow); cursor: grab; }
.vd-plan-row.dragging { opacity: 0.4; }
.vd-plan-row.drop-before { box-shadow: 0 -2px 0 var(--accent), inset 0 0 0 0.5px var(--border); }
.vd-plan-row.drop-after { box-shadow: 0 2px 0 var(--accent), inset 0 0 0 0.5px var(--border); }
.vd-plan-sec.other .vd-plan-row { background: transparent; box-shadow: inset 0 0 0 0.5px var(--border); }
.vd-grip { color: var(--edge); flex-shrink: 0; }
.vd-plan-title { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.vd-plan-title:hover { text-decoration: underline; text-decoration-color: var(--edge); }
.vd-plan-row .subtle { font-size: 12px; flex-shrink: 0; }
.vd-plan-row .icon-btn { width: 28px; height: 28px; }
.vd-plan-quick { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-left: 8px; color: var(--muted); }
.vd-plan-quick .vd-input { flex: 1; }
.vd-plan-cand { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 4px 8px; border-radius: var(--r-sm); text-align: left; font-size: 13.5px; }
.vd-plan-cand:hover { background: var(--hover); }
.vd-plan-cand .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-plan-cand .subtle { font-size: 12px; flex-shrink: 0; }
.vd-plan-add { color: var(--muted); flex-shrink: 0; }
.vd-plan-cand:hover .vd-plan-add { color: var(--accent); }
@media (max-width: 760px) { .vd-plan-cols { grid-template-columns: 1fr; } .vd-plan-day, .vd-plan-pick { max-height: none; } }

/* Goals */
.vd-goals, .vd-review { display: flex; flex-direction: column; gap: 22px; max-width: 1100px; }
.vd-vision { display: flex; flex-direction: column; gap: 12px; }
.vd-vision h2 { margin: 0; font-size: 16px; }
.vd-vision .vd-row > .subtle { font-size: 13px; }
.vd-vision-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vd-vision-field { display: flex; flex-direction: column; gap: 6px; }
.vd-vision-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.vd-vision-ta { font-size: 15px; line-height: 1.45; resize: none; min-height: 52px; }
.vd-goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.vd-goal-card { position: relative; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.vd-goal-top { display: flex; align-items: flex-start; gap: 10px; }
.vd-goal-top h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; white-space: normal !important; }
.vd-goal-bar { width: 6px; align-self: stretch; min-height: 36px; border-radius: 3px; background: var(--goal); flex-shrink: 0; }
.vd-goal-why { margin: -4px 0 0 16px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.vd-goal-people { display: flex; flex-wrap: wrap; gap: 18px; }
.vd-goal-person { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.vd-goal-person .vd-col.tight > strong { font-size: 13px; }
.vd-goal-hit { display: inline-flex; align-items: center; gap: 3px; color: var(--on); font-weight: 600; font-size: 12px; }
.vd-goal-epics { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.vd-chip-btn { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--field); font-size: 12.5px; }
.vd-chip-btn:hover { background: var(--active); }
.vd-goal-tasks { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 0.5px solid var(--border); }
.vd-goal-tasks .vd-row.between > .subtle { font-size: 12.5px; }
.vd-goal-task-list { display: flex; flex-direction: column; margin: 0 -8px; }
.vd-goal-other { display: flex; flex-direction: column; gap: 12px; }
.vd-goal-other .vd-row > .subtle { font-size: 13px; }
.vd-goal-other .vd-goal-person b { font-variant-numeric: tabular-nums; }
.vd-goals-past { padding: 4px 0; }
.vd-goals-past summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.vd-goal-past-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 4px 8px; border-radius: var(--r-sm); text-align: left; font-size: 13.5px; }
button.vd-goal-past-row:hover { background: var(--hover); }
.vd-goal-past-row .vd-badge { background: var(--field); color: var(--muted); }
.vd-empty-big { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; text-align: center; color: var(--muted); }
.vd-empty-big h2 { margin: 6px 0 0; color: var(--fg); font-size: 18px; }
.vd-empty-big p { max-width: 420px; margin: 0 0 8px; }
.vd-ring-wrap { position: relative; width: var(--ring); height: var(--ring); flex-shrink: 0; }
.vd-ring { display: block; }
.vd-ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.vd-ring .track { stroke: var(--field); }
.vd-ring .bar { transition: stroke-dasharray 0.6s var(--ease); }
.vd-ring-center { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.vd-goal-form .vd-target-row, .vd-review-targets .vd-target-row { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; }
.vd-field-hint { font-size: 12px; }
@media (max-width: 760px) { .vd-vision-cols { grid-template-columns: 1fr; } }

/* Logbook */
.vd-view.v-logbook { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 20px; }
.vd-logbook { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vd-log-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.vd-log-cal { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.vd-log-head, .vd-log-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.vd-log-head { border-bottom: 0.5px solid var(--border); }
.vd-log-dayhead { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 4px; font-size: 12px; color: var(--muted); }
.vd-log-dayhead b { font-size: 18px; color: var(--fg); font-weight: 600; }
.vd-log-dayhead.today b { color: #fff; background: var(--danger); border-radius: 999px; min-width: 28px; text-align: center; }
.vd-log-dayhead .subtle { min-height: 15px; font-variant-numeric: tabular-nums; }
.vd-log-scroll { flex: 1; min-height: 0; overflow: auto; }
.vd-log-gutter { position: relative; }
.vd-log-hour { height: 44px; padding-right: 8px; text-align: right; font-size: 11px; color: var(--muted); transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.vd-log-col { position: relative; height: calc(24 * 44px); border-left: 0.5px solid var(--border); background: repeating-linear-gradient(to bottom, transparent 0 43px, var(--gridline) 43px 44px); cursor: cell; }
.vd-log-col.today { background-color: color-mix(in srgb, var(--accent) 3%, transparent); }
.vd-log-event { position: absolute; left: 3px; right: 3px; display: flex; gap: 4px; align-items: flex-start; padding: 3px 5px; border-radius: 6px; font-size: 11px; color: var(--muted); border: 1px dashed var(--edge); background: color-mix(in srgb, var(--card) 60%, transparent); overflow: hidden; pointer-events: none; z-index: 1; }
.vd-log-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-log-block {
  position: absolute; left: 6px; right: 3px; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: 3px 6px 3px 8px; overflow: hidden; cursor: pointer;
  border-radius: 6px; background: color-mix(in srgb, var(--goal) 20%, var(--card)); box-shadow: inset 3px 0 0 var(--goal), inset 0 0 0 0.5px color-mix(in srgb, var(--goal) 40%, transparent);
  font-size: 11.5px; line-height: 1.25;
}
.vd-log-block:hover { background: color-mix(in srgb, var(--goal) 28%, var(--card)); }
.vd-log-block.other { background: color-mix(in srgb, var(--fg) 7%, var(--card)); }
.vd-log-block.live { box-shadow: inset 3px 0 0 var(--goal), inset 0 0 0 1.5px var(--goal); }
.vd-log-block.short { flex-direction: row; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.vd-log-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-log-time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-log-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.vd-log-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.vd-log-done { display: flex; flex-direction: column; gap: 6px; overflow: auto; min-height: 0; }
.vd-log-done h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 4px; font-size: 14px; }
.vd-log-done h3 svg { color: var(--on); }
.vd-log-done-day { margin: 10px 0 2px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
@media (max-width: 1000px) { .vd-log-wrap { grid-template-columns: 1fr; } .vd-view.v-logbook { overflow: auto; display: block; } .vd-log-cal { height: 70vh; } }

/* Review */
.vd-review-sec { min-width: 0; }
.vd-review-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.vd-review-goal { display: flex; align-items: center; gap: 14px; }
.vd-review-goal .vd-col.tight { white-space: normal; }
.vd-review-goal .vd-col.tight > * { white-space: normal; }
.vd-day-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 200px; }
.vd-day-bar-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; min-height: 0; }
.vd-day-bar-wrap > .subtle { font-size: 11px; min-height: 14px; font-variant-numeric: tabular-nums; }
.vd-day-bar { flex: 1; width: min(42px, 100%); display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 8px; background: var(--field); overflow: hidden; }
.vd-day-bar i { display: block; width: 100%; min-height: 2px; }
.vd-review-qs { display: flex; flex-direction: column; gap: 16px; }
.vd-review-qs textarea { resize: none; min-height: 72px; font-size: 14.5px; line-height: 1.45; }
.vd-review-answer { margin: 0; white-space: pre-wrap; font-size: 14.5px; line-height: 1.5; }
.vd-review-targets { display: flex; flex-direction: column; gap: 2px; }
.vd-review-actions { gap: 10px; }
.vd-review-actions > .subtle { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.vd-review-card { display: flex; flex-direction: column; gap: 10px; max-width: 460px; margin-top: 4px; padding: 14px; border-radius: var(--r-card); background: var(--card); box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow); cursor: pointer; }
.vd-review-card:hover { box-shadow: inset 0 0 0 0.5px var(--border), var(--note-shadow-lift); }
.vd-review-card .vd-st-head > svg { color: var(--important); }
.vd-review-card-goals { display: flex; flex-direction: column; gap: 6px; }
.vd-rc-goal { display: grid; grid-template-columns: 10px minmax(0, 1fr) 90px auto; align-items: center; gap: 8px; font-size: 13px; }
.vd-rc-goal .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-rc-goal .subtle { font-size: 12px; font-variant-numeric: tabular-nums; }
.vd-rc-bar { height: 6px; border-radius: 3px; background: var(--field); overflow: hidden; }
.vd-rc-bar i { display: block; height: 100%; border-radius: 3px; }
.vd-rc-q .subtle { font-size: 12px; }
.vd-rc-q p { margin: 2px 0 0; font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vd-review-card .vd-link-btn { align-self: flex-start; }
@media (max-width: 600px) {
  .vd-focus-date, .vd-hide-sm { display: none; }
  .vd-focus-card { padding: 20px 18px 12px; }
  .vd-focus-timer { flex-wrap: wrap; }
  .vd-focus-timer > .vd-grow { display: none; }
  .vd-focus-timer > .vd-col { flex: 1; }
  .vd-complete { width: 100%; }
  .vd-focus-actions .vd-btn { padding: 0 8px; }
  .vd-day-bars { gap: 4px; }
}
.vd-pw-hint { margin: -4px 0 2px; font-size: 12.5px; }
.vd-auth-form .vd-input[readonly] { color: var(--muted); }
