/* ============================================
   Audience Town — Shared Styles for Prototyping
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* --- Color Tokens --- */
:root {
  /* Brand Color Scales — AT Green */
  --at-green-900: #1d6038;
  --at-green-800: #227141;
  --at-green-700: #2d9154;
  --at-green-600: #36b166;
  --at-green-500: #45cc79;
  --at-green-400: #69d895;
  --at-green-300: #a0e5bc;
  --at-green-200: #c0eed2;
  --at-green-100: #e0f7e9;
  --at-green-50: #f0fbf4;

  /* Brand Color Scales — AT Blue */
  --at-blue-900: #032e51;
  --at-blue-800: #043965;
  --at-blue-700: #09518d;
  --at-blue-600: #0e67b6;
  --at-blue-500: #147edd;
  --at-blue-400: #018bff;
  --at-blue-300: #4daefc;
  --at-blue-200: #88c9fd;
  --at-blue-100: #c3e4fe;
  --at-blue-50: #ecf6ff;

  /* Brand Color Scales — AT Pink */
  --at-pink-900: #65032f;
  --at-pink-800: #8e0741;
  --at-pink-700: #b60b54;
  --at-pink-600: #de1066;
  --at-pink-500: #fc1a79;
  --at-pink-400: #ff4598;
  --at-pink-300: #fd73b0;
  --at-pink-200: #fd9bc7;
  --at-pink-100: #fec3dd;
  --at-pink-50: #ffebf4;

  /* Brand Color Scales — AT Yellow */
  --at-yellow-900: #7e7937;
  --at-yellow-800: #979142;
  --at-yellow-700: #b0a94d;
  --at-yellow-600: #cac258;
  --at-yellow-500: #e3da63;
  --at-yellow-400: #fcf26e;
  --at-yellow-300: #fdf5a0;
  --at-yellow-200: #fef9c6;
  --at-yellow-100: #fefcd9;
  --at-yellow-50: #fffdec;

  /* Brand Color Scales — AT Grey */
  --at-grey-900: #142533;
  --at-grey-800: #223240;
  --at-grey-700: #384957;
  --at-grey-600: #384957;
  --at-grey-500: #77828b;
  --at-grey-400: #9ea9b3;
  --at-grey-300: #cdd4da;
  --at-grey-200: #e1e6eb;
  --at-grey-100: #eff3f6;
  --at-grey-50: #f6f9fb;
  --at-grey-00: #ffffff;

  /* Semantic Aliases (backward compat) */
  --at-green: var(--at-green-400);
  --at-green-dark: var(--at-green-700);
  --at-teal: #158995;
  --zillow-blue: var(--at-blue-400);
  --zillow-blue-light: var(--at-blue-50);
  --sidebar-bg: var(--at-grey-00);
  --sidebar-active: var(--at-green-50);
  --sidebar-hover: var(--at-grey-50);
  --content-bg: var(--at-grey-100);
  --card-bg: var(--at-grey-00);
  --text-primary: var(--at-grey-900);
  --text-secondary: var(--at-grey-500);
  --text-muted: var(--at-grey-400);
  --border: var(--at-grey-200);
  --border-light: var(--at-grey-100);
  --pink: var(--at-pink-400);
  --dark-card: var(--at-grey-900);
  --dark-card-text: var(--at-grey-100);

  /* Accent colors kept for backward compat */
  --amber: #F59E0B;
  --amber-bg: #FFFBEB;
  --amber-border: #FDE68A;
  --red: #EF4444;
  --indigo: #6366F1;
  --purple: #8B5CF6;

  /* Charting Colors — Contrasting (12 positions) */
  --chart-100: #45cc79;
  --chart-200: #018bff;
  --chart-300: #8b5cf6;
  --chart-400: #ff4598;
  --chart-500: #f59e0b;
  --chart-600: #fcd34d;
  --chart-110: #a0e5bc;
  --chart-210: #88c9fd;
  --chart-310: #c4b5fd;
  --chart-410: #fd9bc7;
  --chart-510: #facf85;
  --chart-610: #fde9a6;

  /* Charting Colors — Analogous */
  --chart-analogous-000: #e1e6eb;
  --chart-analogous-030: #69d895;
  --chart-analogous-050: #3fb195;
  --chart-analogous-070: #158995;
  --chart-analogous-090: #106a7d;

  /* Charting Colors — Likely Mover */
  --chart-mover-likely: #69d895;
  --chart-mover-potential: #3fb195;
  --chart-mover-recent: #158995;

  /* Funnel gradient (remapped to brand) */
  --funnel-1: var(--at-blue-400);
  --funnel-2: var(--at-blue-300);
  --funnel-3: var(--at-green-500);
  --funnel-4: var(--at-green-400);
  --funnel-5: var(--at-green-300);

  /* Shadow */
  --shadow-1: 0px 1px 3px rgba(166, 175, 195, 0.4);

  /* Spacing */
  --space-0: 0px;
  --space-px: 1px;
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-3-5: 14px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--content-bg);
  -webkit-font-smoothing: antialiased;
}

