/* ═══════════════════════════════════════════════════════════════════════
   VAULT DESIGN SYSTEM — Phase 2 product surfaces (Vault Professional,
   VaultRecruiter, admin consoles). Loaded ONLY by the /vp, /vr and
   /adminlogin layouts — must never co-load with /global.css (Phase 1).
   Self-contained: no tailwind dependency, no font downloads.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Uniform network palette (owner direction 2026-11-12): white surfaces,
     near-black ink, one professional blue accent — the LinkedIn/Facebook
     family of whites, blacks and blues shared with the network front door
     (/pro.css). /network.css was retired 2026-11-20 (dead code, never
     referenced by any layout). */
  --v-bg: #f0f2f5;
  --v-surface: #ffffff;
  --v-ink: #050505;
  --v-muted: #65676b;
  --v-accent: #0a66c2;
  --v-accent-hover: #004182;
  --v-accent-soft: #e8f1fb;
  --v-line: #e4e6eb;
  /* Side rail: LIGHT since the 2026-11-12 classic redesign — the console
     shells (admin + member) join the white/black/blue family. Tokens kept
     under the same names so every legacy rule keeps working. */
  --v-side: #ffffff;
  --v-side-ink: #3a4149;
  --v-side-muted: #65676b;
  --v-side-line: #e4e6eb;
  --v-danger: #b3402e;
  --v-danger-soft: #f7e8e4;
  --v-ok: #1f6640;
  --v-ok-soft: #e6f0e9;
  --v-warn: #7a5410;
  --v-warn-soft: #f6eeda;
  --v-radius: 10px;
  --v-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ── page scaffolding ─────────────────────────────────────────────────── */

.vault-page {
  min-height: 100vh;
  background: var(--v-bg);
  color: var(--v-ink);
  font-family: var(--v-font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.vault-page *,
.vault-page *::before,
.vault-page *::after { box-sizing: border-box; }

.vault-page a { color: var(--v-accent); text-decoration: none; }
.vault-page a:hover { text-decoration: underline; }

/* auth surfaces: centered card.
   --bts-cookie-space (set on :root by the consent banner while it is
   visible, removed on dismissal) subtracts the banner footprint so the
   card + its submit button center in the BANNER-FREE viewport instead of
   under the overlay on first paint (short-viewport login-blocker fix). */
.vault-auth {
  min-height: calc(100vh - var(--bts-cookie-space, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  gap: 16px;
}

/* short viewports (laptop windows, landscape tablets): tighten the auth
   chrome so the card + submit button clear the cookie banner without
   scrolling; the banner's one-shot nudge covers the remainder. */
@media (max-height: 820px) {
  .vault-auth { padding: 12px 16px; gap: 10px; }
}

.vault-auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--v-ink);
  text-decoration: none;
}
.vault-auth-brand:hover { text-decoration: none; }
.vault-auth-brand .vault-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--v-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
}

.vault-card {
  background: var(--v-surface);
  border: 1px solid var(--v-line);
  border-radius: var(--v-radius);
  box-shadow: 0 1px 2px rgba(5, 10, 20, 0.05);
}

.vault-auth .vault-card {
  width: 100%;
  max-width: 470px;
  padding: 28px;
}

.vault-auth-sub {
  color: var(--v-muted);
  font-size: 13.5px;
  text-align: center;
  max-width: 470px;
}

/* ── typography ───────────────────────────────────────────────────────── */

.vault-h1 { font-size: 21px; font-weight: 700; margin: 0 0 4px; }
.vault-h2 { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.vault-sub { color: var(--v-muted); font-size: 13.5px; margin: 0 0 20px; }
.vault-muted { color: var(--v-muted); }
.vault-small { font-size: 12.5px; }

/* ── forms ────────────────────────────────────────────────────────────── */

.vault-field { margin-bottom: 14px; }
.vault-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--v-ink);
}
.vault-input,
.vault-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--v-line);
  border-radius: 8px;
  font: inherit;
  color: var(--v-ink);
  background: #fff;
}
.vault-input:focus,
.vault-select:focus {
  outline: 2px solid var(--v-accent-soft);
  border-color: var(--v-accent);
}
.vault-row { display: flex; gap: 10px; }
.vault-row > * { flex: 1; }

.vault-check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 4px 0 16px;
  font-size: 13.5px;
  color: var(--v-muted);
  cursor: pointer;
}
.vault-check input { margin-top: 3px; accent-color: var(--v-accent); }

.vault-error {
  background: var(--v-danger-soft);
  color: var(--v-danger);
  border: 1px solid #eac9c1;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  margin-bottom: 14px;
}
.vault-ok {
  background: var(--v-ok-soft);
  color: var(--v-ok);
  border: 1px solid #c6dfcd;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  margin-bottom: 14px;
}
.vault-info {
  background: var(--v-accent-soft);
  color: var(--v-accent);
  border: 1px solid #c7ddf5;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  margin-bottom: 14px;
}

/* ── Rounds 4–5 shared member-page utilities (design foundation §4) ────
   The member surfaces (vp-*.tsx, vr-*.tsx) had drifted into ~600
   stereotyped inline styles for the same five layout intents. These
   classes replace them — one pattern per intent, on the sheet that
   owns the surface (vault.css). Modifiers compose: .vm-stack + .vm-gap-10
   etc. Keep them small and structural only; visual identity stays in
   the component classes. */

/* danger-tinted info box (was `style={{ borderColor: '#f0c8b8', color:
   '#973726' }}` on .vault-info, 10×) — the one destructive/error tone
   of the member app */
.vm-alert {
  background: #fdf3f0;
  color: #973726;
  border-color: #f0c8b8;
}

