@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&family=Geist+Mono:wght@400;500;600&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=general-sans@500,600,700&display=swap');

:root {
  --accent: #FF5E47;
  --accent-hover: #E8472F;
  --accent-soft: #FFE9E5;
  --navy: #1A2238;
  --navy-soft: #E8EAF0;
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --border: #ECECEF;
  --border-strong: #D8D8DB;
  --text: #14141A;
  --text-muted: #6B6B6B;

  /* Tenant-overridable design tokens */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'General Sans', 'Inter', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --font-serif: 'Instrument Serif', serif;

  --radius: 12px;       /* base radius — buttons, inputs */
  --radius-lg: 18px;    /* cards, larger surfaces */
  --radius-sm: 8px;     /* small chips, tags */

  --density-pad: 14px;  /* vertical padding rhythm */
  --density-gap: 16px;  /* horizontal gap rhythm */
  --shadow-card-strength: 0.05;
  --button-shape: 12px; /* button border radius — can be 0 (sharp), 12 (rounded), 999 (pill) */
}

/* DENSITY MODES — body class controls vertical rhythm */
body.density-compact { --density-pad: 10px; --density-gap: 12px; }
body.density-comfortable { --density-pad: 14px; --density-gap: 16px; }
body.density-spacious { --density-pad: 18px; --density-gap: 22px; }

html, body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.font-display { font-family: var(--font-display); letter-spacing: -0.015em; }
.serif { font-family: var(--font-serif); letter-spacing: -0.005em; }
.serif-italic { font-family: var(--font-serif); font-style: italic; }
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; }

.shadow-soft { box-shadow: 0 1px 2px rgba(20,20,40,0.04), 0 8px 24px -8px color-mix(in srgb, var(--accent) 25%, transparent); }
.shadow-card { box-shadow: 0 1px 0 rgba(20,20,40,0.04), 0 1px 3px rgba(20,20,40,0.05); }
.shadow-pop { box-shadow: 0 4px 8px -2px rgba(20,20,40,0.06), 0 16px 32px -8px rgba(20,20,40,0.18); }