/* --- Typography Scale (AT Design System) --- */
.text-3xl {
  font-size: 30px;
  font-weight: 600;
  line-height: 36px;
}

.text-2xl {
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.text-xl {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.text-lg {
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
}

.text-base {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.text-sm {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.text-xs {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

/* Weight modifiers */
.font-normal {
  font-weight: 400;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

/* Eyebrow */
.text-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.56px;
  font-weight: 500;
}

/* Legacy aliases (backward compat) */
.text-hero {
  font-size: 30px;
  font-weight: 600;
  line-height: 36px;
  letter-spacing: -0.5px;
}

.text-h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.text-h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.text-h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
}

.text-body {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.text-small {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.text-caption {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--text-secondary);
}

.text-mono {
  font-family: 'DM Mono', monospace;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}


/* ===================
   APP LAYOUT
   =================== */
.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}


/* ===================
   SIDEBAR
   =================== */
.sidebar {
  background: var(--sidebar-bg);
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

/* --- Branding --- */
.sidebar-branding {
  display: flex;
  align-items: center;
  height: 72px;
  padding: 0 var(--space-4);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
}

.sidebar-logo-img {
  height: 24px;
  width: auto;
}

/* --- Sections --- */
.sidebar-section {
  display: flex;
  flex-direction: column;
}

.sidebar-section-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.48px;
  color: var(--at-grey-500);
  padding: 0 var(--space-3) var(--space-2);
}

/* --- Divider --- */
.sidebar-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0 var(--space-6);
}

/* --- Nav Items (Main) --- */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 var(--space-1);
  font-size: 16px;
  font-weight: 400;
  color: var(--at-grey-900);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.sidebar-item:hover {
  background: var(--sidebar-hover);
}

.sidebar-item.active {
  background: var(--sidebar-active);
  color: var(--at-teal);
  font-weight: 500;
}

.sidebar-item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-item-icon svg {
  width: 24px;
  height: 24px;
  color: var(--at-grey-800);
}

/* --- Community Selector --- */
.sidebar-community-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-1);
  height: 48px;
  cursor: pointer;
}

.sidebar-community-selector:hover {
  background: var(--sidebar-hover);
  border-radius: var(--radius-sm);
}

.sidebar-community-selector .sidebar-item-icon svg {
  color: var(--at-grey-800);
}

.sidebar-community-selector-label {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 16px;
  font-weight: 400;
  color: var(--at-grey-900);
}

.sidebar-community-chevron {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-right: var(--space-2);
}

.sidebar-community-chevron svg {
  width: 16px;
  height: 16px;
  color: var(--at-grey-800);
}

/* --- Nav Items (Admin / Small) --- */
.sidebar-item-sm {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px var(--space-3);
  font-size: 14px;
  font-weight: 400;
  color: var(--at-grey-600);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.sidebar-item-sm:hover {
  background: var(--sidebar-hover);
  color: var(--at-grey-900);
}

.sidebar-item-sm.active {
  background: var(--sidebar-active);
  color: var(--at-teal);
  font-weight: 500;
}

.sidebar-item-sm.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.sidebar-item-sm svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--at-grey-600);
}

