/* =====================================================================
   yoursiteisdone — Customer account portal — 1c Vibrant Dark
   ---------------------------------------------------------------------
   Self-contained 1c stylesheet for /. Mirrors the apex
   includes/css/restyle.css design system (tokens, fonts, gradients,
   glow, marquee, btn--grad/btn-pulse) plus the dashboard-only patterns
   (.acc-card, .acc-kv, .acc-tile, .acc-form, .badge-*, .acc-auth).

   Deployed alongside the dashboard PHP — no cross-host fetch.
   ===================================================================== */

/* ---------- tokens (mirror apex/restyle.css) ---------- */
:root {
  --bg: #08080c;
  --bg-1: #0c0c14;
  --bg-2: #11111c;
  --bg-3: #181826;
  --surface: #11111c;
  --surface-2: #181826;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --ink: #f8fafc;
  --text: #f8fafc;
  --ink-2: #d1d5db;
  --text-dim: #d1d5db;
  --muted: #a1a1aa;
  --muted-2: #71717a;

  --violet: #8b5cf6;
  --violet-2: #a78bfa;
  --magenta: #ec4899;
  --pink: #f472b6;
  --cyan: #22d3ee;
  --cyan-2: #06b6d4;

  --grad: linear-gradient(110deg, #a78bfa 0%, #ec4899 38%, #f472b6 60%, #22d3ee 100%);
  --grad-2: linear-gradient(135deg, #8b5cf6 0%, #ec4899 55%, #22d3ee 100%);
  --grad-rim: linear-gradient(135deg, rgba(167, 139, 250, 0.85), rgba(236, 72, 153, 0.7), rgba(34, 211, 238, 0.7));

  --good: #4ade80;
  --warn: #fbbf24;
  --danger: #ef4444;

  --sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --body: var(--sans);
  --display: var(--sans);

  --max: 1080px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 8px 28px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-lg: 0 30px 60px -20px rgba(167, 139, 250, 0.4), 0 30px 60px -20px rgba(236, 72, 153, 0.22);
  --t-fast: 120ms ease;
  --t: 180ms ease;
}

/* ---------- reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }

body.acc-body {
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 12% -120px, rgba(167, 139, 250, 0.20) 0%, transparent 55%),
    radial-gradient(800px 440px at 92% 10%, rgba(236, 72, 153, 0.16) 0%, transparent 55%),
    radial-gradient(700px 380px at 50% 96%, rgba(34, 211, 238, 0.10) 0%, transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet-2); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--pink); }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
code { font-family: var(--mono); font-size: 0.9em; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
p  { margin: 0 0 1em; color: var(--ink-2); }
small, .acc-muted { color: var(--muted); font-size: 0.9em; }

h1 em, h2 em, h3 em,
.gradient-text, .grad-text {
  font-style: normal;
  background: var(--grad);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: grad-shift 8s ease infinite;
}

@keyframes grad-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes pulse {
  50% { opacity: 0.4; transform: scale(0.85); }
}
@keyframes btn-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.16) inset,
      0 1px 0 rgba(255, 255, 255, 0.25) inset,
      0 10px 28px -6px rgba(236, 72, 153, 0.55),
      0 0 32px rgba(167, 139, 250, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.18) inset,
      0 1px 0 rgba(255, 255, 255, 0.28) inset,
      0 14px 34px -6px rgba(236, 72, 153, 0.7),
      0 0 44px rgba(167, 139, 250, 0.42);
  }
}

/* ---------- eyebrow (status chip) ---------- */
.acc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.acc-eyebrow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(244, 114, 182, 0.18) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 5s ease infinite;
  pointer-events: none;
}
.acc-eyebrow > * { position: relative; z-index: 1; }
.acc-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.18), 0 0 14px rgba(236, 72, 153, 0.8);
  animation: pulse 1.8s ease-in-out infinite;
}

