/* ═══════════════════════════════════════════════════════════
   BrandForge — Design System
   Copyright (c) 2026 Global Brands Magazine. All rights reserved.
   Proprietary and confidential. Unauthorised copying or redistribution
   prohibited. Licensing: admin@insightbridge.co
   ═══════════════════════════════════════════════════════════ */

:root {
  --brand-50: #EFF6FF;
  --brand-100: #DBEAFE;
  --brand-200: #BFDBFE;
  --brand-500: #3B82F6;
  --brand-600: #2563EB;
  --brand-700: #1D4ED8;
  --teal-50: #F0FDFA;
  --teal-500: #14B8A6;
  --teal-600: #0D9488;
  --orange-500: #F97316;
  --success: #22C55E;
  --danger: #EF4444;
  --stable: #94A3B8;
  --base: #F5F1EA;             /* warm linen — editorial, premium */
  --base-card: #FFFFFF;
  --warm-border: #E8DECF;      /* warm taupe — card borders */
  --warm-border-soft: #EFE7DA;
  --ink-900: #0F1729;          /* deep navy-black */
  --ink-700: #334155;
  --ink-500: #64748B;
  --ink-300: #CBD5E1;
  --ink-100: #F1F5F9;
  /* Premium accents */
  --indigo:       #4338CA;
  --indigo-deep:  #312E81;
  --gold:         #B45309;
  --emerald-deep: #047857;
  --burnt:        #C2410C;
  --crimson-deep: #B91C1C;
  /* Sidebar dark theme */
  --sidebar-bg:        #0F1729;
  --sidebar-border:    rgba(255, 255, 255, 0.06);
  --sidebar-text:      #CBD5E1;
  --sidebar-text-mute: #6B7B95;
  --sidebar-hover-bg:  rgba(255, 255, 255, 0.06);
  --sidebar-active-bg: #1E3A8A;
  --sidebar-active-text: #FFFFFF;
  --shadow-soft:    0 1px 2px 0 rgba(15, 23, 41, 0.04);
  --shadow-soft-md: 0 4px 14px -2px rgba(15, 23, 41, 0.06);
  --shadow-soft-lg: 0 10px 30px -8px rgba(15, 23, 41, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--base);
  color: var(--ink-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ───── Boot loader ─────────────────────────────────────── */
.boot-loader {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--base); z-index: 9999;
}
.boot-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--ink-100); border-top-color: var(--brand-600);
  animation: spin 0.8s linear infinite;
}
.boot-text { margin-top: 16px; color: var(--ink-500); font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───── Text gradient ───────────────────────────────────── */
.text-gradient {
  background: linear-gradient(90deg, var(--brand-600), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ───── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 12px; font-weight: 600; font-size: 14px;
  transition: all 0.2s ease-out; white-space: nowrap;
}
.btn-primary {
  background: var(--brand-600); color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-700); box-shadow: var(--shadow-soft-md); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary {
  background: white; color: var(--ink-700); border: 1px solid var(--ink-300);
}
.btn-secondary:hover { background: var(--ink-100); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }

/* ───── Cards ───────────────────────────────────────────── */
.card {
  background: var(--base-card); border: 1px solid var(--warm-border);
  border-radius: 12px; padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card-md { padding: 20px; }
.card-lg { padding: 32px; }

/* ───── Form inputs ─────────────────────────────────────── */
.input {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--ink-300); border-radius: 12px;
  background: white; color: var(--ink-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.input-label {
  display: block; margin-bottom: 6px;
  font-weight: 600; font-size: 13px; color: var(--ink-700);
}

/* ───── Landing page ────────────────────────────────────── */
.landing { min-height: 100vh; }
.landing-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 250, 252, 0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-100);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-size: 22px; font-weight: 800; }
.nav-actions { display: flex; gap: 8px; }

.hero {
  max-width: 900px; margin: 0 auto;
  padding: 80px 24px 60px; text-align: center;
}
.hero h1 {
  font-size: 56px; font-weight: 800; line-height: 1.05;
  letter-spacing: -0.02em; margin-bottom: 20px;
}
.hero h1 .accent { display: block; }
.hero-sub {
  font-size: 20px; color: var(--ink-500); max-width: 640px; margin: 0 auto 36px;
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.proof-bar {
  max-width: 1200px; margin: 0 auto;
  padding: 48px 24px;
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
}
.proof-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.proof-item { text-align: center; }
.proof-num { font-size: 32px; font-weight: 800; color: var(--brand-600); }
.proof-label { color: var(--ink-500); font-size: 14px; margin-top: 4px; }

.how {
  max-width: 1200px; margin: 0 auto;
  padding: 80px 24px;
}
.how h2 {
  font-size: 40px; font-weight: 800; text-align: center;
  margin-bottom: 56px; letter-spacing: -0.02em;
}
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 20px;
}
.icon-brand { background: var(--brand-100); color: var(--brand-600); }
.icon-teal  { background: var(--teal-50);   color: var(--teal-600); }
.icon-orange { background: #FFEDD5;         color: var(--orange-500); }
.how-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.how-card p { color: var(--ink-500); }

.footer {
  border-top: 1px solid var(--ink-100);
  padding: 40px 24px; text-align: center; color: var(--ink-500); font-size: 14px;
}

/* ───── Auth pages ──────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-brand {
  text-align: center; font-size: 24px; font-weight: 800;
  margin-bottom: 8px;
}
.auth-sub { text-align: center; color: var(--ink-500); margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-error {
  padding: 12px 14px; margin-bottom: 16px;
  background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B;
  border-radius: 10px; font-size: 14px;
}
.form-success {
  padding: 12px 14px; margin-bottom: 16px;
  background: #F0FDF4; border: 1px solid #BBF7D0; color: #14532D;
  border-radius: 10px; font-size: 14px;
}

/* ───── Analytics dashboard (Phase 3.1) ───────────────── */
@media (max-width: 768px) {
  .analytics-grid { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════════════
   Phase 4.7 — Premium Dashboard
   Dark sidebar · warm cream main · indigo accents · editorial feel
   ═══════════════════════════════════════════════════════════ */

/* Dark premium sidebar */
.dash-sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 22px 0 16px;
  width: 240px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* Account footer pinned to bottom (Phase 5.7) */
.dash-sidebar-footer {
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid var(--sidebar-border);
}
.dash-account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: background 0.14s, border-color 0.14s;
}
.dash-account-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.dash-account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.dash-account-info { flex: 1; min-width: 0; }
.dash-account-name {
  font-size: 12.5px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-account-role {
  font-size: 10.5px;
  color: var(--sidebar-text-mute);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-account-arrow {
  color: var(--sidebar-text-mute);
  font-size: 14px;
  transition: color 0.14s, transform 0.14s;
  flex-shrink: 0;
}
.dash-account-card:hover .dash-account-arrow {
  color: white;
  transform: translateX(2px);
}

.dash-sidebar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 4px;
  font-size: 10.5px;
  color: var(--sidebar-text-mute);
  letter-spacing: -0.005em;
}
.dash-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
  margin-right: 6px;
  vertical-align: middle;
}
.dash-logout {
  color: var(--sidebar-text-mute);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.12s;
}
.dash-logout:hover { color: #F87171; }
.dash-brand {
  padding: 0 22px 18px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: white;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 18px;
}
.dash-section {
  padding: 0 10px 14px;
}
.dash-section-title {
  padding: 8px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sidebar-text-mute);
}
.dash-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  position: relative;
}
.dash-nav-item:hover {
  background: var(--sidebar-hover-bg);
  color: white;
}
.dash-nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
}
.dash-nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 6px; bottom: 6px;
  width: 3px;
  background: #60A5FA;
  border-radius: 0 3px 3px 0;
}

/* Topbar — clean white over warm main */
.dash-topbar {
  height: 60px;
  background: white;
  border-bottom: 1px solid var(--warm-border-soft);
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.dash-content {
  background: var(--base);
  flex: 1;
  padding: 28px 32px;
}

/* Hero strip — luxe gradient */
.dash-hero {
  background: linear-gradient(135deg, #0F1729 0%, #1E1B4B 55%, #312E81 100%);
  border-radius: 16px;
  padding: 30px 34px;
  color: white;
  margin-bottom: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.dash-hero::after {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  pointer-events: none;
}
.dash-hero > * { position: relative; z-index: 1; }
.dash-hero-greet {
  font-size: 13px;
  color: rgba(199, 210, 254, 0.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.dash-hero-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: white;
}
.dash-hero-meta {
  font-size: 13px;
  color: rgba(199, 210, 254, 0.75);
  margin-top: 10px;
}
.dash-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-hero .btn-hero {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: background 0.15s, border-color 0.15s;
}
.dash-hero .btn-hero:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
}
.dash-hero .btn-hero-primary {
  background: white; color: #0F1729;
  border-color: white;
}
.dash-hero .btn-hero-primary:hover { background: #FBE8C8; border-color: #FBE8C8; }

/* KPI strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--base-card);
  border: 1px solid var(--warm-border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.kpi-card:hover {
  border-color: var(--indigo);
  box-shadow: var(--shadow-soft-md);
}
.kpi-label {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}
.kpi-delta.up    { color: var(--emerald-deep); }
.kpi-delta.down  { color: var(--crimson-deep); }
.kpi-delta.muted { color: var(--ink-500); }

/* Section heading */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 30px 0 14px;
  gap: 16px;
}
.section-heading h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.section-heading .section-meta {
  font-size: 12px;
  color: var(--ink-500);
}

/* Quick action grid */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.quick-action {
  background: var(--base-card);
  border: 1px solid var(--warm-border);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.quick-action:hover {
  border-color: var(--indigo);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft-md);
}
.quick-action-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
}
.quick-action-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-900);
}
.quick-action-desc {
  font-size: 12.5px;
  color: var(--ink-500);
  line-height: 1.5;
}

/* Activity panel (recent articles / scans) */
.activity-panel {
  background: var(--base-card);
  border: 1px solid var(--warm-border);
  border-radius: 12px;
  overflow: hidden;
}
.activity-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--warm-border-soft);
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(180deg, #FBF7EF 0%, #FFFFFF 100%);
}
.activity-panel-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-900);
}
.activity-panel-link {
  font-size: 12px;
  color: var(--indigo);
  text-decoration: none;
  font-weight: 600;
}
.activity-panel-link:hover { text-decoration: underline; }
.activity-row {
  padding: 12px 20px;
  border-bottom: 1px solid var(--warm-border-soft);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
  transition: background 0.12s;
}
.activity-row:hover { background: #FBF7EF; }
.activity-row:last-child { border-bottom: none; }
.activity-title {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink-900);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-meta {
  font-size: 11.5px;
  color: var(--ink-500);
}
.activity-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Tools grid (filterable) */
.tools-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  flex-wrap: wrap;
}
.tools-search {
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  padding: 9px 14px;
  border: 1px solid var(--warm-border);
  border-radius: 8px;
  font-size: 13.5px;
  background: var(--base-card);
  font-family: inherit;
  color: var(--ink-900);
}
.tools-search:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.12);
}
.filter-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.filter-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--warm-border);
  background: var(--base-card);
  color: var(--ink-700);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.filter-chip:hover { border-color: var(--ink-300); background: #FBF7EF; }
.filter-chip.active {
  background: var(--ink-900);
  color: white;
  border-color: var(--ink-900);
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.tool-card {
  background: var(--base-card);
  border: 1px solid var(--warm-border);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  position: relative;
}
.tool-card:hover {
  border-color: var(--indigo);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft-md);
}
.tool-card-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.tool-card-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.tool-card-cat-brand        { background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: #92400E; }
.tool-card-cat-intelligence { background: linear-gradient(135deg, #DBEAFE, #BFDBFE); color: #1E40AF; }
.tool-card-cat-create       { background: linear-gradient(135deg, #DCFCE7, #BBF7D0); color: #166534; }
.tool-card-cat-connect      { background: linear-gradient(135deg, #F3E8FF, #E9D5FF); color: #6B21A8; }
.tool-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-900);
  flex: 1;
}
.tool-card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}
.tool-card-tag-needs-connect {
  background: #FEF3C7; color: #92400E;
}
.tool-card-tag-new {
  background: #FCE7F3; color: #9F1239;
}
.tool-card-desc {
  font-size: 12.5px;
  color: var(--ink-500);
  line-height: 1.5;
  flex: 1;
}

/* Empty state */
.empty-state {
  background: var(--base-card);
  border: 1px dashed var(--warm-border);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-500);
}
.empty-state-icon { font-size: 32px; margin-bottom: 12px; }
.empty-state-title { font-weight: 700; color: var(--ink-900); margin-bottom: 6px; font-size: 15px; }
.empty-state-desc { font-size: 13px; line-height: 1.6; }

/* Logged-in user block in topbar */
.dash-topbar .btn-secondary {
  border-color: var(--warm-border);
  background: white;
}
.dash-topbar .btn-secondary:hover { background: #FBF7EF; }

/* Topbar user link */
.topbar-user-link:hover { background: #FBF7EF; }

/* ───── Topbar Search + Aira buttons (Phase 5.2) ──────── */
.topbar-search-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-500);
  transition: border-color 0.12s, background 0.12s;
}
.topbar-search-btn:hover { border-color: var(--ink-300); background: #FBF7EF; }
.topbar-search-text { color: var(--ink-700); font-weight: 500; }
.topbar-search-kbd {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--ink-100);
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}
.topbar-aira-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #4338CA 0%, #6D28D9 100%);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: white;
  transition: opacity 0.12s, transform 0.12s;
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.25);
}
.topbar-aira-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(67, 56, 202, 0.35); }

/* ───── Search Modal (Phase 5.2) ──────────────────────── */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 41, 0.55);
  z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  padding-left: 16px; padding-right: 16px;
}
.search-box {
  width: 100%; max-width: 600px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}
