/* ===== VIDEO STUDIO tab — public/js/video-studio.js (docs/VIDEO_STUDIO.md §11) =====
   The board (five columns, cards grouped by project), the Projects lens, the
   dialogs that share #vsModal, the activity drawer, the bulk bar, the Download
   all progress toast and the host of the full-screen review (#vsOverlay; the
   review panel's own rules are .vr-* in video-review.css).

   Every colour is a :root token, so dark and light follow index.css. Coloured
   TEXT uses the -txt tokens (measured for contrast on these surfaces); tints are
   color-mix()es of the theme's own hue, never a hex of their own. The segmented
   toggles borrow .pipeline-density-toggle/.density-btn and the buttons .btn from
   index.css, so the tab reads like the rest of the dashboard. */

.vs-page {
  max-width: 1680px;
  margin: 0 auto;
  padding: var(--s4) var(--s5) 120px;
  color: var(--text);
}
.vs-page .btn,
.vs-modal .btn,
.vs-ptoast .btn {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.vs-page [hidden],
.vs-modal [hidden] {
  display: none !important;
}

/* ── shared bits ───────────────────────────────────────────────────────────── */
.vs-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.vs-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.vs-offscreen {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.vs-muted {
  color: var(--text3);
  font-size: var(--fz-sm);
}
.vs-hint {
  color: var(--text3);
  font-size: var(--fz-sm);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vs-strong {
  font-weight: var(--fw-semibold);
  color: var(--text);
}
.vs-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.vs-nowrap {
  white-space: nowrap;
}
.vs-error,
.vs-field-error {
  color: var(--red-txt);
  font-size: var(--fz-sm);
  margin-top: 6px;
}
.vs-ok-text {
  color: var(--green-txt);
  font-size: var(--fz-sm);
}
.vs-linkbtn {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent-txt);
  font: inherit;
  font-size: var(--fz-sm);
  cursor: pointer;
  text-align: left;
}
.vs-linkbtn:hover {
  text-decoration: underline;
}
.vs-linkbtn.vs-strong {
  color: var(--text);
  font-size: var(--fz-base);
}
.vs-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: var(--r2);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition:
    background var(--tr-fast),
    color var(--tr-fast),
    border-color var(--tr-fast);
}
.vs-iconbtn:hover {
  background: var(--chip);
  color: var(--text);
}
.vs-iconbtn[aria-expanded='true'] {
  background: var(--chip);
  border-color: var(--border2);
  color: var(--text);
}
.vs-linkbtn:focus-visible,
.vs-iconbtn:focus-visible,
.vs-tool:focus-visible,
.vs-pill:focus-visible,
.vs-chip-skill:focus-visible,
.vs-card-title:focus-visible,
.vs-group-toggle:focus-visible,
.vs-menu-item:focus-visible,
.vs-pop-opt:focus-visible,
.vs-snav-btn:focus-visible,
.vs-drop:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.vs-btn-primary {
  background: var(--accent);
  color: #fff;
}
.vs-btn-approve {
  background: var(--green);
  color: #fff;
}
.btn-ghost.vs-btn-danger {
  color: var(--red-txt);
}
.btn-ghost.vs-btn-danger:hover {
  border-color: var(--red);
}
.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}
.vs-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  animation: vs-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes vs-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── header ────────────────────────────────────────────────────────────────── */
.vs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 16px;
}
.vs-titles h2 {
  margin: 0;
  font-size: 20px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.vs-sub {
  margin: 2px 0 0;
  color: var(--text3);
  font-size: var(--fz-base);
}
.vs-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.vs-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--pill);
  color: var(--text2);
  font: inherit;
  font-size: var(--fz-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text3);
  flex-shrink: 0;
}
.vs-pill.is-ok {
  color: var(--green-txt);
  background: color-mix(in srgb, var(--green) 10%, var(--card));
  border-color: color-mix(in srgb, var(--green) 30%, var(--border));
}
.vs-pill.is-ok .vs-pill-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent);
  animation: vs-breathe 2.4s ease-in-out infinite;
}
.vs-pill.is-warn {
  color: var(--gold-txt);
  background: color-mix(in srgb, var(--gold) 10%, var(--card));
  border-color: color-mix(in srgb, var(--gold) 35%, var(--border));
}
.vs-pill.is-warn .vs-pill-dot {
  background: var(--gold);
}
.vs-pill.is-bad {
  color: var(--red-txt);
  background: color-mix(in srgb, var(--red) 9%, var(--card));
  border-color: color-mix(in srgb, var(--red) 30%, var(--border));
}
.vs-pill.is-bad .vs-pill-dot {
  background: var(--red);
}
@keyframes vs-breathe {
  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 12%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .vs-pill.is-ok .vs-pill-dot,
  .vs-bar.is-indeterminate .vs-bar-fill,
  .vs-spinner {
    animation: none;
  }
}
.vs-chip-skill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text2);
  font: inherit;
  font-size: var(--fz-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-chip-skill:hover {
  border-color: var(--border3);
  color: var(--text);
}
.vs-chip-skill.is-missing {
  color: var(--gold-txt);
  border-color: color-mix(in srgb, var(--gold) 40%, var(--border));
  background: color-mix(in srgb, var(--gold) 8%, var(--card));
}
.vs-chip-skill.is-loading {
  cursor: default;
  color: var(--text3);
}

/* ── the readiness banner ──────────────────────────────────────────────────── */
.vs-banner {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r4);
  background: color-mix(in srgb, var(--accent) 5%, var(--card));
  box-shadow: var(--shadow-sm);
}
.vs-banner.is-warn {
  border-left-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 6%, var(--card));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.vs-banner-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.vs-banner-ico {
  color: var(--accent-txt);
  margin-top: 1px;
}
.vs-banner.is-warn .vs-banner-ico {
  color: var(--gold-txt);
}
.vs-banner-ico .vs-ico {
  width: 20px;
  height: 20px;
}
.vs-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fz-base);
}
.vs-banner-text span {
  color: var(--text2);
}
.vs-steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}
.vs-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r3);
  background: var(--card);
  border: 1px solid var(--border);
}
.vs-step-ico {
  color: var(--text3);
  margin-top: 1px;
}
.vs-step.is-ok .vs-step-ico {
  color: var(--green-txt);
}
.vs-step.is-warn .vs-step-ico {
  color: var(--gold-txt);
}
.vs-step-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fz-sm);
}
.vs-step-text strong {
  font-size: var(--fz-base);
}
.vs-step-text span {
  color: var(--text2);
  line-height: 1.45;
}
.vs-step .btn {
  align-self: center;
}