/* gradient hairline between sections */
.glow-line {
  height: 1px;
  margin: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(167, 139, 250, 0.55) 25%, rgba(236, 72, 153, 0.55) 50%, rgba(34, 211, 238, 0.55) 75%, transparent 100%);
  position: relative;
}
.glow-line::before {
  content: '';
  position: absolute;
  inset: -2px 0;
  background: inherit;
  filter: blur(6px);
  opacity: 0.6;
}

/* ---------- nav (1c glassy) ---------- */
.acc-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 8, 12, 0.7);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.acc-nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.acc-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 700;
  letter-spacing: -0.022em;
  font-size: 1rem;
}
.acc-brand:hover { color: var(--ink); }
.acc-brand__mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--grad-2);
  background-size: 200% 200%;
  animation: grad-shift 8s ease infinite;
  position: relative;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 6px 18px -4px rgba(167, 139, 250, 0.6),
    0 0 18px rgba(236, 72, 153, 0.25);
}
.acc-brand__mark::after {
  content: '';
  position: absolute;
  inset: 7px;
  background: var(--bg);
  border-radius: 3px;
}
.acc-brand__name { color: var(--ink); }
.acc-brand__chip {
  margin-left: 4px;
  font-family: var(--mono);
  font-size: 0.66rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(167, 139, 250, 0.10);
  border: 1px solid rgba(167, 139, 250, 0.30);
  color: var(--violet-2);
}

.acc-nav__links {
  display: flex; gap: 4px; flex-wrap: wrap; flex: 1;
}
.acc-nav__link {
  color: var(--ink-2); font-weight: 500; font-size: 0.9rem;
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: background var(--t-fast), color var(--t-fast), text-shadow var(--t-fast);
}
.acc-nav__link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.5);
}
.acc-nav__link.is-active {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(236, 72, 153, 0.10));
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: var(--violet-2);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.18);
}
.acc-nav__user {
  display: flex; align-items: center; gap: 14px;
  font-size: 0.88rem; color: var(--muted);
}
.acc-nav__hello strong { color: var(--ink); font-weight: 600; }
.acc-nav__logout {
  color: var(--muted); font-weight: 500;
}
.acc-nav__logout:hover { color: var(--pink); }
/* Power-user link out to the advanced GHL CRM surface. Warm brass
   accent (--warn) sets it apart from the cool 1c nav without leaving
   the palette. */
.acc-nav__advanced {
  color: var(--warn); font-weight: 600;
  font-size: 0.82rem; white-space: nowrap;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.06);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.acc-nav__advanced:hover {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.55);
}

@media (max-width: 880px) {
  .acc-nav__inner { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .acc-nav__links {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .acc-nav__links::-webkit-scrollbar { display: none; }
  .acc-nav__link { font-size: 0.86rem; padding: 7px 10px; flex-shrink: 0; }
  .acc-brand__chip { display: none; }
  .acc-nav__user { font-size: 0.82rem; gap: 10px; margin-left: auto; }
  .acc-nav__hello { display: none; }
}

/* ---------- main + container ---------- */
.acc-main { padding: 32px 0 56px; }
.acc-container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) {
  .acc-container { padding: 0 16px; }
  .acc-main { padding: 22px 0 44px; }
}

/* ---------- flash messages ---------- */
.acc-flash {
  max-width: var(--max);
  margin: 0 auto 22px;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-weight: 500;
}
.acc-flash--success {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.12), rgba(34, 211, 238, 0.06));
  border-color: rgba(74, 222, 128, 0.4);
  color: #d6ffe5;
}
.acc-flash--info {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(167, 139, 250, 0.06));
  border-color: rgba(34, 211, 238, 0.4);
  color: #d6f6ff;
}
.acc-flash--warn {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(244, 114, 182, 0.06));
  border-color: rgba(251, 191, 36, 0.4);
  color: #fff1d1;
}
.acc-flash--error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(244, 114, 182, 0.06));
  border-color: rgba(239, 68, 68, 0.45);
  color: #ffd7d3;
}