/* vertical stack (was style={{ marginBottom: N }} on every child) */
.vm-stack { display: grid; gap: 14px; }
.vm-stack--tight { gap: 8px; }

/* horizontal row (was display:flex + gap + alignItems, 20×) */
.vm-row { display: flex; align-items: center; gap: 8px; }
.vm-row--between { justify-content: space-between; }
.vm-row--wrap { flex-wrap: wrap; }
.vm-row--end { justify-content: flex-end; }
.vm-row--push { margin-left: auto; }  /* was marginLeft: 'auto', 10× */

/* two-column form grid (was gridTemplateColumns: '1fr 1fr', gap: 10, 8×) */
.vm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .vm-grid-2 { grid-template-columns: 1fr; } }

/* one-off spacing helpers for the remaining margins */
.vm-mt4 { margin-top: 4px; } .vm-mt6 { margin-top: 6px; }
.vm-mt8 { margin-top: 8px; } .vm-mt10 { margin-top: 10px; }
.vm-mb0 { margin-bottom: 0; } .vm-mb6 { margin-bottom: 6px; }
.vm-mb8 { margin-bottom: 8px; } .vm-mb10 { margin-bottom: 10px; }
.vm-mb14 { margin-bottom: 14px; }
.vm-nowrap { white-space: nowrap; }   /* was 3× */
.vm-block { display: block; }         /* was 4× */
.vm-flex1 { flex: 1; }                /* was 28× */

/* ── buttons ──────────────────────────────────────────────────────────── */

.vault-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  background: var(--v-accent);
  color: #fff;
  transition: background 0.15s ease;
}
.vault-btn:hover { background: var(--v-accent-hover); text-decoration: none; }
.vault-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.vault-btn-block { width: 100%; }
.vault-btn-ghost {
  background: #fff;
  color: var(--v-ink);
  border-color: var(--v-line);
}
.vault-btn-ghost:hover { background: #f0f2f5; }
.vault-btn-danger { background: var(--v-danger); }
.vault-btn-danger:hover { background: #973726; }
.vault-btn-sm { padding: 5px 11px; font-size: 13px; }

.vault-oauth { display: flex; flex-direction: column; gap: 9px; margin: 6px 0 14px; }
.vault-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--v-muted);
  font-size: 12px;
  margin: 16px 0;
}
.vault-divider::before,
.vault-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--v-line);
}

/* ── console shell (sidebar + main) ───────────────────────────────────── */

.vault-console { display: flex; min-height: 100vh; }

.vault-side {
  width: 232px;
  flex-shrink: 0;
  background: var(--v-side);
  color: var(--v-side-ink);
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--v-side-line);
}
/* §16.6 a11y fix: the generic anchor rule below (.vault-page a,
   specificity 0-1-1) used to override .vault-side-link (0-1-0), painting
   every sidebar link accent-teal on the dark rail — 2.61:1 contrast.
   The scoped selectors (0-2-0) restore the intended light ink. */
.vault-side .vault-side-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--v-ink);
  font-weight: 700;
  padding: 4px 10px 12px;
  text-decoration: none;
}
.vault-side .vault-side-brand:hover { text-decoration: none; }
.vault-side-brand .vault-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--v-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.vault-side-caption {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--v-side-muted);
  padding: 10px 10px 4px;
}
.vault-side .vault-side-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--v-side-ink);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 1px;
}
.vault-side .vault-side-link:hover { background: #f0f2f5; text-decoration: none; color: var(--v-ink); }
.vault-side .vault-side-link.vault-active { background: var(--v-accent); color: #fff; }
.vault-side-foot { margin-top: auto; padding: 10px; font-size: 12px; color: var(--v-side-muted); }

.vault-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.vault-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 26px;
  background: var(--v-surface);
  border-bottom: 1px solid var(--v-line);
}
/* §16.6 link-in-text-block: inline links inside running text (muted
   notes, panel paragraphs) are underlined so they never rely on colour
   alone. Control-styled links (.vp-linklike, buttons) are unaffected. */
.vault-muted a, .vault-small a, .vault-sub a, .vault-note a,
.vault-content p a, .vault-empty a, .vault-info a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.vault-muted a:hover, .vault-small a:hover, .vault-sub a:hover,
.vault-content p a:hover, .vault-empty a:hover, .vault-info a:hover {
  color: var(--v-accent-hover);
}

/* §16.3/§16.4 header nav — RETIRED with the classic member-shell redesign
   (the .vm-header icon bar replaced it); rules kept out — nothing renders
   these classes anymore. */

/* sidebar My Communities block (§16.3/§16.4 left column) */
.vault-side-communities { margin-top: 6px; }
.vault-side .vault-side-count {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--v-side-muted);
  background: #e9eaee;
  border-radius: 999px;
  padding: 1px 7px;
}

.vault-topbar-title { font-size: 15px; font-weight: 700; }
.vault-topbar-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--v-muted); }

/* notifications bell — RETIRED with the member topbar (the .vm-header
   carries the bell now); admin consoles never rendered it. */

.vault-content { padding: 26px; max-width: 1060px; width: 100%; }

/* proxy-session indicator (§14.4) — unmissable */
.vault-proxy-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--v-warn-soft);
  border-bottom: 2px solid var(--v-warn);
  color: var(--v-warn);
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 26px;
}

/* ── data display ─────────────────────────────────────────────────────── */

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.vault-stat {
  background: var(--v-surface);
  border: 1px solid var(--v-line);
  border-radius: var(--v-radius);
  padding: 14px 16px;
}
.vault-stat-num { font-size: 24px; font-weight: 750; line-height: 1.15; }
.vault-stat-label { font-size: 12.5px; color: var(--v-muted); margin-top: 2px; }