.search-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--warm-border-soft);
}
.search-input-icon { font-size: 16px; color: var(--ink-500); }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink-900);
  background: transparent;
}
.search-input::placeholder { color: var(--ink-300); }
.search-input-kbd {
  padding: 2px 8px; border-radius: 4px;
  background: var(--ink-100); color: var(--ink-500);
  font-size: 11px; font-weight: 600; font-family: ui-monospace, monospace;
}
.search-empty {
  padding: 30px 18px;
  text-align: center;
  color: var(--ink-500);
  font-size: 13px;
}
.search-results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.1s;
}
.search-result:hover, .search-result.active { background: #FBF7EF; }
.search-result-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--ink-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.search-result-text { flex: 1; min-width: 0; }
.search-result-title {
  font-weight: 600; color: var(--ink-900); font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-result-subtitle { font-size: 11.5px; color: var(--ink-500); margin-top: 1px; }
.search-result-kind {
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 4px;
  background: var(--ink-100); color: var(--ink-500);
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════
   Aira — Intelligent Assistant (Phase 5.4 redesign)
   Premium personal-assistant chat surface. Branded SVG sparkle,
   editorial assistant flow (no bubble), soft user pill, floating
   composer, animated typing, refined conversations sidebar.
   ═══════════════════════════════════════════════════════════ */

.aira-layout {
  display: flex;
  gap: 16px;
  height: calc(100vh - 110px);
  min-height: 500px;
}

/* ── Conversations sidebar ────────────────────────────────── */
.aira-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.aira-sidebar-top {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--warm-border-soft);
  background: #FBFAF7;
}
.aira-new-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: -0.005em;
  transition: transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.aira-new-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.32); }
.aira-new-btn svg { width: 14px; height: 14px; }
.aira-conv-search {
  margin-top: 10px;
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--warm-border);
  border-radius: 8px;
  background: white url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat 10px center;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.aira-conv-search:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }

.aira-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px 8px;
}
.aira-conv-group {
  padding: 14px 8px 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
}
.aira-conv-item {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 2px;
  transition: background 0.1s;
  position: relative;
}
.aira-conv-item:hover { background: #FBF7EF; }
.aira-conv-item.active {
  background: #EEF2FF;
}
.aira-conv-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--indigo);
  border-radius: 0 3px 3px 0;
}
.aira-conv-title {
  font-weight: 600; font-size: 13px; color: var(--ink-900);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: -0.005em;
}
.aira-conv-preview {
  font-size: 11.5px; color: var(--ink-500);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aira-conv-empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--ink-500);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ── Main chat area ──────────────────────────────────────── */