/* ---------- cards ---------- */
.acc-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  position: relative;
  transition: border-color var(--t), box-shadow var(--t);
}
.acc-card:hover {
  border-color: var(--line-strong);
}
.acc-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.acc-card__head h1,
.acc-card__head h2 { margin: 0; }
.acc-card__body p:last-child { margin-bottom: 0; }

.acc-card--accent {
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(167, 139, 250, 0.10), transparent 60%),
    radial-gradient(700px 300px at 100% 100%, rgba(236, 72, 153, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border-color: rgba(167, 139, 250, 0.30);
}
.acc-card--accent::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  padding: 1px;
  background: var(--grad-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.45;
}
.acc-card--accent > * { position: relative; z-index: 1; }
.acc-card--muted {
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
}

/* ---------- grid layouts ---------- */
.acc-grid { display: grid; gap: 20px; }
.acc-grid--2 { grid-template-columns: 1fr 1fr; }
.acc-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) {
  .acc-grid--2, .acc-grid--3 { grid-template-columns: 1fr; }
}

/* ---------- buttons ---------- */
.acc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--sans); font-weight: 500; font-size: 0.92rem;
  padding: 11px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer; text-decoration: none;
  white-space: nowrap; line-height: 1;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t), box-shadow var(--t);
  backdrop-filter: blur(8px);
}
.acc-btn:hover {
  background: rgba(167, 139, 250, 0.07);
  border-color: rgba(167, 139, 250, 0.45);
  color: var(--ink);
}
.acc-btn--accent {
  color: #fff;
  background: var(--grad-2);
  background-size: 200% 100%;
  border: 0;
  animation: grad-shift 6s ease infinite, btn-pulse 3s ease-in-out infinite;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 10px 28px -6px rgba(236, 72, 153, 0.55),
    0 0 32px rgba(167, 139, 250, 0.28);
}
.acc-btn--accent:hover {
  color: #fff;
  transform: translateY(-1px);
}
.acc-btn--ghost {
  background: transparent;
  border-color: var(--line);
}
.acc-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(167, 139, 250, 0.40);
}
.acc-btn--danger {
  color: #ffb4b4;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.06);
}
.acc-btn--danger:hover {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.7);
  color: #ffd7d3;
}
.acc-btn--block { display: flex; width: 100%; }
.acc-btn:disabled, .acc-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* ---------- key/value rows ---------- */
.acc-kv {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 12px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.acc-kv:last-child { border-bottom: none; }
.acc-kv dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  align-self: center;
}
.acc-kv dd { margin: 0; color: var(--ink); }
@media (max-width: 540px) {
  .acc-kv {
    grid-template-columns: 1fr;
    gap: 6px 0;
    padding: 12px 0;
  }
  .acc-kv dt { font-size: 0.7rem; }
}

/* ---------- badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
.badge-active {
  background: rgba(74, 222, 128, 0.10);
  border-color: rgba(74, 222, 128, 0.40);
  color: #b6f5cc;
}
.badge-trial {
  background: rgba(167, 139, 250, 0.10);
  border-color: rgba(167, 139, 250, 0.40);
  color: var(--violet-2);
}
.badge-warn {
  background: rgba(251, 191, 36, 0.10);
  border-color: rgba(251, 191, 36, 0.40);
  color: #ffe1a8;
}
.badge-muted {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--muted);
}

/* Live-site indicator pill (violet) */
.acc-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--violet-2);
  background: rgba(167, 139, 250, 0.10);
  border: 1px solid rgba(167, 139, 250, 0.35);
  padding: 4px 12px 4px 22px;
  border-radius: 999px;
  position: relative;
}
.acc-live-pill::before {
  content: '';
  position: absolute;
  left: 9px; top: 50%;
  transform: translateY(-50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--violet-2);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.20), 0 0 10px rgba(167, 139, 250, 0.7);
  animation: pulse 1.8s ease-in-out infinite;
}

