/* App shell — the authenticated workspace chrome (sidebar + topbar + card system).
   Design: the "definitive" identity (cream paper, deep teal, amber/coral accents)
   applied to the app suite. Loads after app.css and re-skins its widget classes by
   overriding the Ink & Amber variables inside the shell scope, so profile/history
   widgets (.btn, .notice, .progress-wrap, tables) pick up the palette for free. */

body.vw-app {
  --bg: #fbf7ed;
  --bg-tint: #f5efe3;
  --surface: #fffefa;
  --surface-2: #f5efe3;
  --text: #062225;
  --muted: #53676a;
  --border: #e4ddc9;
  --border-strong: #cdc6b2;
  --accent: #075d62;
  --accent-2: #1e918a;
  --accent-dark: #075d62;
  --accent-soft: #d9eeea;
  --accent-soft-border: #bcdcd5;
  --on-accent: #ffffff;
  --accent-grad: linear-gradient(#087178, #00525a);
  --cta-grad: linear-gradient(#087178, #00525a);
  --cta-glow: 0 7px 14px rgba(0, 69, 74, .18);
  --watch-ink: #d04322;
  --watch-ink-hover: #b53517;
  --on-watch-ink: #ffffff;
  --code-bg: #f1ece0;
  --aura-1: transparent;
  --aura-2: transparent;
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(9, 45, 47, .04), 0 8px 24px -12px rgba(9, 45, 47, .12);
  --shadow-lg: 0 2px 4px rgba(9, 45, 47, .05), 0 18px 45px -14px rgba(9, 45, 47, .16);
  --ring: 0 0 0 3px rgba(30, 145, 138, .25);
  /* Shell-only tokens */
  --vw-side-bg: #062c33;
  --vw-side-bg2: #06343b;
  --vw-side-line: rgba(255, 255, 255, .12);
  --vw-side-dim: rgba(239, 249, 247, .88);
  --vw-side-w: 203px;
  /* The rail column is painted on the body so the dark stripe continues even
     when the page is taller than the sticky (100vh) sidebar element. */
  background: linear-gradient(90deg, var(--vw-side-bg) 0, var(--vw-side-bg) var(--vw-side-w), var(--bg) var(--vw-side-w));
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--vw-side-w) minmax(0, 1fr);
}

/* ---------- Sidebar ---------- */
.vw-side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 12px;
  background: linear-gradient(178deg, var(--vw-side-bg2), var(--vw-side-bg) 54%);
  color: #fff;
  overflow-y: auto;
  z-index: 60;
}
.vw-side::after {
  content: "";
  position: absolute;
  left: -18px;
  bottom: -2px;
  width: 168px;
  height: 126px;
  background: url("/img/landing-definitive/decor/brush-teal.svg") 0 100%/contain no-repeat;
  opacity: .46;
  pointer-events: none;
}
.vw-side-brand {
  display: block;
  margin: 1px 4px 19px;
  color: #fff;
  font-family: Sora, Inter, sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 43px;
  text-decoration: none;
}
.vw-side-brand:hover { text-decoration: none; }
.vw-new {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  width: 175px;
  margin: 0 0 20px;
  padding: 8px 17px;
  border-radius: 6px;
  background: rgba(4, 73, 80, .3);
  border: 1px solid rgba(115, 221, 218, .72);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease;
}
.vw-new:hover { background: rgba(20, 128, 132, .34); text-decoration: none; }
.vw-nav { display: flex; flex-direction: column; gap: 3px; }
.vw-side .vw-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  width: 182px;
  margin-left: -3px;
  padding: 10px;
  border-radius: 6px;
  color: var(--vw-side-dim);
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.vw-side .vw-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.vw-side .vw-nav a[aria-current="page"] {
  background: rgba(0, 126, 132, .48);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(0, 17, 22, .2);
}
.vw-nav svg, .vw-new svg, .vw-user-menu svg, .vw-user-popover svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* app.css styles bare `nav` as the sticky glass topbar — neutralize that for
   the sidebar's nav groups so links keep the dark-rail treatment. */
.vw-side nav.vw-nav {
  display: flex;
  width: 100%;
  max-width: none;
  margin: 0;
  align-items: stretch;
  padding: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 0;
  box-shadow: none;
  position: static;
  z-index: auto;
}
.vw-side-sep { display: none; }
.vw-side-spacer { flex: 1; }
.vw-user {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
  margin-bottom: 138px;
  padding: 13px 0 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .28);
}
.vw-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f4b942, #e0850c);
  color: #2a1e08;
  font-size: 15px;
  font-weight: 800;
  flex: none;
}
.vw-avatar-image {
  display: block;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 38%;
  background: #d5d0ca;
  box-shadow: 0 0 0 1px rgba(9, 34, 37, .18);
}
.vw-user-id { min-width: 0; line-height: 1.25; }
.vw-user-name { color: #fff; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-user-plan { color: var(--vw-side-dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-user-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--vw-side-dim);
  box-shadow: none;
  cursor: pointer;
}
.vw-user-menu:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: none; box-shadow: none; filter: none; }
.vw-user-menu svg { transform: rotate(90deg); }
.vw-user-popover {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 58px;
  width: 176px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.vw-user-popover[hidden] { display: none; }
.vw-user-popover a,
.vw-user-popover button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  box-shadow: none;
}
.vw-user-popover a:hover,
.vw-user-popover button:hover { background: var(--accent-soft); transform: none; box-shadow: none; filter: none; }

/* ---------- Topbar ---------- */
.vw-main-col { min-width: 0; display: flex; flex-direction: column; }
.vw-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 304px minmax(300px, 426px) minmax(0, 1fr);
  align-items: center;
  column-gap: 31px;
  min-height: 62px;
  height: 62px;
  padding: 0 40px 0 27px;
  background: rgba(252, 250, 247, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.vw-burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}