.aira-main {
  flex: 1;
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

/* Header bar */
.aira-header {
  padding: 14px 22px;
  border-bottom: 1px solid var(--warm-border-soft);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  background: white;
}
.aira-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.aira-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.22);
}
.aira-avatar svg { width: 20px; height: 20px; }
.aira-avatar.thinking::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 13px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #4F46E5, #A855F7) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: aira-pulse 1.6s ease-in-out infinite;
}
@keyframes aira-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.04); }
}
.aira-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.aira-tagline {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-top: 1px;
  letter-spacing: -0.005em;
}
.aira-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.aira-status-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

/* Messages scroll area */
.aira-messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 32px;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
    radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.03) 0%, transparent 50%),
    white;
}
.aira-loading {
  text-align: center;
  color: var(--ink-500);
  padding: 40px;
  font-size: 13.5px;
}

/* Welcome screen */
.aira-welcome {
  max-width: 640px;
  margin: 24px auto;
  padding: 0 8px;
}
.aira-welcome-greet {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--indigo);
  margin-bottom: 10px;
}
.aira-welcome-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.aira-welcome-title .aira-grad {
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.aira-welcome-subtitle {
  font-size: 14.5px;
  color: var(--ink-500);
  line-height: 1.6;
  margin-bottom: 28px;
  letter-spacing: -0.005em;
}
.aira-cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.aira-cap-card {
  padding: 14px 16px;
  border: 1px solid var(--warm-border);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.14s, transform 0.14s, box-shadow 0.14s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.aira-cap-card:hover {
  border-color: var(--indigo);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08);
}
.aira-cap-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #EEF2FF;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}
.aira-cap-text { min-width: 0; }
.aira-cap-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.aira-cap-sub {
  font-size: 11.5px;
  color: var(--ink-500);
  line-height: 1.4;
}

.aira-starters-divider {
  margin: 16px 0 10px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
}
.aira-starters {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aira-starter {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--warm-border-soft);
  border-radius: 9px;
  background: white;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-700);
  transition: all 0.12s;
  text-align: left;
}
.aira-starter:hover {
  border-color: var(--indigo);
  background: #FBFAFE;
  color: var(--ink-900);
}
.aira-starter-arrow {
  margin-left: auto;
  color: var(--ink-300);
  transition: color 0.12s, transform 0.14s;
}
.aira-starter:hover .aira-starter-arrow { color: var(--indigo); transform: translateX(2px); }
.aira-starter-icon { font-size: 14px; flex-shrink: 0; opacity: 0.85; }

/* Messages */
.aira-msg-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: flex-start;
  animation: aira-fadeup 0.28s ease-out;
}
@keyframes aira-fadeup {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.aira-msg-row.user { flex-direction: row-reverse; }
.aira-msg-avatar {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
  margin-top: 1px;
}
.aira-msg-avatar svg { width: 16px; height: 16px; }
.aira-msg-avatar.user {
  background: var(--ink-900);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Assistant: NO bubble — clean editorial flow */
.aira-msg-row.assistant .aira-msg-bubble {
  background: transparent;
  border: none;
  padding: 4px 0 0;
  max-width: calc(100% - 50px);
  font-size: 14.5px;
  color: var(--ink-900);
  line-height: 1.7;
  letter-spacing: -0.005em;
}
/* User: soft pill on the right */
.aira-msg-row.user .aira-msg-bubble {
  background: #EEF2FF;
  border: 1px solid #DDD6FE;
  padding: 11px 16px;
  border-radius: 14px 14px 4px 14px;
  max-width: 75%;
  font-size: 14px;
  color: var(--ink-900);
  line-height: 1.55;
}
.aira-msg-para { margin-bottom: 10px; }
.aira-msg-para:last-child { margin-bottom: 0; }
.aira-msg-bubble strong { font-weight: 700; color: var(--ink-900); }
.aira-msg-bubble code {
  background: #F1F5F9; padding: 1px 6px; border-radius: 4px;
  font-family: ui-monospace, SF Mono, Monaco, monospace;
  font-size: 13px; color: #1E293B;
}

/* Typing indicator */
.aira-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0 4px;
}
.aira-typing-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--indigo);
  animation: aira-typing 1.2s ease-in-out infinite;
}
.aira-typing-dot:nth-child(2) { animation-delay: 0.18s; }
.aira-typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes aira-typing {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30%           { opacity: 1;    transform: translateY(-3px); }
}

/* Per-message actions (copy/regen) */
.aira-msg-tools {
  display: flex; gap: 6px;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.18s;
}
.aira-msg-row.assistant:hover .aira-msg-tools { opacity: 1; }
.aira-msg-tool {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  background: white;
  border: 1px solid var(--warm-border);
  color: var(--ink-500);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.aira-msg-tool:hover {
  color: var(--indigo);
  border-color: var(--indigo);
  background: #FAFAFE;
}
.aira-msg-tool svg { width: 12px; height: 12px; }

/* Action buttons (CTAs from assistant) */
.aira-msg-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 14px;
}
.aira-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--indigo);
  color: var(--indigo);
  font-weight: 600;
  font-size: 12.5px;
  text-decoration: none;
  transition: all 0.12s;
}
.aira-action-btn:hover {
  background: var(--indigo);
  color: white;
  transform: translateY(-1px);
}

/* Composer */
.aira-input-wrap {
  padding: 14px 22px 18px;
  background: white;
  border-top: 1px solid var(--warm-border-soft);
}
.aira-input-card {
  border: 1px solid var(--warm-border);
  border-radius: 14px;
  background: white;
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.aira-input-card:focus-within {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08), 0 4px 14px rgba(79, 70, 229, 0.06);
}
.aira-input {
  width: 100%;
  resize: none;
  border: none;
  padding: 4px 4px 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-900);
  outline: none;
  min-height: 24px;
  max-height: 200px;
  background: transparent;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.aira-input::placeholder { color: var(--ink-300); }
.aira-input-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.aira-input-hint {
  font-size: 11px;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.aira-input-hint kbd {
  padding: 1px 5px;
  border-radius: 3px;
  background: #F1F5F9;
  border: 1px solid var(--warm-border);
  font-family: ui-monospace, SF Mono, Monaco, monospace;
  font-size: 10px;
  color: var(--ink-700);
}
.aira-send-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.12s, box-shadow 0.18s, opacity 0.12s;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}
.aira-send-btn svg { width: 14px; height: 14px; }
.aira-send-btn:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}
.aira-send-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

/* Responsive */
@media (max-width: 768px) {
  .aira-sidebar { display: none; }
  .aira-cap-grid { grid-template-columns: 1fr; }
  .aira-welcome-title { font-size: 24px; }
  .aira-messages { padding: 18px 18px 24px; }
  .aira-input-wrap { padding: 12px 14px 16px; }
  .topbar-search-text, .topbar-search-kbd { display: none; }
}