/* ---------- forms ---------- */
.acc-form { display: flex; flex-direction: column; gap: 16px; }
.acc-field { display: flex; flex-direction: column; gap: 8px; }
.acc-field label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.acc-field label .acc-muted { text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.acc-field label .req { color: var(--pink); margin-left: 4px; }
.acc-field__hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.acc-field__hint a { color: var(--violet-2); }
.acc-field__hint a:hover { color: var(--pink); }

.acc-input, .acc-textarea, .acc-select,
input[type="text"].acc-input,
input[type="email"].acc-input,
input[type="tel"].acc-input,
input[type="password"].acc-input {
  width: 100%;
  font: inherit;
  font-size: 0.96rem;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t), background var(--t);
  outline: none;
}
.acc-textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.acc-input::placeholder, .acc-textarea::placeholder { color: var(--muted-2); }

.acc-input:focus, .acc-textarea:focus, .acc-select:focus {
  border-color: rgba(236, 72, 153, 0.6);
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 0 4px rgba(167, 139, 250, 0.14),
    0 0 24px rgba(236, 72, 153, 0.18);
}

.acc-select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.acc-select option { background: var(--bg-2); color: var(--ink); }

.acc-check {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 0;
  cursor: pointer;
}
.acc-check input[type=checkbox] {
  margin-top: 4px;
  accent-color: var(--magenta);
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.acc-check strong { color: var(--ink); font-weight: 600; }
.acc-check .acc-muted { color: var(--muted); }

/* ---------- quick-link tiles ---------- */
.acc-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.acc-tile {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.acc-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}
.acc-tile:hover {
  border-color: rgba(167, 139, 250, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(167, 139, 250, 0.35), 0 0 0 1px rgba(167, 139, 250, 0.18);
  color: var(--ink);
}
.acc-tile:hover::before { opacity: 1; }
.acc-tile__title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  position: relative;
  z-index: 1;
}
.acc-tile__desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}
.acc-tile--soon {
  border-style: dashed;
  cursor: default;
}
.acc-tile--soon:hover { transform: none; box-shadow: none; border-color: var(--line); }
.acc-tile__chip {
  align-self: flex-start;
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- mono code block ---------- */
.acc-mono {
  font-family: var(--mono);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: normal;
}
a.acc-mono { color: var(--violet-2); }
a.acc-mono:hover { color: var(--pink); border-color: rgba(167, 139, 250, 0.4); }

/* ---------- empty states ---------- */
.acc-empty {
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}
.acc-empty h3 { color: var(--ink-2); }

/* ---------- auth pages ---------- */
.acc-auth {
  max-width: 440px;
  margin: 72px auto 80px;
  padding: 0 16px;
}
.acc-auth__card {
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(167, 139, 250, 0.10), transparent 60%),
    radial-gradient(500px 240px at 100% 100%, rgba(236, 72, 153, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.acc-auth__card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-lg) + 1px);
  padding: 1px;
  background: var(--grad-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}
.acc-auth__card > * { position: relative; z-index: 1; }
.acc-auth__title {
  text-align: center;
  margin: 0 0 6px;
  font-size: 1.6rem;
}
.acc-auth__subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 0 26px;
  font-size: 0.95rem;
}
.acc-auth__alt {
  text-align: center;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.acc-auth__alt a { color: var(--violet-2); }
.acc-auth__alt a:hover { color: var(--pink); }
@media (max-width: 480px) {
  .acc-auth { margin: 36px auto 48px; }
  .acc-auth__card { padding: 28px 22px; }
  .acc-auth__title { font-size: 1.4rem; }
}

/* ---------- edit-history rows ---------- */
.acc-edit-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.acc-edit-row:last-child { border-bottom: none; }
.acc-edit-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.acc-edit-row__title {
  font-weight: 600;
  color: var(--ink);
}
.acc-edit-row__meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-top: 4px;
}
.acc-edit-row details { margin-top: 8px; }
.acc-edit-row summary {
  cursor: pointer;
  color: var(--violet-2);
  font-size: 0.88rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.acc-edit-row summary:hover { color: var(--pink); }
.acc-edit-row__body {
  white-space: pre-wrap;
  margin: 10px 0 0;
  color: var(--ink-2);
  line-height: 1.55;
}
.acc-edit-row__note {
  margin: 10px 0 0;
  color: var(--muted);
  font-style: italic;
  padding: 10px 12px;
  border-left: 2px solid rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.06);
  border-radius: 0 8px 8px 0;
}