/* --- Portal Items (Prototype-specific) --- */
.sidebar-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-item .dot.blue {
  background: var(--zillow-blue);
}

.sidebar-item .dot.green {
  background: var(--at-green);
}

.sidebar-item .dot.gray {
  background: var(--border);
}

.sidebar-item .badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--at-teal);
  color: white;
  margin-left: auto;
}

.sidebar-item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Sidebar sub-nav for Concept 3 */
.sidebar-subnav {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sidebar-subnav .sidebar-item {
  padding-left: calc(var(--space-6) + 24px);
  font-size: 12px;
}

.sidebar-chevron {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.2s ease;
}

.sidebar-chevron.open {
  transform: rotate(90deg);
}

/* --- Explore grows to fill space --- */
.sidebar-section.sidebar-section--grow {
  flex: 1;
  min-height: 0;
}

/* --- User Section --- */
.sidebar-user {
  margin-top: auto;
  padding: var(--space-2) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex-shrink: 0;
}

.sidebar-user-divider {
  height: 1px;
  background: var(--border-light);
  width: 100%;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-user-profile {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--at-teal), var(--at-green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--at-grey-900);
}

.sidebar-user-actions {
  display: flex;
  align-items: center;
  gap: 0;
}

.sidebar-user-action {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--at-grey-600);
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.sidebar-user-action:hover {
  background: var(--sidebar-hover);
}

.sidebar-user-action svg {
  width: 24px;
  height: 24px;
}

.sidebar-user-action--sm {
  width: 24px;
  height: 24px;
}

.sidebar-user-action--sm svg {
  width: 16px;
  height: 16px;
}


/* ===================
   MAIN CONTENT
   =================== */
.main-content {
  min-height: 100vh;
}


/* ===================
   TOPBAR
   =================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-8);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.topbar-selector {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.topbar-selector:hover {
  border-color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.topbar-date {
  font-size: 13px;
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-3);
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}


/* ===================
   CONTENT AREA
   =================== */
.content-area {
  padding: var(--space-8);
}


/* ===================
   PORTAL BANNER
   =================== */
.portal-banner {
  background: linear-gradient(135deg, var(--at-blue-400) 0%, var(--at-blue-600) 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-banner-left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.portal-banner-logo {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  opacity: 0.95;
}

.portal-banner-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.25);
}

.portal-banner-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.portal-banner-title {
  font-size: 16px;
  font-weight: 600;
}

.portal-banner-meta {
  font-size: 12px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.portal-banner-meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--at-green);
  display: inline-block;
}

.portal-banner-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 12px;
  opacity: 0.8;
}

.portal-banner-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.portal-banner-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--at-green);
}


/* ===================
   TAB BAR (Concept 1)
   =================== */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: var(--space-8);
  background: var(--card-bg);
  padding: 0 var(--space-8);
  position: sticky;
  top: 57px;
  z-index: 40;
}

.tab-item {
  padding: var(--space-4) var(--space-6);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-item:hover {
  color: var(--text-primary);
}

.tab-item.active {
  color: var(--zillow-blue);
  border-bottom-color: var(--zillow-blue);
  font-weight: 600;
}


/* ===================
   ANCHOR BAR (Concept 2)
   =================== */
.anchor-bar {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-3) var(--space-8);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 57px;
  z-index: 40;
}