/* ───── Site Picker (Phase 5.0) ───────────────────────── */
.site-picker { display: inline-block; }
.site-picker-trigger {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.site-picker-trigger:hover { border-color: var(--ink-300); background: #FBF7EF; }
.site-picker-globe { font-size: 14px; }
.site-picker-label { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.site-picker-domain { font-size: 11.5px; color: var(--ink-500); font-family: ui-monospace, monospace; }
.site-picker-caret { font-size: 11px; color: var(--ink-500); margin-left: 2px; }

.site-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 320px;
  max-height: 420px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft-lg);
  padding: 6px;
  z-index: 50;
}
.site-picker-section-label {
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.site-picker-item {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: none;
  background: white;
  cursor: pointer;
  border-radius: 7px;
  font-family: inherit;
  text-align: left;
  transition: background 0.1s;
}
.site-picker-item:hover { background: #FBF7EF; }
.site-picker-item.active { background: #EEF2FF; }
.site-picker-item-name {
  font-size: 13px; font-weight: 600; color: var(--ink-900);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-picker-item-domain {
  font-size: 11px; color: var(--ink-500); font-family: ui-monospace, monospace;
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.site-picker-check { color: var(--indigo); font-weight: 800; }
.site-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--indigo);
  flex-shrink: 0;
}
.site-picker-empty {
  padding: 16px 12px;
  font-size: 12.5px;
  color: var(--ink-500);
  line-height: 1.5;
  text-align: center;
}
.site-picker-divider {
  height: 1px;
  background: var(--warm-border-soft);
  margin: 6px 0;
}
.site-picker-action {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink-700);
  text-decoration: none;
  border-radius: 7px;
  transition: background 0.1s;
}
.site-picker-action:hover {
  background: #FBF7EF;
  color: var(--indigo);
}

/* Responsive */
@media (max-width: 768px) {
  .dash-content { padding: 20px !important; }
  .dash-hero { padding: 22px; flex-direction: column; align-items: flex-start; }
  .dash-hero-title { font-size: 22px; }
  .kpi-strip, .quick-actions, .tools-grid { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
}
.auth-switch {
  text-align: center; margin-top: 20px;
  color: var(--ink-500); font-size: 14px;
}
.auth-switch a { color: var(--brand-600); font-weight: 600; }

/* ───── Scan page ───────────────────────────────────────── */
.scan-page { min-height: 100vh; }
.scan-header {
  border-bottom: 1px solid var(--ink-100);
  background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(8px);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.scan-inner { max-width: 720px; margin: 0 auto; padding: 56px 24px; }
.scan-progress {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 20px;
}
.scan-icon-pulse {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--brand-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}
.progress-bar {
  width: 100%; height: 8px; background: var(--ink-100);
  border-radius: 999px; overflow: hidden; margin-top: 20px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-600), var(--teal-500));
  transition: width 0.4s ease-out;
}
.progress-phase {
  margin-top: 14px; color: var(--ink-500); font-size: 14px;
}

.scan-results-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin: 24px 0;
}
.scan-result-tile {
  padding: 18px; border-radius: 12px;
}
.tile-brand { background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); color: var(--brand-700); }
.tile-teal { background: linear-gradient(135deg, var(--teal-50), #CCFBF1); color: var(--teal-600); }
.tile-orange { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); color: #C2410C; }
.tile-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.75; }
.tile-value { font-size: 32px; font-weight: 800; margin-top: 8px; }

.top-opp {
  padding: 18px; background: var(--ink-100);
  border: 1px solid var(--ink-300); border-radius: 12px;
  margin-bottom: 20px;
}
.top-opp-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-500); margin-bottom: 6px; }
.top-opp-text { font-size: 17px; font-weight: 600; color: var(--ink-900); margin-bottom: 6px; }
.top-opp-hint { font-size: 14px; color: var(--ink-500); }

/* ───── Toast ───────────────────────────────────────────── */
#toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 18px; border-radius: 10px;
  background: var(--ink-900); color: white; font-size: 14px;
  box-shadow: var(--shadow-soft-lg);
  animation: slide-in 0.25s ease-out;
  max-width: 360px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
@keyframes slide-in {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ───── Dashboard layout primitives (sidebar/topbar/content styled in Phase 4.7 block above) ─── */
.dash-layout { display: flex; min-height: 100vh; }
.dash-main { flex: 1; display: flex; flex-direction: column; }
.dash-welcome { padding: 48px; text-align: center; }
.dash-welcome h2 { font-size: 28px; margin-bottom: 8px; }
.dash-welcome p { color: var(--ink-500); margin-bottom: 24px; }

/* ───── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 17px; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .how-grid { grid-template-columns: 1fr; }
  .scan-results-grid { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   Phase 2 additions — Content Generator
   ═══════════════════════════════════════════════════════════ */

.article-body {
  font-size: 16px;
  color: var(--ink-900);
  max-width: 760px;
  margin: 0 auto;
}
.article-body h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.2;
}
.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 14px;
  line-height: 1.3;
}
.article-body h3 {
  font-size: 19px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 10px;
}
.article-body h4 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 8px;
}
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol {
  margin-bottom: 16px;
  padding-left: 28px;
}
.article-body li { margin-bottom: 6px; }
.article-body a {
  color: var(--brand-600);
  text-decoration: underline;
}
.article-body strong { font-weight: 700; }
.article-body em { font-style: italic; }
.article-body code {
  background: var(--ink-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
}
.article-body blockquote {
  border-left: 4px solid var(--brand-600);
  padding-left: 16px;
  margin: 20px 0;
  color: var(--ink-500);
  font-style: italic;
}

/* ───── Image placeholders & inline images (Phase 2.8) ─── */
.article-body .image-placeholder {
  background: var(--ink-100);
  border: 2px dashed var(--ink-300);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
  color: var(--ink-500);
  font-size: 14px;
  font-weight: 600;
  margin: 24px 0;
}
.article-body .image-placeholder .image-placeholder-id {
  display: inline-block;
  margin-left: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-300);
}
.article-body .article-img {
  max-width: 100%;
  border-radius: 12px;
  margin: 24px 0;
  display: block;
}

/* ───── Press Release composite banner (Phase 2.8) ────── */
.composite-banner {
  background: white;
}
.headline-variant:hover {
  background: var(--brand-50);
}

.dash-content a > .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft-md);
  border-color: var(--brand-200);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%2364748B' d='M6 8L2 4h8z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ═══════════════════════════════════════════════════════════
   Phase 2.6 additions — Markdown table styling
   ═══════════════════════════════════════════════════════════ */

.article-body table.md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
  background: white;
  border: 1px solid var(--ink-300);
  border-radius: 8px;
  overflow: hidden;
}
.article-body table.md-table th,
.article-body table.md-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--ink-100);
  border-right: 1px solid var(--ink-100);
  vertical-align: top;
  line-height: 1.5;
}
.article-body table.md-table th:last-child,
.article-body table.md-table td:last-child {
  border-right: none;
}
.article-body table.md-table tr:last-child td {
  border-bottom: none;
}
.article-body table.md-table thead th {
  background: var(--ink-100);
  font-weight: 700;
  color: var(--ink-900);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.article-body table.md-table tbody tr:nth-child(even) {
  background: #FAFBFC;
}
.article-body table.md-table tbody tr:hover {
  background: var(--brand-50);
}
.article-body table.md-table strong {
  color: var(--ink-900);
}

/* Make tables scrollable on small screens */
@media (max-width: 640px) {
  .article-body table.md-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ═══════════════════════════════════════════════════════════
   Aira WP Agent (Phase 5.6) — mode toggle + preview action cards
   ═══════════════════════════════════════════════════════════ */

.aira-mode-toggle {
  display: inline-flex;
  background: #F1F5F9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.aira-mode-opt {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.aira-mode-opt:hover { color: var(--ink-900); }
.aira-mode-opt.active {
  background: white;
  color: var(--indigo);
  box-shadow: 0 1px 3px rgba(15, 23, 41, 0.06);
}

.aira-action-card {
  margin-top: 14px;
  padding: 14px 16px;
  background: #FBFAFE;
  border: 1px solid #E0E7FF;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.aira-action-card.status-completed {
  background: #F0FDF4;
  border-color: #BBF7D0;
}
.aira-action-card.status-failed {
  background: #FEF2F2;
  border-color: #FECACA;
}
.aira-action-card.status-cancelled,
.aira-action-card.status-rolled_back {
  background: #F8FAFC;
  border-color: var(--ink-200, #E5E7EB);
  opacity: 0.85;
}
.aira-action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.aira-action-type {
  font-weight: 700;
  color: var(--ink-900);
  font-size: 13px;
  letter-spacing: -0.005em;
  text-transform: capitalize;
}
.aira-action-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: #EEF2FF;
  color: #4338CA;
}
.aira-action-card.status-completed .aira-action-status { background: #DCFCE7; color: #166534; }
.aira-action-card.status-failed    .aira-action-status { background: #FEE2E2; color: #991B1B; }
.aira-action-card.status-cancelled .aira-action-status,
.aira-action-card.status-rolled_back .aira-action-status { background: #E2E8F0; color: var(--ink-700); }

.aira-action-count {
  font-size: 13.5px;
  color: var(--ink-700);
  margin-bottom: 10px;
}
.aira-action-summary {
  background: white;
  border: 1px solid var(--warm-border-soft);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--ink-700);
  line-height: 1.55;
}
.aira-action-summary > div { padding: 2px 0; }

.aira-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Agent log table (workspace tab) */
.ws-agent-log { display: flex; flex-direction: column; gap: 8px; }
.ws-agent-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--warm-border);
  border-radius: 10px;
  background: white;
}
.ws-agent-row.status-completed { border-left: 3px solid #16A34A; }
.ws-agent-row.status-failed    { border-left: 3px solid #DC2626; }
.ws-agent-row.status-rolled_back { border-left: 3px solid #94A3B8; opacity: 0.85; }
.ws-agent-row.status-cancelled { border-left: 3px solid #94A3B8; opacity: 0.7; }
.ws-agent-row.status-preview   { border-left: 3px solid #4F46E5; }
.ws-agent-row.status-running   { border-left: 3px solid #D97706; }
.ws-agent-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.ws-agent-type {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
  text-transform: capitalize;
  letter-spacing: -0.005em;
}
.ws-agent-time {
  font-size: 11.5px;
  color: var(--ink-500);
}
.ws-agent-instruction {
  font-size: 12.5px;
  color: var(--ink-700);
  font-style: italic;
}
.ws-agent-stats {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-500);
  flex-wrap: wrap;
}
.ws-agent-status-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: #EEF2FF;
  color: #4338CA;
}
.ws-agent-status-pill.status-completed { background: #DCFCE7; color: #166534; }
.ws-agent-status-pill.status-failed    { background: #FEE2E2; color: #991B1B; }
.ws-agent-status-pill.status-rolled_back,
.ws-agent-status-pill.status-cancelled { background: #E2E8F0; color: var(--ink-700); }

/* ═══════════════════════════════════════════════════════════
   Premium Landing Page (Phase 5.8) — editorial-magazine feel
   ═══════════════════════════════════════════════════════════ */

.lp { background: white; color: var(--ink-900); overflow-x: hidden; }
.lp .lp-italic,
.lp-italic {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Top nav */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--warm-border-soft);
}
.lp-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.lp-nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
}
.lp-nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.lp-nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-700);
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 0.14s;
}
.lp-nav-link:hover { color: var(--ink-900); }
.lp-cta-pill {
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ink-900);
  color: white !important;
  text-decoration: none;
  transition: background 0.14s, transform 0.14s;
  letter-spacing: -0.005em;
}
.lp-cta-pill:hover { background: var(--indigo); transform: translateY(-1px); }
@media (max-width: 880px) {
  .lp-nav-links { display: none; }
}

/* Hero */
.lp-hero {
  position: relative;
  padding: 90px 32px 64px;
  text-align: center;
  background: var(--base);
  overflow: hidden;
}
.lp-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 800px 480px at 50% 0%, rgba(79, 70, 229, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 600px 360px at 20% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 600px 360px at 85% 60%, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
}
.lp-hero-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}
.lp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
  letter-spacing: -0.005em;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(15, 23, 41, 0.04);
}
.lp-hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.lp-hero-title {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--ink-900);
  margin: 0 0 20px;
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
}
.lp-hero-italic {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-hero-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-500);
  max-width: 580px;
  margin: 0 auto 36px;
  letter-spacing: -0.005em;
}
.lp-hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.lp-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 26px;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  color: white !important;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.005em;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
  transition: transform 0.14s, box-shadow 0.18s;
}
.lp-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.36);
}
.lp-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
  background: white;
  color: var(--ink-900) !important;
  border: 1px solid var(--warm-border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: border-color 0.14s, transform 0.14s;
}
.lp-cta-secondary:hover { border-color: var(--ink-900); transform: translateY(-1px); }
.lp-cta-large { padding: 16px 32px; font-size: 16px; }