/* ---------- footer + marquee ---------- */
.acc-marquee {
  background:
    linear-gradient(90deg, var(--bg) 0%, transparent 6%, transparent 94%, var(--bg) 100%),
    linear-gradient(180deg, rgba(167, 139, 250, 0.08), rgba(236, 72, 153, 0.04));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 16px 0;
  position: relative;
  margin-top: 48px;
}
.acc-marquee::before, .acc-marquee::after {
  content: '';
  position: absolute; top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.acc-marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.acc-marquee::after  { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.acc-marquee__track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: marquee-scroll 36s linear infinite;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  width: max-content;
}
.acc-marquee__track span { position: relative; }
.acc-marquee__track span::after {
  content: '·';
  position: absolute;
  right: -32px; top: 0;
  color: var(--muted-2);
}
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.acc-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  position: relative;
}
.acc-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px 28px;
}
.acc-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }
.acc-footer__col strong { color: var(--ink); font-weight: 600; font-size: 1rem; display: inline-flex; align-items: center; gap: 10px; }
.acc-footer__col span { color: var(--muted); }
.acc-footer__col a { color: var(--muted); }
.acc-footer__col a:hover { color: var(--pink); }
.acc-footer__brandmark {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--grad-2);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset, 0 0 14px rgba(236,72,153,0.22);
}
.acc-footer__brandmark::after {
  content: '';
  position: absolute; inset: 6px;
  background: var(--bg);
  border-radius: 2px;
}
.acc-footer__legal {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.acc-footer__legal span { color: var(--muted-2); }
.acc-footer__bar {
  max-width: var(--max);
  margin: 32px auto 0;
  padding: 22px 24px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted-2);
  text-align: center;
  letter-spacing: 0.02em;
}
.acc-footer__bar a { color: var(--muted); }
.acc-footer__bar a:hover { color: var(--pink); }
@media (max-width: 880px) {
  .acc-footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .acc-footer { padding: 40px 0 24px; }
}

/* ---------- utility ---------- */
.acc-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; min-width: 0; }
.acc-row > * { min-width: 0; max-width: 100%; }
.acc-row .acc-mono { overflow: hidden; text-overflow: ellipsis; }
.acc-row--between { justify-content: space-between; }
@media (max-width: 540px) {
  .acc-row .acc-btn--accent { width: 100%; }
}
.acc-stack-sm > * + * { margin-top: 8px; }
.acc-stack-md > * + * { margin-top: 16px; }
.acc-mt-0 { margin-top: 0 !important; }
.acc-mb-0 { margin-bottom: 0 !important; }
.acc-mt-2 { margin-top: 32px; }

/* When an ul/ol shows in card body */
.acc-card ul, .acc-card ol { color: var(--ink-2); padding-left: 20px; margin: 0 0 16px; }
.acc-card ul li, .acc-card ol li { margin-bottom: 4px; }
.acc-card details { color: var(--ink-2); }
.acc-card details summary { color: var(--violet-2); font-family: var(--mono); font-size: 0.84rem; cursor: pointer; letter-spacing: 0.03em; }

/* =====================================================================
   EMBEDDED CRM — Conversations + Contacts (Phase 2)
   Mobile-first. Reuses 1c tokens. Reduced-motion safe.
   ===================================================================== */

/* nav unread badge */
.acc-nav__badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px;
  font-size: 0.68rem; font-weight: 700; line-height: 1; color: #fff;
  background: var(--grad-2); border-radius: 999px; vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}