/* ── the toolbar ───────────────────────────────────────────────────────────── */
.vs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.vs-filter {
  position: relative;
}
.vs-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text2);
  font: inherit;
  font-size: var(--fz-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  white-space: nowrap;
}
.vs-tool:hover {
  color: var(--text);
  border-color: var(--border3);
}
.vs-tool.is-on {
  color: var(--accent-txt);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 9%, var(--card));
}
.vs-ico-down {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
}
.vs-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text3);
  flex: 1 1 200px;
  max-width: 320px;
}
.vs-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.vs-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fz-base);
  box-shadow: none;
}
.vs-search input:focus {
  box-shadow: none;
}
.vs-lens .density-btn {
  padding: 5px 12px;
}
.vs-focus-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 10px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
  color: var(--accent-txt);
  font-size: var(--fz-sm);
  font-weight: var(--fw-semibold);
  max-width: 100%;
}
.vs-focus-chip .vs-iconbtn {
  width: 24px;
  height: 24px;
  color: inherit;
}
.vs-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: var(--z-popover);
  width: 280px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border-radius: var(--r4);
  border: 1px solid var(--border2);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}
.vs-pop-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 34px;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text3);
}
.vs-pop-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
  box-shadow: none;
}
.vs-pop-list {
  margin-top: 6px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.vs-pop-opt {
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fz-base);
  padding: 7px 10px;
  border-radius: var(--r2);
  cursor: pointer;
}
.vs-pop-opt:hover {
  background: var(--chip);
}
.vs-pop-opt.is-on {
  color: var(--accent-txt);
  font-weight: var(--fw-semibold);
}
.vs-pop-empty {
  padding: 8px 10px;
}