.anchor-item {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.anchor-item:hover {
  color: var(--text-secondary);
}

.anchor-item.active {
  color: var(--zillow-blue);
  border-bottom-color: var(--zillow-blue);
}


/* ===================
   KPI CARDS
   =================== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.kpi-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-card-value {
  font-family: 'DM Mono', monospace;
  font-size: 32px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.1;
}

.kpi-card-value.blue {
  color: var(--zillow-blue);
}

.kpi-card-value.green {
  color: var(--at-green-dark);
}

.kpi-card-value.teal {
  color: var(--at-teal);
}

.kpi-card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* --- Insight & Action Cards --- */
.insight-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.insight-card {
  background: var(--at-grey-900);
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.insight-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.insight-card-icon {
  flex-shrink: 0;
}

.insight-icon-blue {
  color: var(--at-blue-400);
}

.insight-icon-dark {
  color: rgba(255, 255, 255, 0.6);
}

.insight-card-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.6);
}

.insight-card-text {
  font-size: 14px;
  color: var(--at-grey-100);
  line-height: 1.5;
  margin: 0;
  padding-left: 32px; /* align with text after icon */
}

/* --- Whengine AI Card Upgrades --- */
.whengine-card {
  background: linear-gradient(135deg, #142533 0%, #1c3044 50%, #142533 100%);
  position: relative;
  overflow: hidden;
  padding: 0;
  gap: 0;
  min-height: 0;
}

.whengine-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.whengine-accent {
  display: none;
}

.whengine-card-content {
  padding: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
  height: 100%;
  box-sizing: border-box;
}

.whengine-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.7);
}

.whengine-label-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.whengine-ai-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.6);
}

.whengine-card .insight-card-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.whengine-card .insight-card-text {
  color: #fff;
  font-size: 15px;
  line-height: 1.6;
}

.whengine-text {
  padding-left: 0;
}

.whengine-text-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.whengine-card .insight-card-header {
  gap: var(--space-3);
}


/* ===================
   SECTION HEADERS
   =================== */
.section-header {
  margin-bottom: var(--space-6);
}

.section-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.section-header p {
  font-size: 13px;
  color: var(--text-secondary);
}

.section-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--zillow-blue-light);
  color: var(--zillow-blue);
  margin-left: var(--space-3);
  vertical-align: middle;
}


/* ===================
   MINI FUNNEL
   =================== */
.mini-funnel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: 0;
}

.mini-funnel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-5);
}

.mini-funnel-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  text-transform: none;
  letter-spacing: normal;
}

.mini-funnel-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

.mini-funnel-details-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--at-grey-900);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  padding-top: 2px;
}

.mini-funnel-headline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-4);
}

.mini-funnel-big-number {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.2;
}

.mini-funnel-big-number span {
  font-family: 'DM Mono', monospace;
  font-size: 24px;
  font-weight: 700;
}

.mini-funnel-legend {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-shrink: 0;
}

.mini-funnel-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
  white-space: nowrap;
}

.mini-funnel-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.mini-funnel-bar {
  display: flex;
  align-items: center;
  height: 40px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--at-grey-300);
  position: relative;
  gap: 2px;
}

.mini-funnel-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: width 0.8s ease;
}


/* ===================
   FULL FUNNEL WATERFALL
   =================== */
