/* ═══════════════════════════════════════════════════════
   PyngOS — Shared App Shell
   Sidebar · Top bar · Toasts · Notification panel · AI chat
   Requires: tokens.css loaded first
═══════════════════════════════════════════════════════ */

@import url('/inline-styles.css');
@import url('/theme.css');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Instrument+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── ACCESSIBILITY: Touch Targets & Focus States ── */
/* cursor/position apply to all buttons; min sizes and padding only to full-size canonical classes */
button, a[role="button"], input[type="button"], input[type="submit"] {
  cursor: pointer;
  position: relative;
}
.btn-primary, .btn-secondary, .btn-tertiary, .btn-danger, .btn-small, .btn-pill,
.btn-text-only, .btn-icon-only, .btn-close, .btn-icon-small,
a[role="button"], input[type="button"], input[type="submit"] {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 16px;
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(154,122,64,0.2);
}

/* Sidebar nav items — ensure 44px touch target */
.sb-nav-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
}

/* Icon buttons — expand hit area */
[role="button"] svg, button svg {
  pointer-events: none; /* Make SVG non-blocking for parent hit area */
}

body {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
}

/* ── Hide OLD top nav on any page that loaded app.js ── */
/* Scope to .app-main so the sidebar's own <nav> is never hidden */
body.has-sidebar .app-main nav,
body.has-sidebar .app-main .nav-bar { display: none !important; }

/* ── App Shell ── */
.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.app-sidebar {
  width: 52px; flex-shrink: 0;        /* collapsed icon rail by default */
  background: #111110;                 /* sidebar rail — hardcoded per BRANDING.md, not a token */
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 200; overflow: hidden;
  transition: width 0.22s cubic-bezier(.22,.68,0,1.15);
}
.app-sidebar:hover { width: 220px; }  /* expand on hover */

.sb-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 14px 17px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: var(--weight-medium); letter-spacing: 0.04em;
  color: var(--paper); text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0; white-space: nowrap;
}
.sb-logo em { font-style: italic; color: #c4a47a; } /* intentional sidebar variant — warmer contrast on #111110 */
.sb-wordmark { display: inline; }

.sb-nav {
  flex: 1; padding: 10px 8px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1px;
  justify-content: flex-start; /* prevent page nav CSS spreading items */
  align-items: stretch;
  position: static; /* prevent page sticky from applying */
  background: #111110;
  scrollbar-width: none;
}
.sb-nav::-webkit-scrollbar { display: none; }

.sb-section {
  padding: 14px 12px 5px;
  font-size: 10px; font-weight: var(--weight-semibold); letter-spacing: 0.09em;
  text-transform: uppercase; color: rgba(255,255,255,0.25);
}

.sb-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 7px;
  font-size: var(--text-base); font-weight: var(--weight-medium);
  text-decoration: none; color: rgba(255,255,255,0.82);
  transition: background 0.13s, color 0.13s;
  cursor: pointer; border: none; background: none;
  font-family: 'Instrument Sans', -apple-system, sans-serif;
  width: 100%; text-align: left; line-height: 1;
  white-space: nowrap;
}
.sb-link:hover { background: rgba(255,255,255,0.09); color: var(--surface); }
.sb-link.active { background: var(--gold-dim); color: var(--gold); }

.sb-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.85;
}
.sb-icon svg { width: 16px; height: 16px; display: block; }
.sb-link.active .sb-icon { opacity: 1; }
.sb-link:hover .sb-icon { opacity: 1; }

.sb-badge {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--error); border-radius: 9px;
  font-size: 10px; font-weight: var(--weight-semibold); color: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; flex-shrink: 0;
}
.app-sidebar:not(:hover) .sb-badge { display: none !important; }

/* ── Collapsed icon-rail adjustments (sidebar NOT hovered) ── */
.app-sidebar:not(:hover) .sb-logo {
  justify-content: center;
  padding: 16px 0 15px;
}
.app-sidebar:not(:hover) .sb-wordmark { display: none; }
.app-sidebar:not(:hover) .sb-logo::after {
  content: 'P';
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: var(--weight-medium); color: var(--paper);
}
.app-sidebar:not(:hover) .sb-nav { padding: 8px 6px; gap: 2px; }
.app-sidebar:not(:hover) .sb-link {
  justify-content: center;
  padding: 9px 0; gap: 0; border-radius: 8px;
}
.app-sidebar:not(:hover) .sb-link span:not(.sb-icon) { display: none; }
.app-sidebar:not(:hover) .sb-icon { width: 20px; height: 20px; opacity: 0.72; }
.app-sidebar:not(:hover) .sb-icon svg { width: 20px; height: 20px; }
.app-sidebar:not(:hover) .sb-link.active .sb-icon { opacity: 1; }
.app-sidebar:not(:hover) .sb-link:hover .sb-icon { opacity: 1; }

/* ── Main content ── */
.app-main {
  margin-left: 52px; flex: 1;
  min-height: 100vh; min-width: 0;
  padding-top: 52px;
}

/* Mobile hamburger */
.sb-mobile-toggle {
  display: none; position: fixed; top: 13px; left: 13px; z-index: 201;
  width: 36px; height: 36px; border-radius: 7px;
  background: #111110; color: var(--paper);
  border: none; cursor: pointer; font-size: var(--text-lg);
  align-items: center; justify-content: center;
}
.sb-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(14,14,12,0.55); z-index: 199;
}