.vault-panel {
  background: var(--v-surface);
  border: 1px solid var(--v-line);
  border-radius: var(--v-radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.vault-panel-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--v-line);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.vault-panel-body { padding: 16px; }

.vault-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vault-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--v-muted);
  padding: 9px 14px;
  border-bottom: 1px solid var(--v-line);
  background: #f8f9fb;
  white-space: nowrap;
}
.vault-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--v-line);
  vertical-align: top;
}
.vault-table tr:last-child td { border-bottom: none; }
.vault-table-wrap { overflow-x: auto; }

.vault-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.vault-badge-ok { background: var(--v-ok-soft); color: var(--v-ok); }
.vault-badge-warn { background: var(--v-warn-soft); color: var(--v-warn); }
.vault-badge-danger { background: var(--v-danger-soft); color: var(--v-danger); }
.vault-badge-muted { background: #e9eaee; color: var(--v-muted); }
.vault-badge-accent { background: var(--v-accent-soft); color: var(--v-accent); }

.vault-kv { display: grid; grid-template-columns: 190px 1fr; gap: 7px 18px; font-size: 13.5px; }
.vault-kv dt { color: var(--v-muted); }
.vault-kv dd { margin: 0; word-break: break-word; }

.vault-empty {
  padding: 26px;
  text-align: center;
  color: var(--v-muted);
  font-size: 13.5px;
}

.vault-stack { display: flex; flex-direction: column; gap: 10px; }
.vault-stack--tight { gap: 8px; }   /* Rounds 4–5: was style={{ gap: 8 }} */
.vault-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vault-inline--tight { gap: 8px; }  /* Rounds 4–5: was gap-8 inline overrides */

/* launcher cards (/adminlogin/platform) */
.vault-launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.vault-launch {
  display: block;
  padding: 20px;
  border: 1px solid var(--v-line);
  border-radius: var(--v-radius);
  background: var(--v-surface);
  color: var(--v-ink);
}
.vault-launch:hover { border-color: var(--v-accent); text-decoration: none; }
.vault-launch-title { font-weight: 700; margin-bottom: 4px; }
.vault-launch-desc { font-size: 13px; color: var(--v-muted); }

/* ── responsive ─────────────────────────────────────────────────────────
   Stage 11 (§16.5): ≤900px is now the deliberate mobile APP shell — the
   sidebar is replaced by the fixed bottom navigation (see the Stage 11
   block at the end of this file) instead of the old wrapped link row. */

@media (max-width: 900px) {
  .vault-console { flex-direction: column; }
  /* admin rail hides on phones (unchanged legacy behaviour); the MEMBER
      shell rail (.vm-rail) hides below — the bottom nav + More sheet own
      primary navigation there (§16.5 "not a shrunken desktop") */
  .vault-side { display: none; }
  .vm-rail { display: none; }
  .vault-content { padding: 14px 12px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .vm-body { padding: 14px 12px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .vault-kv { grid-template-columns: 1fr; }
  .vault-row { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════════════
   STAGE 3b — social surfaces (feed, network, chat, communities, §6.3–§6.5)
   Same tokens as above; nothing here touches Phase 1 styles.
   ═══════════════════════════════════════════════════════════════════════ */

/* avatars — initials circles with optional photo */
.vault-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--v-accent);
  overflow: hidden;
  user-select: none;
}
.vault-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vault-avatar-sm { width: 30px; height: 30px; font-size: 12px; }
.vault-avatar-lg { width: 48px; height: 48px; font-size: 16px; }

/* dashboard 3-column: sidebar comes from .vault-console; this grid splits
   the content area into feed + right rail (approved screenshot layout) */
.vp-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 20px;
  align-items: start;
}
.vp-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 76px;
}
@media (max-width: 1100px) {
  .vp-cols { grid-template-columns: minmax(0, 1fr); }
  .vp-rail { position: static; }
}

/* VR member home (§16.4): the same feed + right-rail split used by VP —
   these two classes were referenced by /vr but never defined, so the VR
   dashboard silently stacked instead of gridding (Stage 10 visual pass). */
.vp-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 20px;
  align-items: start;
}
.vp-right-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 76px;
}
@media (max-width: 1100px) {
  .vp-home-grid { grid-template-columns: minmax(0, 1fr); }
  .vp-right-rail { position: static; }
}

/* dashboard welcome banner (§16.3 / §16.4 centre column) — classic white
   card since the LinkedIn-family redesign (watercolour wash retired) */
.vp-welcome {
  background: var(--v-surface);
  border: 1px solid var(--v-line);
  border-radius: var(--v-radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.vp-welcome-hi { font-size: 19px; font-weight: 750; color: var(--v-ink); }
.vp-welcome-sub { font-size: 13px; color: var(--v-muted); margin-top: 4px; line-height: 1.55; max-width: 560px; }

/* §16.4: the locked MyZipVault panel leads the VR rail — accent border,
   solid treatment (the most prominent card, per the approved concept) */
.vp-myzipvault-panel {
  border: 1.5px solid var(--v-accent);
  background: linear-gradient(150deg, var(--v-accent-soft), var(--v-surface) 70%);
}

/* rail cards reuse .vault-panel; rows inside them */
.vp-person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--v-line);
}
.vp-person-row:last-child { border-bottom: none; }
.vp-person-main { min-width: 0; flex: 1; }
.vp-person-name {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--v-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.vp-person-name:hover { color: var(--v-accent); }
.vp-person-meta { font-size: 11.5px; color: var(--v-muted); margin-top: 1px; }
.vp-verified-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--v-ok-soft);
  color: var(--v-ok);
  font-size: 9px;
  line-height: 14px;
  text-align: center;
  font-weight: 800;
}