/* ── notices and state cards ───────────────────────────────────────────────── */
.vs-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: var(--r3);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--border));
  background: color-mix(in srgb, var(--gold) 7%, var(--card));
  color: var(--gold-txt);
  font-size: var(--fz-sm);
}
.vs-notice span {
  flex: 1;
  min-width: 200px;
  color: var(--text2);
}
.vs-state-card {
  max-width: 720px;
  margin: 32px auto;
  padding: 32px 28px;
  text-align: center;
  border-radius: var(--r6);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.vs-state-card.is-compact {
  margin: 8px 0 16px;
  padding: 18px;
}
.vs-state-card h3 {
  margin: 10px 0 6px;
  font-size: var(--fz-lg);
  font-weight: var(--fw-bold);
}
.vs-state-card p {
  color: var(--text2);
  margin: 0 0 14px;
}
.vs-state-card.is-error .vs-state-ico {
  color: var(--red-txt);
  background: color-mix(in srgb, var(--red) 10%, var(--card));
}
.vs-state-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--text2);
}
.vs-state-ico .vs-ico {
  width: 22px;
  height: 22px;
}
.vs-state-card .vs-steps {
  text-align: left;
  margin-bottom: 16px;
}
.vs-explainer {
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  text-align: left;
}
.vs-explainer li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: var(--r4);
  background: var(--bg2);
  border: 1px solid var(--border);
  font-size: var(--fz-sm);
  color: var(--text2);
}
.vs-explainer strong {
  color: var(--text);
  font-size: var(--fz-base);
}
.vs-explainer-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
  color: var(--accent-txt);
  font-weight: var(--fw-bold);
  font-size: 12px;
}

/* ── the board ─────────────────────────────────────────────────────────────── */
.vs-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(250px, 1fr));
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.vs-col {
  min-width: 0;
  border-radius: var(--r5);
  background: var(--bg2);
  border: 1px solid var(--border);
}
.vs-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 8px;
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
}
.vs-count {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--pill);
  color: var(--text3);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.vs-col-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 8px 10px;
}
.vs-col-empty {
  margin: 4px 4px 8px;
  color: var(--text3);
  font-size: var(--fz-sm);
}
.vs-older {
  margin: 2px 4px;
  align-self: flex-start;
}