/* ══════════════════════════════════════════════════════
   TOP BAR  (Notifications · Scan Card · Settings)
══════════════════════════════════════════════════════ */
.app-topbar {
  position: fixed; top: 0; left: 52px; right: 0; height: 52px;
  background: var(--surface); border-bottom: 1px solid rgba(14,14,12,0.08);
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 20px; z-index: 190;
  box-shadow: 0 1px 0 rgba(14,14,12,0.05);
}

.tb-right {
  display: flex; align-items: center; gap: 4px;
}

.tb-btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px;
  border: none; background: none; cursor: pointer;
  color: var(--ink-3); text-decoration: none;
  transition: background 0.13s, color 0.13s;
  position: relative;
}
.tb-btn:hover { background: var(--paper); color: var(--ink); }
.tb-btn.active { background: var(--gold-bg); color: var(--gold); }

.tb-icon { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.tb-icon svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }

.tb-badge {
  position: absolute; top: 5px; right: 5px;
  min-width: 14px; height: 14px; padding: 0 3px;
  background: var(--error); border-radius: 7px;
  font-size: 9px; font-weight: var(--weight-semibold); color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  line-height: 1; border: 1.5px solid var(--surface);
}

/* ══════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════════════════ */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column-reverse; gap: 10px;
  pointer-events: none; max-width: 360px;
}
.pyng-toast {
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 260px; max-width: 360px;
  padding: 12px 14px; border-radius: 10px;
  font-size: var(--text-base); font-weight: var(--weight-medium); line-height: 1.45;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  pointer-events: all; animation: toastIn 0.22s ease;
}
.pyng-toast.removing { animation: toastOut 0.18s ease forwards; }
.t-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.t-body { flex: 1; }
.t-title { font-weight: var(--weight-semibold); }
.t-msg { font-size: var(--text-sm); opacity: 0.70; margin-top: 1px; }
.t-close { background: none; border: none; cursor: pointer; opacity: 0.45; font-size: var(--text-base); padding: 1px 2px; line-height: 1; flex-shrink: 0; }
.t-close:hover { opacity: 1; }
.pyng-toast.t-default { background: var(--toast-default-bg); color: var(--toast-default-fg); }
.pyng-toast.t-success { background: var(--toast-success-bg); color: var(--toast-success-fg); }
.pyng-toast.t-error   { background: var(--toast-error-bg); color: var(--toast-error-fg); }
.pyng-toast.t-warning { background: var(--toast-warning-bg); color: var(--toast-warning-fg); }
.pyng-toast.t-info    { background: var(--toast-info-bg); color: var(--toast-info-fg); }
@keyframes toastIn  { from { opacity:0; transform: translateY(10px) scale(.97) } to { opacity:1; transform: none } }
@keyframes toastOut { to   { opacity:0; transform: translateY(8px) scale(.96) } }

/* ══════════════════════════════════════════════════════
   NOTIFICATION PANEL  (drops from top-right)
══════════════════════════════════════════════════════ */
.notif-panel {
  position: fixed; top: 52px; right: 0; width: 320px;
  bottom: 0;
  background: var(--surface); border-left: 1px solid rgba(14,14,12,0.10);
  z-index: 189; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.22s cubic-bezier(.22,.68,0,1.2);
  box-shadow: -4px 0 32px rgba(14,14,12,0.10);
}
.notif-panel.open { transform: translateX(0); }
.notif-panel-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px; border-bottom: 1px solid rgba(14,14,12,0.08);
  flex-shrink: 0;
}
.notif-panel-title { font-size: var(--text-md); font-weight: var(--weight-semibold); color: var(--ink); }
.notif-panel-actions { display: flex; gap: 6px; align-items: center; }
.notif-mark-all { font-size: var(--text-sm); color: var(--gold-dark); background: none; border: none; cursor: pointer; font-weight: var(--weight-medium); padding: 4px 6px; border-radius: 4px; }
.notif-mark-all:hover { background: var(--gold-bg); }
.notif-close { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(14,14,12,0.10); background: none; cursor: pointer; font-size: var(--text-base); display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.notif-close:hover { background: var(--paper); color: var(--ink); }
.notif-panel-body { flex: 1; overflow-y: auto; padding: 6px; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 7px; cursor: pointer; transition: background 0.12s; margin-bottom: 2px; }
.notif-item:hover { background: var(--paper); }
.notif-item.unread { background: var(--gold-bg); }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.notif-dot.unread-dot { background: var(--gold); }
.notif-dot.read-dot { background: transparent; border: 1.5px solid rgba(14,14,12,0.18); }
.notif-text { flex: 1; }
.notif-title { font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--ink); line-height: 1.4; }
.notif-sub { font-size: var(--text-sm); color: var(--ink-3); margin-top: 2px; }
.notif-empty { text-align: center; padding: 48px 20px; color: var(--ink-3); font-size: var(--text-base); }
.notif-empty-icon { margin-bottom: 10px; display: flex; justify-content: center; }
.notif-empty-icon svg { width: 28px; height: 28px; display: block; opacity: 0.35; }

/* ══════════════════════════════════════════════════════
   AI CHAT WIDGET
══════════════════════════════════════════════════════ */
.pyng-chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 890;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--paper); border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(14,14,12,.22);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.pyng-chat-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(14,14,12,.28); }
.pyng-chat-fab svg { width: 18px; height: 18px; display: block; }