.bounce { transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.bounce:hover { transform: translateY(-1px); }
.bounce:active { transform: translateY(0) scale(0.97); }

/* Buttons */
.btn-primary {
  background: var(--accent); color: white; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: var(--button-shape); display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.15s ease; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 50%, transparent);
  cursor: pointer; border: none; text-decoration: none;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary.lg { padding: 14px 24px; font-size: 15px; border-radius: var(--button-shape); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: white; border: 1px solid var(--border); color: var(--text); font-weight: 500; font-size: 14px;
  padding: 10px 18px; border-radius: var(--button-shape); display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.15s ease; cursor: pointer; text-decoration: none;
}
.btn-secondary:hover { border-color: var(--border-strong); background: #F7F7F2; }
.btn-secondary.lg { padding: 14px 22px; font-size: 15px; border-radius: var(--button-shape); }

.btn-ghost {
  color: var(--text-muted); font-weight: 500; font-size: 14px;
  padding: 10px 14px; border-radius: var(--radius); transition: all 0.15s ease;
  cursor: pointer; border: none; background: transparent; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-ghost:hover { background: #F2F2EE; color: var(--text); }

/* Inputs */
.input {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 14px; font-size: 14px; width: 100%; font-family: inherit; color: var(--text);
  transition: all 0.15s ease;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: #9CA3AF; }
.input.lg { padding: 14px 16px; font-size: 15px; border-radius: var(--radius); }

.label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text);
}
.help-text { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Cards & layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* Top app header */
.app-header { background: white; border-bottom: 1px solid var(--border); padding: 14px 24px; }

.nav-link {
  padding: 6px 12px; border-radius: var(--radius); font-size: 14px; color: var(--text-muted);
  transition: all 0.15s ease; text-decoration: none;
}
.nav-link:hover { background: #F2F2EE; color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Tags */
.tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px;
}
.tag-coral { background: var(--accent-soft); color: var(--accent); }
.tag-emerald { background: #D1FAE5; color: #065F46; }
.tag-amber { background: #FEF3C7; color: #92400E; }
.tag-gray { background: #F3F4F6; color: #4B5563; }
.tag-navy { background: var(--navy-soft); color: var(--navy); }

/* Animations */
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.delay-1 { animation-delay: 0.05s; } .delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; } .delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; } .delay-6 { animation-delay: 0.3s; }
.delay-7 { animation-delay: 0.35s; } .delay-8 { animation-delay: 0.4s; }

.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #10B981;
  animation: pulse 2s infinite; display: inline-block;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* Hero number switcher */
.hero-number {
  background: white; border: 1px solid var(--border); border-radius: 18px;
  padding: 14px 22px; cursor: pointer; transition: all 0.15s ease;
  text-align: right; display: inline-flex; align-items: center; gap: 14px;
  position: relative;
}
.hero-number:hover { border-color: var(--border-strong); }
.hero-number-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; line-height: 1; }
.hero-number-value { font-family: 'Geist Mono', monospace; font-size: 26px; font-weight: 600; line-height: 1; color: var(--navy); letter-spacing: -0.01em; }
.hero-number-meta { font-size: 11px; color: var(--text-muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

/* Dropdown */
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: white; border: 1px solid var(--border); border-radius: 14px;
  min-width: 320px; padding: 6px;
  box-shadow: 0 4px 8px -2px rgba(20,20,40,0.06), 0 16px 32px -8px rgba(20,20,40,0.18);
  z-index: 50;
}
.dropdown.hidden { display: none; }
.dropdown-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s ease;
}
.dropdown-item:hover { background: #F7F7F2; }
.dropdown-item.active { background: var(--accent-soft); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* Conversation rows (used in inbox) */
.conv-row { transition: background-color 0.15s ease; cursor: pointer; }
.conv-row:hover { background: #F2F2EE; }
.conv-active { background: var(--accent-soft); }
.conv-active:hover { background: var(--accent-soft); }

/* Asymmetric message bubbles (inbound = bar, outbound = bubble) */
.inbound-bar { border-left: 2px solid; padding-left: 14px; }
.bubble-out { background: var(--accent); color: white; }

/* Custom logo mark */
.mark { display: inline-block; }

/* Settings tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab {
  padding: 10px 16px; font-size: 14px; color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; transition: all 0.15s ease;
  text-decoration: none; font-weight: 500;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* Theme swatch (settings page) */
.swatch-btn {
  width: 36px; height: 36px; border-radius: 12px; cursor: pointer; border: 2px solid white;
  outline: 2px solid transparent; transition: outline 0.15s ease;
}
.swatch-btn.active { outline-color: var(--text); }

/* Stat cards (analytics) */
.stat-num { font-family: 'Geist Mono', monospace; font-size: 32px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; color: var(--navy); }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); font-weight: 700; }
.stat-delta-up { color: #059669; font-size: 12px; font-weight: 600; }
.stat-delta-down { color: var(--accent); font-size: 12px; font-weight: 600; }

/* Use case selector cards (onboarding) */
.usecase-card {
  background: white; border: 2px solid var(--border); border-radius: 16px;
  padding: 18px; cursor: pointer; transition: all 0.15s ease;
}
.usecase-card:hover { border-color: var(--border-strong); }
.usecase-card.selected { border-color: var(--accent); background: var(--accent-soft); }

/* ============================================ */
/* TENANT / WHITE-LABEL PARTNER BANNER          */
/* ============================================ */
.tenant-banner {
  background: linear-gradient(90deg, var(--navy) 0%, color-mix(in srgb, var(--navy) 88%, var(--accent) 12%) 100%);
  color: white;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0; z-index: 1000;
}
.tenant-banner-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 8px 24px;
  display: flex; align-items: center; gap: 14px;
  justify-content: center; flex-wrap: wrap;
}
.tenant-banner-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: white;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.tenant-banner-text { color: rgba(255,255,255,0.85); }
.tenant-banner-text strong { color: white; font-weight: 600; }
.tenant-banner-exit {
  color: rgba(255,255,255,0.6); text-decoration: none; font-weight: 500;
  padding-left: 8px; border-left: 1px solid rgba(255,255,255,0.15);
  transition: color 0.15s ease;
}
.tenant-banner-exit:hover { color: white; }
@media (max-width: 640px) {
  .tenant-banner-inner { padding: 6px 14px; gap: 8px; }
  .tenant-banner-text { font-size: 11px; }
}

/* ============================================ */
/* ANIMATED HAMBURGER + MOBILE NAV              */
/* ============================================ */

/* Hamburger button — three lines with signature animation */
.hamburger {
  display: none; /* hidden on desktop */
  width: 40px; height: 40px; border: none; background: transparent;
  cursor: pointer; position: relative; z-index: 200;
  padding: 0; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.hamburger-line {
  display: block; height: 2.5px;
  background: var(--text); border-radius: 3px;
  position: absolute; left: 8px;
  transition: all 0.4s cubic-bezier(0.77, 0, 0.18, 1);
}
/* Stagger-in on page load */
.hamburger-line:nth-child(1) { top: 11px; width: 22px; animation: hamburgerIn1 0.5s 0.1s both; }
.hamburger-line:nth-child(2) { top: 18px; width: 16px; animation: hamburgerIn2 0.5s 0.2s both; }
.hamburger-line:nth-child(3) { top: 25px; width: 22px; animation: hamburgerIn3 0.5s 0.3s both; }
@keyframes hamburgerIn1 { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes hamburgerIn2 { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes hamburgerIn3 { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }

/* Hover: lines spread + middle extends */
.hamburger:hover .hamburger-line:nth-child(1) { top: 9px; }
.hamburger:hover .hamburger-line:nth-child(2) { width: 22px; }
.hamburger:hover .hamburger-line:nth-child(3) { top: 27px; }

/* Animated open state — morph to X with accent color */
.hamburger.open .hamburger-line {
  background: var(--accent);
}
.hamburger.open .hamburger-line:nth-child(1) {
  top: 18px; width: 22px; transform: rotate(45deg);
}
.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0; transform: translateX(-12px);
  width: 22px;
}
.hamburger.open .hamburger-line:nth-child(3) {
  top: 18px; width: 22px; transform: rotate(-45deg);
}
/* Override hover when open */
.hamburger.open:hover .hamburger-line:nth-child(1) { top: 18px; }
.hamburger.open:hover .hamburger-line:nth-child(3) { top: 18px; }

/* White variant (for dark backgrounds) */
.hamburger-white .hamburger-line { background: white; }
.hamburger-white.open .hamburger-line { background: var(--accent); }

/* Mobile nav overlay */
.mobile-nav {
  position: fixed; inset: 0; z-index: 150;
  background: white;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1);
  overflow-y: auto;
}
.mobile-nav.open {
  transform: translateX(0);
}
.mobile-nav-header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-nav-links {
  flex: 1; padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px;
  font-size: 16px; font-weight: 500; color: var(--text);
  text-decoration: none; transition: background 0.15s ease;
}
.mobile-nav-link:hover { background: #F2F2EE; }
.mobile-nav-link.active {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.mobile-nav-link svg { flex-shrink: 0; }
.mobile-nav-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* Show hamburger, hide desktop nav on mobile */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .desktop-nav { display: none !important; }
  .desktop-search { display: none !important; }
  /* Responsive app header */
  .app-header { padding: 12px 16px; }
  /* Responsive hero number */
  .hero-number-value { font-size: 18px; }
  .hero-number { padding: 10px 16px; border-radius: 14px; }
}

/* Desktop: hide mobile nav */
@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
}

/* ============================================ */
/* TOAST NOTIFICATIONS                          */
/* ============================================ */
#toast-stack {
  position: fixed; top: 20px; right: 20px; z-index: 2000;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: white; border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 4px 8px -2px rgba(20,20,40,0.08), 0 16px 32px -8px rgba(20,20,40,0.18);
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 280px; max-width: 420px;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.removing { animation: toastOut 0.2s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
.toast-icon { width: 20px; height: 20px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast.success .toast-icon { background: #10B981; color: white; }
.toast.error .toast-icon { background: var(--accent); color: white; }
.toast.info .toast-icon { background: var(--navy); color: white; }
.toast.warning .toast-icon { background: #F59E0B; color: white; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 13px; font-weight: 600; color: var(--text); }
.toast-message { font-size: 12px; color: var(--text-muted); margin-top: 1px; line-height: 1.4; }
.toast-close { color: var(--text-muted); padding: 2px; cursor: pointer; background: none; border: none; opacity: 0.5; transition: opacity 0.15s; flex-shrink: 0; }
.toast-close:hover { opacity: 1; }

/* ============================================ */
/* AUTH-AWARE VISIBILITY                        */
/* ============================================ */
/* Default: assume signed-out so nothing flashes for visitors who aren't.
   auth.js adds `signed-in` to <body> as soon as it confirms a session. */
.if-signed-in { display: none !important; }
body.signed-in .if-signed-in { display: revert !important; }
body.signed-in .if-signed-out { display: none !important; }

/* ============================================ */
/* USER MENU — avatar dropdown                  */
/* ============================================ */
.user-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 240px; background: white;
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 4px 8px -2px rgba(20,20,40,0.06), 0 16px 32px -8px rgba(20,20,40,0.18);
  z-index: 100; padding: 6px; font-size: 13px;
  animation: userMenuIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.user-menu.hidden { display: none; }
@keyframes userMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.user-menu-header {
  padding: 12px 12px 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
  display: flex; gap: 11px; align-items: center;
}
.user-menu-avatar {
  width: 36px; height: 36px; border-radius: 999px;
  background: linear-gradient(135deg, #fdba74, #f472b6);
  color: white; font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-menu-name { font-weight: 600; color: var(--text); }
.user-menu-email { color: var(--text-muted); font-size: 11px; margin-top: 1px; word-break: break-all; }
.user-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 9px; cursor: pointer;
  color: var(--text); transition: background 0.12s ease;
  text-decoration: none; font-size: 13px; width: 100%; text-align: left;
  border: none; background: transparent; font-family: inherit;
}
.user-menu-item:hover { background: #F7F7F2; }
.user-menu-item.danger { color: var(--accent); }
.user-menu-item.danger:hover { background: var(--accent-soft); }
.user-menu-divider { height: 1px; background: var(--border); margin: 4px 6px; }
.user-menu-meta { padding: 8px 12px 4px; color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

/* ============================================ */
/* TENANT FEATURE FLAGS — body-class-driven hide */
/* ============================================ */
body.hide-feature-templates [data-feature="templates"] { display: none !important; }
body.hide-feature-broadcast [data-feature="broadcast"] { display: none !important; }
body.hide-feature-analytics [data-feature="analytics"] { display: none !important; }
body.hide-feature-contacts [data-feature="contacts"] { display: none !important; }
body.hide-feature-mms [data-feature="mms"] { display: none !important; }
body.hide-feature-ai [data-feature="ai"] { display: none !important; }

/* ============================================ */
/* TONE / VOICE — body class for microcopy swap  */
/* ============================================ */
/* Tone variants are runtime-swapped by shared.js using [data-tone-X] attrs */

/* ============================================ */
/* SHADOW DEPTH — partner-controllable           */
/* ============================================ */
body.shadow-flat .card { box-shadow: none; }
body.shadow-soft .card { box-shadow: 0 1px 0 rgba(20,20,40,0.04), 0 1px 3px rgba(20,20,40,0.05); }
body.shadow-deep .card { box-shadow: 0 1px 2px rgba(20,20,40,0.06), 0 8px 20px -4px rgba(20,20,40,0.10), 0 24px 48px -16px rgba(20,20,40,0.16); }

/* ============================================ */
/* LOGO STYLE — partner-selectable               */
/* ============================================ */
/* Default: both squircle marks visible. Variants hide one or recolour. */
body.logo-monogram .mark-square-back { opacity: 0.4; }
body.logo-wordmark-only .mark-square-back,
body.logo-wordmark-only .mark-square-front { display: none; }
body.logo-mark-only [data-tenant-name],
body.logo-mark-only [data-tenant-name-cased] { display: none; }

/* ============================================ */
/* SHAFT LINT — Grammarly-style composer overlay */
/* ============================================ */
/* Wrap a textarea + transparent-text overlay + chip rail.
   Inline highlights underline trigger phrases with a wavy line + soft tint.
   Chips below summarise the issues with click-to-explain hover cards. */

.lint-wrap {
  position: relative;
  isolation: isolate;
}
.lint-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: transparent;
  /* Padding/font/line-height MUST match the textarea or highlights drift —
     these match `.input` (padding 11px 14px) and the inline overrides that
     broadcast & inbox composers apply on top. Per-page tweaks below. */
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  border-radius: var(--radius);
  border: 1px solid transparent; /* matches .input border so geometry aligns */
  z-index: 1;
}
.lint-overlay mark {
  background: color-mix(in srgb, #F59E0B 18%, transparent);
  color: transparent;
  border-bottom: 2px solid;
  border-image: repeating-linear-gradient(
    -45deg, #F59E0B 0 2px, transparent 2px 4px
  ) 2;
  border-radius: 2px;
  padding: 0 1px;
}
.lint-overlay mark.lint-shaft {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-image: repeating-linear-gradient(
    -45deg, var(--accent) 0 2px, transparent 2px 4px
  ) 2;
}
.lint-input {
  position: relative;
  background: transparent !important;
  z-index: 2;
}
.lint-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
  min-height: 0;
  transition: min-height 0.2s ease;
}
.lint-chips:empty { display: none; }
.lint-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: #FEF3C7;
  border: 1px solid #F5D77E;
  color: #6B4F0F;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: background 0.12s ease;
}
.lint-chip:hover { background: #FDE68A; }
.lint-chip.lint-chip-shaft {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}
.lint-chip.lint-chip-shaft:hover {
  background: color-mix(in srgb, var(--accent) 15%, white);
}
.lint-chip-cat {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700; opacity: 0.65;
}
.lint-chip-icon {
  width: 12px; height: 12px; flex-shrink: 0;
}

/* Hover/click card */
.lint-pop {
  position: absolute;
  bottom: calc(100% + 8px); left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 8px -2px rgba(20,20,40,0.06), 0 16px 32px -8px rgba(20,20,40,0.18);
  padding: 12px 14px;
  width: 280px;
  font-size: 12.5px;
  color: var(--text);
  z-index: 50;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}
.lint-pop-title {
  font-size: 12px; font-weight: 600; color: var(--navy);
  margin-bottom: 4px; line-height: 1.3;
}
.lint-pop-why {
  color: var(--text-muted); line-height: 1.5; margin-bottom: 8px;
}
.lint-pop-try {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700; color: var(--text-muted); margin-bottom: 4px;
}
.lint-pop-suggest {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--navy);
  background: var(--bg);
  padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--border);
}

/* "All clear" state for the chip rail */
.lint-clear {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  font-size: 11px; color: #059669;
  font-weight: 500;
}
.lint-clear svg { flex-shrink: 0; }

/* ============================================ */
/* QUIET-HOURS SEND BUTTON TRANSFORM             */
/* ============================================ */
/* Send button has two states: default (immediate send) and shifted
   (recipient is in their off-hours, button shape-shifts to a "Send at
   9:00 AM [tz]" pill that schedules instead of confirming). */

.qh-send {
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.qh-send.qh-shifted {
  background: var(--navy);
  /* Pill shape with a leading clock glyph */
  padding-left: 16px;
}
.qh-send.qh-shifted:hover {
  background: color-mix(in srgb, var(--navy) 88%, white);
}
.qh-clock {
  width: 14px; height: 14px;
  display: none; flex-shrink: 0;
}
.qh-send.qh-shifted .qh-clock { display: inline-block; }
.qh-send.qh-shifted .qh-now-label { display: none; }
.qh-send.qh-shifted .qh-shifted-label { display: inline; }
.qh-now-label { display: inline; }
.qh-shifted-label { display: none; }

/* Quiet-hours hint card — small note that appears below the composer
   when the recipient is currently in their off-hours window. */
.qh-hint {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--navy) 5%, white) 0%, white 100%);
  border: 1px solid color-mix(in srgb, var(--navy) 15%, var(--border));
  border-radius: 12px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.45;
}
.qh-hint-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: color-mix(in srgb, var(--navy) 10%, transparent);
  color: var(--navy);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.qh-hint-body strong { color: var(--navy); font-weight: 600; }
.qh-hint-body { flex: 1; min-width: 0; }
.qh-hint-time { font-family: var(--font-mono); font-weight: 600; }

/* ============================================ */
/* ONE-TO-ONE CONSENT BLOCK                      */
/* ============================================ */
/* Per FCC January 2026 enforcement: each consent record is bound to a
   single seller, captures provenance + topic scope, and supports
   revocation + audit. Visual register: ambient state, calm — green
   dot for consented, gray dot for opted-out, never red banners. */

.consent-block {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}
.consent-block-out {
  background: linear-gradient(180deg, #FAFAF7 0%, white 100%);
  border-color: var(--border);
}

.consent-head { padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.consent-state-row { display: flex; align-items: center; gap: 8px; }
.consent-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  display: inline-block;
}
.consent-dot-on {
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.4);
  animation: consent-pulse 2.4s infinite;
}
.consent-dot-out { background: #9CA3AF; }
@keyframes consent-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.consent-state-label {
  font-weight: 600; color: var(--navy);
  font-size: 13px;
}
.consent-state-time {
  margin-left: auto;
  font-size: 11px; color: var(--text-muted);
  font-family: var(--font-mono);
}
.consent-state-detail {
  font-size: 12px; color: var(--text-muted); margin-top: 6px;
  margin-left: 16px;
}

.consent-binding {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 11.5px;
  margin-bottom: 12px;
  line-height: 1.4;
}
.consent-binding strong { color: var(--accent); font-weight: 600; }
.consent-binding-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: white; color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.consent-section { padding-top: 12px; border-top: 1px solid var(--border); }
.consent-section + .consent-section { margin-top: 12px; }
.consent-section-muted { background: transparent; }
.consent-section-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
  margin-bottom: 8px;
}
.consent-topics { display: flex; flex-wrap: wrap; gap: 4px; }
.consent-topic {
  font-size: 11px; padding: 3px 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; color: var(--text);
  font-weight: 500;
}
.consent-prov-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 3px 0;
}
.consent-prov-key {
  font-size: 11px; color: var(--text-muted);
}
.consent-prov-val { font-size: 12px; color: var(--text); font-weight: 500; }
.consent-prov-val.mono { font-family: var(--font-mono); font-weight: 500; }
.consent-original {
  font-size: 12px; color: var(--text);
}

.consent-actions {
  display: flex; gap: 8px; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.consent-action-primary {
  background: var(--accent); color: white !important;
  font-size: 11px; font-weight: 600; padding: 7px 12px;
  border-radius: 8px;
}
.consent-action-primary:hover { background: var(--accent-hover); color: white !important; }
.consent-action-secondary {
  font-size: 11px; padding: 7px 12px;
  color: var(--text-muted) !important;
  background: transparent;
}
.consent-action-secondary:hover { color: var(--navy) !important; background: var(--bg); }

/* Audit timeline (expandable) */
.consent-audit {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.consent-audit.hidden { display: none; }
.audit-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.audit-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--navy);
}
.audit-retention {
  font-size: 10px; color: var(--text-muted);
  font-style: italic; font-family: var(--font-serif);
}
.audit-list {
  list-style: none; padding: 0; margin: 0;
  position: relative;
}
.audit-list::before {
  content: ""; position: absolute;
  left: 4px; top: 4px; bottom: 4px;
  width: 1px; background: var(--border);
}
.audit-event {
  position: relative; padding: 0 0 14px 18px;
}
.audit-event:last-child { padding-bottom: 0; }
.audit-dot {
  position: absolute; left: 0; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: white; border: 2px solid var(--text-muted);
}
.audit-event-consented .audit-dot { border-color: #10B981; background: #10B981; }
.audit-event-verified .audit-dot,
.audit-event-reverified .audit-dot { border-color: #10B981; background: white; }
.audit-event-opted_out .audit-dot { border-color: var(--accent); background: var(--accent); }
.audit-event-activity .audit-dot {
  border-color: var(--border-strong); background: white;
  width: 7px; height: 7px; left: 1px; top: 6px;
}
.audit-event-title {
  font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3;
}
.audit-event-sub {
  font-size: 11.5px; color: var(--text-muted); line-height: 1.5;
  margin-top: 2px;
}
.audit-event-meta {
  font-size: 11px; color: var(--text-muted); line-height: 1.5;
  margin-top: 2px; font-style: italic;
}
.audit-event-when {
  font-size: 10px; color: var(--text-muted); margin-top: 4px;
  font-feature-settings: 'tnum';
}

/* Compact thread-header consent chip — used in inbox */
.consent-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  font-size: 11px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: all 0.12s ease;
}
.consent-chip:hover { border-color: var(--border-strong); background: var(--bg); }
.consent-chip-on { color: #047857; border-color: color-mix(in srgb, #10B981 30%, transparent); }
.consent-chip-on:hover { background: #ECFDF5; }
.consent-chip-out { color: var(--text-muted); background: var(--bg); border-style: dashed; }
.consent-chip-out:hover { background: white; }
.consent-chip-icon { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.consent-chip-on .consent-chip-icon { background: #10B981; }
.consent-chip-out .consent-chip-icon { background: #9CA3AF; }
.consent-chip-source { color: var(--text-muted); font-weight: 400; }

/* Demo toggle — a small switcher to flip between clean/risky message
   and inside/outside quiet hours. PoC-only — strip when wiring real backends. */
.demo-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: #F2F2EE;
  border: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 500;
}
.demo-toggle-btn {
  padding: 3px 9px;
  border-radius: 999px;
  border: none; background: transparent;
  color: var(--text-muted); cursor: pointer;
  font: inherit; transition: all 0.12s ease;
}
.demo-toggle-btn:hover { color: var(--text); }
.demo-toggle-btn.active {
  background: white; color: var(--navy); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.demo-toggle-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  padding: 0 6px 0 8px;
}