/* project groups inside a column */
.vs-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vs-group-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 2px 2px 0;
}
.vs-group-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 2px;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: var(--r1);
}
.vs-ico-caret {
  width: 14px;
  height: 14px;
  color: var(--text3);
  transform: rotate(90deg);
  transition: transform var(--tr-fast);
}
.vs-group.is-collapsed .vs-ico-caret {
  transform: rotate(0deg);
}
.vs-group-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.vs-group-client {
  font-size: 11px;
  color: var(--text3);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-group-name {
  font-size: var(--fz-sm);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vs-group-meta {
  font-size: 11px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vs-group-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.vs-group-actions .btn {
  padding: 3px 8px;
  font-size: 11px;
}
.vs-group-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* cards */
.vs-card {
  position: relative;
  border-radius: var(--r4);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--tr-fast),
    box-shadow var(--tr-fast),
    transform var(--tr-fast);
}
.vs-vcard {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  cursor: pointer;
}
.vs-vcard:hover {
  border-color: var(--border3);
  box-shadow: var(--shadow-md);
}
.vs-card.is-failed {
  border-color: color-mix(in srgb, var(--red) 45%, var(--border));
  background: color-mix(in srgb, var(--red) 4%, var(--card));
}
.vs-card.is-ready {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.vs-card.is-selected {
  border-color: var(--accent);
  background: var(--board-card-sel);
  box-shadow: 0 0 0 1px var(--accent);
}
.vs-board.is-selecting .vs-vcard:hover {
  border-style: dashed;
  border-color: var(--accent);
}
.vs-card-media {
  position: relative;
  width: 62px;
  aspect-ratio: 9 / 16;
  border-radius: var(--r2);
  overflow: hidden;
  background: var(--chip);
}
.vs-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vs-poster-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  border-radius: 0;
}
.vs-badges {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.vs-badge {
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.66);
  color: var(--on-scrim);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  line-height: 15px;
  font-variant-numeric: tabular-nums;
}
.vs-badge.is-version {
  background: color-mix(in srgb, var(--accent) 80%, black);
}
.vs-check {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--on-scrim);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vs-check.is-on {
  background: var(--accent);
  border-color: var(--accent);
}
.vs-check .vs-ico {
  width: 13px;
  height: 13px;
}
.vs-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.vs-card-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.vs-card-title {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 0;
  color: var(--text);
  font: inherit;
  font-size: var(--fz-base);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  border-radius: var(--r1);
}
.vs-card-top .vs-more {
  width: 26px;
  height: 26px;
  margin: -3px -3px 0 0;
}
.vs-state {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-size: var(--fz-sm);
  color: var(--text2);
  line-height: 1.35;
}
.vs-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--text3);
  flex-shrink: 0;
}
.vs-state.is-working .vs-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.vs-state.is-delivering .vs-dot {
  background: var(--purple);
}
.vs-state.is-ready {
  color: var(--accent-txt);
  font-weight: var(--fw-semibold);
}
.vs-state.is-ready .vs-dot {
  background: var(--accent);
}
.vs-state.is-done .vs-dot {
  background: var(--green);
}
.vs-state.is-done {
  color: var(--green-txt);
}
.vs-state.is-failed {
  color: var(--red-txt);
}
.vs-state.is-failed .vs-dot {
  background: var(--red);
}
.vs-card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text3);
}
.vs-eta {
  font-variant-numeric: tabular-nums;
}
.vs-activity {
  margin: 0;
  font-size: 11px;
  color: var(--text3);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.vs-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 1px 5px;
  border-radius: 20px;
  background: var(--chip);
  color: var(--text2);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  text-decoration: none;
  line-height: 18px;
  white-space: nowrap;
}
.vs-chip .vs-ico {
  width: 12px;
  height: 12px;
}
.vs-chip.is-good {
  color: var(--green-txt);
  background: color-mix(in srgb, var(--green) 12%, var(--card));
}
.vs-chip.is-warn {
  color: var(--gold-txt);
  background: color-mix(in srgb, var(--gold) 13%, var(--card));
}
/* Handed to Your review under the pass mark: outlined, so it reads as "read the AI notes first". */
.vs-chip.is-below {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 60%, transparent);
}
a.vs-chip:hover {
  text-decoration: underline;
}
.vs-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.vs-card-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
}

/* the project card (Footage) */
.vs-pcard {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.vs-pcard-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.vs-pcard-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r2);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
  color: var(--accent-txt);
  flex-shrink: 0;
}
.vs-pcard.is-failed .vs-pcard-ico {
  background: color-mix(in srgb, var(--red) 12%, var(--card));
  color: var(--red-txt);
}
.vs-pcard-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.vs-card-client {
  font-size: 11px;
  color: var(--text3);
  font-weight: var(--fw-semibold);
}
.vs-card-name {
  font-size: var(--fz-base);
  font-weight: var(--fw-semibold);
  overflow-wrap: anywhere;
}
.vs-pcard-footage {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: var(--fz-sm);
  color: var(--text2);
}

/* progress */
.vs-bar {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: var(--track);
  overflow: hidden;
}
.vs-bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--purple)));
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.vs-bar.is-indeterminate .vs-bar-fill {
  width: 35%;
  animation: vs-slide 1.4s ease-in-out infinite;
}
@keyframes vs-slide {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(310%);
  }
}

/* menus */
.vs-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: var(--z-popover);
  min-width: 210px;
  padding: 6px;
  border-radius: var(--r4);
  border: 1px solid var(--border2);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.vs-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  border-radius: var(--r2);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fz-base);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.vs-menu-item .vs-ico {
  color: var(--text3);
}
.vs-menu-item:hover {
  background: var(--chip);
}
.vs-menu-item.is-danger {
  color: var(--red-txt);
}
.vs-menu-item.is-danger .vs-ico {
  color: var(--red-txt);
}