.pyng-chat-panel {
  position: fixed; bottom: 80px; right: 24px; z-index: 891;
  width: 320px; max-height: 460px;
  background: var(--surface); border: 1px solid rgba(14,14,12,0.10); border-radius: 12px;
  box-shadow: 0 8px 40px rgba(14,14,12,.14);
  display: flex; flex-direction: column;
  transform: translateY(14px) scale(.97); opacity: 0; pointer-events: none;
  transition: transform .18s cubic-bezier(.22,.68,0,1.2), opacity .15s;
}
.pyng-chat-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
.pyng-chat-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid rgba(14,14,12,0.08); flex-shrink: 0; }
.pyng-chat-title { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--ink); }
.pyng-chat-subtitle { font-size: var(--text-xs); color: var(--gold-dark); font-weight: var(--weight-medium); margin-top: 1px; }
.pyng-chat-close { background: none; border: none; cursor: pointer; color: var(--ink-3); font-size: var(--text-md); padding: 2px 4px; border-radius: 4px; line-height: 1; }
.pyng-chat-close:hover { background: var(--paper); color: var(--ink); }
.pyng-chat-messages { flex: 1; overflow-y: auto; padding: 12px 13px; display: flex; flex-direction: column; gap: 8px; font-size: var(--text-base); line-height: 1.6; }
.pyng-msg { max-width: 90%; }
.pyng-msg-user { align-self: flex-end; background: var(--ink); color: var(--paper); padding: 7px 11px; border-radius: 10px 10px 2px 10px; }
.pyng-msg-ai { align-self: flex-start; background: var(--paper-2); color: var(--ink); padding: 7px 11px; border-radius: 10px 10px 10px 2px; }
.pyng-chat-hint { font-size: var(--text-xs); color: var(--ink-4); text-align: center; padding: 4px 0; }
.pyng-chat-input-row { display: flex; gap: 7px; padding: 10px 12px; border-top: 1px solid rgba(14,14,12,0.08); flex-shrink: 0; }
.pyng-chat-input { flex: 1; height: 34px; padding: 0 10px; border: 1px solid rgba(14,14,12,0.14); border-radius: 8px; font-family: 'Instrument Sans', -apple-system, sans-serif; font-size: var(--text-base); outline: none; background: var(--surface); color: var(--ink); }
.pyng-chat-input:focus { border-color: var(--gold); }
.pyng-chat-send { height: 34px; padding: 0 12px; background: var(--ink); color: var(--paper); border: none; border-radius: 8px; font-size: var(--text-base); font-weight: var(--weight-semibold); cursor: pointer; transition: opacity 0.15s; white-space: nowrap; }
.pyng-chat-send:hover { opacity: 0.85; }
.pyng-chat-send:disabled { opacity: 0.35; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════
   PAGE CONTAINER — consistent spacing inside app shell
══════════════════════════════════════════════════════ */
.app-main .page {
  padding-left: 40px;
  padding-right: 40px;
}

/* ══════════════════════════════════════════════════════
   MOBILE
══════════════════════════════════════════════════════ */
@media (max-width: 820px) {
  .app-sidebar { width: 220px; transform: translateX(-100%); transition: transform 0.22s ease; }
  .app-sidebar:hover { width: 220px; } /* disable icon-rail on mobile, use full width */
  .app-sidebar.sb-open { transform: translateX(0); }

  /* When open on mobile, override icon-rail collapsed rules to show full labels */
  .app-sidebar.sb-open .sb-wordmark { display: inline; }
  .app-sidebar.sb-open .sb-logo { justify-content: flex-start; padding: 18px 14px 17px; }
  .app-sidebar.sb-open .sb-logo::after { display: none; }
  .app-sidebar.sb-open .sb-nav { padding: 10px 8px; gap: 1px; }
  .app-sidebar.sb-open .sb-link { justify-content: flex-start; padding: 8px 12px; gap: 10px; }
  .app-sidebar.sb-open .sb-link span:not(.sb-icon) { display: flex; }
  .app-sidebar.sb-open .sb-icon { width: 16px; height: 16px; opacity: 0.85; }
  .app-sidebar.sb-open .sb-icon svg { width: 16px; height: 16px; }
  .app-sidebar.sb-open .sb-badge { display: inline-flex !important; }
  .app-sidebar.sb-open .sb-footer { display: flex; }
  .app-main { margin-left: 0; }

  /* Topbar spans full width; make room on left for hamburger */
  .app-topbar { left: 0; padding-left: 52px; }

  /* Hamburger sits inside the topbar — match topbar style */
  .sb-mobile-toggle {
    display: flex;
    top: 8px; left: 8px;
    background: none;
    color: var(--ink);
    border: 1px solid rgba(14,14,12,0.12);
  }

  .sb-overlay { display: block; visibility: hidden; opacity: 0; transition: opacity 0.22s; }
  .sb-overlay.open { visibility: visible; opacity: 1; }
  .notif-panel { width: 100%; }
  .pyng-chat-panel { width: calc(100vw - 32px); right: 16px; }
  .pyng-chat-fab { right: 16px; bottom: 16px; }

  /* Tighter page padding on mobile */
  .app-main .page {
    padding-left: 16px;
    padding-right: 16px;
  }
}
/* .sb-mobile-toggle is display:none by default — no desktop override needed */

/* ── Sidebar footer (logout) ── */
.sb-footer {
  flex-shrink: 0;
  padding: 8px 8px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.app-sidebar:not(:hover) .sb-footer { display: none; }

/* ── Pro nav badge ── */
.nav-link-pro { position: relative; }
.nav-pro-badge {
  display: inline-block; margin-left: 5px;
  font-size: 9px; font-weight: var(--weight-semibold); letter-spacing: 0.06em;
  text-transform: uppercase; vertical-align: middle;
  background: var(--gold); color: var(--surface);
  padding: 1px 5px; border-radius: 4px;
  line-height: 1.6; pointer-events: none;
}

/* ── Top nav (shared across all app pages) ── */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; position: sticky; top: 0;
  background: rgba(var(--paper-rgb), 0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); z-index: 50;
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif; font-size: 22px;
  font-weight: var(--weight-medium); letter-spacing: 0.04em; color: var(--ink); text-decoration: none;
}
.nav-logo em { font-style: italic; color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px;
  font-size: var(--text-base); font-weight: var(--weight-medium); text-decoration: none; border-radius: var(--r-sm);
  color: var(--ink-3); transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--paper-2); color: var(--ink); }