.lp-hero-trust {
  margin-top: 4px;
  display: flex;
  justify-content: center;
}
.lp-trust-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-500);
}
.lp-trust-stars {
  color: #F59E0B;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .lp-hero { padding: 60px 22px 48px; }
  .lp-hero-title { font-size: 40px; }
  .lp-hero-sub { font-size: 16px; }
}

/* Stats bar */
.lp-stats {
  background: var(--ink-900);
  color: white;
  padding: 38px 32px;
}
.lp-stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.lp-stat { text-align: center; }
.lp-stat-num {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  background: linear-gradient(135deg, #60A5FA 0%, #A78BFA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.lp-stat-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.7);
  margin-top: 8px;
}
@media (max-width: 700px) {
  .lp-stats-inner { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

/* Section wrapper / heads */
.lp-section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.lp-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 14px;
}
.lp-section-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink-900);
  margin: 0 0 16px;
}
.lp-section-sub {
  font-size: 17px;
  color: var(--ink-500);
  line-height: 1.55;
  margin: 0;
  letter-spacing: -0.005em;
}

/* Pillars */
.lp-pillars {
  padding: 96px 32px;
  background: white;
}
.lp-pillar-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.lp-pillar {
  position: relative;
  padding: 28px 28px 26px;
  border: 1px solid var(--warm-border);
  border-radius: 18px;
  background: white;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.22s;
}
.lp-pillar:hover {
  transform: translateY(-3px);
  border-color: var(--indigo);
  box-shadow: 0 12px 36px rgba(15, 23, 41, 0.08);
}
.lp-pillar-featured {
  background: linear-gradient(180deg, #FBFAFE 0%, #FFFFFF 60%);
  border-color: #C7D2FE;
}
.lp-pillar-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1E3A8A 0%, #7C3AED 100%);
  color: white;
}
.lp-pillar-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.lp-pillar-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 8px;
}
.lp-pillar-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--ink-900);
}
.lp-pillar-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-700);
  margin: 0 0 16px;
  letter-spacing: -0.005em;
}
.lp-pillar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--warm-border-soft);
  padding-top: 14px;
}
.lp-pillar-list li {
  font-size: 13px;
  color: var(--ink-700);
  padding: 6px 0 6px 22px;
  position: relative;
  line-height: 1.5;
}
.lp-pillar-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--indigo);
  font-weight: 700;
}
@media (max-width: 900px) { .lp-pillar-grid { grid-template-columns: 1fr; } }

/* How it works */
.lp-how {
  padding: 96px 32px;
  background: var(--base);
}
.lp-how-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.lp-how-step {
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 16px;
  padding: 26px 26px;
  position: relative;
}
.lp-how-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 38px;
  font-weight: 500;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
  line-height: 1;
}
.lp-how-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.lp-how-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-500);
  margin: 0;
  letter-spacing: -0.005em;
}
@media (max-width: 900px) { .lp-how-grid { grid-template-columns: 1fr; } }

/* Pull-quote */
.lp-quote {
  padding: 80px 32px;
  background: white;
}
.lp-quote-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}
.lp-quote-mark {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 120px;
  line-height: 0.6;
  color: var(--indigo);
  opacity: 0.18;
  margin-bottom: 6px;
}
.lp-quote-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  line-height: 1.4;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  max-width: 28ch;
  margin-left: auto;
  margin-right: auto;
}
.lp-quote-attr {
  font-size: 14px;
  color: var(--ink-500);
  letter-spacing: -0.005em;
}
.lp-quote-attr strong { color: var(--ink-900); font-weight: 700; }
@media (max-width: 700px) { .lp-quote-text { font-size: 22px; } }

/* Aira 2.0 spotlight */
.lp-agent {
  padding: 96px 32px;
  background: linear-gradient(180deg, #0F1729 0%, #1E1B4B 70%, #312E81 100%);
  color: white;
  position: relative;
  overflow: hidden;
}
.lp-agent::before {
  content: '';
  position: absolute;
  right: -200px;
  top: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, rgba(99,102,241,0) 70%);
  pointer-events: none;
}
.lp-agent-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  position: relative;
}
.lp-agent-text { color: white; }
.lp-agent-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: white;
  margin: 12px 0 16px;
}
.lp-agent-title .lp-italic {
  background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-agent-sub {
  font-size: 17px;
  color: rgba(199, 210, 254, 0.8);
  line-height: 1.6;
  margin: 0 0 20px;
  letter-spacing: -0.005em;
}
.lp-agent-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.lp-agent-list li {
  padding: 10px 0 10px 26px;
  position: relative;
  font-size: 14.5px;
  color: rgba(199, 210, 254, 0.85);
  line-height: 1.55;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lp-agent-list li:first-child { border-top: none; }
.lp-agent-list li strong { color: white; font-weight: 600; }
.lp-agent-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 11px;
  color: #FCD34D;
  font-size: 10px;
}
.lp-agent-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.lp-agent-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lp-agent-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}
.lp-agent-card-avatar {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lp-agent-card-avatar svg { width: 22px; height: 22px; }
.lp-agent-card-name {
  font-size: 15px; font-weight: 700; color: white;
}
.lp-agent-card-sub {
  font-size: 12px; color: rgba(199, 210, 254, 0.6); margin-top: 1px;
}
.lp-agent-msg {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 11px;
  max-width: 86%;
  letter-spacing: -0.005em;
}
.lp-agent-msg.user {
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.4);
  align-self: flex-end;
  color: white;
}
.lp-agent-msg.agent {
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 4px;
  max-width: 100%;
}
.lp-agent-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 4px;
}
.lp-agent-action-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #FCD34D;
  margin-bottom: 6px;
}
.lp-agent-action-summary {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 10px;
}
.lp-agent-action-buttons { display: flex; gap: 8px; }
.lp-agent-btn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 7px;
  letter-spacing: -0.005em;
}
.lp-agent-btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.lp-agent-btn.primary {
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  color: white;
}
@media (max-width: 900px) {
  .lp-agent-grid { grid-template-columns: 1fr; gap: 36px; }
  .lp-agent-title { font-size: 30px; }
}