/* skeleton */
.vs-board.is-loading .vs-col-body {
  padding-top: 2px;
}
.vs-sk-card {
  padding: 10px;
  border-radius: var(--r4);
  background: var(--card);
  border: 1px solid var(--border);
}
.vs-sk-media {
  height: 74px;
  margin-bottom: 10px;
  border-radius: var(--r2);
}
.vs-sk-short {
  width: 60%;
}

/* ── the Projects lens ─────────────────────────────────────────────────────── */
.vs-table-wrap {
  overflow-x: auto;
  border-radius: var(--r5);
  border: 1px solid var(--border);
  background: var(--card);
}
.vs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fz-base);
}
.vs-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.vs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.vs-table tbody tr:last-child td {
  border-bottom: none;
}
.vs-table tbody tr:hover td {
  background: var(--card-hover);
}
.vs-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.vs-actions-cell {
  position: relative;
  white-space: nowrap;
  text-align: right;
}
.vs-actions-cell .btn {
  padding: 3px 10px;
  font-size: 12px;
  vertical-align: middle;
}
.vs-actions-cell .vs-iconbtn {
  vertical-align: middle;
}
.vs-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--chip);
  color: var(--text2);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.vs-status.is-analyzing,
.vs-status.is-editing {
  color: var(--accent-txt);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}
.vs-status.is-review {
  color: var(--gold-txt);
  background: color-mix(in srgb, var(--gold) 13%, var(--card));
}
.vs-status.is-done {
  color: var(--green-txt);
  background: color-mix(in srgb, var(--green) 12%, var(--card));
}
.vs-status.is-failed {
  color: var(--red-txt);
  background: color-mix(in srgb, var(--red) 11%, var(--card));
}
/* Why the planning failed — under the pill, which may already read Editing
   again for a project whose "Make more videos" failed. */
.vs-status-note {
  display: block;
  max-width: 280px;
  margin-top: 4px;
  color: var(--red-txt);
  font-size: 11.5px;
  line-height: 1.35;
  white-space: normal;
}
.vs-stages {
  white-space: nowrap;
}
.vs-stagecount {
  display: inline-block;
  min-width: 22px;
  margin-right: 3px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--chip);
  color: var(--text2);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.vs-stagecount.is-zero {
  color: var(--text3);
  background: transparent;
}
.vs-stagecount.is-editing,
.vs-stagecount.is-ai {
  color: var(--accent-txt);
  background: color-mix(in srgb, var(--accent) 11%, var(--card));
}
.vs-stagecount.is-ready {
  color: var(--gold-txt);
  background: color-mix(in srgb, var(--gold) 13%, var(--card));
}
.vs-stagecount.is-done {
  color: var(--green-txt);
  background: color-mix(in srgb, var(--green) 12%, var(--card));
}

/* ── select mode ───────────────────────────────────────────────────────────── */
.vs-bulk {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: var(--z-popover);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: var(--r5);
  border: 1px solid var(--border2);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}