/* feed tabs */
.vp-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--v-line);
  margin-bottom: 16px;
}
.vp-tab {
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--v-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.vp-tab:hover { color: var(--v-ink); }
.vp-tab.vp-tab-active {
  color: var(--v-ink);
  border-bottom-color: var(--v-accent);
}

/* composer */
.vp-composer { padding: 14px 16px; }
.vp-composer textarea {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--v-line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--v-ink);
  background: #f8f9fa;
  resize: vertical;
}
.vp-composer textarea:focus { outline: 2px solid var(--v-accent-soft); border-color: var(--v-accent); }
.vp-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.vp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--v-muted);
  background: #fff;
  border: 1px solid var(--v-line);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.vp-chip:hover { background: #eef0f4; }
a.vp-chip { text-decoration: none; color: var(--v-muted); }
.vp-chip.vp-chip-on { border-color: var(--v-accent); color: var(--v-accent); background: var(--v-accent-soft); }

/* §16.3 composer Feeling picker row */
.vp-feeling-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--v-bg);
  border-radius: 8px;
}
.vp-poll-builder { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.vp-poll-builder input {
  padding: 8px 11px;
  border: 1px solid var(--v-line);
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px;
}
.vp-file-note { font-size: 12px; color: var(--v-muted); margin-top: 6px; }

/* post card */
.vp-post { padding: 14px 16px; }
.vp-post + .vp-post { margin-top: 14px; }
.vp-post-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.vp-post-identity { min-width: 0; flex: 1; }
.vp-post-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--v-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vp-post-name:hover { color: var(--v-accent); }
.vp-post-meta { font-size: 12px; color: var(--v-muted); margin-top: 1px; }
.vp-post-body {
  font-size: 14px;
  line-height: 1.6;
  margin: 10px 0 4px;
  white-space: pre-wrap;
  word-break: break-word;
}
.vp-post-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0 4px;
}
.vp-post-attachments img,
.vp-post-attachments video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--v-line);
  display: block;
}
.vp-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid var(--v-line);
  border-radius: 8px;
  margin-top: 8px;
}

/* poll */
.vp-poll { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 4px; }
.vp-poll-option {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--v-line);
  border-radius: 8px;
  font-size: 13.5px;
  cursor: pointer;
  background: #fff;
  font-family: inherit;
  text-align: left;
  overflow: hidden;
}
.vp-poll-option:hover { border-color: var(--v-accent); }
.vp-poll-fill {
  position: absolute;
  inset: 0;
  background: var(--v-accent-soft);
  z-index: 0;
}
.vp-poll-option > span { position: relative; z-index: 1; }
.vp-poll-option.vp-poll-mine { border-color: var(--v-accent); font-weight: 650; }

/* counts + action bar */
.vp-post-counts {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--v-muted);
  margin-top: 10px;
}
.vp-post-actions {
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--v-line);
  margin-top: 8px;
  padding-top: 6px;
}
.vp-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 4px;
  font-size: 13px;
  font-weight: 600;
  color: #65676b;
  background: none;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
}
.vp-action:hover { background: #eef4fb; }
.vp-action.vp-action-on { color: var(--v-accent); }
.vp-action-ico { width: 17px; height: 17px; flex-shrink: 0; }

/* reaction picker row */
.vp-reactions-row {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.vp-reaction-pick {
  font-size: 17px;
  padding: 4px 7px;
  background: #fff;
  border: 1px solid var(--v-line);
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  font-family: inherit;
}
.vp-reaction-pick:hover { transform: scale(1.12); border-color: var(--v-accent); }
.vp-reaction-pick.vp-reaction-on { border-color: var(--v-accent); background: var(--v-accent-soft); }

/* comments */
.vp-comments { border-top: 1px solid var(--v-line); margin-top: 10px; padding-top: 10px; }
.vp-comment { display: flex; gap: 9px; margin-bottom: 10px; }
.vp-comment-reply { margin-left: 34px; }
.vp-comment-bubble {
  background: #f0f2f5;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13.5px;
  line-height: 1.5;
  min-width: 0;
  flex: 1;
}
.vp-comment-head { font-size: 12px; color: var(--v-muted); margin-bottom: 2px; }
.vp-comment-form { display: flex; gap: 8px; margin-top: 6px; }
.vp-comment-form input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--v-line);
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px;
}
.vp-comment-form input:focus { outline: 2px solid var(--v-accent-soft); border-color: var(--v-accent); }

/* chat (§15.3) */
.vp-chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 170px); min-height: 420px; }
.vp-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--v-line);
}
.vp-chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8f9fa;
}
.vp-bubble {
  max-width: 72%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.vp-bubble-mine {
  align-self: flex-end;
  background: var(--v-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.vp-bubble-theirs {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--v-line);
  border-bottom-left-radius: 4px;
}
.vp-bubble-time { display: block; font-size: 10.5px; opacity: 0.65; margin-top: 3px; }
.vp-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--v-line);
}
.vp-chat-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--v-line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
}
.vp-chat-form input:focus { outline: 2px solid var(--v-accent-soft); border-color: var(--v-accent); }

/* conversation list rows */
.vp-conv-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--v-line);
  text-decoration: none;
  color: var(--v-ink);
}
.vp-conv-row:hover { background: #f8f9fa; text-decoration: none; }
.vp-conv-row:last-child { border-bottom: none; }
.vp-conv-unread {
  background: var(--v-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* network / communities helpers */
.vp-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 26px 0 10px;
}
.vp-section-title:first-child { margin-top: 0; }
.vp-tile-list { display: flex; flex-direction: column; gap: 10px; }
.vp-community-tile {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--v-line);
  border-radius: 10px;
  background: var(--v-surface);
  text-decoration: none;
  color: var(--v-ink);
}
.vp-community-tile:hover { border-color: var(--v-accent); text-decoration: none; }
.vp-community-name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vp-community-desc { font-size: 13px; color: var(--v-muted); margin-top: 4px; line-height: 1.5; }

.vp-badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }

