/* ============================================================
   CAVMIR CLIENT PORTAL — shared layout & components
   Brand-neutral: every colour that carries identity comes from
   brand.css (var(--brand), var(--accent), --wordmark, --product).
   This file is identical across Cavmir / WBD / Attorney.
   ============================================================ */

:root {
  --bg:       #f4f5f8;
  --surface:  #ffffff;
  --surface-2:#fafbfc;
  --line:     #e6e8ee;
  --line-2:   #eef0f4;
  --ink:      #1b2130;
  --mut:      #667085;
  --mut-2:    #98a0ae;

  --ok:#1f9d57;   --ok-bg:#e7f6ed;
  --warn:#b9770d; --warn-bg:#fdf2df;
  --info:#2563eb; --info-bg:#e9f0fe;
  --violet:#7c3aed; --violet-bg:#f1ebfd;
  --red:#c5392b;  --red-bg:#fbe9e7;
  --grey:#5b6472; --grey-bg:#eef0f3;

  --radius:10px;
  --shadow:0 1px 2px rgba(16,24,40,.05), 0 8px 24px -16px rgba(16,24,40,.18);
}

* { box-sizing:border-box; }
html,body { margin:0; padding:0; }
body {
  font-family:var(--brand-font);
  background:var(--bg);
  color:var(--ink);
  font-size:14.5px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
a { color:inherit; text-decoration:none; }
h1,h2,h3,h4 { margin:0; font-weight:700; letter-spacing:-.01em; }
input,textarea,select,button { font-family:inherit; font-size:14px; }

/* ---- brand wordmark (text comes from brand.css) ---- */
.wordmark::before { content:var(--wordmark); }
.product::before  { content:var(--product); }
.wordmark { font-family:var(--brand-serif); font-weight:600; letter-spacing:.01em; }

.diamond { width:10px; height:10px; background:var(--accent); transform:rotate(45deg); border-radius:2px; flex:0 0 auto; }

/* ============================================================ LOGIN */
.login-wrap {
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(var(--brand-rgb),.10), transparent 60%),
    radial-gradient(700px 500px at 100% 110%, rgba(212,175,55,.10), transparent 55%),
    var(--bg);
}
.login-card {
  width:400px; max-width:94vw; background:var(--surface); border:1px solid var(--line);
  border-radius:16px; padding:38px 34px; box-shadow:var(--shadow);
}
.login-brand { display:flex; align-items:center; gap:9px; margin-bottom:26px; }
.login-brand .wordmark { font-size:22px; color:var(--brand); }
.login-brand .product { font-size:11px; letter-spacing:.18em; text-transform:uppercase; color:var(--mut-2);
  border-left:1px solid var(--line); padding-left:9px; margin-left:1px; }