.vs-bulk-count {
  font-size: var(--fz-base);
  font-weight: var(--fw-semibold);
}
.vs-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── the activity drawer ───────────────────────────────────────────────────── */
.vs-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: calc(var(--z-modal) - 10);
  width: min(440px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-left: 1px solid var(--border2);
  box-shadow: var(--shadow-lg);
  animation: vs-drawer-in 0.18s ease;
}
@keyframes vs-drawer-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}
.vs-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.vs-drawer-head h3 {
  margin: 2px 0 0;
  font-size: var(--fz-lg);
  font-weight: var(--fw-bold);
}
.vs-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--fz-base);
}
.vs-drawer-body h4 {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
}
.vs-drawer-body p {
  margin: 0;
}
.vs-details summary {
  cursor: pointer;
  color: var(--text2);
  font-size: var(--fz-sm);
  font-weight: var(--fw-semibold);
}
.vs-pre {
  white-space: pre-wrap;
  margin-top: 6px;
  color: var(--text2);
}
.vs-clips,
.vs-files {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fz-sm);
  max-height: 240px;
  overflow-y: auto;
}
.vs-files li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--border);
}
.vs-files li .vs-mono {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vs-files li.is-blocked .vs-mono {
  color: var(--text3);
  text-decoration: line-through;
}
.vs-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vs-event {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-left: 10px;
  border-left: 2px solid var(--border2);
  font-size: var(--fz-sm);
  color: var(--text2);
}
.vs-event.is-error {
  border-left-color: var(--red);
  color: var(--red-txt);
}
.vs-event.is-stage {
  border-left-color: var(--accent);
}
.vs-event time {
  color: var(--text3);
  white-space: nowrap;
  font-size: 11px;
}

/* ── the dialogs (#vsModal) ────────────────────────────────────────────────── */
.vs-modal {
  max-width: 640px;
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vs-modal.vs-modal-wide {
  max-width: 900px;
}
.vs-modal .modal-close {
  width: 36px;
  height: 36px;
}
.vs-modal-title {
  margin: 0 44px 4px 0 !important;
  font-size: var(--fz-xl) !important;
}
.vs-modal-sub {
  margin: 0 0 16px;
  color: var(--text2);
  font-size: var(--fz-base);
  line-height: 1.5;
}
.vs-modal-scroll {
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
  margin-right: -4px;
}
.vs-modal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}
.vs-modal-foot > .btn:first-child:last-child {
  margin-left: auto;
}
.vs-foot-buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.vs-foot-notes {
  flex: 1 1 260px;
  min-width: 0;
}
.vs-blockers {
  margin: 0;
  padding-left: 18px;
  color: var(--text3);
  font-size: var(--fz-sm);
}
.vs-h3 {
  margin: 18px 0 8px;
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
}
.vs-h3:first-child {
  margin-top: 0;
}
.vs-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vs-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vs-field > label,
.vs-label {
  font-size: var(--fz-sm);
  font-weight: var(--fw-semibold);
  color: var(--text2);
}
.vs-field input[type='text'],
.vs-field input[type='url'],
.vs-field input[type='number'],
.vs-field select,
.vs-field textarea,
.vs-linkbox input,
.vs-num-input {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--r3);
  border: 1.5px solid var(--border2);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: var(--fz-md);
}
.vs-field textarea {
  resize: vertical;
  line-height: 1.5;
}
.vs-field textarea.vs-mono {
  font-size: 12px;
  line-height: 1.55;
}
.vs-field [aria-invalid='true'] {
  border-color: var(--red);
}
.vs-field input:disabled,
.vs-field select:disabled,
.vs-field textarea:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.vs-seg-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.vs-seg {
  flex-wrap: wrap;
  max-width: 100%;
}
.vs-num-input {
  width: 90px !important;
}
.vs-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fz-base);
  cursor: pointer;
}
.vs-check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.vs-skill-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text3);
  font-size: var(--fz-sm);
}
.vs-task-line {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.vs-task-line .vs-hint {
  flex-basis: 100%;
  margin-top: 0;
}
.vs-task-text {
  font-size: var(--fz-base);
}
.vs-task-line select {
  flex-basis: 100%;
}

/* the client combobox */
.vs-combo {
  position: relative;
}
.vs-combo input {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--r3);
  border: 1.5px solid var(--border2);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: var(--fz-md);
}
.vs-combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 5;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  border-radius: var(--r4);
  border: 1px solid var(--border2);
  background: var(--card);
  box-shadow: var(--shadow-lg);
}
.vs-combo-opt {
  padding: 7px 10px;
  border-radius: var(--r2);
  cursor: pointer;
  font-size: var(--fz-base);
}
.vs-combo-opt:hover,
.vs-combo-opt.is-active {
  background: var(--chip);
}
.vs-combo-opt.is-on {
  color: var(--accent-txt);
  font-weight: var(--fw-semibold);
}
.vs-combo-empty {
  padding: 8px 10px;
  color: var(--text3);
  font-size: var(--fz-sm);
}