/* quiet text button inside meta rows */
.vp-linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--v-accent);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.vp-linklike:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .vp-chat-wrap { height: calc(100vh - 120px); }
  .vp-bubble { max-width: 86%; }
}

/* §16.6 responsive fix (Stage 10): the member topbar's meta row — search
   box (230px inline) + bell + email + sign-out — overflowed every VP page
   at 390px (scrollWidth 585). Below 640px: stack the bar, let the search
   form take the full row, and drop the email echo (it stays in Settings). */
@media (max-width: 640px) {
  .vault-topbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px; }
  .vault-topbar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vault-topbar-meta { flex-wrap: wrap; gap: 8px; font-size: 12px; }
  .vault-topbar-meta .vp-topbar-email { display: none; }
  .vault-topbar-meta form { flex: 1 1 100%; }
  .vault-topbar-meta .vp-topbar-search { width: 100% !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   STAGE 11 (§16.5) — the deliberate mobile app shell + PWA surfaces.
   Phones (≤900px) get a thumb-reachable bottom nav, a More bottom sheet,
   a touch composer sheet, full-height mobile chat and stacked org cards.
   Tablet/desktop are untouched. All targets are ≥44px; safe-area insets
   pad the chrome for installed home-screen use.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── bottom navigation (fixed) ────────────────────────────────────────── */
.vp-bottom-nav {
  display: none; /* desktop never sees it */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--v-surface, #fff);
  border-top: 1px solid var(--v-line, #e4e6eb);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: stretch;
}
.vp-bottom-nav-item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--v-muted, #65676b);
  text-decoration: none;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.vp-bottom-nav-item:active { background: #f0f2f5; }
/* specificity: the generic `.vault-page a` accent rule (0-1-1) must not
   repaint anchor nav items — same bug class as the Stage 10 sidebar fix */
.vp-bottom-nav .vp-bottom-nav-item,
.vp-bottom-nav .vp-bottom-nav-item:link,
.vp-bottom-nav .vp-bottom-nav-item:visited {
  color: var(--v-muted);
  text-decoration: none;
}
.vp-bottom-nav-icon {
  position: relative;
  display: inline-flex;
  line-height: 1;
}
.vp-bottom-nav-icon svg { width: 23px; height: 23px; display: block; }
.vp-bottom-nav-label {
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.vp-bottom-nav .vp-bottom-nav-active,
.vp-bottom-nav .vp-bottom-nav-active:link,
.vp-bottom-nav .vp-bottom-nav-active:visited {
  color: var(--v-accent);
  background: var(--v-accent-soft);
}
.vp-bottom-nav-badge {
  position: absolute;
  top: -6px;
  right: -14px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--v-accent, #0a66c2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--v-surface, #fff);
}

/* ── the More bottom sheet ────────────────────────────────────────────── */
.vp-mobile-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(8, 14, 22, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.vp-mobile-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 71;
  background: var(--v-surface, #fff);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(8, 14, 22, 0.25);
  max-height: 76vh;
  overflow-y: auto;
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateY(105%);
  transition: transform 0.22s ease;
}
.vp-mobile-sheet-open { transform: translateY(0); }
.vp-mobile-sheet-backdrop.vp-mobile-sheet-open { opacity: 1; pointer-events: auto; }
.vp-mobile-sheet-head {
  position: sticky;
  top: 0;
  background: var(--v-surface, #fff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--v-line, #e4e6eb);
}
.vp-mobile-sheet-title { font-size: 15px; font-weight: 750; color: var(--v-ink); }
.vp-mobile-sheet-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 17px;
  color: var(--v-muted);
  border-radius: 10px;
  cursor: pointer;
}
.vp-mobile-sheet-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 10px; }
.vp-mobile-sheet .vp-mobile-sheet-link,
.vp-mobile-sheet .vp-mobile-sheet-link:link,
.vp-mobile-sheet .vp-mobile-sheet-link:visited {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--v-bg, #f0f2f5);
  color: var(--v-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.vp-mobile-sheet-link:active { background: var(--v-accent-soft, #e8f1fb); }
.vp-mobile-sheet-foot { display: flex; justify-content: center; padding-top: 12px; }

/* ── touch-friendly composer (§16.5): collapsed bar → full-screen sheet ── */
.vp-composer-mobile-bar {
  display: none;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--v-line);
  border-radius: 999px;
  background: var(--v-surface);
  color: var(--v-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.vp-composer-mobile-bar span.vp-composer-mobile-av { flex-shrink: 0; }
.vp-composer-mobile-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 14, 22, 0.45);
  display: flex;
  align-items: flex-end;
}
.vp-composer-mobile-panel {
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--v-surface);
  border-radius: 18px 18px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
.vp-composer-mobile-head {
  position: sticky;
  top: 0;
  background: var(--v-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--v-line);
  margin-bottom: 10px;
}
.vp-composer-mobile-title { font-size: 15px; font-weight: 750; }
.vp-composer-mobile-close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 17px;
  color: var(--v-muted);
  cursor: pointer;
}

/* ── mobile chat (§16.5): full-height, keyboard-friendly ─────────────── */
@media (max-width: 900px) {
  .vp-chat-wrap {
    height: calc(100vh - 210px);
    min-height: 420px;
    display: flex;
    flex-direction: column;
  }
  .vp-chat-head .vault-btn { display: none; } /* "All messages" — the back control + bottom nav suffice */
  .vp-chat-scroll { flex: 1 1 auto; }
  .vp-chat-form { position: sticky; bottom: 0; background: var(--v-surface); }
  .vp-chat-form input { min-height: 46px; }
  .vp-chat-form .vault-btn { min-height: 46px; min-width: 46px; }
  .vp-bubble { max-width: 86%; }
}

/* ── streamlined org workflows (§16.5): tables stack into cards ───────── */
@media (max-width: 900px) {
  .vault-table-wrap { overflow-x: visible; }
  .vault-table { border: 0; }
  .vault-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .vault-table tr {
    display: block;
    border: 1px solid var(--v-line);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--v-surface);
  }
  .vault-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    border: 0;
    padding: 6px 0;
    text-align: right;
    word-break: break-word;
  }
  .vault-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--v-muted);
    text-align: left;
  }
}

/* ── enable the shell (single switch: phones + small tablets) ─────────── */
@media (max-width: 900px) {
  .vp-bottom-nav { display: flex; }
  .vp-composer-mobile-bar { display: flex; }
  .vp-feed-composer-card { display: none; } /* the desktop composer card hides on phones */
}
@media (min-width: 901px) {
  .vp-composer-mobile-sheet { display: none; }
}

/* ── cookie-banner coexistence (Stage 11): the Phase 1 consent banner is
   fixed bottom z-60 — it must not cover the mobile bottom nav. On phones
   the banner lifts above the nav; the nav stays tappable beneath it. ──── */
@media (max-width: 900px) {
  .vp-bottom-nav { z-index: 61; }
  div[role="dialog"][aria-label="Cookie preferences"] {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── one-page onboarding (owner direction 2026-11-12) ───────────────────
   The wizard's three steps collapsed onto a single centered card (auth
   surface, not the console shell): three numbered sections stacked with
   dividers and ONE submit. Sections are visual anchors, not gates. */
.vault-onb-section {
  border-top: 1px solid var(--v-line);
  padding: 18px 0 6px;
  margin-top: 18px;
}
.vault-onb-section:first-of-type { border-top: none; padding-top: 0; margin-top: 4px; }
.vault-onb-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 12px;
}
.vault-onb-step {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--v-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.vault-onb-eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--v-accent);
}
.vault-onb-title {
  display: block;
  font-size: 15.5px;
  font-weight: 750;
  color: var(--v-ink);
  line-height: 1.3;
}
.vault-onb-submit { margin-top: 18px; }

/* Wider auth card for the one-page onboarding (three sections need more
   room than the 470px login card; still centered on the auth surface). */
.vault-auth .vault-card.vault-onb-card { max-width: 640px; }

/* ═══════════════════════════════════════════════════════════════════════
   MEMBER SHELL — the classic LinkedIn-family layout (owner direction
   2026-11-12, "feed like LinkedIn upon login"): sticky white application
   header (brand · search · icon nav · Me), light left rail (profile card,
   grouped menu, communities, chats), page body, formal network footer.
   Rendered by vp-member-shell.tsx for BOTH /vp and /vr. Link rules are
   .vm-app-scoped (0-2-0+) so the generic `.vault-page a` rule (0-1-1)
   can never repaint them — the §16.6 bug class, prevented up front.
   ═══════════════════════════════════════════════════════════════════════ */

.vm-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── skip link ────────────────────────────────────────────────────────── */
.vm-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--v-accent);
  color: #fff;
  padding: 9px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-size: 13px;
  font-weight: 650;
}
.vm-skip:focus { left: 0; }