/* Final CTA */
.lp-final {
  padding: 96px 32px;
  background: var(--base);
  text-align: center;
}
.lp-final-inner { max-width: 760px; margin: 0 auto; }
.lp-final-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink-900);
  margin: 0 0 18px;
}
.lp-final-title .lp-italic {
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-final-sub {
  font-size: 17px;
  color: var(--ink-500);
  line-height: 1.55;
  margin: 0 0 32px;
  letter-spacing: -0.005em;
}
.lp-final-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.lp-final-meta {
  font-size: 12.5px;
  color: var(--ink-500);
}
@media (max-width: 700px) {
  .lp-final-title { font-size: 32px; }
}

/* Hide the old .hero / .proof-bar / .how — we replaced them with .lp-* */
.lp ~ .footer { background: white; }   /* footer overflow if used */

/* ═══════════════════════════════════════════════════════════
   Premium Workspace Dashboard (Phase 5.7)
   ═══════════════════════════════════════════════════════════ */

.wsx { display: flex; flex-direction: column; gap: 18px; }

/* Hero strip */
.wsx-hero {
  background: linear-gradient(135deg, #0F1729 0%, #1E1B4B 50%, #312E81 100%);
  border-radius: 18px;
  padding: 28px 32px 24px;
  color: white;
  position: relative;
  overflow: hidden;
}
.wsx-hero::before {
  content: '';
  position: absolute;
  right: -120px; top: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(99,102,241,0.35) 0%, rgba(99,102,241,0) 70%);
  pointer-events: none;
}
.wsx-hero::after {
  content: '';
  position: absolute;
  left: -80px; bottom: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(168,85,247,0.18) 0%, rgba(168,85,247,0) 70%);
  pointer-events: none;
}
.wsx-hero > * { position: relative; z-index: 1; }

.wsx-hero-head { margin-bottom: 22px; }
.wsx-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.85);
  margin-bottom: 8px;
}
.wsx-hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.wsx-hero-meta {
  font-size: 13.5px;
  color: rgba(199, 210, 254, 0.7);
  letter-spacing: -0.005em;
}

.wsx-hero-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.wsx-hero-tile {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.18s, border-color 0.18s;
}
.wsx-hero-tile:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}
.wsx-hero-tile-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wsx-hero-tile-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.75);
  margin-top: 2px;
}
.wsx-hero-tile-delta {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: -0.005em;
}
.wsx-hero-tile-delta.good { color: #4ADE80; }
.wsx-hero-tile-delta.bad  { color: #F87171; }

@media (max-width: 768px) {
  .wsx-hero-tiles { grid-template-columns: repeat(2, 1fr); }
  .wsx-hero-title { font-size: 24px; }
  .wsx-hero { padding: 22px 22px 20px; }
}

/* Rows */
.wsx-row {
  display: grid;
  gap: 18px;
}
.wsx-row-2-1 { grid-template-columns: 2fr 1fr; }
.wsx-stack { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 1000px) {
  .wsx-row-2-1 { grid-template-columns: 1fr; }
}

/* Card */
.wsx-card {
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, border-color 0.18s;
}
.wsx-card:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 41, 0.05);
  border-color: var(--warm-border-soft);
}
.wsx-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.wsx-card-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo);
  flex-basis: 100%;
  margin-bottom: 2px;
}
.wsx-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  flex: 1;
}
.wsx-card-action {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: none;
}
.wsx-card-action:hover { text-decoration: underline; }

/* Next Best Actions grid */
.wsx-nba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px) {
  .wsx-nba-grid { grid-template-columns: 1fr; }
}
.wsx-nba {
  border-radius: 12px;
  padding: 14px 16px;
  background: #FAFBFC;
  border: 1px solid var(--warm-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.wsx-nba:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 41, 0.06);
}
.wsx-nba.severity-critical { border-color: #FECACA; background: #FEF7F7; }
.wsx-nba.severity-high     { border-color: #FED7AA; background: #FFFAF3; }
.wsx-nba.severity-medium   { border-color: #BAE6FD; background: #F4FAFF; }
.wsx-nba.severity-low      { border-color: #D9F99D; background: #FAFEF3; }

.wsx-nba-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink-500);
}
.wsx-nba-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-300, #94A3B8);
}
.wsx-nba.severity-critical .wsx-nba-dot { background: #DC2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }
.wsx-nba.severity-high     .wsx-nba-dot { background: #D97706; box-shadow: 0 0 0 3px rgba(217,119,6,0.15); }
.wsx-nba.severity-medium   .wsx-nba-dot { background: #0891B2; box-shadow: 0 0 0 3px rgba(8,145,178,0.15); }
.wsx-nba.severity-critical .wsx-nba-tag { color: #DC2626; }
.wsx-nba.severity-high     .wsx-nba-tag { color: #D97706; }
.wsx-nba.severity-medium   .wsx-nba-tag { color: #0891B2; }

.wsx-nba-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.wsx-nba-fix {
  font-size: 12.5px;
  color: var(--ink-700);
  line-height: 1.5;
}
.wsx-nba-impact {
  font-size: 12px;
  color: #16A34A;
  font-weight: 600;
}
.wsx-nba-cta {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: none;
  align-self: flex-start;
}
.wsx-nba-cta:hover { text-decoration: underline; }

/* At a glance */
.wsx-glance-headline {
  font-size: 14.5px;
  color: var(--ink-900);
  line-height: 1.5;
  letter-spacing: -0.005em;
  margin-bottom: 14px;
  font-weight: 600;
}
.wsx-glance-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.wsx-sev {
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1px solid;
}
.wsx-sev-num {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.wsx-sev-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Setup health (with ring chart) */
.wsx-ring-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.wsx-ring { flex-shrink: 0; }
.wsx-ring-info {}
.wsx-ring-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.wsx-ring-label {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wsx-checklist-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.wsx-cli {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--warm-border-soft);
  font-size: 13px;
}
.wsx-cli:first-child { border-top: none; padding-top: 0; }
.wsx-cli-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 800;
  background: #F1F5F9;
  color: var(--ink-500);
  flex-shrink: 0;
}
.wsx-cli.done .wsx-cli-dot {
  background: #DCFCE7;
  color: #16A34A;
}
.wsx-cli-text {
  flex: 1;
  color: var(--ink-700);
  font-weight: 500;
}
.wsx-cli.done .wsx-cli-text { color: var(--ink-500); }
.wsx-cli-action {
  font-size: 11.5px;
  color: var(--indigo);
  text-decoration: none;
  font-weight: 600;
}

/* Articles list */
.wsx-articles { display: flex; flex-direction: column; }
.wsx-article {
  display: block;
  padding: 12px 0;
  border-top: 1px solid var(--warm-border-soft);
  text-decoration: none;
  transition: padding-left 0.16s;
}
.wsx-article:first-child { border-top: none; padding-top: 0; }
.wsx-article:hover { padding-left: 4px; }
.wsx-article-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.005em;
  line-height: 1.4;
}
.wsx-article-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink-500);
}
.wsx-pill {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: #F1F5F9;
  color: var(--ink-700);
  border: 1px solid var(--warm-border-soft);
}

/* Brand grid */
.wsx-brand-grid { display: flex; flex-direction: column; }
.wsx-brand-row {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--warm-border-soft);
  font-size: 13px;
  align-items: baseline;
}
.wsx-brand-row:first-child { border-top: none; padding-top: 0; }
.wsx-brand-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
  width: 70px;
  flex-shrink: 0;
}
.wsx-brand-value {
  flex: 1;
  color: var(--ink-900);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.5;
}

/* Empty states */
.wsx-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 4px;
}
.wsx-empty-icon { font-size: 30px; margin-bottom: 8px; }
.wsx-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.wsx-empty-desc {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.55;
  max-width: 480px;
}
.wsx-empty-inline {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.55;
}

/* Quick actions hero */
.wsx-qa-hero { padding: 26px 28px 28px; }
.wsx-qa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .wsx-qa-grid { grid-template-columns: repeat(2, 1fr); } }