/* the Drive inspection */
.vs-inspect {
  margin-top: 4px;
  padding: 12px;
  border-radius: var(--r4);
  border: 1px solid var(--border);
  background: var(--bg2);
  font-size: var(--fz-base);
}
.vs-inspect.is-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text2);
}
.vs-inspect.is-error {
  display: flex;
  gap: 8px;
  color: var(--red-txt);
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
  background: color-mix(in srgb, var(--red) 5%, var(--card));
}
.vs-inspect.is-error p {
  margin: 0;
  color: var(--text);
}
.vs-inspect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.vs-inspect-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vs-inspect-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r2);
  background: color-mix(in srgb, var(--green) 13%, var(--card));
  color: var(--green-txt);
  flex-shrink: 0;
}
.vs-inspect-titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.vs-inspect-titles a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.vs-inspect-titles a:hover {
  text-decoration: underline;
}
.vs-inspect-titles a .vs-ico {
  width: 12px;
  height: 12px;
  color: var(--text3);
}
.vs-inspect-counts {
  margin: 8px 0 0;
  color: var(--text2);
  font-size: var(--fz-sm);
}
.vs-inspect-warn {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 0;
  color: var(--gold-txt);
  font-size: var(--fz-sm);
}
.vs-inspect .vs-details {
  margin-top: 8px;
}
.vs-dest {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text2);
  font-size: var(--fz-sm);
}

/* switches (review link, settings) */
.vs-switches {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r4);
  margin: 12px 0;
}
.vs-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.vs-switches .vs-switch-row:last-child {
  border-bottom: none;
}
.vs-sbody > .vs-switch-row {
  border: 1px solid var(--border);
  border-radius: var(--r4);
  margin-bottom: 12px;
}
.vs-switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: var(--fz-base);
}
.vs-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 20px;
  background: var(--border3);
  cursor: pointer;
  transition: background var(--tr-fast);
}
.vs-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--tr-fast);
}
.vs-switch:checked {
  background: var(--accent);
}
.vs-switch:checked::after {
  transform: translateX(16px);
}
.vs-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.vs-switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* the review link */
.vs-linkbox {
  display: flex;
  gap: 8px;
}
.vs-linkbox input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px !important;
}
.vs-views {
  margin: 6px 0 0;
}

/* the 720p-preview sheet */
.vs-sheet-list {
  margin: 4px 0 14px;
  padding-left: 20px;
  font-size: var(--fz-base);
}

/* the Skill panel */
.vs-skill-card {
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--r4);
  border: 1px solid var(--border);
  background: var(--card);
}
.vs-skill-card.is-active {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  background: color-mix(in srgb, var(--green) 4%, var(--card));
}
.vs-skill-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.vs-skill-ver {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--chip);
  color: var(--text2);
  font-size: 12px;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.vs-skill-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vs-skill-meta,