/* ── application header ──────────────────────────────────────────────── */
.vm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--v-surface);
  border-bottom: 1px solid var(--v-line);
}
.vm-header__inner {
  max-width: 1128px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.vm-app .vm-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--v-ink);
  flex-shrink: 0;
  text-decoration: none;
}
.vm-app .vm-brand:hover { text-decoration: none; }
.vm-brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--v-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}
.vm-brand__word {
  font-size: 16.5px;
  font-weight: 750;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.vm-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #edf3f8;
  border-radius: 4px;
  padding: 0 12px;
  height: 34px;
  flex: 1 1 260px;
  max-width: 360px;
  color: var(--v-muted);
  transition: box-shadow 0.15s ease;
}
.vm-search:focus-within { box-shadow: 0 0 0 1.5px var(--v-accent); }
.vm-search svg { width: 16px; height: 16px; flex-shrink: 0; }
.vm-search input {
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 14px;
  color: var(--v-ink);
  width: 100%;
  min-width: 0;
}
.vm-search input::placeholder { color: var(--v-muted); }

.vm-header-nav {
  display: flex;
  align-items: stretch;
  margin-left: auto;
  gap: 2px;
  flex-shrink: 0;
}
.vm-app .vm-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 66px;
  padding: 6px 8px;
  color: var(--v-muted);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 2.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.vm-app .vm-nav-item:hover { color: var(--v-ink); text-decoration: none; }