.nav-link.active { background: var(--ink); color: var(--paper); }
.nav-link.primary { background: var(--ink); color: var(--paper); margin-left: 4px; }
.nav-link.primary:hover { background: var(--ink-2); }
@media (max-width: 680px) {
  .nav-links { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; flex-shrink: 0; }
}

/* ═══════════════════════════════════════════════════════
   STANDARDIZED BUTTON SYSTEM — BRANDING.md Compliant
   Consolidated from 70+ button classes to 10 core types
   All buttons: 40px height, 8px v-padding, 16px h-padding, 13px font, 600 weight
═══════════════════════════════════════════════════════ */

/* Base button reset and accessibility */
.btn-primary,
.btn-secondary,
.btn-tertiary,
.btn-danger,
.btn-small,
.btn-pill,
.btn-text-only,
.btn-icon-only,
.btn-close,
/* legacy aliases */
.btn-hdr, .btn-hdr-primary, .btn-hdr-secondary,
.btn-modal-primary, .btn-modal-secondary, .btn-modal-dismiss,
.btn-cancel-inline, .btn-save-inline, .btn-edit-toggle,
.btn-add-note, .btn-cancel-note, .btn-activity-tap,
.btn-pyng-now, .btn-regen, .btn-nurture-save,
.btn-ghost, .btn-warn, .btn-info, .btn-icon-label,
.btn-nav-back, .btn-add, .btn-save, .btn-delete, .btn-log,
.btn-add-task, .btn-submit, .btn-sender-change,
.btn-cancel-log, .btn-load-more, .btn-select,
.group-collapse-btn {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: var(--weight-semibold);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Disable state shared across all buttons */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-tertiary:disabled,
.btn-danger:disabled,
.btn-small:disabled,
.btn-pill:disabled,
.btn-text-only:disabled,
.btn-icon-only:disabled,
.btn-close:disabled,
/* legacy aliases */
.btn-hdr:disabled, .btn-hdr-primary:disabled, .btn-hdr-secondary:disabled,
.btn-modal-primary:disabled, .btn-modal-secondary:disabled, .btn-modal-dismiss:disabled,
.btn-cancel-inline:disabled, .btn-save-inline:disabled, .btn-edit-toggle:disabled,
.btn-add-note:disabled, .btn-cancel-note:disabled, .btn-activity-tap:disabled,
.btn-pyng-now:disabled, .btn-regen:disabled, .btn-nurture-save:disabled,
.btn-ghost:disabled, .btn-warn:disabled, .btn-info:disabled, .btn-icon-label:disabled,
.btn-nav-back:disabled, .btn-add:disabled, .btn-save:disabled, .btn-delete:disabled,
.btn-log:disabled, .btn-add-task:disabled, .btn-submit:disabled, .btn-sender-change:disabled,
.btn-cancel-log:disabled, .btn-load-more:disabled, .btn-select:disabled,
.group-collapse-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── PRIMARY: Dark ink background, cream text ── */
.btn-primary {
  padding: 8px 16px;
  height: 40px;
  font-size: var(--text-base);
  background: var(--ink);
  color: var(--paper);
  gap: 6px;
}
.btn-primary:hover { background: var(--ink-2); }
.btn-primary:active { background: var(--ink); }

/* ── SECONDARY: Light cream background, ink text, subtle border ── */
.btn-secondary {
  padding: 8px 16px;
  height: 40px;
  font-size: var(--text-base);
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--border);
  gap: 6px;
}
.btn-secondary:hover { background: var(--paper); border-color: var(--border-md); }
.btn-secondary:active { background: var(--paper-2); }

/* ── TERTIARY: Ghost/transparent, border only ── */
.btn-tertiary {
  padding: 8px 16px;
  height: 40px;
  font-size: var(--text-base);
  background: transparent;
  color: var(--ink-3);
  border: 1px solid var(--border);
  gap: 6px;
}
.btn-tertiary:hover { background: var(--paper-2); color: var(--ink); border-color: var(--border-md); }
.btn-tertiary:active { background: var(--paper); }

/* ── DANGER: Red background, destructive actions ── */
.btn-danger {
  padding: 8px 16px;
  height: 40px;
  font-size: var(--text-base);
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error);
  gap: 6px;
}
.btn-danger:hover { background: var(--error-bg-hover); border-color: var(--error-border-hover); }
.btn-danger:active { background: var(--error-bg); }

/* ── SMALL: Compact 32px variant for pills and tight UIs ── */
.btn-small {
  padding: 8px 12px;
  height: 32px;
  font-size: var(--text-sm);
  background: var(--paper-2);
  color: var(--ink-3);
  border: 1px solid var(--border);
  font-weight: var(--weight-medium);
  gap: 4px;
}
.btn-small:hover { background: var(--paper); color: var(--ink); border-color: var(--border-md); }