/* page head */
.crm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.crm-head h1 { margin: 0; }
.crm-head .acc-eyebrow { display: block; }
.crm-count { font-size: 0.7em; font-weight: 600; color: var(--muted); vertical-align: middle; }
.crm-count--sm { font-size: 0.85em; }

.crm-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: var(--radius-sm);
  font-size: 1.3rem; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line);
}
.crm-back:hover { color: var(--ink); border-color: var(--line-strong); }

/* search */
.crm-search { position: relative; margin-bottom: 14px; }
.crm-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); opacity: 0.6; font-size: 0.9rem; pointer-events: none; }
.crm-search__input { padding-left: 38px !important; }

/* list */
.crm-list-card { padding: 4px; }
.crm-list { display: flex; flex-direction: column; }
.crm-list__spinner { height: 3px; margin: 6px 8px; border-radius: 2px; background: var(--grad); opacity: 0.5; }
@media (prefers-reduced-motion: no-preference) {
  .crm-list__spinner { background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
}

.crm-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px;
  border-radius: var(--radius-sm); color: var(--ink); text-decoration: none;
  transition: background var(--t-fast);
}
.crm-row + .crm-row { border-top: 1px solid var(--line); }
.crm-row:hover { background: var(--surface-2); color: var(--ink); }
.crm-row.is-unread .crm-row__name { font-weight: 700; }
.crm-row.is-unread { background: rgba(167,139,250,0.06); }

.crm-row__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.crm-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.crm-row__name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-row__time { flex: 0 0 auto; font-size: 0.78rem; color: var(--muted-2); font-family: var(--mono); }
.crm-row__sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crm-row__snippet { color: var(--muted); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-ch { opacity: 0.85; margin-right: 2px; }

/* avatar */
.crm-ava {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: #fff; letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.crm-ava--lg { width: 60px; height: 60px; font-size: 1.2rem; }

/* unread count dot on a row */
.crm-dot {
  flex: 0 0 auto; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; color: #fff; background: var(--grad-2);
  border-radius: 999px;
}

/* tags */
.crm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-tags--row { flex: 0 0 auto; max-width: 40%; justify-content: flex-end; }
.crm-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px;
  font-size: 0.72rem; font-weight: 500; color: var(--violet-2);
  background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.25);
  border-radius: 999px; white-space: nowrap;
}
.crm-tags--row .crm-tag { font-size: 0.66rem; }
.crm-tags--manage { margin-top: 14px; }
.crm-tag--rm { padding-right: 4px; }
.crm-tag__x { display: inline; }
.crm-tag__x button { color: var(--violet-2); font-size: 1rem; line-height: 1; padding: 0 2px; opacity: 0.7; }
.crm-tag__x button:hover { opacity: 1; color: var(--pink); }

/* pager */
.crm-pager { display: flex; justify-content: center; margin-top: 16px; }

/* empty states */
.crm-empty { text-align: center; padding: 36px 20px; }
.crm-empty--sm { padding: 22px 12px; }
.crm-empty__icon { font-size: 2rem; margin-bottom: 8px; }
.crm-empty h3 { margin: 0 0 6px; }
.crm-empty p { color: var(--muted); max-width: 38ch; margin: 0 auto 16px; }