.login-card h1 { font-size:21px; margin-bottom:5px; }
.login-card .sub { color:var(--mut); margin:0 0 22px; font-size:13.5px; }
.field { margin-bottom:15px; }
.field label { display:block; font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--mut); margin-bottom:6px; }
.field input {
  width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:9px;
  background:var(--surface-2); color:var(--ink); transition:border-color .15s, box-shadow .15s;
}
.field input:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(var(--brand-rgb),.12); background:#fff; }
.notice { font-size:13px; padding:10px 12px; border-radius:8px; margin-bottom:16px; display:none; }
.notice.err { display:block; background:var(--red-bg); color:var(--red); border:1px solid #f1c4bd; }
.notice.ok  { display:block; background:var(--ok-bg); color:var(--ok); border:1px solid #bce5cb; }
.login-foot { margin-top:18px; text-align:center; color:var(--mut-2); font-size:11.5px; }

/* ============================================================ BUTTONS */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  padding:10px 16px; border-radius:9px; border:1px solid var(--line); cursor:pointer;
  background:var(--surface); color:var(--ink); font-weight:500; transition:.15s; white-space:nowrap;
}
.btn:hover { border-color:var(--mut-2); }
.btn-primary { background:var(--brand); border-color:var(--brand); color:#fff; }
.btn-primary:hover { background:var(--brand-ink); border-color:var(--brand-ink); }
.btn-sm { padding:7px 12px; font-size:13px; border-radius:8px; }
.btn-block { width:100%; }
.btn:disabled { opacity:.55; cursor:default; }

/* ============================================================ APP SHELL */
.app { display:grid; grid-template-columns:248px 1fr; min-height:100vh; }

.sidebar {
  background:var(--brand); color:#fff; display:flex; flex-direction:column;
  position:sticky; top:0; height:100vh;
}
.sidebar-brand { display:flex; align-items:center; gap:9px; padding:22px 22px 18px; }
.sidebar-brand .wordmark { font-size:21px; color:#fff; }
.sidebar-brand .product { font-size:10px; letter-spacing:.16em; text-transform:uppercase; color:rgba(255,255,255,.6);
  border-left:1px solid rgba(255,255,255,.25); padding-left:8px; }
.nav { padding:8px 12px; display:flex; flex-direction:column; gap:2px; flex:1; overflow-y:auto; }
.nav a {
  display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:8px;
  color:rgba(255,255,255,.78); font-weight:500; font-size:14px; cursor:pointer;
}
.nav a:hover { background:rgba(255,255,255,.08); color:#fff; }
.nav a.active { background:rgba(255,255,255,.14); color:#fff; }
.nav a.active .ic { color:var(--accent); }
.nav .ic { width:18px; height:18px; flex:0 0 auto; opacity:.95; }
.nav .badge {
  margin-left:auto; background:var(--accent); color:#3a2c05; font-size:11px; font-weight:700;
  min-width:18px; height:18px; padding:0 5px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center;
}
.nav-sep { height:1px; background:rgba(255,255,255,.12); margin:8px 12px; }
.nav-label { padding:6px 12px 2px; font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:rgba(255,255,255,.45); }
.side-foot { padding:14px; border-top:1px solid rgba(255,255,255,.12); }
.side-user { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.avatar { width:34px; height:34px; border-radius:50%; background:var(--accent); color:#3a2c05;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; flex:0 0 auto; }
.side-user .who { font-size:13px; font-weight:600; line-height:1.2; }
.side-user .who small { display:block; color:rgba(255,255,255,.6); font-weight:400; font-size:11.5px; }
.side-foot .btn { background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.18); color:#fff; }
.side-foot .btn:hover { background:rgba(255,255,255,.18); }

/* ---- main ---- */
.main { min-width:0; display:flex; flex-direction:column; }
.topbar {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:20px 30px; background:var(--surface); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20;
}
.topbar h1 { font-size:20px; }
.topbar .crumb { color:var(--mut); font-size:13px; margin-top:2px; }
.menu-btn { display:none; }
.content { padding:26px 30px 60px; max-width:1180px; width:100%; }

/* ============================================================ CARDS / GRID */
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.card-pad { padding:20px 22px; }
.card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; border-bottom:1px solid var(--line-2); }
.card-head h3 { font-size:15px; }
.grid { display:grid; gap:18px; }
.grid.cols-4 { grid-template-columns:repeat(4,1fr); }
.grid.cols-3 { grid-template-columns:repeat(3,1fr); }
.grid.cols-2 { grid-template-columns:repeat(2,1fr); }
.section { margin-bottom:22px; }
.section-title { font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--mut); margin:0 0 12px; }

.stat { padding:18px 20px; }
.stat .label { font-size:12.5px; color:var(--mut); display:flex; align-items:center; gap:7px; }
.stat .num { font-size:30px; font-weight:700; letter-spacing:-.02em; margin-top:8px; line-height:1; }
.stat .sub { font-size:12px; color:var(--mut-2); margin-top:6px; }
.stat .ic { width:16px; height:16px; color:var(--brand); }

/* ============================================================ BADGES */
.badge-s { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600;
  padding:3px 9px; border-radius:20px; line-height:1.4; white-space:nowrap; }
.badge-s::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.9; }
.s-submitted,.s-new   { color:var(--info);   background:var(--info-bg); }
.s-in_progress,.s-contacted { color:var(--warn); background:var(--warn-bg); }
.s-completed,.s-won,.s-paid { color:var(--ok); background:var(--ok-bg); }
.s-qualified { color:var(--violet); background:var(--violet-bg); }
.s-declined,.s-lost,.s-spam { color:var(--grey); background:var(--grey-bg); }
.s-due { color:var(--warn); background:var(--warn-bg); }
.s-overdue { color:var(--red); background:var(--red-bg); }
.pri-high { color:var(--red); }
.pri-normal { color:var(--mut); }
.pri-low { color:var(--mut-2); }

/* ============================================================ TABLE */
.tbl { width:100%; border-collapse:collapse; }
.tbl th { text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--mut);
  font-weight:600; padding:11px 14px; border-bottom:1px solid var(--line); background:var(--surface-2); }
.tbl td { padding:13px 14px; border-bottom:1px solid var(--line-2); vertical-align:top; }
.tbl tr:last-child td { border-bottom:0; }
.tbl tr.click { cursor:pointer; }
.tbl tr.click:hover td { background:var(--surface-2); }
.tbl .muted { color:var(--mut); }
.tbl .nowrap { white-space:nowrap; }
.cellname { font-weight:600; }
.cellsub { color:var(--mut); font-size:12.5px; }

/* ============================================================ REQUESTS */
.req-item { padding:15px 20px; border-bottom:1px solid var(--line-2); display:flex; gap:14px; align-items:flex-start; cursor:pointer; }
.req-item:hover { background:var(--surface-2); }
.req-item:last-child { border-bottom:0; }
.req-item .grow { flex:1; min-width:0; }
.req-item .subj { font-weight:600; }
.req-item .meta { color:var(--mut); font-size:12.5px; margin-top:3px; display:flex; gap:10px; flex-wrap:wrap; }

/* comment thread */
.thread { display:flex; flex-direction:column; gap:12px; }
.cmt { display:flex; gap:10px; }
.cmt .av { width:30px; height:30px; border-radius:50%; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; color:#fff; background:var(--mut); }
.cmt.admin .av { background:var(--brand); }
.cmt .bubble { background:var(--surface-2); border:1px solid var(--line-2); border-radius:10px; padding:9px 13px; flex:1; }
.cmt.admin .bubble { background:var(--brand-soft); border-color:#ecd9e5; }
.cmt .who { font-size:12.5px; font-weight:600; }
.cmt .who small { color:var(--mut-2); font-weight:400; margin-left:7px; }
.cmt .txt { margin-top:3px; }

/* ============================================================ BARS (analytics) */
.bars { display:flex; align-items:flex-end; gap:10px; height:130px; padding-top:8px; }
.bars .col { flex:1; display:flex; flex-direction:column; align-items:center; gap:7px; height:100%; justify-content:flex-end; }
.bars .bar { width:100%; max-width:34px; background:linear-gradient(var(--brand), var(--brand-ink)); border-radius:5px 5px 0 0; min-height:3px; transition:height .4s; }
.bars .blab { font-size:10.5px; color:var(--mut-2); }
.bars .bval { font-size:11px; color:var(--mut); font-weight:600; }

/* ============================================================ WEBSITE / HEALTH */
.score-card { display:flex; flex-direction:column; }
.gauge { flex:0 0 auto; line-height:0; }
.breakdown { display:flex; flex-direction:column; gap:11px; }
.brk-top { display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:600; }
.brk-bar { height:6px; background:var(--line); border-radius:6px; margin:5px 0 3px; overflow:hidden; }
.brk-bar span { display:block; height:100%; background:linear-gradient(90deg, var(--brand), var(--accent)); border-radius:6px; transition:width .5s; }
.brk-note { font-size:11.5px; color:var(--mut-2); }

.mini { background:var(--surface-2); border:1px solid var(--line-2); border-radius:9px; padding:12px 8px; text-align:center; }
.mini .mlab { font-size:11px; color:var(--mut); }
.mini .mval { font-size:21px; font-weight:700; margin-top:3px; letter-spacing:-.01em; }

.spark { display:flex; align-items:flex-end; gap:3px; height:62px; }
.spark.tall { height:124px; gap:4px; }
.spark .sp { flex:1; background:linear-gradient(var(--brand), var(--brand-ink)); border-radius:3px 3px 0 0; min-height:3px; opacity:.85; transition:opacity .15s; }
.spark .sp:hover { opacity:1; }

.kv { padding:8px 16px 14px; display:flex; flex-direction:column; gap:3px; }
.kv-row { position:relative; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 11px; border-radius:7px; font-size:13px; overflow:hidden; }
.kv-bar { position:absolute; left:0; top:0; bottom:0; background:var(--brand-soft); border-radius:7px; z-index:0; transition:width .5s; }
.kv-k, .kv-v { position:relative; z-index:1; }
.kv-k { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.kv-v { font-weight:700; color:var(--brand); flex:0 0 auto; }

/* ============================================================ FORM / PANEL */
.form-row { margin-bottom:14px; }
.form-row label { display:block; font-size:12px; color:var(--mut); margin-bottom:5px; font-weight:500; }
.form-row input, .form-row textarea, .form-row select {
  width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); color:var(--ink);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(var(--brand-rgb),.10); background:#fff;
}
.form-row textarea { min-height:96px; resize:vertical; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* slide-over panel */
.overlay { position:fixed; inset:0; background:rgba(16,24,40,.42); opacity:0; pointer-events:none; transition:.2s; z-index:50; }
.overlay.show { opacity:1; pointer-events:auto; }
.panel {
  position:fixed; top:0; right:0; height:100vh; width:min(540px,94vw); background:var(--surface);
  box-shadow:-20px 0 60px -30px rgba(16,24,40,.4); transform:translateX(100%); transition:transform .25s; z-index:51;
  display:flex; flex-direction:column;
}
.panel.show { transform:translateX(0); }
.panel-head { padding:20px 24px; border-bottom:1px solid var(--line); display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.panel-body { padding:20px 24px; overflow-y:auto; flex:1; }
.panel-foot { padding:14px 24px; border-top:1px solid var(--line); display:flex; gap:10px; }
.x { cursor:pointer; color:var(--mut); font-size:22px; line-height:1; border:0; background:none; padding:0; }

/* ============================================================ MISC */
.empty { text-align:center; color:var(--mut); padding:48px 20px; }
.empty .big { font-size:15px; color:var(--ink); font-weight:600; margin-bottom:4px; }
.muted { color:var(--mut); }
.right { text-align:right; }
.flex { display:flex; align-items:center; gap:10px; }
.between { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.spread { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}
.toast {
  position:fixed; bottom:22px; left:50%; transform:translateX(-50%) translateY(20px); opacity:0;
  background:var(--ink); color:#fff; padding:11px 18px; border-radius:10px; font-size:13.5px; z-index:80;
  transition:.25s; box-shadow:0 10px 30px -10px rgba(0,0,0,.4); pointer-events:none;
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.plan-card { background:linear-gradient(135deg, var(--brand), var(--brand-ink)); color:#fff; border:0; }
.plan-card .price { font-size:30px; font-weight:700; }
.plan-card .price small { font-size:14px; font-weight:400; opacity:.8; }
.plan-card .tier { font-family:var(--brand-serif); font-size:22px; font-weight:600; }
.dot-accent { color:var(--accent); }

/* ---- plan management ---- */
.plan-btn { background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.3); color:#fff; }
.plan-btn:hover { background:rgba(255,255,255,.22); border-color:rgba(255,255,255,.5); }
.cancel-banner { background:rgba(0,0,0,.22); border:1px solid rgba(255,255,255,.25); border-radius:8px;
  padding:8px 11px; font-size:12.5px; color:#fff; }
.plan-opt { display:flex; align-items:center; gap:12px; padding:14px 16px; border:1px solid var(--line);
  border-radius:10px; margin-bottom:10px; cursor:pointer; transition:border-color .15s, background .15s; }
.plan-opt:hover { border-color:var(--brand); }
.plan-opt.cur { border-color:var(--brand); background:var(--brand-soft); }
.plan-opt .grow { flex:1; }
.plan-opt input { accent-color:var(--brand); }

/* ============================================================ FILES */
.files-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:14px; }
.file-tile { border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--surface);
  display:flex; flex-direction:column; }
.file-tile .thumb { width:100%; height:120px; object-fit:cover; display:block; background:var(--surface-2);
  border-bottom:1px solid var(--line-2); }
.file-tile .thumb-ic { display:flex; align-items:center; justify-content:center; color:var(--mut-2); }
.file-tile .thumb-ic .ic { width:34px; height:34px; }
.file-meta { padding:10px 12px 4px; min-width:0; }
.file-name { font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.file-sub { color:var(--mut-2); font-size:11.5px; margin-top:2px; }
.file-acts { display:flex; gap:6px; padding:8px 12px 11px; }
.file-acts .btn { padding:5px 9px; }
.file-acts .ic { width:15px; height:15px; }

.drop { border:2px dashed var(--line); border-radius:12px; padding:26px 18px; text-align:center;
  color:var(--mut); display:flex; flex-direction:column; align-items:center; gap:8px;
  transition:border-color .15s, background .15s; }
.drop.over { border-color:var(--brand); background:var(--brand-soft); }
.drop .ic { width:26px; height:26px; color:var(--brand); }
.drop b { color:var(--ink); }
.linklike { color:var(--brand); font-weight:600; cursor:pointer; text-decoration:underline; }

.up-row { display:flex; align-items:center; gap:12px; padding:9px 2px; font-size:13px; }
.up-row.err .up-name { color:var(--red); }
.up-name { flex:0 1 240px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.up-bar { flex:1; height:7px; background:var(--line); border-radius:6px; overflow:hidden; }
.up-bar span { display:block; height:100%; width:0; background:linear-gradient(90deg, var(--brand), var(--accent)); transition:width .2s; }
.up-pct { flex:0 0 34px; text-align:right; color:var(--mut); font-weight:600; font-size:12px; }

/* ============================================================ RESPONSIVE */
@media (max-width:880px) {
  .app { grid-template-columns:1fr; }
  .sidebar { position:fixed; left:0; top:0; width:264px; transform:translateX(-100%); transition:transform .25s; z-index:60; }
  .sidebar.open { transform:translateX(0); }
  .menu-btn { display:inline-flex; }
  .grid.cols-4 { grid-template-columns:1fr 1fr; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns:1fr; }
  .row2 { grid-template-columns:1fr; }
  .content { padding:18px 16px 50px; }
  .topbar { padding:14px 16px; }
  .hide-sm { display:none; }
}
@media (max-width:520px) {
  .grid.cols-4 { grid-template-columns:1fr; }
}

/* ============================================================
   WELCOME / ONBOARDING  — first-login explainer + quickstart
   Self-contained, CSP-safe (no external media). The "video" is
   a branded motion-graphics tour rendered in CSS/SVG.
   ============================================================ */
.welcome-overlay{
  position:fixed; inset:0; z-index:100; display:none;
  align-items:flex-start; justify-content:center; padding:34px 18px;
  background:rgba(21,9,17,.60); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  overflow-y:auto;
}
.welcome-overlay.show{ display:flex; }
.welcome-modal{
  width:min(780px,100%); margin:auto; background:var(--surface);
  border-radius:18px; overflow:hidden; box-shadow:0 40px 90px -24px rgba(0,0,0,.55);
  animation:wPop .32s cubic-bezier(.2,.7,.3,1);
}
@keyframes wPop{ from{ opacity:0; transform:translateY(16px) scale(.98);} to{ opacity:1; transform:none; } }

/* ---- the motion-graphics "video" stage ---- */
.wv-stage{
  position:relative; aspect-ratio:16/9; color:#fff; overflow:hidden;
  background:
    radial-gradient(130% 120% at 12% -10%, #86285d 0%, transparent 52%),
    radial-gradient(130% 130% at 108% 116%, #35102630 0%, transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-ink) 100%);
}
.wv-scene{
  position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:22px;
  padding:6.5% 8% 15%; text-align:center; opacity:0; transform:translateY(10px);
  transition:opacity .5s ease, transform .5s ease; pointer-events:none;
}
.wv-scene.active{ opacity:1; transform:none; }

.wv-cap{ max-width:34em; }
.wv-kicker{ font-size:10.5px; letter-spacing:.24em; text-transform:uppercase; font-weight:700; color:var(--accent); margin-bottom:11px; }
.wv-title{ font-family:var(--brand-serif); font-weight:600; font-size:clamp(23px,4.4vw,40px); line-height:1.12; letter-spacing:-.01em; }
.wv-sub{ margin-top:11px; font-size:clamp(12.5px,1.75vw,16px); line-height:1.55; color:rgba(255,255,255,.82); }
/* stagger the caption in on activate */
.wv-scene .wv-kicker,.wv-scene .wv-title,.wv-scene .wv-sub{ opacity:0; transform:translateY(9px); }
.wv-scene.active .wv-kicker{ animation:wRise .55s .05s ease forwards; }
.wv-scene.active .wv-title { animation:wRise .6s .13s ease forwards; }
.wv-scene.active .wv-sub   { animation:wRise .6s .24s ease forwards; }
@keyframes wRise{ to{ opacity:1; transform:none; } }

.wv-visual{ height:40%; min-height:96px; display:flex; align-items:center; justify-content:center; }

/* -- scene: intro diamond -- */
.wv-diamond{ position:relative; width:74px; height:74px; }
.wv-diamond i{ position:absolute; inset:0; margin:auto; width:34px; height:34px; background:var(--accent);
  border-radius:6px; transform:rotate(45deg) scale(0); box-shadow:0 0 40px rgba(212,175,55,.55); }
.wv-diamond b{ position:absolute; inset:0; border:2px solid rgba(212,175,55,.5); border-radius:12px; transform:rotate(45deg) scale(.4); opacity:0; }
.wv-scene.active .wv-diamond i{ animation:wDia .8s .1s cubic-bezier(.2,.8,.3,1) forwards; }
.wv-scene.active .wv-diamond b{ animation:wRing 1.4s .2s ease-out forwards; }
@keyframes wDia{ to{ transform:rotate(45deg) scale(1); } }
@keyframes wRing{ 0%{opacity:.9; transform:rotate(45deg) scale(.4);} 100%{opacity:0; transform:rotate(45deg) scale(1.7);} }

/* -- scene: overview stat cards -- */
.wv-cards{ display:flex; gap:12px; flex-wrap:wrap; justify-content:center; }
.wv-card{ background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.16); border-radius:12px;
  padding:12px 16px; min-width:104px; -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
  opacity:0; transform:translateY(14px); }
.wv-card .l{ font-size:10.5px; letter-spacing:.05em; text-transform:uppercase; color:rgba(255,255,255,.7); }
.wv-card .n{ font-size:26px; font-weight:700; letter-spacing:-.02em; margin-top:3px; line-height:1; }
.wv-card .n small{ font-size:12px; color:var(--accent); font-weight:700; margin-left:2px; }
.wv-scene.active .wv-card{ animation:wRise .55s ease forwards; }
.wv-scene.active .wv-card:nth-child(1){ animation-delay:.10s; }
.wv-scene.active .wv-card:nth-child(2){ animation-delay:.22s; }
.wv-scene.active .wv-card:nth-child(3){ animation-delay:.34s; }
.wv-scene.active .wv-card:nth-child(4){ animation-delay:.46s; }

/* -- scene: health gauge -- */
.wv-gauge{ display:flex; align-items:center; gap:20px; }
.wv-gauge svg{ width:118px; height:118px; }
.wv-gauge .ring-fg{ stroke-dasharray:327; stroke-dashoffset:327; }
.wv-scene.active .wv-gauge .ring-fg{ animation:wSweep 1.3s .2s cubic-bezier(.3,.7,.3,1) forwards; }
@keyframes wSweep{ to{ stroke-dashoffset:26; } }   /* ~92% of 327 */
.wv-gauge .g-num{ font:700 30px/1 var(--brand-font); fill:#fff; }
.wv-gauge .g-gr { font:700 13px/1 var(--brand-font); fill:var(--accent); }
.wv-gchips{ display:flex; flex-direction:column; gap:9px; text-align:left; }
.wv-gchip{ display:flex; align-items:center; gap:8px; font-size:13px; color:rgba(255,255,255,.9); opacity:0; transform:translateX(-8px); }
.wv-gchip i{ width:8px; height:8px; border-radius:50%; background:var(--accent); flex:0 0 auto; }
.wv-scene.active .wv-gchip{ animation:wRise .5s ease forwards; }
.wv-scene.active .wv-gchip:nth-child(1){ animation-delay:.5s; }
.wv-scene.active .wv-gchip:nth-child(2){ animation-delay:.66s; }
.wv-scene.active .wv-gchip:nth-child(3){ animation-delay:.82s; }

/* -- scene: request status flow -- */
.wv-req{ width:min(360px,80%); background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.16);
  border-radius:12px; padding:14px 16px; text-align:left; }
.wv-req .rq-t{ font-weight:600; font-size:14px; }
.wv-req .rq-s{ font-size:12px; color:rgba(255,255,255,.62); margin-top:2px; }
.wv-steps{ display:flex; align-items:center; gap:8px; margin-top:13px; }
.wv-step{ flex:1; height:5px; border-radius:4px; background:rgba(255,255,255,.18); position:relative; overflow:hidden; }
.wv-step span{ position:absolute; inset:0; width:0; background:var(--accent); }
.wv-scene.active .wv-step:nth-child(1) span{ animation:wFill .5s .3s ease forwards; }
.wv-scene.active .wv-step:nth-child(2) span{ animation:wFill .5s 1.5s ease forwards; }
.wv-scene.active .wv-step:nth-child(3) span{ animation:wFill .5s 2.7s ease forwards; }
@keyframes wFill{ to{ width:100%; } }
.wv-steplab{ display:flex; justify-content:space-between; margin-top:7px; font-size:10.5px; letter-spacing:.03em; color:rgba(255,255,255,.6); }
.wv-steplab b{ color:#fff; font-weight:600; }

/* -- scene: leads bars -- */
.wv-bars{ display:flex; align-items:flex-end; gap:9px; height:104px; }
.wv-bars .b{ width:26px; background:linear-gradient(var(--accent), #b98f22); border-radius:5px 5px 0 0;
  transform:scaleY(0); transform-origin:bottom; }
.wv-scene.active .wv-bars .b{ animation:wGrow .7s cubic-bezier(.3,.7,.3,1) forwards; }
.wv-scene.active .wv-bars .b:nth-child(1){ animation-delay:.15s; }
.wv-scene.active .wv-bars .b:nth-child(2){ animation-delay:.27s; }
.wv-scene.active .wv-bars .b:nth-child(3){ animation-delay:.39s; }
.wv-scene.active .wv-bars .b:nth-child(4){ animation-delay:.51s; }
.wv-scene.active .wv-bars .b:nth-child(5){ animation-delay:.63s; }
.wv-scene.active .wv-bars .b:nth-child(6){ animation-delay:.75s; }
@keyframes wGrow{ to{ transform:scaleY(1); } }

/* -- scene: files + social tiles -- */
.wv-tiles{ display:flex; gap:12px; flex-wrap:wrap; justify-content:center; }
.wv-tile{ width:96px; height:76px; border-radius:11px; background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.16);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; font-size:11px; color:rgba(255,255,255,.85);
  opacity:0; transform:translateY(12px); }
.wv-tile svg{ width:24px; height:24px; stroke:var(--accent); fill:none; stroke-width:2; }
.wv-scene.active .wv-tile{ animation:wRise .55s ease forwards; }
.wv-scene.active .wv-tile:nth-child(1){ animation-delay:.12s; }
.wv-scene.active .wv-tile:nth-child(2){ animation-delay:.26s; }
.wv-scene.active .wv-tile:nth-child(3){ animation-delay:.40s; }

/* -- scene: done check -- */
.wv-check{ width:78px; height:78px; border-radius:50%; background:rgba(212,175,55,.16); border:2px solid var(--accent);
  display:flex; align-items:center; justify-content:center; transform:scale(0); }
.wv-check svg{ width:38px; height:38px; stroke:var(--accent); fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round;
  stroke-dasharray:40; stroke-dashoffset:40; }
.wv-scene.active .wv-check{ animation:wPopIn .5s .15s cubic-bezier(.2,.8,.3,1) forwards; }
.wv-scene.active .wv-check svg{ animation:wDraw .5s .5s ease forwards; }
@keyframes wPopIn{ to{ transform:scale(1); } }
@keyframes wDraw{ to{ stroke-dashoffset:0; } }

/* ---- skip (top-right) ---- */
.wv-skip{ position:absolute; top:12px; right:13px; z-index:4; background:rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.28); color:#fff; font-size:12px; font-weight:600; border-radius:20px;
  padding:6px 13px; cursor:pointer; -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px); transition:.15s; }
.wv-skip:hover{ background:rgba(0,0,0,.45); }

/* ---- control bar (progress + play/pause + sound) ---- */
.wv-ctrl{ position:absolute; left:0; right:0; bottom:0; z-index:4; padding:20px 16px 12px;
  background:linear-gradient(transparent, rgba(24,8,18,.55)55%); }
.wv-progress{ height:4px; border-radius:4px; background:rgba(255,255,255,.22); overflow:hidden; cursor:pointer; }
.wv-progress .fill{ display:block; height:100%; width:0; background:var(--accent); border-radius:4px; }
.wv-crow{ display:flex; align-items:center; gap:12px; margin-top:9px; }
.wv-btn{ background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.24); color:#fff; cursor:pointer;
  width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; transition:.15s; flex:0 0 auto; }
.wv-btn:hover{ background:rgba(255,255,255,.26); }
.wv-btn svg{ width:16px; height:16px; fill:currentColor; }
.wv-dots{ display:flex; gap:6px; flex:1; align-items:center; }
.wv-dot{ width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.34); cursor:pointer; transition:.2s; }
.wv-dot.on{ background:var(--accent); transform:scale(1.25); }
.wv-time{ font-size:11.5px; color:rgba(255,255,255,.72); font-variant-numeric:tabular-nums; flex:0 0 auto; }
.wv-sound{ background:none; border:1px solid rgba(255,255,255,.28); color:rgba(255,255,255,.9); cursor:pointer;
  border-radius:20px; padding:6px 11px; font-size:11.5px; font-weight:600; display:flex; align-items:center; gap:6px; transition:.15s; flex:0 0 auto; }
.wv-sound:hover{ background:rgba(255,255,255,.12); }
.wv-sound.on{ border-color:var(--accent); color:var(--accent); }
.wv-sound svg{ width:14px; height:14px; fill:currentColor; }

/* ---- quickstart guide below the video ---- */
.wv-guide{ padding:24px 26px 8px; }
.wv-ghead{ font-family:var(--brand-serif); font-weight:600; font-size:20px; letter-spacing:-.01em; }
.wv-gsub{ color:var(--mut); font-size:13px; margin:3px 0 16px; }
.qs-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.qs-item{ display:flex; gap:12px; align-items:flex-start; padding:12px 13px; border:1px solid var(--line);
  border-radius:11px; background:var(--surface-2); }
.qs-ic{ width:34px; height:34px; border-radius:9px; background:var(--brand-soft); color:var(--brand);
  display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.qs-ic .ic,.qs-ic svg{ width:17px; height:17px; }
.qs-item b{ font-size:13.5px; }
.qs-item p{ margin:2px 0 0; font-size:12.5px; color:var(--mut); line-height:1.45; }

/* ---- footer CTA ---- */
.wv-cta{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
  padding:18px 26px 24px; }
.wv-cta .btn-primary{ padding:11px 24px; font-size:14.5px; }
.wv-cta-note{ font-size:12px; color:var(--mut-2); max-width:20em; }
.wv-cta-note b{ color:var(--mut); }

/* ---- Getting-started chip on Overview ---- */
#ovTour{ gap:7px; }

@media (max-width:620px){
  .welcome-overlay{ padding:0; }
  .welcome-modal{ border-radius:0; min-height:100%; }
  .wv-scene{ gap:16px; padding:8% 7% 17%; }
  .wv-visual{ min-height:82px; }
  .qs-grid{ grid-template-columns:1fr; }
  .wv-gauge{ gap:14px; }
  .wv-gauge svg{ width:96px; height:96px; }
  .wv-cta{ justify-content:center; text-align:center; }
}