.vs-skill-notes {
  margin: 8px 0 0;
  font-size: var(--fz-sm);
  color: var(--text3);
}
.vs-skill-notes {
  color: var(--text2);
  white-space: pre-wrap;
}
.vs-skill-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.vs-skill-md {
  margin: 10px 0 0;
  padding: 12px;
  max-height: 320px;
  overflow: auto;
  border-radius: var(--r3);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.vs-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 18px;
  text-align: center;
  border-radius: var(--r5);
  border: 2px dashed var(--border2);
  background: var(--bg2);
  color: var(--text2);
  transition:
    border-color var(--tr-fast),
    background var(--tr-fast);
}
.vs-drop p {
  margin: 0;
  font-size: var(--fz-base);
}
.vs-drop.is-over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
}
.vs-drop-ico {
  width: 26px;
  height: 26px;
  color: var(--text3);
}
.vs-drop-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.vs-drop-actions label {
  cursor: pointer;
}
.vs-prepared {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--r4);
  border: 1px solid var(--border);
  background: var(--bg2);
}
.vs-prepared.is-error {
  border-color: color-mix(in srgb, var(--red) 40%, var(--border));
}
.vs-prepared > p {
  margin: 8px 0 0;
  color: var(--text2);
  font-size: var(--fz-sm);
}
.vs-errors,
.vs-warnings {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: var(--fz-sm);
}
.vs-errors {
  color: var(--red-txt);
}
.vs-warnings {
  color: var(--gold-txt);
}
.vs-upload {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Settings */
.vs-settings {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  min-height: 0;
  flex: 1;
}
.vs-snav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vs-snav-btn {
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-radius: var(--r2);
  background: transparent;
  color: var(--text2);
  font: inherit;
  font-size: var(--fz-base);
  font-weight: var(--fw-medium);
  cursor: pointer;
}
.vs-snav-btn:hover {
  background: var(--chip);
  color: var(--text);
}
.vs-snav-btn.is-on {
  background: color-mix(in srgb, var(--accent) 11%, var(--card));
  color: var(--accent-txt);
  font-weight: var(--fw-semibold);
}
.vs-sbody {
  max-height: min(62vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vs-sbody .vs-field {
  max-width: 520px;
}
.vs-sbody .vs-field.vs-prompt {
  max-width: none;
}
.vs-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0;
  font-size: var(--fz-base);
}
.vs-facts dt {
  color: var(--text3);
}
.vs-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.vs-setup {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--fz-base);
  line-height: 1.5;
}
.vs-setup code,
.vs-sbody code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--chip);
}
.vs-cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  padding: 6px 6px 6px 10px;
  border-radius: var(--r3);
  background: var(--bg);
  border: 1px solid var(--border);
}
.vs-cmd code {
  flex: 1;
  min-width: 0;
  background: none !important;
  padding: 0 !important;
  overflow-x: auto;
  white-space: nowrap;
}
.vs-drive-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r4);
  border: 1px solid var(--border);
  background: var(--card);
}
.vs-drive-card > div {
  flex: 1;
  min-width: 0;
}
.vs-drive-card p {
  margin: 4px 0 0;
}
.vs-drive-card.is-error {
  border-color: color-mix(in srgb, var(--red) 40%, var(--border));
}
.vs-drive-card.is-empty {
  background: var(--bg2);
}
.vs-drive-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r2);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
  color: var(--accent-txt);
  flex-shrink: 0;
}
.vs-drive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vs-sbody a {
  color: var(--accent-txt);
}
.vs-meter-label {
  font-size: var(--fz-base);
  color: var(--text2);
}
.vs-meter-label strong {
  color: var(--text);
}
.vs-sbody > .vs-bar {
  height: 8px;
  border-radius: 4px;
  max-width: 520px;
}
.vs-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vs-prompt-head label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fz-sm);
  font-weight: var(--fw-semibold);
  color: var(--text2);
}

/* ── the Download all progress toast ───────────────────────────────────────── */
.vs-ptoast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-toast);
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r4);
  border: 1px solid var(--border2);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.vs-ptoast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fz-base);
  min-width: 0;
}
.vs-ptoast-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vs-ptoast-text span {
  color: var(--text3);
  font-size: var(--fz-sm);
  font-variant-numeric: tabular-nums;
}
.vs-ptoast .btn {
  align-self: flex-end;
}

/* ── the review overlay host (#vsOverlay) ──────────────────────────────────── */
.vs-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) - 5);
  background: var(--bg);
  color: var(--text);
  overflow: auto;
}
.vs-overlay[hidden] {
  display: none;
}
body.vs-overlay-open {
  overflow: hidden;
}
.vs-overlay-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text2);
}
.vs-overlay-error {
  margin-top: 12vh;
}

/* ── narrow screens ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .vs-board {
    grid-template-columns: repeat(5, minmax(240px, 280px));
  }
}
@media (max-width: 760px) {
  .vs-page {
    padding: var(--s3) var(--s4) 140px;
  }
  .vs-head-actions {
    margin-left: 0;
    width: 100%;
  }
  .vs-board {
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
  }
  .vs-search {
    max-width: none;
    flex-basis: 100%;
  }
  .vs-settings {
    grid-template-columns: minmax(0, 1fr);
  }
  .vs-snav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .vs-sbody {
    max-height: none;
  }
  .vs-modal {
    padding: 18px 16px 16px;
  }
  .vs-bulk {
    left: 16px;
    right: 16px;
    transform: none;
    bottom: 12px;
  }
  .vs-chip-skill {
    max-width: 100%;
  }
  .vs-pill {
    white-space: normal;
  }
}