/* ── PILL: Inline tags/badges with rounded corners ── */
.btn-pill {
  padding: 6px 14px;
  height: 32px;
  font-size: var(--text-sm);
  border-radius: 20px;
  background: var(--paper-2);
  color: var(--ink-3);
  border: 1px solid var(--border);
  font-weight: var(--weight-medium);
  gap: 4px;
}
.btn-pill:hover { background: var(--paper); color: var(--ink); border-color: var(--border-md); }

/* ── TEXT-ONLY: Minimal link-style button ── */
.btn-text-only {
  padding: 8px 0;
  height: auto;
  font-size: var(--text-base);
  background: transparent;
  color: var(--gold-dark);
  border: none;
  text-decoration: none;
  gap: 4px;
}
.btn-text-only:hover { color: var(--gold-light); text-decoration: underline; }

/* ── ICON-ONLY: Square buttons for compact icon controls (44px touch target) ── */
.btn-icon-only {
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  color: var(--ink-3);
  border: none;
  gap: 0;
}
.btn-icon-only:hover { background: var(--paper-2); color: var(--ink); }

/* Smaller icon button variant (32px) */
.btn-icon-small {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  color: var(--ink-3);
  border: none;
  font-size: var(--text-base);
  gap: 0;
}
.btn-icon-small:hover { background: var(--paper-2); color: var(--ink); }

/* Extra-small icon button variant (24px) — for compact headers and widget controls */
.btn-icon-xs {
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  color: var(--ink-3);
  border: none;
  gap: 0;
}
.btn-icon-xs:hover { background: var(--paper-2); color: var(--ink); }
.btn-icon-xs svg { width: 14px; height: 14px; }

/* ── CLOSE: Minimal dismiss button ── */
.btn-close {
  padding: 0;
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--ink-3);
  border: none;
  font-size: var(--text-base);
  gap: 0;
}
.btn-close:hover { color: var(--ink); }

/* ═══════════════════════════════════════════════════════
   LEGACY COMPATIBILITY ALIASES
   Maps old button class names to canonical visual styles.
   Base properties (font, radius, cursor, display) come from
   the shared reset block above. Only type-specific overrides
   are declared here.
═══════════════════════════════════════════════════════ */

/* ── Primary-style aliases ── */
.btn-hdr, .btn-hdr-primary,
.btn-modal-primary,
.btn-pyng-now,
.btn-nurture-save {
  padding: 8px 16px;
  height: 40px;
  font-size: var(--text-base);
  background: var(--ink);
  color: var(--paper);
  gap: 6px;
}
:is(.btn-hdr, .btn-hdr-primary, .btn-modal-primary, .btn-pyng-now, .btn-nurture-save):hover { background: var(--ink-2); }
:is(.btn-hdr, .btn-hdr-primary, .btn-modal-primary, .btn-pyng-now, .btn-nurture-save):active { background: var(--ink); }

/* ── Secondary-style aliases ── */
.btn-hdr-secondary,
.btn-modal-secondary,
.btn-cancel-inline, .btn-save-inline, .btn-edit-toggle,
.btn-warn, .btn-info, .btn-icon-label,
.btn-add, .btn-save, .btn-delete, .btn-log,
.btn-add-task, .btn-submit, .btn-sender-change,
.btn-load-more, .btn-select {
  padding: 8px 16px;
  height: 40px;
  font-size: var(--text-base);
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--border);
  gap: 6px;
}
:is(.btn-hdr-secondary, .btn-modal-secondary, .btn-cancel-inline, .btn-save-inline,
    .btn-edit-toggle, .btn-warn, .btn-info, .btn-icon-label, .btn-add, .btn-save,
    .btn-delete, .btn-log, .btn-add-task, .btn-submit, .btn-sender-change,
    .btn-load-more, .btn-select):hover { background: var(--paper); border-color: var(--border-md); }
:is(.btn-hdr-secondary, .btn-modal-secondary, .btn-cancel-inline, .btn-save-inline,
    .btn-edit-toggle, .btn-warn, .btn-info, .btn-icon-label, .btn-add, .btn-save,
    .btn-delete, .btn-log, .btn-add-task, .btn-submit, .btn-sender-change,
    .btn-load-more, .btn-select):active { background: var(--paper-2); }

/* ── Tertiary-style aliases ── */
.btn-modal-dismiss, .btn-regen, .btn-ghost, .btn-cancel-log {
  padding: 8px 16px;
  height: 40px;
  font-size: var(--text-base);
  background: transparent;
  color: var(--ink-3);
  border: 1px solid var(--border);
  gap: 6px;
}
:is(.btn-modal-dismiss, .btn-regen, .btn-ghost, .btn-cancel-log):hover { background: var(--paper-2); color: var(--ink); border-color: var(--border-md); }
:is(.btn-modal-dismiss, .btn-regen, .btn-ghost, .btn-cancel-log):active { background: var(--paper); }

/* ── Pill-style aliases ── */
.btn-add-note, .btn-cancel-note, .btn-activity-tap {
  padding: 6px 14px;
  height: 32px;
  font-size: var(--text-sm);
  border-radius: 20px;
  background: var(--paper-2);
  color: var(--ink-3);
  border: 1px solid var(--border);
  font-weight: var(--weight-medium);
  gap: 4px;
}
:is(.btn-add-note, .btn-cancel-note, .btn-activity-tap):hover { background: var(--paper); color: var(--ink); border-color: var(--border-md); }