.vm-app .vm-nav-item--active { color: var(--v-ink); border-bottom-color: var(--v-accent); }
.vm-nav-icon { position: relative; display: inline-flex; }
.vm-nav-icon svg { width: 23px; height: 23px; display: block; }
.vm-nav-badge {
  position: absolute;
  top: -6px;
  right: -12px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #cb112d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vm-nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--v-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}
.vm-nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── body grid: left rail + page ─────────────────────────────────────── */
.vm-body {
  width: 100%;
  max-width: 1128px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 24px 16px 48px;
  flex: 1;
}
.vm-main { min-width: 0; }

/* ── left rail ───────────────────────────────────────────────────────── */
.vm-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.vm-card {
  background: var(--v-surface);
  border: 1px solid var(--v-line);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

/* profile card — the LinkedIn "me" card */
.vm-profile-card { text-align: center; padding-bottom: 14px; }
.vm-profile-cover {
  height: 54px;
  background: linear-gradient(135deg, #0a66c2 0%, #378fe9 55%, #a4c9f0 100%);
}
.vm-profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: -36px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3.5px solid #fff;
  background: var(--v-accent);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}
.vm-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vm-app .vm-profile-name {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--v-ink);
  padding: 0 12px;
  text-decoration: none;
}
.vm-app .vm-profile-name:hover { color: var(--v-accent); }
.vm-profile-headline {
  font-size: 12.5px;
  color: var(--v-muted);
  line-height: 1.45;
  margin: 3px 14px 0;
}
.vm-profile-foot {
  border-top: 1px solid var(--v-line);
  margin: 12px 12px 0;
  padding-top: 10px;
}
.vm-app .vm-profile-link {
  font-size: 13px;
  font-weight: 650;
  color: var(--v-accent);
}

/* grouped menu card */
.vm-menu-card { padding: 8px; }
.vm-menu-group + .vm-menu-group {
  border-top: 1px solid var(--v-line);
  margin-top: 8px;
  padding-top: 6px;
}
.vm-menu-caption {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--v-muted);
  padding: 6px 10px 4px;
}
.vm-app .vm-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--v-ink);
  text-decoration: none;
}
.vm-app .vm-menu-link:hover { background: #f0f2f5; text-decoration: none; }
.vm-app .vm-menu-link--active {
  background: var(--v-accent-soft);
  color: var(--v-accent);
  font-weight: 650;
}
.vm-menu-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vm-menu-lock { color: var(--v-muted); display: inline-flex; }
.vm-menu-lock svg { width: 13px; height: 13px; }
.vm-menu-badge {
  background: var(--v-accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}
.vm-menu-count {
  font-size: 11px;
  color: var(--v-muted);
  background: #e9eaee;
  border-radius: 999px;
  padding: 1px 7px;
  flex-shrink: 0;
}

/* side cards (communities, chats) */
.vm-side-card { padding: 10px 8px; }
.vm-side-caption {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--v-muted);
  padding: 2px 10px 6px;
}
.vm-rail-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--v-muted);
  padding: 2px 0 6px;
}

/* ── the header "Me" dropdown (2026-11-13 nav pass) ────────────────────
   Everything identity lives behind the avatar: identity block (name,
   email, member since), then profile / verification / settings, then
   sign-out. Replaces the old rail account card. */