.funnel-waterfall {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.funnel-stage {
  display: grid;
  grid-template-columns: 180px 1fr 140px;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
}

.funnel-stage-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.funnel-stage-label .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.funnel-stage-label .note {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.funnel-bar-track {
  height: 44px;
  background: var(--content-bg);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.funnel-bar-fill {
  height: 100%;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  transition: width 1s ease;
}

.funnel-bar-fill span {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: white;
}

.funnel-stage-stats {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.funnel-stage-stats .rate {
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.funnel-stage-stats .context {
  font-size: 11px;
  color: var(--text-secondary);
}

.funnel-dropoff {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0 var(--space-2) 180px;
  margin-left: var(--space-4);
}

.funnel-dropoff-line {
  border-left: 2px dotted var(--border);
  height: 24px;
}

.funnel-dropoff-text {
  font-size: 11px;
  color: var(--text-secondary);
}


/* ===================
   SANKEY DIAGRAM
   =================== */
.sankey-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  overflow: hidden;
}

.sankey-container h3 {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-6);
}

.sankey-svg {
  width: 100%;
}

.sankey-column-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  fill: var(--at-grey-500);
}

.sankey-node-label {
  font-size: 12px;
  fill: var(--text-secondary);
  font-family: 'Inter', sans-serif;
}

.sankey-node-count {
  font-size: 13px;
  font-weight: 600;
  fill: var(--text-primary);
  font-family: 'DM Mono', monospace;
}

.sankey-insight {
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: var(--at-grey-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--zillow-blue);
}

.sankey-insight p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sankey-note {
  margin-top: var(--space-4);
  font-size: 11px;
  color: var(--at-grey-500);
}


/* ===================
   ENGAGEMENT BARS
   =================== */
.engagement-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.engagement-legend {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.engagement-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--text-secondary);
}

.engagement-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.engagement-legend-dot.zillow {
  background: var(--zillow-blue);
}

.engagement-legend-dot.maronda {
  background: var(--at-grey-300);
}

.engagement-row {
  margin-bottom: var(--space-6);
}

.engagement-row:last-child {
  margin-bottom: 0;
}

.engagement-metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.engagement-metric-label .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.engagement-metric-label .note {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.engagement-bar-pair {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.engagement-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.engagement-bar-source {
  font-size: 11px;
  color: var(--text-secondary);
  width: 60px;
  flex-shrink: 0;
  text-align: right;
}

.engagement-bar-track {
  flex: 1;
  height: 24px;
  background: var(--content-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.engagement-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  transition: width 0.8s ease;
}

.engagement-bar-fill.zillow {
  background: var(--zillow-blue);
}

.engagement-bar-fill.maronda {
  background: var(--at-grey-300);
}

.engagement-bar-value {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: white;
}

.engagement-bar-fill.maronda .engagement-bar-value {
  color: var(--text-primary);
}


/* ===================
   SPEED TO CLICK
   =================== */
.speed-to-click {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.speed-to-click h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.speed-to-click .subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.speed-bucket {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.speed-bucket-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
}

.speed-bucket-bar {
  height: 20px;
  background: var(--content-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.speed-bucket-fill {
  height: 100%;
  background: var(--zillow-blue);
  border-radius: var(--radius-sm);
  opacity: 0.7;
  transition: width 0.6s ease;
}

.speed-bucket-value {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

.speed-callout {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--zillow-blue-light);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--zillow-blue);
  font-weight: 500;
}


/* ===================
   ROI LOCKED
   =================== */
.roi-locked {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.roi-locked-content {
  filter: blur(6px);
  opacity: 0.6;
  pointer-events: none;
  padding: var(--space-8);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.roi-ghost-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.roi-ghost-card {
  background: var(--content-bg);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  text-align: center;
}

.roi-ghost-card .label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.roi-ghost-card .value {
  font-family: 'DM Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
}

.roi-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
  gap: var(--space-4);
}

.roi-overlay-badge {
  background: var(--zillow-blue);
  color: white;
  font-size: 14px;
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.roi-overlay-badge:hover {
  transform: scale(1.03);
}

.roi-overlay-text {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 400px;
  text-align: center;
  line-height: 1.5;
}

.roi-teaser-list {
  margin-top: var(--space-6);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.roi-teaser-list h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.roi-teaser-list .phase-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.roi-teaser-list ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.roi-teaser-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: var(--space-5);
  position: relative;
}

.roi-teaser-list li::before {
  content: "~";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}


/* ===================
   PHONE CALLOUT
   =================== */
.phone-callout {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.phone-callout-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
}

.phone-callout-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.phone-callout-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.phone-callout-content .note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--space-2);
  font-style: italic;
}


/* ===================
   TWO-COLUMN LAYOUT
   =================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.two-col>* {
  min-width: 0;
}


/* ===================
   CARD WRAPPER
   =================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}


/* ===================
   CONCEPT 2 — SCROLL SECTIONS
   =================== */
.scroll-section {
  padding: var(--space-12) var(--space-8);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--zillow-blue);
  margin-bottom: var(--space-4);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.hero-metric {
  text-align: center;
}

.hero-metric .value {
  font-family: 'DM Mono', monospace;
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.hero-metric .label {
  font-size: 15px;
  color: var(--text-secondary);
}

.thesis-statement {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto var(--space-8);
  text-align: center;
  font-style: italic;
}

.scroll-prompt {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  animation: bounce 2s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}


/* ===================
   CONCEPT 2 — VENN DIAGRAM
   =================== */
.venn-container {
  position: relative;
  width: 360px;
  height: 280px;
  margin: 0 auto;
}

.venn-circle {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.venn-circle.maronda {
  width: 240px;
  height: 240px;
  background: rgba(21, 137, 149, 0.15);
  border: 2px solid var(--at-teal);
  left: 0;
  top: 20px;
}

.venn-circle.zillow {
  width: 200px;
  height: 200px;
  background: rgba(1, 139, 255, 0.15);
  border: 2px solid var(--zillow-blue);
  right: 0;
  top: 40px;
}

.venn-overlap-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
}

.venn-overlap-label .count {
  font-family: 'DM Mono', monospace;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
}

.venn-overlap-label .label {
  font-size: 11px;
  color: var(--text-secondary);
}

.venn-circle-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.venn-circle-count {
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  font-weight: 500;
}


/* ===================
   CONCEPT 2 — PIE CHART
   =================== */
.pie-chart-container {
  text-align: center;
}

.pie-chart {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto var(--space-4);
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--text-secondary);
}

.pie-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}


/* ===================
   CONCEPT 3 — BUILDER CONTEXT STRIP
   =================== */
.builder-context-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-8);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.builder-context-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.builder-viewing {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 500;
}

.builder-viewing .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--at-green);
}

.builder-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--at-green);
  color: white;
}