/* ── Icon-only alias ── */
.btn-nav-back {
  width: 44px; height: 44px; padding: 0;
  background: transparent; color: var(--ink-3); border: none; gap: 0;
}
.btn-nav-back:hover { background: var(--paper-2); color: var(--ink); }

/* ── Icon-small alias ── */
.group-collapse-btn {
  width: 32px; height: 32px; padding: 0;
  background: transparent; color: var(--ink-3); border: none;
  font-size: var(--text-base); gap: 0;
}
.group-collapse-btn:hover { background: var(--paper-2); color: var(--ink); }

/* ══════════════════════════════════════════════════════
   VOICE LOG WIDGET
══════════════════════════════════════════════════════ */
.vl-fab {
  position: fixed; bottom: 80px; right: 24px; z-index: 890;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: var(--surface); border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(154,122,64,.30);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.vl-fab:hover        { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(154,122,64,.40); }
.vl-fab:active       { transform: scale(.94); box-shadow: 0 2px 8px rgba(154,122,64,.30); }
.vl-fab:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.vl-fab svg   { width: 18px; height: 18px; display: block; }

.vl-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(14,14,12,.46);
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.vl-overlay.open { opacity: 1; pointer-events: auto; }

.vl-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1001;
  background: var(--surface); border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 40px rgba(14,14,12,.14);
  max-height: 90vh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.22,.68,0,1.1);
}
.vl-sheet.open { transform: translateY(0); }
@media (min-width: 600px) {
  .vl-sheet { left: 50%; right: auto; width: 480px; transform: translateX(-50%) translateY(100%); }
  .vl-sheet.open { transform: translateX(-50%) translateY(0); }
}

.vl-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--border-solid); margin: 16px auto 0; }

.vl-view { padding: 24px 24px 32px; display: flex; flex-direction: column; gap: 16px; }

.vl-sheet-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: var(--weight-semibold); color: var(--ink); margin: 0; }
.vl-rec-hint    { font-size: .875rem; color: var(--ink-3); line-height: 1.5; }
.vl-rec-example { font-size: .8rem; color: var(--ink-4); font-style: italic; margin-top: .25rem; line-height: 1.4; }

.vl-rec-btn {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gold-dim); border: 2px solid var(--gold); color: var(--gold); cursor: pointer;
  display: flex; align-items: center; justify-content: center; margin: 8px auto;
  transition: background .15s, box-shadow .15s;
}
.vl-rec-btn:hover        { background: var(--gold-focus); }
.vl-rec-btn:active       { transform: scale(.93); }
.vl-rec-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.vl-rec-btn svg   { width: 26px; height: 26px; display: block; }
.vl-rec-btn.recording {
  background: rgba(192,57,43,.12); border-color: var(--error); color: var(--error);
  animation: vl-pulse 1.4s ease-in-out infinite;
}
@keyframes vl-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(192,57,43,.10); }
  50%       { box-shadow: 0 0 0 12px rgba(192,57,43,.04); }
}

.vl-rec-status { text-align: center; font-size: .875rem; color: var(--ink-3); min-height: 18px; }

.vl-transcript {
  min-height: 48px; padding: 10px 12px;
  background: var(--surface-alt); border: 1px solid var(--border-solid); border-radius: 8px;
  font-size: .875rem; color: var(--ink-2); line-height: 1.55; white-space: pre-wrap;
}

.form-group  { display: flex; flex-direction: column; gap: 4px; }
.vl-label  { font-size: .875rem; font-weight: var(--weight-medium); color: var(--ink-2); }
.vl-input  {
  padding: 10px 12px; border: 1px solid var(--border-solid); border-radius: 8px;
  font-family: var(--font-ui); font-size: .875rem; color: var(--ink);
  background: var(--surface); width: 100%; box-sizing: border-box; transition: border-color .12s;
}
.vl-input:focus       { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-focus); }
.vl-input.error       { border-color: var(--error); box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
textarea.vl-input     { resize: vertical; min-height: 70px; line-height: 1.5; }
select.vl-input       { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a7975' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }

.vl-check-row { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--ink-2); min-height: 44px; cursor: pointer; }
.vl-check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; flex-shrink: 0; }

.vl-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

.vl-warn {
  padding: 8px 16px; border-radius: 6px;
  background: var(--warning-bg); color: var(--warning);
  font-size: .875rem; border: 1px solid rgba(217,119,6,.2);
}

.vl-rec-actions { display: flex; gap: 8px; margin-top: 4px; }

.vl-btn-primary {
  flex: 1; padding: 13px 16px; border-radius: 8px;
  background: var(--ink); color: var(--paper); border: none; cursor: pointer;
  font-family: var(--font-ui); font-size: .875rem; font-weight: var(--weight-medium);
  transition: background .12s, opacity .12s;
}
.vl-btn-primary:disabled              { opacity: .45; cursor: not-allowed; }
.vl-btn-primary:not(:disabled):hover  { background: var(--ink-2); }
.vl-btn-primary:not(:disabled):active { opacity: .8; }
.vl-btn-primary:focus-visible         { outline: 2px solid var(--gold); outline-offset: 2px; }

.vl-btn-ghost {
  padding: 13px 16px; border-radius: 8px;
  background: transparent; color: var(--ink-3); border: 1px solid var(--border-solid); cursor: pointer;
  font-family: var(--font-ui); font-size: .875rem; transition: color .12s, border-color .12s;
}
.vl-btn-ghost:hover         { color: var(--ink); border-color: var(--ink-3); }
.vl-btn-ghost:active        { background: var(--surface-alt); }
.vl-btn-ghost:disabled      { opacity: .35; cursor: not-allowed; }
.vl-btn-ghost:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.vl-input:disabled { opacity: .45; cursor: not-allowed; background: var(--surface-alt); }