/* ---- thread ---- */
.crm-thread { display: flex; flex-direction: column; }
.crm-thread__bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 0 14px;
  border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.crm-thread__id { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.crm-thread__id strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-thread__id .acc-muted { font-size: 0.82rem; }
.crm-thread__view { flex: 0 0 auto; font-size: 0.82rem; font-family: var(--mono); }

.crm-msgs {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 56vh; overflow-y: auto; padding: 4px 2px 8px; scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { .crm-msgs { scroll-behavior: auto; } }
.crm-msgs__empty { text-align: center; padding: 28px 12px; }
.crm-msg { display: flex; flex-direction: column; max-width: 82%; }
.crm-msg--in { align-self: flex-start; align-items: flex-start; }
.crm-msg--out { align-self: flex-end; align-items: flex-end; }
.crm-bubble {
  padding: 9px 13px; border-radius: 16px; font-size: 0.92rem; line-height: 1.45;
  word-break: break-word; white-space: normal;
}
.crm-msg--in .crm-bubble { background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; color: var(--ink); }
.crm-msg--out .crm-bubble { background: var(--grad-2); color: #fff; border-bottom-right-radius: 5px; }
.crm-msg__meta { font-size: 0.68rem; color: var(--muted-2); margin-top: 3px; font-family: var(--mono); }
.crm-msg.is-pending .crm-bubble { opacity: 0.6; }
.crm-msg.is-failed .crm-bubble { background: rgba(239,68,68,0.18); border: 1px solid var(--danger); color: var(--ink); cursor: pointer; }
.crm-msg.is-failed .crm-msg__meta { color: var(--danger); }

/* ---- composer ---- */
.crm-composer { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.crm-composer--inline { margin-top: 16px; border-top: 0; padding-top: 0; }
.crm-composer__row { display: flex; gap: 8px; align-items: flex-end; }
.crm-composer__input { flex: 1 1 auto; resize: none; min-height: 44px; max-height: 160px; }
.crm-send { flex: 0 0 auto; }
.crm-chan { display: flex; gap: 14px; margin-bottom: 8px; }
.crm-chan__opt { display: inline-flex; align-items: center; gap: 5px; font-size: 0.85rem; color: var(--ink-2); cursor: pointer; }
.crm-msg-status { margin-top: 8px; }

/* ---- contact detail ---- */
.crm-contact__top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.crm-contact__id { flex: 1 1 auto; min-width: 0; }
.crm-contact__id h1 { font-size: 1.4rem; }
.crm-contact__actions { display: flex; gap: 8px; flex: 0 0 auto; }
.crm-contact__kv { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 16px; }
.crm-contact__kv > div { display: flex; flex-direction: column; gap: 2px; }
.crm-contact__kv .acc-muted { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- CSS-only tabs ---- */
.crm-tabin { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.crm-tabs { display: flex; gap: 4px; margin: 18px 0 12px; border-bottom: 1px solid var(--line); }
.crm-tab {
  padding: 9px 14px; font-size: 0.9rem; font-weight: 500; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.crm-tab:hover { color: var(--ink-2); }
.crm-panel { display: none; }
#ctab-notes:checked    ~ .crm-panel--notes,
#ctab-activity:checked ~ .crm-panel--activity,
#ctab-tags:checked     ~ .crm-panel--tags { display: block; }
#ctab-notes:checked    ~ .crm-tabs .crm-tab:nth-child(1),
#ctab-activity:checked ~ .crm-tabs .crm-tab:nth-child(2),
#ctab-tags:checked     ~ .crm-tabs .crm-tab:nth-child(3) { color: var(--ink); border-bottom-color: var(--violet); }
.crm-tabin:focus-visible ~ .crm-tabs .crm-tab { outline: 2px solid var(--violet-2); outline-offset: 2px; }

/* notes */
.crm-note-add { margin-bottom: 18px; }
.crm-notes { display: flex; flex-direction: column; gap: 12px; }
.crm-note { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.crm-note__body { color: var(--ink-2); font-size: 0.92rem; }
.crm-note__meta { font-size: 0.72rem; margin-top: 6px; font-family: var(--mono); }

/* timeline */
.crm-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.crm-timeline__item { display: flex; gap: 12px; }
.crm-timeline__icon {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 0.95rem;
}
.crm-timeline__item > div { font-size: 0.9rem; }

.crm-form-card { max-width: 560px; }

/* ---- desktop refinements ---- */
@media (min-width: 720px) {
  .crm-row { padding: 14px 16px; }
  .crm-row__snippet { font-size: 0.92rem; }
  .crm-msg { max-width: 70%; }
  .crm-contact__id h1 { font-size: 1.7rem; }
}