.builder-switch {
  padding: var(--space-1) var(--space-3);
  background: var(--content-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  color: var(--text-secondary);
}

.builder-context-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 12px;
  color: var(--text-secondary);
}

.builder-context-right .approved {
  color: var(--at-green-dark);
  font-weight: 500;
}


/* ===================
   CONCEPT 3 — BUILDER SWITCHER PANEL
   =================== */
.builder-switcher-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
}

.builder-switcher-panel h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.builder-list {
  display: flex;
  gap: var(--space-4);
}

.builder-card {
  flex: 1;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.builder-card.active {
  border-color: var(--at-green);
  background: var(--sidebar-active);
}

.builder-card.disabled {
  opacity: 0.45;
}

.builder-card .name {
  font-size: 13px;
  font-weight: 500;
}

.builder-card .status {
  font-size: 11px;
  color: var(--text-muted);
}

.builder-card .check {
  margin-left: auto;
  color: var(--at-green-dark);
  font-weight: 600;
}


/* ===================
   CONCEPT 3 — BUILT FOR SCALE
   =================== */
.built-for-scale {
  background: linear-gradient(135deg, var(--at-blue-50), var(--at-green-50));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-8);
  text-align: center;
  margin-top: var(--space-8);
}

.built-for-scale h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.built-for-scale p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}


/* ===================
   UTILITY
   =================== */
.hidden {
  display: none !important;
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mt-8 {
  margin-top: var(--space-8);
}

.stat-callouts {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stat-callout {
  padding: var(--space-4);
  background: var(--content-bg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--at-teal);
}

.stat-callout .value {
  font-family: 'DM Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
}

.stat-callout .label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}