.wsx-qa {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 14px;
  text-decoration: none;
  position: relative;
  transition: transform 0.16s, box-shadow 0.18s, border-color 0.18s;
}
.wsx-qa:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 41, 0.07);
  border-color: var(--qa-color, var(--indigo));
}
.wsx-qa::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--qa-color, var(--indigo));
  border-radius: 14px 0 0 14px;
  opacity: 0;
  transition: opacity 0.18s;
}
.wsx-qa:hover::before { opacity: 1; }

.wsx-qa-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--qa-color, #4F46E5) 12%, white);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.wsx-qa-text { flex: 1; min-width: 0; }
.wsx-qa-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.005em;
}
.wsx-qa-sub {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 2px;
}
.wsx-qa-arrow {
  font-size: 18px;
  color: var(--ink-300);
  transition: transform 0.16s, color 0.16s;
}
.wsx-qa:hover .wsx-qa-arrow {
  color: var(--qa-color, var(--indigo));
  transform: translateX(3px);
}

/* ═══════════════════════════════════════════════════════════
   Site Workspace (Phase 5.5a) — unified per-site command centre
   ═══════════════════════════════════════════════════════════ */

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--warm-border);
  margin-bottom: 0;
}
.workspace-title-block { min-width: 0; flex: 1; }
.workspace-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--indigo);
  margin-bottom: 6px;
}
.workspace-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1.15;
}
.workspace-domain {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-500);
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.workspace-domain:hover { color: var(--indigo); }
.workspace-site-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 10px;
  flex-shrink: 0;
}
.workspace-site-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.workspace-site-select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
  cursor: pointer;
  outline: none;
  padding: 2px 4px;
}

.workspace-tabs {
  display: flex;
  gap: 4px;
  margin: 18px 0 24px;
  border-bottom: 1px solid var(--warm-border-soft);
  overflow-x: auto;
  padding-bottom: 0;
  scrollbar-width: thin;
}
.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-500);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s, border-color 0.12s;
  letter-spacing: -0.005em;
}
.workspace-tab:hover { color: var(--ink-900); }
.workspace-tab.active {
  color: var(--indigo);
  font-weight: 600;
  border-bottom-color: var(--indigo);
}
.workspace-tab-icon { font-size: 15px; opacity: 0.85; }
.workspace-tab.active .workspace-tab-icon { opacity: 1; }

.workspace-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.workspace-overview {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: start;
}
.workspace-overview .ws-card-full,
.workspace-overview .ws-card-wide {
  grid-column: 1 / -1;
}
.workspace-overview > .ws-card-wide:first-child { grid-column: 1 / 2; }
.workspace-overview > .ws-card:nth-child(2)     { grid-column: 2 / 3; }
@media (max-width: 900px) {
  .workspace-overview { grid-template-columns: 1fr; }
  .workspace-overview > .ws-card-wide:first-child,
  .workspace-overview > .ws-card:nth-child(2) { grid-column: 1 / -1; }
}

.ws-card {
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}
.ws-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ws-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.ws-card-meta {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 600;
}
.ws-card-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: none;
}
.ws-card-link:hover { text-decoration: underline; }

.ws-progress {
  height: 6px;
  background: #F1F5F9;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 18px;
}
.ws-progress-bar {
  height: 100%;
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.ws-checklist { display: flex; flex-direction: column; gap: 4px; }
.ws-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--warm-border-soft);
}
.ws-checklist-item:last-child { border-bottom: none; }
.ws-checklist-status {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
  background: #F1F5F9;
  color: var(--ink-500);
  flex-shrink: 0;
}
.ws-checklist-item.done .ws-checklist-status {
  background: #DCFCE7;
  color: #16A34A;
}
.ws-checklist-body { flex: 1; min-width: 0; }
.ws-checklist-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.005em;
}
.ws-checklist-item.done .ws-checklist-label {
  color: var(--ink-700);
}
.ws-checklist-hint {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-top: 2px;
  line-height: 1.4;
}

.ws-snapshot-headline {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.ws-snapshot-metric {
  font-size: 13px;
  color: var(--indigo);
  font-weight: 600;
  margin-top: 6px;
}
.ws-snapshot-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--warm-border-soft);
}
.ws-snapshot-count { text-align: center; }
.ws-snapshot-count-num {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.ws-snapshot-count-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: 4px;
}
.ws-empty-inline {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.55;
}

.ws-nba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.ws-nba-card {
  border: 1px solid var(--warm-border);
  border-radius: 10px;
  padding: 14px 16px;
  background: #FBFAF7;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ws-nba-card.severity-critical { border-color: #FECACA; background: #FEF2F2; }
.ws-nba-card.severity-high     { border-color: #FED7AA; background: #FFF7ED; }
.ws-nba-card.severity-medium   { border-color: #BAE6FD; background: #F0F9FF; }
.ws-nba-severity {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink-500);
}
.ws-nba-card.severity-critical .ws-nba-severity { color: #DC2626; }
.ws-nba-card.severity-high     .ws-nba-severity { color: #D97706; }
.ws-nba-card.severity-medium   .ws-nba-severity { color: #0891B2; }
.ws-nba-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.ws-nba-fix {
  font-size: 12.5px;
  color: var(--ink-700);
  line-height: 1.5;
}
.ws-nba-impact {
  font-size: 12px;
  color: #16A34A;
  font-weight: 600;
}
.ws-nba-cta {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: none;
  align-self: flex-start;
}
.ws-nba-cta:hover { text-decoration: underline; }

.ws-qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.ws-qa-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--warm-border);
  border-radius: 12px;
  background: white;
  text-decoration: none;
  transition: border-color 0.14s, transform 0.14s, box-shadow 0.14s;
}
.ws-qa-card:hover {
  border-color: var(--indigo);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08);
}
.ws-qa-icon {
  font-size: 20px;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: #EEF2FF;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ws-qa-text { min-width: 0; }
.ws-qa-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.005em;
}
.ws-qa-sub {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 1px;
  line-height: 1.4;
}

.ws-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ws-stat {
  background: #FBFAF7;
  border: 1px solid var(--warm-border-soft);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.ws-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.ws-stat-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: 4px;
}

.ws-content-list { display: flex; flex-direction: column; }
.ws-content-item {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid var(--warm-border-soft);
  text-decoration: none;
}
.ws-content-item:last-child { border-bottom: none; }
.ws-content-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.005em;
}
.ws-content-meta {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 2px;
}

.ws-settings-grid { display: flex; flex-direction: column; gap: 8px; }
.ws-settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--warm-border);
  border-radius: 10px;
  background: white;
  text-decoration: none;
  transition: border-color 0.14s, background 0.14s;
}
.ws-settings-row:hover {
  border-color: var(--indigo);
  background: #FBFAFE;
}
.ws-settings-icon {
  font-size: 22px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ws-settings-text { flex: 1; min-width: 0; }
.ws-settings-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.005em;
}
.ws-settings-status {
  font-size: 12.5px;
  color: var(--ink-500);
  margin-top: 2px;
}
.ws-settings-arrow {
  font-size: 16px;
  color: var(--ink-300);
}
.ws-settings-row:hover .ws-settings-arrow { color: var(--indigo); }