.vw-burger:hover { transform: none; box-shadow: none; filter: none; }
.vw-burger svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.vw-top-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  position: static;
  top: auto;
  z-index: auto;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vw-top-title a { flex: none; color: #24363a; font-weight: 400; text-decoration: none; }
.vw-top-title a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.vw-top-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-top-separator { flex: none; color: #939b99; font-weight: 400; }
.vw-top-search {
  display: flex;
  height: 36px;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 0 11px 0 13px;
  border: 1px solid #cfd4d2;
  border-radius: 6px;
  background: rgba(255, 255, 255, .68);
  box-shadow: none;
}
.vw-top-search:focus-within { border-color: #43878b; box-shadow: 0 0 0 2px rgba(19, 111, 116, .12); }
.vw-top-search > span:first-child { color: #193940; }
.vw-top-search svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.vw-top-search input {
  min-width: 0;
  flex: 1;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 400 13px/1 Inter, system-ui, sans-serif;
  outline: 0;
  box-shadow: none;
}
.vw-top-search input::placeholder { color: #647378; opacity: 1; }
.vw-search-shortcut { display: flex; align-items: center; gap: 3px; }
.vw-search-shortcut kbd {
  display: inline-flex;
  min-width: 20px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid #d4d7d4;
  border-radius: 5px;
  background: #fafaf8;
  color: #49565a;
  font: 500 11px/1 Inter, system-ui, sans-serif;
  box-shadow: none;
}
.vw-search-close,
.vw-search-launch {
  display: none;
  width: 32px;
  height: 32px;
  flex: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #132b30;
  box-shadow: none;
  cursor: pointer;
}
.vw-search-close:hover,
.vw-search-launch:hover { background: #edf2ef; transform: none; box-shadow: none; filter: none; }
.vw-search-launch svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.vw-top-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 36px; }
.vw-chips { display: flex; align-items: center; gap: 15px; }
.vw-chip {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #25777d;
  border-radius: 6px;
  background: rgba(255, 255, 255, .5);
  color: #07565e;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.vw-chip:hover { text-decoration: none; border-color: #075d62; background: #fff; }
.vw-chip b { font-weight: 700; color: #17292d; }
.vw-chip.watch b { color: #17292d; }
.vw-top-status { display: flex; align-items: center; gap: 34px; }
.vw-notification-wrap { position: relative; display: inline-flex; }
.vw-notifications {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #0b1619;
  box-shadow: none;
  cursor: pointer;
}
.vw-notifications:hover { background: #edf2ef; transform: none; box-shadow: none; filter: none; }
.vw-notifications svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.vw-notification-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fcfaf7;
  border-radius: 999px;
  background: #ee7543;
  color: #fff;
  font: 800 10px/1 Inter, system-ui, sans-serif;
}
.vw-notification-popover {
  position: absolute;
  z-index: 60;
  top: 43px;
  right: -51px;
  width: 300px;
  padding: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.vw-notification-popover[hidden] { display: none; }
.vw-notification-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 9px 10px;
  color: var(--text);
  font-size: 13px;
}
.vw-notification-heading span { color: #b6502e; font-size: 11px; font-weight: 700; }
.vw-notification-popover > a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
}
.vw-notification-popover > a:hover { background: var(--accent-soft); text-decoration: none; }
.vw-notification-popover > a > span:last-child { display: grid; gap: 2px; min-width: 0; }
.vw-notification-popover strong { font-size: 12px; }
.vw-notification-popover small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.vw-notification-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}
.vw-notification-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.vw-top-user { display: inline-flex; border-radius: 50%; text-decoration: none; }
.vw-top-user:hover { text-decoration: none; }
.vw-top-user .vw-avatar-image,
.vw-top-user .vw-avatar { width: 42px; height: 42px; box-shadow: 0 0 0 1px rgba(9, 34, 37, .14); }

/* ---------- Content ---------- */
.vw-content {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 26px 28px 56px;
}
/* Warm amber brush in the far corner, as in the suite mockups. */
.vw-content::after {
  content: "";
  position: fixed;
  right: -30px;
  bottom: -24px;
  width: 200px;
  height: 150px;
  background: url("/img/landing-definitive/decor/brush-amber.svg") 100% 100%/contain no-repeat;
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}
.vw-content > * { position: relative; z-index: 1; }
body.vw-app h1 {
  margin: 4px 0 6px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.vw-sub { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.vw-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.vw-card h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vw-card h2 .vw-view-all { margin-left: auto; }
.vw-view-all { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.vw-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Stat cards */
.vw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 0 0 22px; }
.vw-stat { display: flex; flex-direction: column; gap: 2px; }
.vw-stat-head { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.vw-stat-head svg { width: 17px; height: 17px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vw-stat.watch .vw-stat-head svg { stroke: var(--watch-ink); }
.vw-stat-num { margin-top: 8px; font-family: Sora, Inter, sans-serif; font-size: 31px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.vw-stat-num small { font-size: 16px; font-weight: 700; color: var(--muted); letter-spacing: -.01em; }
.vw-stat-foot { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.vw-stat .progress-wrap { margin: 10px 0 0; }
.vw-stat.watch .progress-bar { background: linear-gradient(90deg, #ef5b3f, #d04322); }

/* Paste bar */
.vw-paste { display: flex; gap: 10px; align-items: stretch; padding: 14px; margin-bottom: 22px; }
.vw-paste input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-size: 15.5px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.vw-paste input:focus-visible { border-color: var(--accent-2); box-shadow: var(--ring); }
.vw-paste .btn { flex: none; }
/* A select in the paste row must not starve the link input: its intrinsic
   width is the longest option label, so cap it and let the input win. */
.vw-paste .vw-select { flex: 0 1 auto; max-width: 225px; }

/* Two-column board */
.vw-board { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.vw-board > * { min-width: 0; }
.vw-rail { display: flex; flex-direction: column; gap: 18px; }

/* Tables */
.vw-card table { margin-top: 12px; }
.vw-card th { font-size: 12px; letter-spacing: .5px; border-bottom-color: var(--border); }
.vw-card td { border-bottom-color: var(--border); vertical-align: middle; }
.vw-card tbody tr:last-child td { border-bottom: 0; }
.vw-card tbody tr:hover td { background: var(--surface-2); }
.vw-video-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vw-thumb {
  width: 66px;
  height: 38px;
  flex: none;
  border-radius: 7px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.vw-video-cell .t { min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vw-video-cell a { color: var(--text); }
.vw-video-cell a:hover { color: var(--accent); text-decoration: none; }
.vw-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.vw-tag.watch { background: #fde2d9; border-color: #f6c4b4; color: #9f3525; }
.vw-when { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Quick actions */
.vw-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.vw-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.vw-action:hover { text-decoration: none; border-color: var(--accent-2); background: var(--surface-2); }
.vw-action-ico {
  width: 34px;
  height: 34px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
}
.vw-action-ico svg, .vw-continue-thumb .play svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vw-action.watch .vw-action-ico { background: #fde2d9; color: #d04322; }
.vw-action.amber .vw-action-ico { background: #f9e7ba; color: #8a5b06; }
.vw-action-txt { min-width: 0; line-height: 1.3; }
.vw-action-txt .t { font-size: 14px; font-weight: 700; }
.vw-action-txt .d { font-size: 12.5px; color: var(--muted); }
.vw-action > .vw-icon:last-child { margin-left: auto; color: var(--muted); width: 16px; height: 16px; }

/* Continue card */
.vw-continue-thumb { position: relative; display: block; margin: 12px 0 10px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.vw-continue-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.vw-continue-thumb .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vw-continue-thumb .play span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 34, 37, .78);
  color: #fff;
}
.vw-continue-title { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.vw-continue-meta { margin: 4px 0 12px; color: var(--muted); font-size: 12.5px; }

/* Library video-card grid (suite mockup 05) */
.vw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; margin-top: 14px; }
.vw-vcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.vw-vcard:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.vw-vcard-thumb { position: relative; display: block; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.vw-vcard-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.vw-vcard-title { font-size: 14px; font-weight: 700; line-height: 1.35; margin: 2px 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vw-vcard-title a { color: var(--text); }
.vw-vcard-title a:hover { color: var(--accent); text-decoration: none; }
.vw-vcard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 2px; }
.vw-vcard-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 2px; }
.vw-vcard-foot { display: flex; align-items: center; gap: 8px; margin: 2px; margin-top: auto; }
.vw-vcard-foot .vw-when { flex: 1; }
.vw-vcard-foot .btn.small { padding: 6px 11px; font-size: 12.5px; }
.vw-tag.ok { background: var(--accent-soft); border-color: var(--accent-soft-border); color: var(--accent-dark); }

/* Library layout: main column + Storage & credits rail (suite mockup 05) */
.vw-lib-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.vw-lib-rail { position: sticky; top: 16px; }
@media (max-width: 1100px) {
  .vw-lib-layout { grid-template-columns: minmax(0, 1fr); }
  .vw-lib-rail { position: static; order: 2; }
}

/* Library tabs (All / Transcripts / AI Watch) */
.vw-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
/* An author display rule beats the UA's [hidden] one — re-assert it. */
.vw-tabs[hidden], .vw-bulkbar[hidden] { display: none; }
.vw-tab {
  padding: 8px 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  cursor: pointer;
}
.vw-tab:hover { color: var(--text); border-color: var(--accent-2); }
.vw-tab.active { color: #fff; background: var(--accent); border-color: var(--accent); }

/* Bulk-selection bar: appears once at least one card is checked. */
.vw-bulkbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 0 0 14px;
  background: var(--surface);
  border: 1px solid var(--accent-soft-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 600;
}
.vw-bulkbar span { flex: 1; }

/* Card select checkbox, floated over the thumbnail like the mockup. */
.vw-vcard { position: relative; }
.vw-vcard-check {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--accent);
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(9, 45, 47, .35);
  cursor: pointer;
}
.vw-vcard.selected { border-color: var(--accent); box-shadow: var(--ring); }

/* Storage & credits meters */
.vw-meter { margin: 12px 0 0; }
.vw-meter:first-child { margin-top: 2px; }
.vw-meter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.vw-meter-head b { color: var(--text); font-size: 13px; white-space: nowrap; }
.vw-meter-track { height: 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.vw-meter-fill { height: 100%; border-radius: 99px; }
.vw-meter-fill.teal { background: var(--accent-2); }
.vw-meter-fill.coral { background: #d04322; }

/* Duration badge on video thumbnails (mockups 04/05) */
.vw-thumb-time {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(6, 34, 37, .82);
  color: #fff;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: .02em;
}

/* "This week" activity chart (mockup 04): pure CSS bars from history data */
.vw-chart { display: flex; align-items: stretch; gap: 8px; height: 110px; margin-top: 6px; }
.vw-chart-day { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vw-chart-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--border); padding-bottom: 1px; }
.vw-chart-bar { width: 9px; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--border); }
.vw-chart-bar.teal { background: var(--accent-2); }
.vw-chart-bar.coral { background: #d04322; }
.vw-chart-bar[style*="height:0%"] { background: var(--surface-2); }
.vw-chart-label { margin-top: 6px; text-align: center; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-chart-legend { display: flex; gap: 14px; margin: 2px 0 0; }
.vw-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.vw-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.vw-legend-dot.teal { background: var(--accent-2); }
.vw-legend-dot.coral { background: #d04322; }

/* API page: dark quickstart block, endpoint rows, limits list (mockup 08) */
.vw-code {
  margin: 4px 0 12px;
  padding: 14px 16px;
  background: #062225;
  color: #d9eeea;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
}
.vw-code code { background: none; color: inherit; padding: 0; }
.vw-endpoint { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; font-size: 13.5px; }
.vw-endpoint code { flex: none; }
.vw-endpoint .muted { flex: 1 1 100%; margin-left: 2px; }
.vw-limits { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; }

/* Toolbar selects (language / sort) */
.vw-select {
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
}

/* Library toolbar */
.vw-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.vw-search { position: relative; flex: 1; min-width: 220px; max-width: 430px; }
.vw-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  font-size: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.vw-search input:focus-visible { border-color: var(--accent-2); box-shadow: var(--ring); }
.vw-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}
.vw-count { color: var(--muted); font-size: 13px; }

/* ---------- Library workspace (05-library) ---------- */
body.vw-library-page {
  --vw-side-w: 203px;
  --library-line: #dedbd4;
  --library-paper: #faf9f6;
  --library-ink: #0c282c;
  --library-muted: #425b5c;
  --library-teal: #075d62;
  --library-coral: #ef5638;
  background: linear-gradient(90deg, var(--vw-side-bg) 0, var(--vw-side-bg) var(--vw-side-w), var(--library-paper) var(--vw-side-w));
}
body.vw-library-page .vw-side { padding: 14px 12px 14px; }
body.vw-library-page .vw-side-brand { margin: 0 5px 20px; font-size: 27px; }
body.vw-library-page .vw-new { min-height: 40px; margin: 0 4px 13px 0; padding: 8px 14px; justify-content: flex-start; }
body.vw-library-page .vw-side .vw-nav a { padding: 10px 11px; font-size: 14px; }
body.vw-library-page .vw-side .vw-nav a[aria-current="page"] { background: linear-gradient(90deg, #0b6466, #08777b); }
body.vw-library-page .vw-side-sep { margin: 12px 7px; }
body.vw-library-page .vw-content {
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
}
body.vw-library-page .vw-content::after { width: 165px; height: 124px; right: -20px; bottom: -16px; opacity: .62; }

.vw-library-header.vw-top {
  position: sticky;
  top: 0;
  min-height: 119px;
  display: grid;
  grid-template-columns: minmax(285px, 320px) minmax(300px, 425px) minmax(430px, 1fr);
  align-items: start;
  gap: 22px;
  padding: 18px 30px 11px;
  background: rgba(250, 249, 246, .96);
  border-bottom-color: var(--library-line);
  backdrop-filter: blur(8px);
}
.vw-library-header .vw-burger { align-self: center; }
.vw-library-heading { min-width: 0; }
body.vw-library-page .vw-library-title {
  margin: 2px 0 7px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.vw-library-heading p { max-width: 300px; margin: 0; color: var(--library-muted); font-size: 13px; line-height: 1.55; }
.vw-library-search {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  height: 36px;
  margin-top: 7px;
  padding: 0 10px 0 13px;
  border: 1px solid #cdd1ce;
  border-radius: 6px;
  background: #fff;
  color: var(--library-muted);
}
.vw-library-search:focus-within { border-color: var(--library-teal); box-shadow: 0 0 0 3px rgba(7, 93, 98, .14); }
.vw-library-search-icon { width: 14px; height: 14px; border: 1.7px solid currentColor; border-radius: 50%; position: relative; }
.vw-library-search-icon::after { content: ""; position: absolute; right: -4px; bottom: -3px; width: 6px; border-top: 1.7px solid currentColor; transform: rotate(45deg); }
.vw-library-search input { min-width: 0; border: 0; outline: 0; padding: 0; background: transparent; color: var(--library-ink); font: inherit; font-size: 13px; box-shadow: none; }
.vw-library-search kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 22px; border: 1px solid #d6d8d5; border-radius: 4px; background: #f7f7f5; color: #5c6969; font: 11px Inter, sans-serif; }
.vw-library-header-actions {
  display: grid;
  grid-template-columns: auto 36px 38px;
  grid-template-rows: 40px 45px;
  align-items: center;
  justify-content: end;
  gap: 4px 13px;
  min-width: 0;
}
.vw-library-header-actions .vw-chips { gap: 10px; }
.vw-library-header-actions .vw-chips { grid-column: 1; grid-row: 1; }
.vw-library-header-actions .vw-library-icon-button { grid-column: 2; grid-row: 1; }
.vw-library-header-actions .vw-library-top-avatar { grid-column: 3; grid-row: 1; }
.vw-library-header-actions .vw-chip { min-height: 34px; padding: 6px 12px; border-color: #0f7b80; border-radius: 6px; background: transparent; font-size: 12px; font-weight: 500; }
.vw-library-header-actions .vw-chip svg { display: none; }
.vw-library-header-actions .vw-chip b { margin-left: 5px; color: var(--library-ink); }
.vw-library-icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--library-ink); text-decoration: none; }
.vw-library-bell { width: 14px; height: 17px; border: 2px solid currentColor; border-top-left-radius: 9px; border-top-right-radius: 9px; border-bottom: 0; position: relative; }
.vw-library-bell::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: -5px; border-top: 2px solid currentColor; border-radius: 50%; }
.vw-library-notice { position: absolute; top: -2px; right: -1px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px; background: var(--library-coral); color: #fff; font-size: 10px; line-height: 18px; text-align: center; }
.vw-library-top-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #173837; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.vw-library-new { grid-column: 1 / 4; grid-row: 2; justify-self: end; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; min-width: 164px; margin: 0; padding: 9px 17px; border-radius: 6px; background: linear-gradient(#086b70, #005158); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 5px 12px rgba(0, 81, 88, .14); }
.vw-library-new:hover { color: #fff; text-decoration: none; }
.vw-library-new span { font-size: 22px; font-weight: 300; line-height: 1; }

.vw-library-frame {
  display: grid;
  grid-template-columns: 206px minmax(650px, 1fr) 300px;
  align-items: stretch;
  min-height: calc(100vh - 199px);
  background: var(--library-paper);
  color: var(--library-ink);
}
.vw-library-collections { padding: 25px 8px 24px 12px; border-right: 1px solid var(--library-line); background: rgba(255,255,255,.22); }
.vw-library-aside-title, .vw-library-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vw-library-aside-title { padding: 0 10px 11px 13px; }
.vw-library-aside-title h2, .vw-library-panel h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.025em; }
.vw-library-aside-title button, .vw-library-panel-title button { border: 0; padding: 4px; background: transparent; color: var(--library-teal); box-shadow: none; font-size: 18px; cursor: pointer; }
.vw-library-collection-nav { display: block; position: static; padding: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.vw-library-collection-nav > button, .vw-library-collection-nav #lib-collection-list button {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 46px;
  margin: 0 0 2px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--library-ink);
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.vw-library-collection-nav button:hover { background: rgba(7,93,98,.05); transform: none; }
.vw-library-collection-nav button.active { border-color: #afd4d3; background: #eaf5f3; color: #075d62; }
.vw-library-collection-nav button > span:first-child { color: var(--library-teal); font-size: 18px; text-align: center; }
.vw-library-collection-nav button b { color: var(--library-muted); font-size: 12px; font-weight: 500; }
.vw-library-add-collection { display: flex; align-items: center; gap: 10px; width: calc(100% - 16px); margin: 12px 8px 0; padding: 13px 8px; border: 0; border-top: 1px solid var(--library-line); border-radius: 0; background: transparent; color: var(--library-teal); box-shadow: none; font-size: 13px; font-weight: 500; cursor: pointer; }

.vw-library-workspace { min-width: 0; padding: 24px 14px 12px; }
.vw-library-filterbar { display: grid; grid-template-columns: minmax(300px, 1fr) 138px 138px 126px 30px; gap: 10px; align-items: end; min-height: 54px; }
.vw-library-tabs { display: flex; align-items: center; gap: 8px; align-self: end; }
.vw-library-tabs button, .vw-library-filterbar select, .vw-library-sort-direction {
  min-height: 37px;
  border: 1px solid #d5d8d4;
  border-radius: 6px;
  background: #fff;
  color: var(--library-muted);
  box-shadow: none;
  font: 500 12px Inter, sans-serif;
}
.vw-library-tabs button { padding: 8px 13px; cursor: pointer; }
.vw-library-tabs button.active { border-color: var(--library-teal); background: #edf7f6; color: var(--library-teal); }
.vw-library-filterbar label { display: grid; gap: 6px; color: var(--library-ink); font-size: 10px; }
.vw-library-filterbar select { width: 100%; padding: 8px 11px; }
.vw-library-sort-direction { width: 30px; padding: 0; font-size: 17px; cursor: pointer; }
.vw-library-bulkbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  margin: 12px 0 20px;
  padding: 10px 20px;
  border: 1px solid #e2ddd4;
  border-radius: 7px;
  background: rgba(255,255,255,.45);
}
.vw-library-bulkbar strong { min-width: 70px; font-size: 13px; font-weight: 600; }
.vw-library-divider { height: 30px; border-left: 1px solid var(--library-line); }
.vw-library-bulkbar button, .vw-library-move-wrap select {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #cdd1ce;
  border-radius: 6px;
  background: #fff;
  color: var(--library-ink);
  box-shadow: none;
  font: 500 12px Inter, sans-serif;
}
.vw-library-bulkbar button:disabled { opacity: .48; cursor: not-allowed; }
.vw-library-bulkbar button.danger { color: #c9442c; border-color: #e4c9c3; }
.vw-library-bulkbar .vw-library-clear { margin-left: auto; border: 0; background: transparent; color: var(--library-muted); }
.vw-library-move-wrap { display: flex; gap: 6px; }

.vw-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 10px; }
.vw-library-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 315px; padding: 38px 16px 15px; border: 1px solid #e2ddd5; border-radius: 8px; background: rgba(255,255,255,.5); box-shadow: 0 1px 5px rgba(12,40,44,.025); }
.vw-library-card.selected { border-color: #0b8b8b; box-shadow: 0 0 0 1px rgba(11,139,139,.18); }
.vw-library-card-check { position: absolute; z-index: 3; top: 14px; left: 14px; width: 17px; height: 17px; margin: 0; accent-color: var(--library-teal); cursor: pointer; }
.vw-library-card-menu { position: absolute; z-index: 4; top: 11px; right: 12px; }
.vw-library-card-menu summary { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 4px; background: rgba(250,249,246,.9); color: var(--library-ink); cursor: pointer; list-style: none; font-size: 20px; line-height: 1; }
.vw-library-card-menu summary::-webkit-details-marker { display: none; }
.vw-library-card-menu-popover { position: absolute; top: 27px; right: 0; width: 142px; padding: 5px; border: 1px solid var(--library-line); border-radius: 7px; background: #fff; box-shadow: 0 10px 26px rgba(12,40,44,.16); }
.vw-library-card-menu-popover a, .vw-library-card-menu-popover button { display: block; width: 100%; padding: 8px 9px; border: 0; border-radius: 4px; background: transparent; color: var(--library-ink); box-shadow: none; text-align: left; text-decoration: none; font: 12px Inter, sans-serif; }
.vw-library-card-menu-popover a:hover, .vw-library-card-menu-popover button:hover { background: #edf5f4; transform: none; }
.vw-library-card-thumb { position: relative; display: block; overflow: hidden; width: 100%; aspect-ratio: 1.85 / 1; margin-bottom: 11px; border-radius: 7px; background: #e7e3dc; }
.vw-library-card-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vw-library-card-duration { position: absolute; right: 5px; bottom: 5px; padding: 3px 5px; border-radius: 3px; background: rgba(8,22,23,.86); color: #fff; font-size: 10px; font-weight: 600; }
.vw-library-card-title { min-height: 20px; margin: 0 0 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; line-height: 1.25; letter-spacing: -.035em; }
.vw-library-card-title a { color: var(--library-ink); text-decoration: none; }
.vw-library-creator { display: flex; align-items: center; gap: 7px; min-height: 23px; margin-bottom: 7px; color: var(--library-muted); font-size: 11px; }
.vw-library-creator-avatar { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; border-radius: 50%; background: linear-gradient(135deg,#e2a05d,#60442d); color: #fff; font-size: 9px; font-weight: 700; }
.vw-library-verified { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; border-radius: 50%; background: var(--library-teal); color: #fff; font-size: 8px; }
.vw-library-card-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; color: var(--library-muted); font-size: 10px; }
.vw-library-card-meta span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.vw-library-card-tags { display: flex; gap: 8px; margin-top: auto; }
.vw-library-status { display: inline-flex; align-items: center; gap: 5px; min-height: 27px; padding: 4px 7px; border: 1px solid #a8d3d0; border-radius: 5px; background: #f2faf9; color: #075d62; font-size: 10px; white-space: nowrap; }
.vw-library-status.watch { border-color: #f3a18f; background: #fff7f4; color: #db4f31; }
.vw-library-status.pending { border-color: #d5d8d4; background: #f7f7f5; color: var(--library-muted); }
.vw-library-empty { grid-column: 1 / -1; padding: 70px 20px; border: 1px dashed var(--library-line); border-radius: 8px; text-align: center; color: var(--library-muted); }

.vw-library-utility { display: flex; flex-direction: column; gap: 18px; padding: 24px 29px 24px 11px; }
.vw-library-panel { padding: 17px 16px; border: 1px solid #e2ddd4; border-radius: 8px; background: rgba(255,255,255,.46); box-shadow: 0 3px 14px rgba(12,40,44,.025); }
.vw-library-panel-title { margin-bottom: 4px; }
.vw-library-panel-title button { font-size: 11px; font-weight: 500; }
.vw-library-saved-row { display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid #e7e3dc; color: var(--library-ink); font-size: 11px; }
.vw-library-saved-row button { overflow: hidden; border: 0; padding: 0; background: transparent; color: inherit; box-shadow: none; text-align: left; text-overflow: ellipsis; white-space: nowrap; font: inherit; cursor: pointer; }
.vw-library-saved-row .icon { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border: 1px solid #d6dad7; border-radius: 5px; color: var(--library-muted); }
.vw-library-saved-row b { font-weight: 500; color: var(--library-muted); }
.vw-library-panel-action { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 38px; margin-top: 12px; padding: 8px; border: 1px solid #cfd3d0; border-radius: 6px; background: transparent; color: var(--library-ink); box-shadow: none; text-decoration: none; font: 500 11px Inter, sans-serif; cursor: pointer; }
.vw-library-panel-action:hover { background: #fff; color: var(--library-ink); text-decoration: none; transform: none; }
.vw-library-panel .vw-meter { margin-top: 19px; }
.vw-library-panel .vw-meter-head { display: grid; justify-items: start; gap: 5px; margin-bottom: 6px; font-size: 12px; }
.vw-library-panel .vw-meter-head b { font-size: 12px; font-weight: 500; }
.vw-library-panel .vw-meter-track { border: 0; height: 7px; background: #e7e6e1; }
.vw-library-reset { margin: 10px 0 0; color: var(--library-muted); font-size: 10px; }

.vw-library-footer { display: grid; grid-template-columns: 206px minmax(650px, 1fr) 300px; align-items: center; min-height: 80px; margin-top: 0; padding: 0 28px 0 25px; border-top: 1px solid var(--library-line); background: rgba(250,249,246,.95); color: var(--library-muted); font-size: 11px; }
.vw-library-footer > span { grid-column: 1 / 2; }
.vw-library-footer nav { display: flex; align-items: center; justify-content: center; gap: 11px; position: static; padding: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.vw-library-footer nav button { display: inline-flex; align-items: center; justify-content: center; min-width: 29px; height: 31px; padding: 0 8px; border: 1px solid #d8dad7; border-radius: 5px; background: #fff; color: var(--library-muted); box-shadow: none; font: 11px Inter,sans-serif; cursor: pointer; }
.vw-library-footer nav button.active { border-color: var(--library-teal); background: var(--library-teal); color: #fff; }
.vw-library-footer nav button:disabled { opacity: .45; }
.vw-library-footer > a { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; border: 1px solid #cfd3d0; border-radius: 6px; color: var(--library-ink); text-decoration: none; }
.vw-library-footer > a b { margin-left: 10px; font-size: 18px; font-weight: 400; }

.vw-library-dialog { width: min(430px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--library-line); border-radius: 10px; background: #fff; color: var(--library-ink); box-shadow: 0 24px 70px rgba(12,40,44,.25); }
.vw-library-dialog::backdrop { background: rgba(12,40,44,.42); }
.vw-library-dialog form { display: grid; gap: 16px; padding: 20px; }
.vw-library-dialog-title { display: flex; align-items: center; justify-content: space-between; }
.vw-library-dialog-title h2 { margin: 0; font-size: 18px; }
.vw-library-dialog-title button { border: 0; background: transparent; color: var(--library-muted); box-shadow: none; font-size: 24px; }
.vw-library-dialog label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }
.vw-library-dialog input { padding: 10px 12px; border: 1px solid #cdd1ce; border-radius: 6px; }
.vw-library-dialog p { margin: 0; color: var(--library-muted); font-size: 12px; }
.vw-library-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.vw-library-dialog-actions button { min-height: 38px; padding: 8px 15px; border: 1px solid var(--library-teal); border-radius: 6px; background: var(--library-teal); color: #fff; box-shadow: none; }
.vw-library-dialog-actions button.secondary { border-color: #cdd1ce; background: #fff; color: var(--library-ink); }

@media (max-width: 1280px) {
  .vw-library-header.vw-top { grid-template-columns: 250px minmax(250px, 1fr) minmax(380px, auto); padding-inline: 20px; }
  .vw-library-frame, .vw-library-footer { grid-template-columns: 190px minmax(570px, 1fr) 260px; }
  .vw-library-filterbar { grid-template-columns: 1fr 120px 120px 112px 30px; }
  .vw-library-tabs { gap: 5px; }
  .vw-library-tabs button { padding-inline: 9px; }
  .vw-library-card-title { font-size: 14px; }
}
@media (max-width: 1080px) {
  .vw-library-header.vw-top { grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.3fr) auto; min-height: 92px; }
  .vw-library-new { min-width: 0; }
  .vw-library-header-actions .vw-chips { display: none; }
  .vw-library-frame { grid-template-columns: 190px minmax(0, 1fr); }
  .vw-library-utility { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; padding: 18px; border-top: 1px solid var(--library-line); }
  .vw-library-footer { grid-template-columns: 190px minmax(0, 1fr); }
  .vw-library-footer > a { display: none; }
  .vw-library-filterbar { grid-template-columns: 1fr 1fr 1fr; }
  .vw-library-tabs { grid-column: 1 / -1; }
  .vw-library-sort-direction { display: none; }
}
@media (max-width: 900px) {
  body.vw-library-page .vw-content { padding: 0; }
  .vw-library-header.vw-top { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; height: auto; min-height: auto; padding: 10px 16px; }
  .vw-library-header .vw-burger { display: inline-flex; }
  .vw-library-heading p, .vw-library-header-actions .vw-library-icon-button, .vw-library-header-actions .vw-library-top-avatar { display: none; }
  body.vw-library-page .vw-library-title { margin: 0; font-size: 22px; }
  .vw-library-search { grid-column: 1 / -1; grid-row: 2; width: 100%; margin: 2px 0 0; }
  .vw-library-new { min-height: 38px; padding: 7px 11px; font-size: 12px; }
  .vw-library-frame { display: block; }
  .vw-library-collections { border-right: 0; border-bottom: 1px solid var(--library-line); }
  .vw-library-collection-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vw-library-add-collection { width: 100%; margin-inline: 0; }
  .vw-library-footer { grid-template-columns: 1fr; gap: 12px; padding: 14px 16px; }
  .vw-library-footer > span { grid-column: auto; text-align: center; }
}
@media (max-width: 640px) {
  .vw-library-heading { display: none; }
  .vw-library-header.vw-top { grid-template-columns: auto minmax(0,1fr); }
  .vw-library-header-actions { justify-self: end; }
  .vw-library-workspace { padding: 16px 12px; }
  .vw-library-filterbar { grid-template-columns: 1fr 1fr; }
  .vw-library-tabs { overflow-x: auto; padding-bottom: 2px; }
  .vw-library-filterbar label:last-of-type { grid-column: 1 / -1; }
  .vw-library-bulkbar { flex-wrap: wrap; padding: 10px; }
  .vw-library-divider { display: none; }
  .vw-library-grid { grid-template-columns: 1fr; }
  .vw-library-card { min-height: 0; }
  .vw-library-utility { display: block; padding: 12px; }
  .vw-library-utility .vw-library-panel + .vw-library-panel { margin-top: 12px; }
  .vw-library-footer nav { flex-wrap: wrap; }
}

/* Settings grid */
.vw-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.vw-settings-grid .vw-card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.vw-plan-name { font-family: Sora, Inter, sans-serif; font-size: 27px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 10px; }
.vw-plan-email { overflow-wrap: anywhere; }
.vw-profile-avatar-row { display: flex; align-items: center; gap: 17px; min-height: 96px; }
.vw-profile-avatar-preview { width: 96px; height: 96px; flex: none; }
.vw-profile-avatar-image {
  display: flex;
  width: 96px;
  height: 96px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(9, 34, 37, .16);
  border-radius: 50%;
  background: var(--surface-2);
  object-fit: cover;
  color: var(--accent-dark);
  font-size: 28px;
  font-weight: 800;
}
.vw-profile-avatar-copy { min-width: 0; }
.vw-avatar-help { margin: 9px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.vw-avatar-help[data-state="ok"] { color: var(--accent-dark); }
.vw-avatar-help[data-state="error"] { color: #9f2f21; }
.vw-avatar-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.vw-avatar-remove { color: #9f2f21; }
/* An author `button` display rule beats the UA's [hidden] one — re-assert it so the
   Remove-photo button actually hides when there's no photo. */
.vw-avatar-remove[hidden] { display: none; }
body.vw-app .mono { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--code-bg); color: var(--text); }

/* Links inside body copy need a non-color cue (axe link-in-text-block). */
body.vw-app .vw-card p a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Settings: tabbed account + billing dashboard (design 09) ---------- */
.vw-settings-title { margin: 0 0 14px; }
.vw-settings { --set-teal: #086b73; --set-teal-soft: #e4f2f2; }
html[data-theme="dark"] .vw-settings { --set-teal: #4bb6bd; --set-teal-soft: #10312f; }

/* Tabs (own class — .vw-tab is already taken by the bulk/history pill tabs) */
.vw-set-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 0 0 22px; }
.vw-set-tab {
  appearance: none;
  border: 0;
  background: none;
  box-shadow: none;
  padding: 10px 4px;
  margin: 0 14px -1px 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: color .15s var(--ease-out), border-color .15s var(--ease-out);
}
.vw-set-tab:hover { color: var(--text); background: none; transform: none; box-shadow: none; filter: none; }
.vw-set-tab.active { color: var(--set-teal); background: none; border-bottom-color: var(--set-teal); }
.vw-set-tab:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* Panels + generic stacks */
.vw-panel[hidden] { display: none; }
.vw-set-stack { display: grid; gap: 18px; align-items: start; }
@media (min-width: 720px) {
  .vw-set-stack { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

/* Card head (icon + label), shared by every settings card */
.vw-set-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.vw-set-head svg { width: 18px; height: 18px; stroke: var(--accent); }
.vw-set-head.watch svg { stroke: var(--watch-ink); }
.vw-card .vw-set-head + * { margin-top: 0; }

/* Billing two-column layout: main content + a narrower right rail */
.vw-billing { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.vw-billing-main, .vw-billing-aside { display: grid; gap: 18px; align-content: start; }

/* The three headline credit cards */
.vw-set-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.vw-set-card { display: flex; flex-direction: column; }
.vw-set-hero { font-family: Sora, Inter, sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 2px 0 2px; }
.vw-set-sub { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.vw-set-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.vw-set-meta svg { width: 14px; height: 14px; stroke: var(--muted); }
.vw-set-metatext { color: var(--muted); }
.vw-set-stat { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 10px; }
.vw-set-stat.small { margin: 0; }
.vw-set-statnum { font-family: Sora, Inter, sans-serif; font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--text); }
.vw-set-stat.small .vw-set-statnum { font-size: 26px; }
.vw-set-statlabel { color: var(--muted); font-size: 13px; font-weight: 600; }
.vw-set-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }

/* Progress bar with an inline "% used" caption */
.vw-set-bar { position: relative; height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: visible; margin: 0 0 8px; }
.vw-set-bar-fill { height: 100%; border-radius: 99px; }
.vw-set-bar-fill.teal { background: var(--accent-2); }
.vw-set-bar-fill.coral { background: linear-gradient(90deg, #ef5b3f, #d04322); }
.vw-set-bar-pct { position: absolute; right: 0; top: 12px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.vw-set-note { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* Credit top-up modal (opened by "Buy more credits" / "Add credits") */
.vw-modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(6, 34, 37, .55); animation: vw-fade .12s ease; }
@keyframes vw-fade { from { opacity: 0; } to { opacity: 1; } }
.vw-modal-card { position: relative; width: min(420px, 100%); padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.vw-modal-card h3 { margin: 0 0 4px; font-family: Sora, Inter, sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.vw-modal-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; background: none; border: 0; box-shadow: none; color: var(--muted); }
.vw-modal-close:hover { background: var(--surface-2); color: var(--text); transform: none; filter: none; box-shadow: none; }
.vw-modal-close svg { width: 18px; height: 18px; }
.vw-pack-options { display: grid; gap: 10px; margin: 16px 0 0; }
.vw-pack-option { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: none; color: var(--text); }
.vw-pack-option:hover { border-color: var(--accent-2); background: var(--surface-2); transform: none; filter: none; box-shadow: var(--shadow); }
.vw-pack-option:disabled { opacity: .5; cursor: not-allowed; }
.vw-pack-option.loading { opacity: .7; }
.vw-pack-credits { font-weight: 700; font-size: 15px; }
.vw-pack-price { font-family: Sora, Inter, sans-serif; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.vw-modal-error { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #fdedeb; border: 1px solid #f2c7bf; color: #9f2f21; font-size: 13px; line-height: 1.45; }
.vw-modal-error[hidden] { display: none; }
html[data-theme="dark"] .vw-modal-error { background: #2c1512; border-color: #7f2a1d; color: #fca5a5; }

/* Usage-history chart: y-axis | chart (bg gridlines) over a shared row, x-labels below */
.vw-usage-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vw-usage-top h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.vw-usage-legend { display: flex; gap: 14px; }
.vw-usage-range { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; background: var(--surface-2); }
.vw-usage-plot { display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: 176px auto; column-gap: 10px; margin-top: 16px; }
.vw-usage-yaxis { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: 11px; color: var(--muted); }
.vw-usage-chart {
  grid-column: 2; grid-row: 1;
  display: flex; align-items: flex-end; gap: 3px;
  background-image: linear-gradient(to top, var(--border) 1px, transparent 1px);
  background-size: 100% calc(100% / var(--divs, 3));
  background-position: left bottom;
}
.vw-usage-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; min-width: 0; }
.vw-usage-bar { width: 12px; max-width: 40%; min-height: 2px; border-radius: 3px 3px 0 0; }
.vw-usage-bar.teal { background: var(--accent-2); }
.vw-usage-bar.coral { background: #d04322; }
.vw-usage-xlabels { grid-column: 2; grid-row: 2; display: flex; gap: 3px; margin-top: 7px; }
.vw-usage-xlabels small { flex: 1; min-width: 0; text-align: center; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.vw-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.vw-legend-dot.teal { background: var(--accent-2); }
.vw-legend-dot.coral { background: #d04322; }

/* Invoices table */
.vw-invoices h3, .vw-set-stack .vw-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.vw-invoices-body { overflow-x: auto; }
.vw-invoices-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13.5px; }
.vw-invoices-table th { text-align: left; padding: 8px 10px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 700; }
.vw-invoices-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.vw-invoices-table tbody tr:last-child td { border-bottom: 0; }
.vw-invoice-dl { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; text-decoration: none; }
.vw-invoice-dl svg { width: 15px; height: 15px; }

/* Key/value rows in the right rail */
.vw-kv { display: grid; gap: 9px; margin: 2px 0 2px; }
.vw-kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.vw-kv-row > span { color: var(--muted); flex: none; }
.vw-kv-row > b { text-align: right; overflow-wrap: anywhere; }

/* Editable "Name" row in the Account card. .vw-name-view/.vw-name-edit also carry
   the .row utility (display:flex), which would defeat the [hidden] attribute — the
   [hidden] rules below win on specificity so the toggle actually hides them. */
.vw-name-cell { display: flex; justify-content: flex-end; min-width: 0; }
.vw-name-cell > span { color: var(--text); justify-content: flex-end; }
.vw-name-view > b { text-align: right; overflow-wrap: anywhere; }
.vw-name-input { width: 170px; max-width: 46vw; padding: 5px 9px; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.vw-name-view[hidden], .vw-name-edit[hidden] { display: none; }

/* Status pills */
.vw-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; border: 1px solid transparent; text-transform: capitalize; }
.vw-pill-ok { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); border-color: color-mix(in srgb, var(--green) 26%, transparent); }
.vw-pill-warn { background: #fdeede; color: #9a5b00; border-color: #f2d3a3; }
.vw-pill-muted { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
html[data-theme="dark"] .vw-pill-warn { background: #2c1f0c; color: #f6b23c; border-color: #4a3413; }

/* Honest "spending protections" / data checklist */
.vw-checklist { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 11px; }
.vw-checklist li { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.5; }
.vw-checklist svg { width: 15px; height: 15px; flex: none; margin-top: 2px; stroke: var(--set-teal); }
.vw-checklist a { color: var(--accent); }

/* Sidebar nav "Soon" badge (Team + any not-yet-built feature) */
.vw-nav-badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(244, 185, 66, .18);
  color: #f4c76a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.vw-side .vw-nav a[aria-current="page"] .vw-nav-badge { background: rgba(255, 255, 255, .2); color: #fff; }

/* "Coming soon" feature page (Team) */
.vw-soon { max-width: 620px; margin: 6px auto; padding: 42px 34px; text-align: center; }
.vw-soon-icon {
  width: 60px; height: 60px; margin: 0 auto 16px;
  display: grid; place-items: center; border-radius: 16px;
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
}
.vw-soon-icon svg { width: 28px; height: 28px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vw-soon-pill { margin-bottom: 12px; }
.vw-soon h2 { margin: 0 0 8px; font-family: Sora, Inter, sans-serif; font-size: 25px; font-weight: 800; letter-spacing: -.03em; }
.vw-soon-lead { margin: 0 auto 22px; max-width: 440px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.vw-soon-list { list-style: none; margin: 0 auto 22px; padding: 0; display: inline-grid; gap: 12px; text-align: left; }
.vw-soon-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.vw-soon-list svg { width: 18px; height: 18px; flex: none; stroke: var(--accent-2); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vw-soon .vw-set-actions { justify-content: center; }

/* Empty states */
.vw-empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Workspace page (def-page tool inside the shell) ----------
   /workspace loads landing-rebuild.css for the def result/watch styling; its
   `html body.def-page` and `.def-page main` rules outrank the shell's, so the
   shell layout is re-asserted at higher specificity here. */
body.def-page.vw-app {
  margin: 0;
  overflow-x: clip;
  background: linear-gradient(90deg, var(--vw-side-bg) 0, var(--vw-side-bg) var(--vw-side-w), var(--bg) var(--vw-side-w));
  display: grid;
  grid-template-columns: var(--vw-side-w) minmax(0, 1fr);
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
}
body.def-page.vw-app main.vw-content {
  max-width: 1220px;
  padding: 26px 28px 56px;
  overflow: visible;
}
body.def-page.vw-app .lp-tool { margin-top: 6px; }
/* The tool's card/result internals size themselves for the landing's 1180px
   column; inside the shell they just fill the content column. */
body.def-page.vw-app #result { margin-top: 18px; }
@media (max-width: 900px) {
  body.def-page.vw-app { grid-template-columns: 1fr; background: var(--bg); }
  body.def-page.vw-app main.vw-content { padding: 20px 16px 48px; }
}

/* Skip link */
.vw-skip { position: fixed; z-index: 200; top: 8px; left: 8px; transform: translateY(-180%); padding: 10px 14px; border-radius: 8px; background: #fff; color: var(--text); box-shadow: var(--shadow-lg); }
.vw-skip:focus-visible { transform: none; }

/* Backdrop for the mobile drawer */
.vw-backdrop { display: none; position: fixed; inset: 0; z-index: 55; background: rgba(6, 34, 37, .45); border: 0; padding: 0; }
.vw-backdrop:hover { transform: none; box-shadow: none; filter: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .vw-board { grid-template-columns: minmax(0, 1fr); }
  .vw-rail { flex-direction: column; }
}
@media (max-width: 1380px) and (min-width: 901px) {
  .vw-top {
    grid-template-columns: minmax(190px, 1fr) minmax(250px, 360px) auto;
    column-gap: 20px;
  }
  .vw-top-actions { gap: 20px; }
  .vw-chips { gap: 8px; }
  .vw-top-status { gap: 10px; }
  .vw-search-shortcut { display: none; }
}
@media (max-width: 1120px) and (min-width: 901px) {
  .vw-top { grid-template-columns: minmax(0, 1fr) auto; }
  .vw-top-search { display: none; }
  .vw-search-launch { display: inline-flex; }
  body.vw-search-open .vw-top-title,
  body.vw-search-open .vw-top-actions { visibility: hidden; }
  body.vw-search-open .vw-top-search {
    position: absolute;
    z-index: 2;
    top: 13px;
    left: 27px;
    right: 40px;
    display: flex;
    background: #fff;
  }
  body.vw-search-open .vw-search-close { display: inline-flex; }
}
@media (max-width: 900px) {
  body.vw-app { grid-template-columns: 1fr; background: var(--bg); }
  .vw-side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 84vw);
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 0 0 60px rgba(6, 34, 37, .4);
  }
  .vw-user { margin-bottom: 0; }
  body.vw-app.vw-drawer-open .vw-side { transform: none; }
  body.vw-app.vw-drawer-open .vw-backdrop { display: block; }
  .vw-burger { display: inline-flex; }
  .vw-top { display: flex; height: 62px; padding: 10px 16px; }
  .vw-top-search { display: none; }
  .vw-top-actions { margin-left: auto; gap: 12px; }
  .vw-top-status { gap: 8px; }
  .vw-chips { display: none; }
  .vw-search-launch { display: inline-flex; }
  .vw-top-user .vw-avatar-image,
  .vw-top-user .vw-avatar { width: 34px; height: 34px; font-size: 13px; }
  body.vw-search-open .vw-top-title,
  body.vw-search-open .vw-top-actions { visibility: hidden; }
  body.vw-search-open .vw-top-search {
    position: absolute;
    z-index: 2;
    top: 13px;
    left: 64px;
    right: 16px;
    display: flex;
    background: #fff;
  }
  body.vw-search-open .vw-search-close { display: inline-flex; }
  .vw-notification-popover {
    position: fixed;
    top: 56px;
    right: 12px;
    width: min(300px, calc(100vw - 24px));
  }
  .vw-content { padding: 20px 16px 48px; }
  .vw-chips .vw-chip { padding: 6px 9px; font-size: 12px; }
  .vw-paste { flex-direction: column; }
  .vw-content::after { display: none; }
  /* Settings: right rail drops below the main column; headline cards reflow */
  .vw-billing { grid-template-columns: 1fr; }
  .vw-set-cards { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
}
@media (max-height: 820px) and (min-width: 901px) {
  .vw-user { margin-bottom: 10px; }
}
@media (max-width: 560px) {
  .vw-top-title { display: none; }
  .vw-card { padding: 16px; }
  .vw-profile-avatar-row { align-items: flex-start; }
  .vw-profile-avatar-preview,
  .vw-profile-avatar-image { width: 76px; height: 76px; }
  /* Tables collapse into stacked rows */
  .vw-card table, .vw-card tbody, .vw-card tr, .vw-card td { display: block; width: 100%; }
  .vw-card thead { display: none; }
  .vw-card tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .vw-card tbody tr:hover td { background: transparent; }
  .vw-card td { border: 0; padding: 3px 0; }
  /* The invoices table keeps its columns and scrolls horizontally instead */
  .vw-set-cards { grid-template-columns: 1fr; }
  .vw-invoices-table { display: table; min-width: 480px; }
  .vw-invoices-table thead { display: table-header-group; }
  .vw-invoices-table tbody { display: table-row-group; }
  .vw-invoices-table tr { display: table-row; padding: 0; border: 0; }
  .vw-invoices-table td { display: table-cell; width: auto; padding: 10px; border-bottom: 1px solid var(--border); }
  .vw-invoices-table tbody tr:last-child td { border-bottom: 0; }
  .vw-usage-plot { grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: 150px auto; }
}
@media (prefers-reduced-motion: reduce) {
  .vw-side { transition: none; }
}