@media (max-width: 599px) { .vl-fab { bottom: 82px; right: 16px; } }

/* ── Voice Log: extended elements (2026-05-30) ──────────────────────── */

/* Live transcript during recording */
.vl-live-text {
  min-height: 40px; padding: 10px 12px;
  background: var(--surface-alt); border: 1px solid var(--border-solid); border-radius: 8px;
  font-size: .875rem; color: var(--ink-2); line-height: 1.55; white-space: pre-wrap;
  font-style: italic;
}

/* Attempt dots */
.vl-attempt-dots { display: flex; justify-content: center; gap: 8px; min-height: 14px; }
.vl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-solid); transition: background .2s; }
.vl-dot.used { background: var(--error); }

/* Audio level waveform — shown during recording */
.vl-wave { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 44px; }
.vl-wave-bar {
  width: 3px; min-height: 3px; border-radius: 2px;
  background: var(--border-solid); transition: height 80ms ease, background 200ms ease; flex-shrink: 0;
}
.vl-wave--active .vl-wave-bar { background: var(--gold); }

/* Error / fallback messages */
.vl-error-msg {
  padding: 8px 16px; border-radius: 6px;
  background: var(--error-bg); color: var(--error);
  font-size: .875rem; border: 1px solid rgba(192,57,43,.25); line-height: 1.45;
}
.vl-fallback-wrap { display: flex; flex-direction: column; gap: 8px; }

/* Loading spinner */
.vl-loading-view {
  padding: 48px 24px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
}
.vl-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border-solid); border-top-color: var(--gold);
  animation: vl-spin .75s linear infinite;
}
@keyframes vl-spin { to { transform: rotate(360deg); } }

/* Pills view shell */
.vl-pills-view { padding: 24px 24px 32px; display: flex; flex-direction: column; gap: 14px; }
.vl-pills-body { display: flex; flex-direction: column; gap: 8px; }
.vl-pill-group { display: flex; flex-direction: column; gap: 4px; }

/* Individual pill */
.vl-pill {
  border-radius: 8px; border: 1px solid var(--border-solid); border-left-width: 3px;
  background: var(--surface-alt); overflow: hidden;
}
.vl-pill--high   { border-left-color: var(--success); }
.vl-pill--medium { border-left-color: var(--warning); }
.vl-pill--low    { border-left-color: var(--error); }
/* Status overrides confidence — gold = existing DB record, green = net-new */
.vl-pill--existing { border-left-color: var(--gold); }
.vl-pill--new      { border-left-color: var(--success); }
.vl-pill--child  { margin-left: 24px; }
.vl-pill--disabled { opacity: .4; pointer-events: none; }
.vl-pill:not(.vl-pill--disabled):hover { background: var(--paper-2); }

.vl-pill-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; min-height: 46px;
}
.vl-pill-chk {
  width: 16px; height: 16px; flex-shrink: 0; margin: 0;
  accent-color: var(--gold); cursor: pointer;
}
.vl-pill-label {
  flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  cursor: pointer; user-select: none; min-width: 0;
}
.vl-pill-text {
  font-size: .875rem; font-weight: var(--weight-medium); line-height: 1.4;
  word-break: break-word;
}
.vl-conf--high   { color: var(--success); }
.vl-conf--medium { color: var(--warning); }
.vl-conf--low    { color: var(--error); }

.vl-pill-badge {
  /* 11px min — below this screen readers and users at distance lose legibility */
  font-size: .7rem; font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 4px; white-space: nowrap; flex-shrink: 0;
}
.vl-conf-badge--high   { background: var(--success-bg); color: var(--success); }
/* medium: warning-bg (#fef3e2) + warning (#d97706) = ~2.87:1 at small size — fails AA.
   Use ink-2 on warning-bg for 7.6:1 contrast, keep gold-tinted bg for brand identity. */
.vl-conf-badge--medium { background: var(--warning-bg); color: var(--ink-2); }
.vl-conf-badge--low    { background: var(--error-bg);   color: var(--error); }

.vl-pill-edit-btn {
  /* min-height 36px — inline with pill so 44px not achievable, 36px is acceptable for secondary action */
  padding: 8px 12px; min-height: 36px; border-radius: 6px; font-size: .75rem; font-weight: var(--weight-medium);
  background: transparent; color: var(--ink-3); border: 1px solid var(--border-solid);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: color .12s, border-color .12s;
}
.vl-pill-edit-btn:hover        { color: var(--ink); border-color: var(--ink-3); }
.vl-pill-edit-btn:disabled     { opacity: .45; cursor: not-allowed; }
.vl-pill-edit-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.vl-pill-edit-panel {
  padding: 12px 16px 16px; border-top: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column; gap: 10px;
}
.vl-edit-row { display: flex; flex-direction: column; gap: 4px; }

/* ── Voice Log: existing-contact groups & disambiguation ───────────────── */