.workspace-empty {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.workspace-empty-icon { font-size: 48px; margin-bottom: 14px; }
.workspace-empty-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.workspace-empty-desc {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.6;
  max-width: 460px;
}

/* ═══════════════════════════════════════════════════════════
   Password input with show/hide eye toggle
   ═══════════════════════════════════════════════════════════ */
.password-wrap { position: relative; }
.password-input { padding-right: 44px !important; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.12s, background 0.12s;
}
.password-toggle:hover {
  color: var(--indigo);
  background: rgba(15, 23, 41, 0.04);
}
.password-toggle:focus {
  outline: none;
  color: var(--indigo);
}
.password-toggle svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   Phase 5.4 — Compliance: Policy pages, footer, cookie banner
   ═══════════════════════════════════════════════════════════ */

/* Marketing footer */
.footer {
  padding: 32px 24px 40px;
  border-top: 1px solid var(--ink-100);
  background: white;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-left { font-size: 13px; color: var(--ink-500); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a {
  font-size: 13px; color: var(--ink-700); text-decoration: none;
  font-weight: 500; transition: color 0.12s;
}
.footer-links a:hover { color: var(--indigo); }

/* Policy pages */
.policy-page { background: white; min-height: 100vh; }
.policy-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}
.policy-eyebrow {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--indigo);
  margin-bottom: 14px;
}
.policy-title {
  font-size: 40px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink-900);
  margin: 0 0 12px;
}
.policy-meta {
  font-size: 13px; color: var(--ink-500);
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink-100);
}
.policy-h2 {
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  margin: 36px 0 14px;
}
.policy-body {
  font-size: 15px; line-height: 1.75;
  color: var(--ink-700);
}
.policy-body p { margin: 0 0 14px; }
.policy-body strong { color: var(--ink-900); font-weight: 700; }
.policy-body em { font-style: italic; color: var(--ink-700); }
.policy-body a { color: var(--indigo); text-decoration: underline; text-underline-offset: 2px; }
.policy-body a:hover { color: var(--indigo-deep); }
.policy-body ul { margin: 0 0 14px; padding-left: 22px; }
.policy-body ul li { margin-bottom: 8px; line-height: 1.6; }
.policy-body code {
  background: #F1F5F9; padding: 1px 6px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px; color: #1E293B;
}
.policy-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; margin: 12px 0 18px;
  background: #FAFBFC;
  border: 1px solid var(--ink-100);
  border-radius: 8px;
  overflow: hidden;
}
.policy-table th {
  text-align: left; padding: 10px 14px;
  font-weight: 700; color: var(--ink-900);
  background: white;
  border-bottom: 1px solid var(--ink-100);
  font-size: 13px;
}
.policy-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--ink-100);
  color: var(--ink-700);
  vertical-align: top;
}
.policy-contact {
  margin-top: 40px;
  padding: 18px 22px;
  background: #FBFAFE;
  border: 1px solid #E0E7FF;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-700);
}

.policy-footer {
  border-top: 1px solid var(--ink-100);
  padding: 28px 32px 40px;
  background: #FBFAF7;
}
.policy-footer-inner {
  max-width: 760px; margin: 0 auto;
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; align-items: center;
}
.policy-footer-left { font-size: 12.5px; color: var(--ink-500); }
.policy-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.policy-footer-links a {
  font-size: 13px; color: var(--ink-700); text-decoration: none;
  font-weight: 500;
}
.policy-footer-links a:hover { color: var(--indigo); }

@media (max-width: 640px) {
  .policy-article { padding: 36px 20px 48px; }
  .policy-title { font-size: 30px; }
}

/* ═══════════════════════════════════════════════════════════
   Cookie consent banner
   ═══════════════════════════════════════════════════════════ */

.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 9000;
  background: white;
  border: 1px solid var(--warm-border);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(15, 23, 41, 0.18), 0 4px 12px rgba(15, 23, 41, 0.08);
  max-width: 980px;
  margin: 0 auto;
  animation: cookie-slide-up 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.cookie-banner-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}
@keyframes cookie-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  flex-wrap: wrap;
}
.cookie-banner-text { flex: 1; min-width: 280px; }
.cookie-banner-title {
  font-size: 14px; font-weight: 700; color: var(--ink-900);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.cookie-banner-body {
  font-size: 13px; color: var(--ink-500);
  line-height: 1.55;
}
.cookie-banner-body a { color: var(--indigo); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cookie-banner-btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.12s;
  letter-spacing: -0.005em;
}
.cookie-banner-secondary {
  background: white;
  color: var(--ink-700);
  border-color: var(--warm-border);
}
.cookie-banner-secondary:hover {
  border-color: var(--ink-700);
  color: var(--ink-900);
}
.cookie-banner-primary {
  background: linear-gradient(135deg, #1E3A8A 0%, #4F46E5 55%, #7C3AED 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.cookie-banner-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Cookie preferences expanded view */
.cookie-prefs { flex-direction: column; align-items: stretch !important; }
.cookie-pref-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--warm-border-soft);
  cursor: pointer;
}
.cookie-pref-row:last-of-type { border-bottom: none; }
.cookie-pref-name {
  font-size: 13.5px; font-weight: 600; color: var(--ink-900);
  margin-bottom: 2px;
}
.cookie-pref-desc { font-size: 12.5px; color: var(--ink-500); line-height: 1.5; }
.cookie-pref-toggle {
  flex-shrink: 0;
  margin-top: 2px;
  width: 18px; height: 18px;
  cursor: pointer;
}
.cookie-pref-toggle:disabled { cursor: not-allowed; opacity: 0.55; }

@media (max-width: 640px) {
  .cookie-banner-inner { gap: 14px; padding: 16px 18px; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-btn { flex: 1; }
}

/* ═══════════════════════════════════════════════════════════
   Phase 4.7 — Brand logo (Anvil Hex + Star)
   Inline SVG logo wired via brandLogo() in app.js
   ═══════════════════════════════════════════════════════════ */
.brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo svg { display: block; height: 36px; width: auto; }

/* Sidebar — compact, dark variant */
.dash-brand .brand-logo svg { height: 30px; }

/* Auth pages — centered, larger */
.auth-brand { text-align: center; margin-bottom: 8px; }
.auth-brand .brand-logo { display: inline-flex; }
.auth-brand .brand-logo svg { height: 40px; }

/* Marketing top nav */
.nav-brand .brand-logo svg { height: 32px; }

/* ════════════════════════════════════════════════════════════
   Responsive mobile navigation (added 2026-05-21)
   Reveals the app sidebar as a slide-in drawer on small screens
   (paired with /js/responsive-nav.js). Inert on desktop/laptop.
   ═══════════════════════════════════════════════════════════ */
.bf-nav-toggle { display: none; }
.bf-nav-backdrop { display: none; }

@media (max-width: 768px) {
  /* Hamburger — only when the app shell sidebar exists */
  html.bf-has-sidebar .bf-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    position: fixed;
    top: 11px;
    left: 12px;
    z-index: 1002;
    width: 40px;
    height: 40px;
    padding: 9px 8px;
    background: var(--sidebar-bg, #0F1729);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  }
  .bf-nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  html.bf-nav-open .bf-nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  html.bf-nav-open .bf-nav-toggle span:nth-child(2) { opacity: 0; }
  html.bf-nav-open .bf-nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* Sidebar becomes an off-canvas drawer (overrides display:none above) */
  html.bf-has-sidebar .dash-sidebar {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    width: 264px;
    max-width: 84vw;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.26s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
  }
  html.bf-nav-open .dash-sidebar { transform: translateX(0); }

  /* Backdrop */
  html.bf-has-sidebar .bf-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 41, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.26s ease;
  }
  html.bf-nav-open .bf-nav-backdrop { opacity: 1; pointer-events: auto; }
  html.bf-nav-open { overflow: hidden; }

  /* Topbar reflow so nothing collides; leaves room for the hamburger */
  html.bf-has-sidebar .dash-topbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 60px;
    padding: 10px 12px 10px 62px;
    gap: 8px;
    row-gap: 8px;
  }
  .dash-topbar > div { flex-wrap: wrap; gap: 8px; min-width: 0; }
  .dash-topbar .topbar-user-link { display: none; } /* account reachable in drawer footer */
  .dash-topbar .site-picker-trigger { max-width: 62vw; }
  .dash-topbar .site-picker-domain { display: none; }
  .workspace-tabs { -webkit-overflow-scrolling: touch; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 440px) {
  .kpi-strip { grid-template-columns: 1fr; }
}

/* Workspace tab strip - wrap instead of phantom-scroll (fix 2026-05-21b)
   overflow-x:auto forced overflow-y to auto, creating a stray vertical
   scrollbar on the tab row; wrapping removes both scrollbars cleanly. */
.workspace-tabs { flex-wrap: wrap; overflow: visible; }