.vm-me { position: relative; display: inline-flex; }
.vm-me__trigger { background: none; border: none; cursor: pointer; font: inherit; }
.vm-me__caret {
  width: 0;
  height: 0;
  margin-top: 1px;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid currentColor;
  opacity: 0.65;
}
.vm-me__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 90;
  width: 264px;
  background: var(--v-surface);
  border: 1px solid var(--v-line);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  text-align: left;
}
.vm-app .vm-me__identity {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--v-line);
  text-decoration: none;
}
.vm-app .vm-me__identity:hover { background: #f0f2f5; }
.vm-me__name { font-size: 14.5px; font-weight: 700; color: var(--v-ink); }
.vm-me__email {
  font-size: 12px;
  color: var(--v-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vm-me__since { font-size: 11.5px; color: var(--v-muted); }
.vm-me__links { padding: 6px; }
.vm-app .vm-me__link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: none;
  font-size: 13.5px;
  color: var(--v-ink);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.vm-app .vm-me__link:hover { background: #f0f2f5; text-decoration: none; }
.vm-me__foot { border-top: 1px solid var(--v-line); padding: 6px; }
.vm-me__signout { font-weight: 600; }

/* ── in-app footer — one thin line ─────────────────────────────────────
   (2026-11-13 nav pass: the 4-column marketing footer retired —
   brochure furniture inside an application; LinkedIn-style bar only.
   The .vm-footer__inner / __brand / __col rules were removed with it.) */
.vm-footer {
  background: var(--v-surface);
  border-top: 1px solid var(--v-line);
  margin-top: auto;
}
.vm-footer__bar { border-top: none; }
.vm-footer__bar-inner {
  max-width: 1128px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.vm-footer__bar-inner small { font-size: 12px; color: var(--v-muted); }
.vm-footer__links { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.vm-app .vm-footer__links a {
  font-size: 12px;
  color: var(--v-muted);
  text-decoration: none;
}
.vm-app .vm-footer__links a:hover { color: var(--v-accent); }

/* ── member-shell responsive ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .vm-body { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 900px) {
  /* the rail is GONE on phones — the bottom nav + More sheet own
     primary navigation (§16.5 "not a shrunken desktop") */
  .vm-header__inner {
    flex-wrap: wrap;
    min-height: 0;
    padding: 8px 12px;
    row-gap: 8px;
  }
  .vm-search { order: 10; flex-basis: 100%; max-width: none; width: 100%; }
  .vm-nav-label { display: none; }
  .vm-app .vm-nav-item { min-width: 46px; padding: 4px 6px; }
  .vm-nav-icon svg { width: 25px; height: 25px; }
  .vm-nav-avatar { width: 28px; height: 28px; font-size: 11px; }
  /* header keeps Messaging · Notifications · Me; Home/Network/etc are
     covered by the bottom navigation + More sheet */
  .vm-app .vm-nav-item--secondary { display: none; }
  .vm-me__panel { position: fixed; top: auto; right: 8px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); width: min(300px, calc(100vw - 16px)); }
}
@media (max-width: 640px) {
  .vm-brand__word { display: none; }
  .vm-footer__bar-inner { flex-direction: column; align-items: flex-start; }
}

/* ── anchor specificity guards (2026-11-12 classic pass) ──────────────
   The generic `.vault-page a` rule (0,1,1) repainted every anchor-styled
   component blue: primary buttons rendered blue-on-blue (invisible),
   person/post names lost their near-black ink. Scoped (0,2,1) guards
   restore the intended colours; hovers keep their accent. */
.vault-page a.vault-btn,
.vault-page a.vault-btn-danger { color: #fff; }
.vault-page a.vault-btn-ghost { color: var(--v-ink); }
.vault-page a.vp-person-name,
.vault-page a.vp-post-name { color: var(--v-ink); }
.vault-page a.vp-person-name:hover,
.vault-page a.vp-post-name:hover { color: var(--v-accent); }
.vault-page a.vp-conv-row,
.vault-page a.vp-community-tile,
.vault-page a.vault-launch { color: var(--v-ink); }

/* ── member shell mobile order fix ─────────────────────────────────────
   The base `.vm-rail { display: flex }` sits BELOW the early ≤900px
   block, so it re-enabled the rail on phones (and with it horizontal
   overflow at 390px). This block re-declares the phone layout AFTER all
   base rules so source order can no longer flip it back on. */
@media (max-width: 900px) {
  .vm-rail { display: none; }
  .vm-body { grid-template-columns: minmax(0, 1fr); }
}

/* ── feed tabs: never wrap (mobile QA fix 2026-11-12) ──────────────────
   "For You" / "My Posts" wrapped onto two lines at 390px, shrinking tap
   targets. Tabs stay on one line; the row scrolls horizontally when the
   viewport cannot fit all five. */
.vp-tabs { overflow-x: auto; scrollbar-width: none; }
.vp-tabs::-webkit-scrollbar { display: none; }
.vp-tab { white-space: nowrap; flex-shrink: 0; }

/* ── Ambassador "Coming Soon" experience (2026-11, docs/ambassador-plan.md)
   Rendered at /r/<code> for referral visitors during pre-launch and in place
   of member surfaces for referral-journey browsers. Uses the shared design
   tokens only — no new palette. */
.amb-cs {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 18px 56px;
  text-align: center;
}
.amb-cs-emoji { font-size: 46px; line-height: 1; margin-bottom: 18px; }
.amb-cs h1 { margin-bottom: 12px; }
.amb-cs-copy { color: var(--v-muted); font-size: 14.5px; line-height: 1.65; margin: 0 auto 22px; max-width: 46ch; }
.amb-cs-note { margin-top: 14px; font-size: 12.5px; color: var(--v-muted); }
.amb-cs-brand { margin-top: 26px; font-size: 12px; color: var(--v-muted); }
.amb-cs-tester { margin-top: 34px; border-top: 1px dashed var(--v-line); padding-top: 18px; }
.amb-cs-tester-toggle {
  background: none; border: none; cursor: pointer; color: var(--v-muted);
  font-size: 12px; text-decoration: underline; padding: 4px;
}
.amb-cs-tester-toggle:hover { color: var(--v-accent); }
.amb-cs-tester-form { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 14px auto 0; text-align: left; }
.amb-cs-invalid { max-width: 560px; margin: 0 auto; }

/* ── Ambassador portal surfaces (2026-11) — landing, shell, dashboard ── */
.amb-landing { max-width: 720px; }
.amb-hero { text-align: center; margin: 18px 0 26px; }
.amb-hero-eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--v-muted); margin-bottom: 8px; }
.amb-hero-copy { color: var(--v-muted); font-size: 14.5px; line-height: 1.65; max-width: 52ch; margin: 0 auto 18px; }
.amb-hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.amb-landing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 18px 0; }
.amb-landing-foot { text-align: center; font-size: 12.5px; color: var(--v-muted); }
.amb-shell { min-height: 100vh; display: flex; flex-direction: column; }
.amb-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid var(--v-line); background: var(--v-surface);
}
.amb-topnav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.amb-navlink { color: var(--v-muted); text-decoration: none; font-size: 13.5px; padding: 4px 2px; }
.amb-navlink:hover { color: var(--v-accent); }
.amb-navlink--active { color: var(--v-ink); font-weight: 600; }
.amb-main { width: 100%; max-width: 980px; margin: 0 auto; padding: 22px 18px 60px; }
.amb-welcome { margin-bottom: 18px; }
.amb-welcome-hi { font-size: 20px; font-weight: 700; color: var(--v-ink); }
.amb-welcome-sub { font-size: 13.5px; color: var(--v-muted); margin-top: 4px; }
.amb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.amb-stat {
  border: 1px solid var(--v-line); border-radius: var(--v-radius); background: var(--v-surface);
  padding: 16px;
}
.amb-stat-num { font-size: 26px; font-weight: 700; color: var(--v-ink); }
.amb-stat-label { font-size: 12px; color: var(--v-muted); margin-top: 4px; }
.amb-linkbox { display: flex; flex-direction: column; gap: 10px; }
.amb-linkrow { width: 100%; min-width: 0; }
.amb-link {
  display: block; width: 100%; box-sizing: border-box; overflow-x: auto; white-space: nowrap;
  background: var(--v-bg, #f6f7f9); border: 1px dashed var(--v-line); border-radius: var(--v-radius);
  padding: 10px 12px; font-size: 13px; color: var(--v-ink);
}
.amb-linkbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.amb-rowlist { display: flex; flex-direction: column; }
.amb-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--v-line); font-size: 13px; }
.amb-row:first-child { border-top: none; }
.amb-form { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
@media (max-width: 640px) {
  .amb-topbar { justify-content: center; text-align: center; }
  .amb-main { padding: 16px 12px 50px; }
}