.vl-group-header {
  font-size: .8rem; font-weight: var(--weight-semibold); color: var(--ink-3); text-transform: uppercase;
  letter-spacing: .04em; padding: 6px 4px 2px; line-height: 1.4;
}
.vl-group-muted {
  font-size: .78rem; color: var(--ink-4); padding: 2px 4px 4px;
  font-style: italic;
}
.vl-disambig {
  border: 1px solid var(--border-solid); border-radius: 8px;
  background: var(--surface-alt); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
}
.vl-disambig-warning {
  font-size: .78rem; color: var(--warning); background: var(--warning-bg);
  border: 1px solid rgba(217,119,6,.2); border-radius: 6px; padding: 6px 10px; line-height: 1.4;
}
.vl-disambig-option {
  display: flex; align-items: flex-start; gap: 10px; padding: 4px 0;
}
.vl-disambig-radio { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; accent-color: var(--gold); cursor: pointer; }
.vl-disambig-label { display: flex; flex-direction: column; gap: 1px; cursor: pointer; flex: 1; }
.vl-disambig-name  { font-size: .875rem; font-weight: var(--weight-medium); color: var(--ink); }
.vl-disambig-secondary { font-size: .78rem; color: var(--ink-3); word-break: break-word; }
.vl-disambig-create .vl-disambig-label { color: var(--gold-dark); font-weight: var(--weight-medium); font-size: .875rem; flex-direction: row; }

.vl-pills-error {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--error-bg); color: var(--error);
  border: 1px solid rgba(192,57,43,.25); font-size: .875rem; line-height: 1.45;
}
.vl-pills-error-msg { flex: 1; }
.vl-pills-error-close {
  background: none; border: none; color: var(--error); cursor: pointer;
  font-size: 1.1rem; line-height: 1; padding: 0; flex-shrink: 0; opacity: .7;
}
.vl-pills-error-close:hover { opacity: 1; }

/* ── Voice Log: Groq Whisper + press-hold gesture (2026-05-30) ─────────── */

/* Locked recording state — gold pulse instead of red */
.vl-rec-btn.recording--locked {
  background: var(--gold-dim); border-color: var(--gold); color: var(--gold);
  animation: vl-pulse-gold 1.4s ease-in-out infinite;
}
@keyframes vl-pulse-gold {
  0%, 100% { box-shadow: 0 0 0 6px rgba(154,122,64,.15); }
  50%       { box-shadow: 0 0 0 14px rgba(154,122,64,.05); }
}

/* Cancel gesture state — stronger red tint */
.vl-rec-btn.recording--cancel {
  background: rgba(192,57,43,.24); border-color: var(--error);
}

/* Gesture hint — floats above button, animates in */
.vl-lock-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: .8rem; color: var(--gold-dark); font-weight: var(--weight-medium); user-select: none;
  animation: vl-hint-rise .18s ease-out;
}
.vl-lock-hint--cancel { color: var(--error); }
.vl-lock-hint-arrow { font-size: 1rem; font-weight: var(--weight-semibold); line-height: 1; }
@keyframes vl-hint-rise {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Elapsed recording timer */
.vl-rec-timer {
  text-align: center; font-family: var(--font-mono); font-size: 1.5rem;
  font-weight: var(--weight-semibold); color: var(--gold); letter-spacing: .05em; min-height: 36px;
}

/* Stop button shown in locked state */
.vl-lock-stop {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 auto; max-width: 180px;
}
.vl-lock-stop svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Review — contenteditable div replaces textarea */
.vl-review-div {
  min-height: 80px; max-height: 200px; overflow-y: auto;
  padding: 10px 12px; border: 1px solid var(--border-solid); border-radius: 8px;
  font-family: var(--font-ui); font-size: .875rem; color: var(--ink);
  background: var(--surface); line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; cursor: text;
  transition: border-color .12s;
}
.vl-review-div:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-focus);
}
.vl-review-div:empty::before {
  content: "Transcript will appear here…";
  color: var(--ink-4); pointer-events: none;
}

/* ── Voice Log: mode tab bar ─────────────────────────────────────────────── */
.vl-tab-bar { display: flex; gap: 4px; padding: 12px 24px 0; }
.vl-tab {
  flex: 1; padding: 6px 0; font-family: var(--font-ui); font-size: var(--text-base); font-weight: var(--weight-medium);
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--ink-3); cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.vl-tab:hover { color: var(--ink); border-color: var(--ink-3); }
.vl-tab--active { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.vl-tab--active:hover { background: var(--gold-focus); border-color: var(--gold-focus); }
.vl-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── Voice Log: Meeting Prep view ────────────────────────────────────────── */
.vl-prep-search-wrap { position: relative; }
.vl-prep-input { width: 100%; box-sizing: border-box; }
.vl-prep-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 10;
  background: var(--paper); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18); overflow: hidden;
}
.vl-prep-result-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.vl-prep-result-item:last-child { border-bottom: none; }
.vl-prep-result-item:hover { background: var(--surface-alt); }
.vl-prep-result-name { font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--ink); font-family: var(--font-ui); }
.vl-prep-result-co   { font-size: var(--text-sm); color: var(--ink-3); font-family: var(--font-ui); }

.vl-prep-brief-wrap {
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 14px; max-height: 260px; overflow-y: auto;
}
.vl-prep-brief-name {
  font-family: var(--font-ui); font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--gold-dark);
  margin-bottom: 8px;
}
.vl-prep-brief-body {
  white-space: pre-wrap; font-family: var(--font-ui); font-size: var(--text-sm);
  color: var(--ink-2); line-height: 1.65; margin: 0;
}
.vl-prep-brief-ts { font-size: var(--text-xs); color: var(--ink-4); margin-top: 6px; font-family: var(--font-ui); }

/* Entity highlights — bold gold with dashed underline */
