/* ================================================================
   GHOSTWING — Spectral Light Design System
   Violet + ecto mint on airy light surfaces · Sora + Inter + JetBrains Mono
   Pill buttons · Soft layered shadows · Gradient-driven data viz
   ================================================================ */

/* Fonts loaded via <link> in base.html for better performance */

/* ---- Design Tokens ---- */
:root {
  /* ---- Ghostwing Core Palette ---- */
  --gw-bg-page: #FAFAFF;
  --gw-bg-section: #F4F4FB;
  --gw-surface-1: #FFFFFF;
  --gw-surface-2: #F7F7FD;
  --gw-surface-3: #EEEEFA;
  --gw-border: rgba(76,60,150,0.12);
  --gw-border-strong: rgba(76,60,150,0.24);
  --gw-text-1: #171332;
  --gw-text-2: #5A5680;
  --gw-text-3: #8B88A8;
  --gw-violet: #7C3AED;
  --gw-violet-deep: #6D28D9;
  --gw-violet-soft: #C4B5FD;
  --gw-violet-tint: rgba(124,58,237,0.07);
  --gw-ecto: #14B8A6;
  --gw-ecto-deep: #0D9488;
  --gw-ecto-light: #5EEAD4;
  --gw-brand-grad: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 55%, #14B8A6 100%);
  --gw-focus-ring: 0 0 0 3px rgba(124,58,237,0.18);

  /* ---- Legacy aliases (postbing var names → Ghostwing values) ---- */
  --navy: #171332;
  --navy-light: #241E4E;
  --navy-lighter: #322A6B;
  --navy-50: rgba(23,19,50,0.5);
  --white: #ffffff;
  --black: #000000;
  --cyan: #A78BFA;
  --cyan-light: #DDD6FE;
  --cyan-pale: #F3F0FF;
  --cyan-25: rgba(139,92,246,0.25);
  --cyan-15: rgba(139,92,246,0.15);
  --cyan-10: rgba(139,92,246,0.10);
  --blue-pale: #EEF2FF;
  --mint: #99F6E4;
  --mint-pale: #F0FDFA;
  --orange: #F59E0B;
  --orange-pale: #FFF7E6;
  --red: #EF4444;
  --green: #10B981;
  --gray: #5A5680;
  --gray-light: #F7F7FD;
  --gray-200: #EEEEFA;
  --gray-border: #E5E3F2;

  /* ---- Extended Palette (violet ramp; keeps legacy green-* names) ---- */
  --green-900: #171332;
  --green-800: #241E4E;
  --green-700: #322A6B;
  --green-600: #6D28D9;
  --green-500: #8B5CF6;
  --green-400: #A78BFA;
  --green-300: #DDD6FE;
  --green-100: #F3F0FF;
  --green-50: #FAFAFF;
  --surface: #ffffff;
  --surface-alt: #F7F7FD;
  --text-primary: #171332;
  --text-secondary: #5A5680;

  /* ---- Gradient & Glass ---- */
  --hero-gradient: linear-gradient(180deg, #1E1745 0%, #322A6B 65%, #fff 100%);
  --glow-cyan: radial-gradient(ellipse at center, rgba(139,92,246,0.15) 0%, transparent 70%);
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(139,92,246,0.15);
  --overlay-dark: rgba(0,0,0,0.75);

  /* ---- Typography ---- */
  --font-heading: 'Sora', 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* ---- Spacing ---- */
  --section-y: 100px;
  --section-x: max(5vw, 24px);
  --content-max: 1200px;
  --content-narrow: 800px;
  --content-xnarrow: 600px;
  --card-padding: 32px;
  --card-gap: 24px;
  --grid-gap: 24px;
  --bento-gap: 20px;

  /* ---- Radii ---- */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 50px;

  /* ---- Shadows ---- */
  --shadow-xs: 0 1px 2px rgba(23,19,50,0.05);
  --shadow-sm: 0 2px 8px rgba(23,19,50,0.06);
  --shadow-md: 0 8px 24px rgba(23,19,50,0.08);
  --shadow-lg: 0 12px 32px rgba(23,19,50,0.10);
  --shadow-xl: 0 20px 48px rgba(23,19,50,0.12);
  --card-hover-shadow: 0 16px 40px rgba(76,60,150,0.14);

  /* ---- Layout ---- */
  --sidebar-width: 260px;
  --sidebar-collapsed: 68px;
  --topbar-height: 64px;
  --navbar-height: 72px;

  /* ---- Bootstrap Overrides ---- */
  --bs-primary: #7C3AED;
  --bs-primary-rgb: 124, 58, 237;
  --bs-body-font-family: 'Inter', sans-serif;

  /* ── Semantic severity tokens ── */
  --severity-critical:      #E11D48;
  --severity-warning:       #D97706;
  --severity-passed:        #059669;
  --severity-critical-bg:   rgba(225,29,72,0.08);
  --severity-warning-bg:    rgba(217,119,6,0.08);
  --severity-passed-bg:     rgba(5,150,105,0.08);
  --severity-critical-text: #E11D48;
  --severity-warning-text:  #D97706;
  --severity-passed-text:   #059669;

  /* ── Score band tokens ── */
  --score-excellent:  #059669;          /* 80-100 */
  --score-good:       #D97706;          /* 60-79 */
  --score-fair:       #D97706;          /* 40-59 */
  --score-poor:       #E11D48;          /* 0-39 */
}

/* ── PDF Export: traffic-light severity overrides ── */
body.pdf-export {
  --severity-critical:      #ef4444;
  --severity-warning:       #ffa534;
  --severity-passed:        #22c55e;
  --severity-critical-bg:   rgba(239,68,68,0.10);
  --severity-warning-bg:    rgba(255,165,52,0.10);
  --severity-passed-bg:     rgba(34,197,94,0.10);
  --severity-critical-text: #991b1b;
  --severity-warning-text:  #856404;
  --severity-passed-text:   #1a5c2a;
  --score-excellent:        #22c55e;
  --score-good:             #22c55e;
  --score-fair:             #ffa534;
  --score-poor:             #ef4444;
}

/* ---- Base Reset ---- */
*, *::before, *::after {
  border-color: var(--gray-border);
}

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--cyan);
}

/* Display classes — for heroes & sections */
.display-hero {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 72px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.display-section {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.display-subsection {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.text-lg { font-size: 18px; line-height: 1.6; }
.text-sm { font-size: 14px; line-height: 1.5; }
.text-xs { font-size: 12px; line-height: 1.4; }

code, .font-mono, .stat-number {
  font-family: var(--font-mono);
}

::selection {
  background: var(--cyan-light);
  color: var(--navy);
}

/* ---- Buttons ---- */
.btn {
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  font-size: 15px;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
  letter-spacing: -0.01em;
}

.btn-primary,
.btn-neo-primary {
  background-color: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover,
.btn-neo-primary:hover {
  background-color: var(--navy-light);
  border-color: var(--navy-light);
  color: var(--cyan-pale);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active,
.btn-neo-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline-primary {
  color: var(--navy);
  border-color: var(--navy);
  background-color: transparent;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.btn-outline-primary.active,
.btn-outline-primary:active {
  background-color: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.btn-check:checked + .btn-outline-primary {
  background-color: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.btn-secondary,
.btn-neo-secondary {
  background-color: var(--white);
  color: var(--navy);
  border-color: var(--gray-200);
}
.btn-secondary:hover,
.btn-neo-secondary:hover {
  background-color: var(--gray-light);
  border-color: var(--gray-200);
  color: var(--navy);
}

.btn-accent {
  background-color: var(--cyan);
  color: var(--navy);
  border-color: var(--cyan);
}
.btn-accent:hover {
  background-color: var(--cyan-light);
  border-color: var(--cyan-light);
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-danger,
.btn-neo-danger {
  background-color: #e74c3c;
  color: var(--white);
  border-color: #e74c3c;
}
.btn-danger:hover,
.btn-neo-danger:hover {
  background-color: #c0392b;
  border-color: #c0392b;
  color: var(--white);
}

.btn-dark {
  background-color: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  border-radius: var(--radius-pill);
}
.btn-dark:hover {
  background-color: var(--navy-light);
  color: var(--cyan-pale);
  border-color: var(--navy-light);
}

.btn-outline-dark,
.btn-outline-secondary {
  background: transparent;
  border-color: var(--gray-200);
  color: var(--navy);
  border-radius: var(--radius-pill);
}
.btn-outline-dark:hover,
.btn-outline-secondary:hover {
  background-color: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
  min-height: 36px;
  min-width: 36px;
}

/* Table action buttons */
.table .btn-sm {
  padding: 0.25rem 0.5rem;
}

/* ---- Cards ---- */
.card {
  background-color: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  border-bottom: 1px solid var(--gray-border);
  padding: 16px 24px;
  font-weight: 600;
  background: transparent;
}

.card-body {
  padding: 24px;
}

.card-footer {
  border-top: 1px solid var(--gray-border);
  padding: 16px 24px;
  background: transparent;
}

/* Glass card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

/* Card hover lift */
.card-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

/* Metric tile (dashboard stats) */
.metric-tile {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-tile .metric-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.metric-tile .metric-label {
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.metric-tile .metric-trend { font-size: 13px; font-weight: 500; }
.metric-trend.up { color: var(--severity-passed); }
.metric-trend.down { color: var(--severity-critical); }

/* Bento card */
.bento-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
  transition: all 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--navy);
}
.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

/* Bento grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bento-gap);
}
.bento-grid .bento-wide { grid-column: span 2; }

/* Featured card (pricing, highlighted) */
.card-featured {
  border: 2px solid var(--cyan);
  box-shadow: 0 0 24px var(--cyan-15), var(--shadow-lg);
  position: relative;
}

/* Glow orb */
.glow-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  background: var(--glow-cyan);
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

/* Border glow */
.border-glow {
  border: 2px solid var(--cyan);
  box-shadow: 0 0 20px var(--cyan-25), inset 0 0 20px var(--cyan-15);
}

/* ---- Badges ---- */
.badge,
.badge-neo {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: none;
  letter-spacing: 0.01em;
}

.badge-neo {
  background-color: var(--cyan-pale);
  color: var(--navy);
}

.badge.bg-success, .badge-neo.bg-success {
  background-color: var(--severity-passed-bg) !important;
  color: var(--severity-passed-text);
}

.badge.bg-danger, .badge-neo.bg-danger {
  background-color: var(--severity-critical-bg) !important;
  color: var(--severity-critical-text);
}

.badge.bg-warning, .badge-neo.bg-warning {
  background-color: var(--severity-warning-bg) !important;
  color: var(--severity-warning-text);
}

.badge.bg-dark {
  background-color: var(--navy) !important;
  color: var(--white);
}

.badge.bg-secondary {
  background-color: var(--gray-light) !important;
  color: var(--gray);
}

.badge.bg-info {
  background-color: var(--cyan-pale) !important;
  color: var(--navy);
}

/* ---- Alerts ---- */
.alert,
.alert-neo {
  border-radius: var(--radius-sm);
  border: none;
  padding: 14px 20px;
  font-size: 14px;
}

.alert-success, .alert-neo.alert-success {
  background-color: var(--severity-passed-bg);
  color: var(--severity-passed-text);
  border-left: 4px solid var(--severity-passed);
}

.alert-danger, .alert-neo.alert-danger {
  background-color: var(--severity-critical-bg);
  color: var(--severity-critical-text);
  border-left: 4px solid var(--severity-critical);
}

.alert-warning, .alert-neo.alert-warning {
  background-color: var(--severity-warning-bg);
  color: var(--severity-warning-text);
  border-left: 4px solid var(--severity-warning);
}

.alert-info {
  background-color: var(--cyan-pale);
  color: var(--navy);
  border-left: 4px solid var(--cyan);
}

/* ---- Forms ---- */
.form-control,
.form-control-neo,
.form-select,
.form-select-neo {
  font-family: var(--font-body);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 15px;
  color: var(--navy);
  background-color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-control-neo:focus,
.form-select:focus,
.form-select-neo:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(23,19,50,0.12);
  outline: none;
}

.form-control-lg,
.form-select-lg {
  padding: 12px 16px;
  font-size: 16px;
  border-radius: var(--radius-sm);
}

.form-label {
  font-weight: 500;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-check-input {
  border-radius: 4px;
  border: 1.5px solid var(--gray-200);
}
.form-check-input:checked {
  background-color: var(--navy);
  border-color: var(--navy);
}
.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(23,19,50,0.12);
}

.input-group .form-control {
  border-radius: 0;
}
.input-group > :first-child {
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.input-group > :last-child {
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

/* ---- Tables ---- */
.table,
.table-refined {
  font-family: var(--font-body);
  font-size: 14px;
}

.table thead th,
.table-refined thead th {
  background-color: var(--gray-light);
  color: var(--gray);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-border);
  white-space: nowrap;
}

.table tbody td,
.table-refined tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-border);
  vertical-align: middle;
  color: var(--navy);
}

.table tbody tr:hover,
.table-refined tbody tr:hover {
  background-color: var(--cyan-pale);
}

.table-hover > tbody > tr:hover > * {
  background-color: transparent;
  --bs-table-bg-state: var(--cyan-pale);
}

.table-dark thead {
  background-color: var(--navy);
  color: var(--white);
}
.table-dark thead th {
  background-color: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Modals ---- */
.modal-content,
.modal-content-neo {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  background-color: var(--white);
}

.modal-header {
  border-bottom: 1px solid var(--gray-border);
  padding: 20px 24px;
}

.modal-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--gray-border);
  padding: 16px 24px;
}

.modal-backdrop {
  background-color: rgba(23,19,50, 0.6);
  backdrop-filter: blur(4px);
}

.btn-close:focus {
  box-shadow: 0 0 0 3px rgba(23,19,50,0.12);
}

/* ---- Accordions ---- */
.accordion-item {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-sm) !important;
  margin-bottom: 10px;
  overflow: hidden;
}

.accordion-button {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  padding: 18px 24px;
  background-color: var(--white);
  color: var(--navy);
  border-radius: var(--radius-sm) !important;
}

.accordion-button:not(.collapsed) {
  background-color: var(--cyan-pale);
  color: var(--navy);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(23,19,50,0.12);
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23032127'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
  padding: 0 24px 24px;
  font-size: 15px;
  color: var(--gray);
  line-height: 1.6;
}

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--navy);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: width 0.25s ease, transform 0.25s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--navy-lighter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  flex-shrink: 0;
}

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

/* Full logo (white) shown in expanded sidebar */
.sidebar-logo-full {
  height: 30px;
}

/* Icon emblem shown only in collapsed sidebar */
.sidebar-logo-icon {
  height: 26px;
  display: none;
  filter: brightness(0) invert(1);
}

.sidebar-collapse-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: rgba(255,255,255,0.35);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.sidebar-collapse-btn:hover {
  background-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  position: relative;
}

.sidebar-link:hover {
  background-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  padding-left: 16px;
}
.sidebar-link:hover i {
  color: rgba(255,255,255,0.9);
  transform: scale(1.12);
}

.sidebar-link.active {
  background-color: rgba(139,92,246,0.12);
  color: var(--cyan);
  font-weight: 600;
}
.sidebar-link.active i {
  color: var(--cyan);
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background-color: var(--cyan);
}

.sidebar-link i {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  color: rgba(255,255,255,0.5);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.15s ease;
}

.sidebar-section {
  padding: 8px 12px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
}

.sidebar-divider {
  height: 1px;
  background-color: var(--navy-lighter);
  margin: 8px 12px;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--navy-lighter);
  flex-shrink: 0;
}

.sidebar-plan-widget {
  background-color: rgba(255,255,255,0.05);
  border: 1px solid var(--navy-lighter);
  border-radius: 10px;
  padding: 12px;
}

.sidebar-plan-widget .plan-name {
  font-weight: 600;
  font-size: 13px;
  text-transform: capitalize;
  color: var(--white);
}

.sidebar-plan-widget .plan-usage {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.sidebar-plan-widget .progress {
  height: 4px;
  border-radius: 2px;
  background-color: var(--navy-light);
  margin-top: 8px;
  overflow: hidden;
}

.sidebar-plan-widget .progress-bar {
  background-color: var(--cyan);
  border-radius: 2px;
}

.sidebar-upgrade-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
}
.sidebar-upgrade-link:hover {
  color: var(--cyan-light);
  text-decoration: underline;
}

/* Sidebar user profile */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.sidebar-user:hover {
  background-color: rgba(255,255,255,0.05);
}
.sidebar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--cyan);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.sidebar-user-info {
  flex: 1;
  min-width: 0;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}
.sidebar-user-email {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-logout {
  color: rgba(255,255,255,0.3);
  font-size: 15px;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.sidebar-user-logout:hover {
  color: var(--red);
  background-color: rgba(239,68,68,0.1);
}

/* Expand button — hidden by default, shown only when collapsed */
.sidebar-expand-btn {
  display: none;
  background: none;
  border: 1px solid var(--navy-lighter);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  transition: background 0.15s, color 0.15s;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  font-size: 14px;
}
.sidebar-expand-btn:hover {
  background-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
}

/* ---- Mobile Header (shown only on small screens) ---- */
.mobile-header {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-border);
  position: sticky;
  top: 0;
  z-index: 1020;
  flex-shrink: 0;
}
.mobile-header-logo {
  display: flex;
  align-items: center;
}
.mobile-header-logo img {
  height: 24px;
}

/* ---- Layouts ---- */
.layout-authenticated {
  display: flex;
  min-height: 100vh;
}

.layout-authenticated .content-area {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
  background-color: var(--gray-light);
}

.layout-authenticated .content-main {
  flex: 1;
  padding: 32px 5%;
  width: 100%;
}

/* Sidebar collapsed */
.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
}
.sidebar-collapsed .sidebar .sidebar-link span,
.sidebar-collapsed .sidebar .sidebar-section,
.sidebar-collapsed .sidebar .sidebar-plan-widget,
.sidebar-collapsed .sidebar .sidebar-upgrade-link,
.sidebar-collapsed .sidebar .sidebar-user-info,
.sidebar-collapsed .sidebar .sidebar-user-logout {
  display: none;
}
.sidebar-collapsed .sidebar .sidebar-header {
  justify-content: center;
  padding: 12px 8px;
}
.sidebar-collapsed .sidebar .sidebar-logo {
  justify-content: center;
}
.sidebar-collapsed .sidebar .sidebar-logo-full {
  display: none;
}
.sidebar-collapsed .sidebar .sidebar-logo-icon {
  display: block;
}
.sidebar-collapsed .sidebar .sidebar-collapse-btn {
  display: none;
}
.sidebar-collapsed .sidebar .sidebar-expand-btn {
  display: flex;
}
.sidebar-collapsed .sidebar .sidebar-link {
  justify-content: center;
  padding: 10px;
}
.sidebar-collapsed .sidebar .sidebar-link.active::before {
  display: none;
}
.sidebar-collapsed .sidebar .sidebar-link i {
  font-size: 19px;
}
.sidebar-collapsed .sidebar .sidebar-nav {
  padding: 8px;
  align-items: center;
}
.sidebar-collapsed .sidebar .sidebar-divider {
  width: 32px;
  margin: 8px auto;
}
.sidebar-collapsed .sidebar .sidebar-footer {
  padding: 8px;
}
.sidebar-collapsed .sidebar .sidebar-user {
  justify-content: center;
  padding: 8px;
  margin-top: 0;
}
.sidebar-collapsed .content-area {
  margin-left: var(--sidebar-collapsed);
}

/* Public layout */
.layout-public {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.layout-public .content-main {
  flex: 1;
}

/* ---- Public Navbar ---- */
.navbar-public {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(12px);
  background-color: rgba(255,255,255,0.95);
}

.navbar-public .nav-link {
  font-weight: 500;
  color: var(--navy);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  transition: all 0.15s ease;
}
.navbar-public .nav-link:hover {
  background-color: var(--gray-light);
  color: var(--navy);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  color: var(--navy) !important;
  text-decoration: none;
}

/* Navbar hero — transparent, floating over dark hero */
.navbar-hero {
  position: fixed;
  width: 100%;
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
}
.navbar-hero .nav-link {
  color: rgba(255,255,255,0.7);
}
.navbar-hero .nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}
.navbar-hero .navbar-brand {
  color: var(--white) !important;
}
.navbar-hero .navbar-brand img {
  filter: brightness(0) invert(1);
}
.navbar-hero .btn-secondary {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  background: transparent;
}
.navbar-hero .btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}
.navbar-hero .btn-primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--navy);
}
.navbar-hero.scrolled {
  background: rgba(23,19,50,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(255,255,255,0.06);
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .mobile-header {
    display: flex;
  }
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }
  .sidebar.show {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }
  .sidebar-collapse-btn {
    display: none;
  }
  .layout-authenticated .content-area {
    margin-left: 0;
  }
  /* Reset sidebar-collapsed for mobile — always show full sidebar when toggled */
  .sidebar-collapsed .content-area {
    margin-left: 0;
  }
  .sidebar-collapsed .sidebar {
    width: var(--sidebar-width);
    transform: translateX(-100%);
  }
  .sidebar-collapsed .sidebar.show {
    transform: translateX(0);
  }
  .sidebar-collapsed .sidebar .sidebar-link span,
  .sidebar-collapsed .sidebar .sidebar-section,
  .sidebar-collapsed .sidebar .sidebar-plan-widget,
  .sidebar-collapsed .sidebar .sidebar-upgrade-link,
  .sidebar-collapsed .sidebar .sidebar-user-info,
  .sidebar-collapsed .sidebar .sidebar-user-logout {
    display: revert;
  }
  .sidebar-collapsed .sidebar .sidebar-link {
    justify-content: flex-start;
    padding: 9px 12px;
  }
  .sidebar-collapsed .sidebar .sidebar-link.active::before {
    display: block;
  }
  .sidebar-collapsed .sidebar .sidebar-header {
    justify-content: flex-start;
    padding: 12px 16px;
  }
  .sidebar-collapsed .sidebar .sidebar-nav {
    padding: 12px;
    align-items: stretch;
  }
  .sidebar-collapsed .sidebar .sidebar-footer {
    padding: 12px;
  }
  .sidebar-collapsed .sidebar .sidebar-user {
    justify-content: flex-start;
    padding: 10px;
  }
  .sidebar-collapsed .sidebar .sidebar-logo-full {
    display: block;
  }
  .sidebar-collapsed .sidebar .sidebar-logo-icon {
    display: none;
  }
  .sidebar-collapsed .sidebar .sidebar-expand-btn {
    display: none;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(23,19,50, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1035;
    display: none;
  }
  .sidebar-backdrop.show {
    display: block;
  }
  .layout-authenticated .content-main {
    padding: 24px 16px;
  }
}

@media (max-width: 767.98px) {
  .layout-authenticated .content-main {
    padding: 20px 16px;
  }
}

.sidebar-hamburger {
  background: none;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--navy);
  cursor: pointer;
  transition: background-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-hamburger:hover {
  background-color: var(--gray-light);
}

/* ---- Homepage ---- */

/* Hero — Full-viewport dark aurora */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px var(--section-x) 60px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139,92,246,0.2), transparent),
    radial-gradient(ellipse 50% 60% at 85% 40%, rgba(139,92,246,0.07), transparent),
    radial-gradient(ellipse 40% 50% at 10% 80%, rgba(34,197,94,0.04), transparent),
    linear-gradient(180deg, var(--navy) 0%, var(--navy) 40%, var(--navy-light) 100%);
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

.hero-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(139,92,246,0.06);
  border: 1px solid rgba(139,92,246,0.18);
  border-radius: var(--radius-pill);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeInUp 0.6s ease both;
}
.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: blink 2s ease-in-out infinite;
}

.hero-section h1 {
  font-family: var(--font-heading);
  font-size: clamp(44px, 6.5vw, 72px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease 0.1s both;
}
.hero-section h1 .text-accent {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--green-400) 25%, var(--cyan-light) 60%, var(--cyan-pale) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
  max-width: 540px;
  margin: 0 auto 28px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease 0.3s both;
}
.hero-section .btn-accent {
  background: linear-gradient(135deg, var(--green-600) 0%, var(--cyan) 40%, var(--cyan-light) 100%);
  color: var(--navy);
  border: none;
  font-weight: 700;
  box-shadow: 0 0 40px rgba(139,92,246,0.35), 0 8px 20px rgba(139,92,246,0.2);
  position: relative;
  overflow: hidden;
}
.hero-section .btn-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmerBtn 3s ease-in-out infinite;
}
.hero-section .btn-accent:hover {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--green-400) 40%, var(--cyan-light) 100%);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 0 56px rgba(139,92,246,0.45), 0 12px 28px rgba(139,92,246,0.25);
}
.hero-section .btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
}
.hero-section .btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.3);
  color: var(--white);
}

/* Trust bar — pill with avatars */
.trust-bar {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px 10px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-pill);
  margin-bottom: 36px;
  animation: fadeInUp 0.6s ease 0.4s both;
}
.avatar-stack { display: flex; }
.avatar-stack .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(23,19,50,0.9);
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: var(--navy);
}
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .avatar:nth-child(1) { background: var(--cyan); }
.avatar-stack .avatar:nth-child(2) { background: var(--mint); }
.avatar-stack .avatar:nth-child(3) { background: var(--cyan-light); }
.avatar-stack .avatar:nth-child(4) { background: var(--orange); color: var(--white); }
.trust-bar .trust-text {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.3;
}
.trust-bar .trust-text strong { color: rgba(255,255,255,0.85); }

/* Hero Dashboard Mockup — perspective tilt + ambient glow */
.hero-mockup-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  perspective: 1200px;
  animation: fadeInUp 0.9s ease 0.5s both;
}
.hero-mockup-wrapper .glow-orb {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 500px;
  opacity: 0.45;
  animation: pulseGlow 6s ease-in-out infinite;
  background: radial-gradient(ellipse, rgba(139,92,246,0.3) 0%, transparent 70%);
}

.hero-mockup {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(0,0,0,0.5),
    0 0 0 1px rgba(139,92,246,0.04),
    inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
  z-index: 1;
  transform: rotateX(2deg);
  transform-origin: center bottom;
}
/* Shimmer sweep across entire mockup */
.hero-mockup::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.04), rgba(255,255,255,0.06), rgba(139,92,246,0.04), transparent);
  z-index: 10;
  pointer-events: none;
  animation: mockupSweep 5s ease-in-out 1.5s infinite;
}

.mockup-chrome {
  background: rgba(255,255,255,0.05);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mockup-dots { display: flex; gap: 6px; }
.mockup-dots span { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dots span:first-child { background: #ff5f57; }
.mockup-dots span:nth-child(2) { background: #febc2e; }
.mockup-dots span:nth-child(3) { background: #28c840; }
.mockup-url {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  font-family: var(--font-mono);
  margin-left: 8px;
}

.mockup-body {
  display: flex;
  min-height: 480px;
  background: rgba(23,19,50, 0.6);
  backdrop-filter: blur(8px);
}

/* Mockup sidebar */
.mockup-sidebar {
  width: 180px;
  background: rgba(0,0,0,0.25);
  border-right: 1px solid rgba(255,255,255,0.04);
  padding: 20px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mockup-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 12px;
}
.mockup-sidebar-icon {
  height: 22px;
  width: 28px;
  flex-shrink: 0;
}
.mockup-sidebar-name {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: rgba(255,255,255,0.85);
  letter-spacing: -0.02em;
}
.mockup-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
  cursor: default;
}
.mockup-nav-item i { font-size: 13px; width: 16px; text-align: center; }
.mockup-nav-item.active {
  color: var(--cyan);
  background: rgba(139,92,246,0.08);
  border-right: 2px solid var(--cyan);
  animation: activeGlow 2.5s ease-in-out infinite;
}

/* Mockup main content */
.mockup-main {
  flex: 1;
  padding: 24px;
  overflow: hidden;
}
.mockup-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.mockup-metric {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  animation: metricPulse 3s ease-in-out infinite;
}
.mockup-metric:nth-child(2) { animation-delay: 0.5s; }
.mockup-metric:nth-child(3) { animation-delay: 1.0s; }
.mockup-metric:nth-child(4) { animation-delay: 1.5s; }
.mockup-metric:nth-child(5) { animation-delay: 2.0s; }
.mockup-metric-label {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 6px;
}
.mockup-metric-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.mockup-metric-trend { font-size: 12px; font-weight: 600; margin-top: 4px; }
.mockup-metric-trend.up { color: var(--severity-passed); }
.mockup-metric-trend.down { color: var(--severity-critical); }

/* Mockup content grid: chart + table side by side */
.mockup-content-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 14px;
}
.mockup-chart {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 20px;
  height: 180px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.mockup-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, rgba(139,92,246,0.15), rgba(139,92,246,0.45));
  animation: growBar 1.5s ease both, barBreathe 3s ease-in-out infinite;
}
.mockup-bar:nth-child(1)  { height: 45%; animation-delay: 0.6s, 2.1s; }
.mockup-bar:nth-child(2)  { height: 60%; animation-delay: 0.7s, 2.3s; }
.mockup-bar:nth-child(3)  { height: 35%; animation-delay: 0.8s, 2.5s; }
.mockup-bar:nth-child(4)  { height: 70%; animation-delay: 0.9s, 2.7s; }
.mockup-bar:nth-child(5)  { height: 55%; animation-delay: 1.0s, 2.9s; }
.mockup-bar:nth-child(6)  { height: 80%; animation-delay: 1.1s, 3.1s; }
.mockup-bar:nth-child(7)  { height: 65%; animation-delay: 1.2s, 3.3s; }
.mockup-bar:nth-child(8)  { height: 90%; animation-delay: 1.3s, 3.5s; }
.mockup-bar:nth-child(9)  { height: 75%; animation-delay: 1.4s, 3.7s; }
.mockup-bar:nth-child(10) { height: 95%; animation-delay: 1.5s, 3.9s; background: linear-gradient(to top, var(--cyan), rgba(139,92,246,0.7)); }

.mockup-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.mockup-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.22);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mockup-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.025);
}
.mockup-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-mono);
}
.mockup-rank-badge.top3 { background: var(--severity-passed-bg); color: var(--severity-passed); animation: badgePulse 2s ease-in-out infinite; }
.mockup-rank-badge.top10 { background: rgba(139,92,246,0.15); color: var(--cyan); }
.mockup-table tbody tr {
  animation: rowFadeIn 0.5s ease both;
}
.mockup-table tbody tr:nth-child(1) { animation-delay: 1.2s; }
.mockup-table tbody tr:nth-child(2) { animation-delay: 1.5s; }
.mockup-table tbody tr:nth-child(3) { animation-delay: 1.8s; }
.mockup-table tbody tr:nth-child(4) { animation-delay: 2.1s; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.35; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.15); }
}
@keyframes growBar {
  from { height: 0; opacity: 0; }
  to { opacity: 1; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes shimmerBtn {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}
@keyframes metricPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 rgba(139,92,246,0); }
  50% { transform: translateY(-8px); box-shadow: 0 8px 24px rgba(139,92,246,0.1); }
}
@keyframes mockupSweep {
  0% { left: -50%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 150%; opacity: 0; }
}
@keyframes barBreathe {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.7; filter: brightness(1.3); }
}
@keyframes activeGlow {
  0%, 100% { background: rgba(139,92,246,0.08); }
  50% { background: rgba(139,92,246,0.16); }
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 rgba(34,197,94,0); }
  50% { box-shadow: 0 0 12px rgba(34,197,94,0.3); }
}
@keyframes rowFadeIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Hero responsive */
@media (max-width: 991.98px) {
  .hero-section {
    min-height: auto;
    padding: 120px var(--section-x) 60px;
  }
  .hero-mockup { transform: none; }
  .hero-mockup-wrapper { max-width: 100%; }
  .mockup-sidebar { display: none; }
  .mockup-metrics { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .mockup-metric-value { font-size: 20px; }
  .mockup-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  .hero-section { padding: 100px 16px 40px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .mockup-chart { height: 80px; }
  .mockup-table { display: none; }
  .mockup-metric { padding: 12px; }
  .mockup-metric-value { font-size: 16px; }
  .mockup-metric-label { font-size: 9px; }
  .mockup-metrics { grid-template-columns: repeat(2, 1fr); }
  .trust-bar { padding: 8px 16px; gap: 10px; }
}

/* ---- Sections ---- */
.section { padding: var(--section-y) var(--section-x); }
.section-sm { padding: 60px var(--section-x); }
.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}
.section-header h2 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.section-header p {
  font-size: 18px;
  color: var(--gray);
  line-height: 1.6;
}

/* Dark section variant */
.section-dark {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
.section-dark .section-header h2 { color: var(--white); }
.section-dark .section-header h2 .text-accent {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-dark .section-header p { color: rgba(255,255,255,0.5); }

/* Dark bento cards */
.section-dark .bento-card {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
  color: var(--white);
  transition: all 0.3s ease;
}
.section-dark .bento-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(139,92,246,0.25);
  box-shadow: 0 0 40px rgba(139,92,246,0.06);
  transform: translateY(-4px);
}
.section-dark .bento-card h4 { color: var(--white); }
.section-dark .bento-card p { color: rgba(255,255,255,0.45) !important; }
.section-dark .bento-icon {
  background: rgba(139,92,246,0.08) !important;
  color: var(--cyan) !important;
}

/* Feature Splits */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.feature-split.reverse { direction: rtl; }
.feature-split.reverse > * { direction: ltr; }
.feature-split-text { max-width: 480px; }
.feature-split-text .feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.feature-split-text h3 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.feature-split-text p {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 24px;
}
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 15px;
  color: var(--navy);
}
.feature-list li i {
  color: var(--cyan);
  font-size: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}
.feature-split-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-border);
  background: var(--gray-light);
}
.feature-split-visual img,
.feature-split-visual video {
  width: 100%;
  display: block;
}
@media (max-width: 991.98px) {
  .feature-split {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .feature-split.reverse { direction: ltr; }
  .feature-split-text { max-width: 100%; margin: 0 auto; }
  .feature-list { display: inline-block; text-align: left; }
}

/* Stats Section — glass cards on dark gradient */
.stats-section {
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(139,92,246,0.06), transparent),
    var(--navy);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.02;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
.stat-glass {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}
.stat-glass:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(139,92,246,0.2);
  transform: translateY(-4px);
}
.stat-glass .stat-number {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  color: var(--white);
  display: block;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-glass .stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
}

/* Testimonials — featured layout (large + stack) */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.testimonial-featured {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.testimonial-featured::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139,92,246,0.15), transparent 70%);
  pointer-events: none;
}
.testimonial-featured .testimonial-quote {
  font-size: 22px;
  line-height: 1.6;
  color: var(--white);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.testimonial-featured .testimonial-quote::before {
  content: '\201C';
  font-size: 72px;
  font-family: Georgia, serif;
  color: var(--cyan);
  opacity: 0.25;
  position: absolute;
  top: -20px;
  left: -8px;
  line-height: 1;
}
.testimonial-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.testimonial-card {
  background-color: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.testimonial-stars {
  color: var(--orange);
  font-size: 14px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.testimonial-card .testimonial-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--navy);
  margin-bottom: 20px;
  flex: 1;
}
.testimonial-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  flex-shrink: 0;
}
.testimonial-info .testimonial-author {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
}
.testimonial-info .testimonial-role {
  font-size: 13px;
  color: var(--gray);
}
@media (max-width: 767.98px) {
  .testimonial-grid { grid-template-columns: 1fr; }
  .testimonial-featured { padding: 32px; }
  .testimonial-featured .testimonial-quote { font-size: 18px; }
}

/* CTA Section — aurora gradient */
.cta-section {
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(139,92,246,0.12), transparent),
    var(--navy);
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
.cta-section h2 {
  color: var(--white);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}
.cta-section p {
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}
.cta-section .btn-accent {
  position: relative;
  z-index: 1;
}
.cta-section .cta-note {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   Auth pages — editorial split with product preview
   ============================================================ */
.auth-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  background: #fafaf7;
}

/* --- BRAND PANEL (left, dark) ------------------------------- */
.auth-brand {
  position: relative;
  background: radial-gradient(1200px 700px at 12% 18%, #241E4E 0%, #171332 60%, #02171c 100%);
  padding: clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 40px;
  overflow: hidden;
  isolation: isolate;
}
/* Dot-grid whisper */
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}
/* Soft teal glow behind the preview card */
.auth-brand::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(139,92,246,0.16) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.auth-brand > * { position: relative; z-index: 1; }

/* Logo — explicit dimensions + align-self so flex column can't stretch it */
.auth-brand-logo {
  display: inline-block;
  width: 148px;
  height: 32px;
  align-self: flex-start;
  object-fit: contain;
  object-position: left center;
}

.auth-brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #A78BFA;
  margin-bottom: 18px;
}
.auth-brand-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: #A78BFA;
  opacity: 0.6;
}
.auth-brand h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0 0 20px;
  max-width: 12ch;
}
.auth-brand h1 em {
  font-style: normal;
  color: #A78BFA;
}
.auth-brand-lede {
  color: rgba(232, 239, 241, 0.62);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 44ch;
  margin: 0;
}

/* Product preview card — the hero moment */
.auth-preview {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 20px 22px 18px;
  backdrop-filter: blur(1px);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.4);
  max-width: 440px;
}
.auth-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.auth-preview-label {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.46);
}
.auth-preview-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(139,92,246,0.9);
}
.auth-preview-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #A78BFA;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.22);
  animation: authPulse 2.2s ease-in-out infinite;
}
@keyframes authPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(139,92,246,0.22); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(139,92,246,0.06); }
}
.auth-preview-kw {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 18px;
  line-height: 1.3;
}
.auth-preview-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}
.auth-preview-rank {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-heading);
  color: #ffffff;
}
.auth-preview-rank-num {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #cfe8eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-preview-rank-suffix {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  margin-left: 2px;
}
.auth-preview-spark {
  height: 44px;
  width: 100%;
  display: block;
}
.auth-preview-delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(139,92,246,0.12);
  color: #9fe4ec;
  border: 1px solid rgba(139,92,246,0.22);
  white-space: nowrap;
}
.auth-preview-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.auth-preview-foot .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
}
.auth-preview-engines {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}
.auth-preview-engine {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.58);
}

/* Trust footer */
.auth-brand-trust {
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  line-height: 1.5;
  max-width: 40ch;
}
.auth-brand-trust strong {
  color: rgba(255,255,255,0.72);
  font-weight: 600;
}

/* --- FORM PANEL (right, light) ----------------------------- */
.auth-form-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 72px) clamp(24px, 4vw, 56px);
  background: #fafaf7;
  position: relative;
}
.auth-form-area::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #6D28D9 30%, #A78BFA 70%, transparent 100%);
  opacity: 0.55;
}
.auth-form-wrapper {
  width: 100%;
  max-width: 420px;
}
.auth-form-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6D28D9;
  margin-bottom: 12px;
  display: block;
}
.auth-form-wrapper h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.025em;
  color: #171332;
  line-height: 1.05;
  margin: 0 0 8px;
}
.auth-form-wrapper .auth-form-sub {
  color: #5b6b6e;
  font-size: 14.5px;
  margin: 0 0 28px;
}
.auth-form-wrapper .form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #2a3a3d;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}
.auth-form-wrapper .form-control {
  background: #ffffff;
  border: 1px solid #e6e2d9;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: #171332;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  box-shadow: 0 1px 0 rgba(23,19,50,0.02);
}
.auth-form-wrapper .form-control::placeholder { color: #a3a8a4; }
.auth-form-wrapper .form-control:focus {
  border-color: #171332;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(23,19,50,0.06);
  outline: none;
}
.auth-form-wrapper .form-control:hover:not(:focus) {
  border-color: #d8d3c7;
}
.auth-form-wrapper .form-text {
  color: #8a9093;
  font-size: 12.5px;
  margin-top: 6px;
}
.auth-form-wrapper .form-check-input {
  border: 1px solid #c9c3b4;
  border-radius: 4px;
  width: 16px; height: 16px;
  margin-top: 2px;
}
.auth-form-wrapper .form-check-input:checked {
  background-color: #171332;
  border-color: #171332;
}
.auth-form-wrapper .form-check-label {
  color: #5b6b6e;
  font-size: 13.5px;
  line-height: 1.5;
}
.auth-form-wrapper .auth-link {
  color: #171332;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(23,19,50,0.25);
  transition: border-color 0.15s ease;
}
.auth-form-wrapper .auth-link:hover {
  border-color: #171332;
}
.auth-form-wrapper .auth-link-subtle {
  color: #6D28D9;
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.auth-form-wrapper .auth-link-subtle:hover {
  color: #171332;
}
.auth-form-wrapper .btn-primary {
  background: #171332;
  border: 1px solid #171332;
  padding: 13px 20px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.005em;
  box-shadow: 0 6px 16px -6px rgba(23,19,50,0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.auth-form-wrapper .btn-primary:hover {
  background: #241E4E;
  border-color: #241E4E;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(23,19,50,0.4);
}
.auth-form-wrapper .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px -4px rgba(23,19,50,0.35);
}
.auth-form-wrapper .auth-footer {
  color: #6b7f82;
  margin-top: 28px;
  margin-bottom: 0;
  font-size: 14px;
  text-align: left;
}
.auth-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #a3a8a4;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.auth-pw-toggle:hover {
  color: #171332;
  background: rgba(23,19,50,0.05);
}
.auth-form-wrapper .position-relative > .form-control {
  padding-right: 42px;
}

/* Staggered entrance */
@media (prefers-reduced-motion: no-preference) {
  .auth-form-wrapper > * {
    opacity: 0;
    transform: translateY(8px);
    animation: authFadeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .auth-form-wrapper > *:nth-child(1) { animation-delay: 0.05s; }
  .auth-form-wrapper > *:nth-child(2) { animation-delay: 0.10s; }
  .auth-form-wrapper > *:nth-child(3) { animation-delay: 0.15s; }
  .auth-form-wrapper > *:nth-child(4) { animation-delay: 0.20s; }
  .auth-form-wrapper > *:nth-child(5) { animation-delay: 0.25s; }
  .auth-form-wrapper > *:nth-child(n+6) { animation-delay: 0.30s; }

  .auth-brand-logo,
  .auth-brand-content > *,
  .auth-brand-trust {
    opacity: 0;
    transform: translateY(10px);
    animation: authFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .auth-brand-logo { animation-delay: 0.1s; }
  .auth-brand-content > *:nth-child(1) { animation-delay: 0.2s; }
  .auth-brand-content > *:nth-child(2) { animation-delay: 0.28s; }
  .auth-brand-content > *:nth-child(3) { animation-delay: 0.36s; }
  .auth-brand-content > *:nth-child(4) { animation-delay: 0.5s; }
  .auth-brand-trust { animation-delay: 0.6s; }
}
@keyframes authFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 991.98px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-area { min-height: 100vh; padding: 48px 24px; }
}

/* ---- Dropdowns ---- */
.dropdown-menu {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  background-color: var(--white);
}
.dropdown-item {
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--navy);
}
.dropdown-item:hover {
  background-color: var(--cyan-pale);
  color: var(--navy);
}
.dropdown-divider {
  border-color: var(--gray-border);
}

/* ---- Progress Bars ---- */
.progress {
  height: 6px;
  border-radius: 3px;
  background-color: var(--gray-light);
  overflow: hidden;
}
.progress-bar {
  background-color: var(--cyan);
  border-radius: 3px;
}

/* ---- Quick Access Grid ---- */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}
.quick-tile {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: var(--navy);
}
.quick-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-color: var(--cyan-25);
  color: var(--navy);
}
.quick-tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.quick-tile h4 { font-size: 15px; font-weight: 600; margin-bottom: 0; }
.quick-tile p { font-size: 13px; color: var(--gray); margin: 0; line-height: 1.4; }

/* ---- Project Grid ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}
.project-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.project-card-add {
  border: 2px dashed var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  cursor: pointer;
  color: var(--gray);
  text-align: center;
}
.project-card-add:hover {
  border-color: var(--navy);
  color: var(--navy);
  background-color: rgba(23,19,50,0.04);
}

/* ---- Dashboard Command Center ---- */
.dashboard-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--bento-gap);
  margin-bottom: var(--bento-gap);
}

.dashboard-hero-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--gray-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  min-width: 0;
}

.dashboard-hero-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.dashboard-hero-card .hero-metric {
  font-family: var(--font-body);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dashboard-hero-card .hero-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard-hero-card .hero-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.dashboard-hero-card .hero-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-top: 8px;
}

.dashboard-hero-card .hero-trend.up {
  background: var(--severity-passed-bg);
  color: var(--severity-passed);
}

.dashboard-hero-card .hero-trend.down {
  background: var(--severity-critical-bg);
  color: var(--severity-critical);
}

.dashboard-hero-card .hero-trend.stable {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.dashboard-hero-card .hero-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.dashboard-hero-card .hero-icon.green,
.dashboard-hero-card .hero-icon.emerald,
.dashboard-hero-card .hero-icon.teal {
  background: var(--cyan-pale);
  color: var(--navy);
}

.dashboard-bento-row {
  display: grid;
  gap: var(--bento-gap);
  margin-bottom: var(--bento-gap);
}

.dashboard-bento-row.split-8-4 {
  grid-template-columns: 2fr 1fr;
}

.dashboard-bento-row.split-3-3-3-3 {
  grid-template-columns: repeat(4, 1fr);
}

.dashboard-bento-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--gray-border);
  min-width: 0;
}

/* Chart containers must be position:relative for Chart.js responsive sizing */
.dashboard-bento-card > div[style*="height"] {
  position: relative;
}

.dashboard-bento-card .bento-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.bento-view-link {
  font-size: 12px;
  color: var(--cyan);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.bento-view-link:hover {
  color: #A78BFA;
  text-decoration: underline;
}

.dashboard-bento-card .bento-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.time-range-toggle {
  display: inline-flex;
  background: var(--gray-light);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
}

.time-range-toggle .range-btn {
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.time-range-toggle .range-btn.active {
  background: var(--navy);
  color: var(--white);
}

.bento-mini-table {
  width: 100%;
}

.bento-mini-table tr td {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-border);
  font-size: 14px;
}

.bento-mini-table tr:last-child td {
  border-bottom: none;
}

.bento-mini-table .mini-rank {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.vis-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

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

.vis-bar-label {
  font-size: 13px;
  color: var(--text-primary);
  min-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vis-bar-track {
  flex: 1;
  height: 8px;
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
}

.vis-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.vis-bar-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 40px;
  text-align: right;
}

.activity-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-border);
}

.activity-feed-item:last-child {
  border-bottom: none;
}

.activity-feed-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.activity-feed-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.4;
}

.activity-feed-time {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.audit-health-score {
  font-family: var(--font-body);
  font-size: 48px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.audit-health-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
}

.audit-issue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-top: 6px;
}

.project-card-new {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--gray-border);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card-new:hover {
  box-shadow: 0 0 0 3px rgba(139,92,246, 0.08), var(--shadow-sm);
  transform: translateY(-3px);
  border-color: rgba(139,92,246, 0.4);
}

.project-card-new.is-primary {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy), var(--shadow-xs);
}

.project-card-new .project-domain {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.project-card-new .project-favicon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.project-card-new .project-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.project-card-new .project-url {
  font-size: 12px;
  color: var(--text-secondary);
}

.project-card-new .project-rank {
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.project-card-new .project-rank-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.project-card-new .project-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-border);
  align-items: center;
}

.project-card-new .primary-star {
  color: var(--cyan);
  cursor: pointer;
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.grade-badge.grade-a { background: rgba(39,174,96,0.12); color: #27AE60; }
.grade-badge.grade-b { background: rgba(0,194,168,0.12); color: #00C2A8; }
.grade-badge.grade-c { background: rgba(241,196,15,0.15); color: #c9a100; }
.grade-badge.grade-d { background: rgba(230,126,34,0.12); color: #E67E22; }
.grade-badge.grade-f { background: rgba(212,43,43,0.12); color: #D42B2B; }

/* AEO Tab Pills */
.aeo-tabs .nav-pills .nav-link {
  border-radius: var(--radius-pill);
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.aeo-tabs .nav-pills .nav-link:hover {
  background: var(--cyan-pale);
  color: var(--navy);
}

.aeo-tabs .nav-pills .nav-link.active {
  background: var(--navy);
  color: var(--white);
}

/* Responsive dashboard grid */
@media (max-width: 991px) {
  .dashboard-hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-bento-row.split-8-4 {
    grid-template-columns: 1fr;
  }
  .dashboard-bento-row.split-3-3-3-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .dashboard-hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-bento-row.split-3-3-3-3 {
    grid-template-columns: 1fr;
  }
}

/* ---- Pricing Grid ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
  max-width: 800px;
  margin: 0 auto;
}

/* ---- Footer ---- */
.footer {
  background-color: var(--navy);
  color: var(--white);
  padding: 60px 0 30px;
  margin-top: auto;
}
.footer h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
  color: var(--white);
  text-transform: none;
  letter-spacing: 0;
}
.footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 4px 0;
}
.footer a:hover {
  color: var(--cyan);
}
.footer-bottom {
  border-top: 1px solid var(--navy-lighter);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ---- Pricing Cards ---- */
.pricing-card {
  background-color: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.pricing-card.pricing-featured {
  border-color: var(--cyan);
  border-width: 2px;
  position: relative;
  box-shadow: var(--shadow-md);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--cyan);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pricing-card .pricing-price {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: var(--navy);
}
.pricing-card .pricing-period {
  font-size: 15px;
  color: var(--gray);
}
.pricing-card .pricing-features {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.pricing-card .pricing-features li {
  padding: 6px 0;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
}
.pricing-card .pricing-features li i {
  color: var(--cyan);
  font-size: 16px;
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 60px 32px;
  color: var(--gray);
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  color: var(--gray-200);
}
.empty-state p {
  font-size: 16px;
  margin-bottom: 24px;
  color: var(--gray);
}

/* ---- Enhanced Empty State Card ---- */
.empty-state-card {
  text-align: center;
  padding: 80px 32px;
  background: linear-gradient(180deg, var(--gray-light) 0%, var(--white) 100%);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
}
.empty-state-card .empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}
.empty-state-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.empty-state-card p {
  font-size: 15px;
  color: var(--gray);
  max-width: 400px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* ---- Card Accent Top ---- */
.card-accent-top {
  border-top: 3px solid var(--navy);
}

/* ---- Badge Default (no bg-* class) ---- */
.badge:not([class*="bg-"]) {
  background-color: var(--green-700);
  color: var(--white);
}

/* ---- Progress Bar Refinement ---- */
.progress {
  height: 6px;
  border-radius: 3px;
  background-color: var(--gray-200);
}
.progress-bar {
  background-color: var(--cyan);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ---- Subtle entrance for content ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.content-main > *:first-child {
  animation: fadeIn 0.3s ease both;
}

/* ---- Utility Overrides ---- */
.text-primary { color: var(--navy) !important; }
.bg-primary { background-color: var(--navy) !important; }
.border-primary { border-color: var(--navy) !important; }
.text-success { color: var(--severity-passed) !important; }
.text-danger { color: var(--severity-critical) !important; }
.text-warning { color: var(--severity-warning) !important; }
.text-info { color: var(--cyan) !important; }
.text-muted { color: var(--gray) !important; }
.bg-light { background-color: var(--gray-light) !important; }
.bg-transparent { background-color: transparent !important; }
.border-2 { border-width: 1px !important; }
.border-dark { border-color: var(--gray-border) !important; }
.fw-bolder, .fw-black { font-weight: 700 !important; }
.rounded-3 { border-radius: var(--radius-sm) !important; }

/* Breadcrumb */
.breadcrumb { font-size: 14px; margin-bottom: 0; }
.breadcrumb-item a { color: var(--gray); text-decoration: none; }
.breadcrumb-item.active { color: var(--navy); }

/* Nav tabs */
.nav-tabs { border-bottom: 1px solid var(--gray-border); }
.nav-tabs .nav-link {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 500;
  color: var(--gray);
  font-size: 14px;
}
.nav-tabs .nav-link.active {
  color: var(--navy);
  border-color: var(--gray-border) var(--gray-border) var(--white);
  font-weight: 600;
}

/* Code blocks */
.bg-dark.text-light.p-3 {
  border-radius: var(--radius-sm) !important;
  background-color: var(--navy) !important;
}

/* Pagination */
.pagination .page-link,
.pagination .btn {
  border-radius: var(--radius-pill);
}

/* Spinner */
.spinner-border { color: var(--cyan); }

.tooltip-inner {
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  background-color: var(--navy);
}

/* ---- Wide Screen: use extra space with more columns ---- */
@media (min-width: 1400px) {
  .project-grid { grid-template-columns: repeat(4, 1fr); }
  .bento-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1800px) {
  .project-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Table overflow inside dashboard cards */
.dashboard-bento-card .table-responsive,
.dashboard-bento-card .table {
  overflow-x: auto;
}

.dashboard-bento-card .table {
  min-width: 0;
}

/* ---- New Component Responsive ---- */
@media (max-width: 1199.98px) {
  .display-hero { font-size: 52px; }
  .display-section { font-size: 40px; }
  :root { --section-y: 80px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-grid .bento-wide { grid-column: span 2; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-access-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991.98px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-access-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
  .display-hero { font-size: 38px; }
  .display-section { font-size: 32px; }
  .display-subsection { font-size: 28px; }
  :root { --section-y: 60px; --card-padding: 20px; --grid-gap: 16px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-grid .bento-wide { grid-column: span 1; }
  .project-grid { grid-template-columns: 1fr; }
  .quick-access-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .display-hero { font-size: 32px; }
  .quick-access-grid { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

/* ---- Public Page Header (subpages: tools, blog, pricing, legal) ---- */
.page-header {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139,92,246,0.08), transparent),
    var(--gray-light);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--gray-border);
}
.page-header .container-xl {
  max-width: 1200px;
}
.page-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.page-header p {
  font-size: 17px;
  color: var(--gray);
  line-height: 1.6;
  max-width: 600px;
  margin: 0;
}
.page-header .page-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Auth pages — hide public chrome when auth-split is used */
.layout-public:has(.auth-split) .navbar-public,
.layout-public:has(.auth-split) .footer {
  display: none;
}
.layout-public:has(.auth-split) > .container-xl {
  display: none;
}
.layout-public:has(.auth-split) .content-main {
  flex: 1;
  padding: 0;
}

/* ---- Public Page Content Section ---- */
.page-content {
  padding: 48px 0 64px;
}
.page-content .container-xl {
  max-width: 1200px;
}

@media (max-width: 767.98px) {
  .page-header {
    padding: 40px 0 32px;
  }
  .page-content {
    padding: 32px 0 48px;
  }
}

/* ================================================================
   BLOG — Editorial Layout
   ================================================================ */

/* ---- Hero ---- */
.blog-hero {
  background:
    radial-gradient(ellipse 90% 70% at 20% 0%, rgba(139,92,246,0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(139,92,246,0.06), transparent),
    var(--navy);
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='1' cy='1' r='0.6' fill='rgba(139,92,246,0.08)'/%3E%3C/svg%3E");
  pointer-events: none;
}
.blog-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}
.blog-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 24px;
}
.blog-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blogDotPulse 2.4s ease-in-out infinite;
}
@keyframes blogDotPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}
.blog-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.blog-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin: 0 0 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Filter tabs ---- */
.blog-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.25s ease;
}
.blog-filter-tab:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}
.blog-filter-tab.is-active {
  color: var(--navy);
  background: var(--cyan);
  border-color: var(--cyan);
}
.blog-filter-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 1px 8px;
  line-height: 1.5;
}
.blog-filter-tab.is-active .blog-filter-count {
  background: rgba(23,19,50,0.15);
}

/* ---- Grid section ---- */
.blog-grid-section {
  padding: 48px 0 72px;
}
.blog-grid-section .container-xl {
  max-width: 1200px;
}

/* ---- Featured card ---- */
.blog-featured {
  display: flex;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  transition: all 0.35s ease;
  position: relative;
}
.blog-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(23,19,50,0.10);
  border-color: var(--cyan-25);
}
.blog-featured-accent {
  width: 6px;
  min-height: 100%;
  background: linear-gradient(180deg, var(--cyan) 0%, #4fc3c3 100%);
  flex-shrink: 0;
}
.blog-featured-accent.is-aeo {
  background: linear-gradient(180deg, var(--orange) 0%, #ff8a00 100%);
}
.blog-featured-body {
  flex: 1;
  padding: 40px 40px 36px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.blog-featured-title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 12px 0 16px;
}
.blog-featured-excerpt {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.65;
  margin: 0 0 20px;
  flex: 1;
}
.blog-featured-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: linear-gradient(135deg, var(--cyan-pale) 0%, var(--white) 100%);
  flex-shrink: 0;
}
.blog-featured-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: rgba(139,92,246,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--navy-light);
}
.blog-featured-icon.is-aeo {
  background: rgba(255,165,52,0.12);
  color: #cc7a00;
}
.blog-featured .blog-featured-side.is-aeo-parent,
.blog-featured-accent.is-aeo ~ .blog-featured-body ~ .blog-featured-side {
  background: linear-gradient(135deg, var(--orange-pale) 0%, var(--white) 100%);
}

/* ---- Category label ---- */
.blog-cat-label {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a7a7a;
  background: var(--cyan-pale);
  padding: 3px 10px;
  border-radius: 6px;
}
.blog-cat-label.is-aeo {
  color: #a06200;
  background: var(--orange-pale);
}
.blog-cat-label.small {
  font-size: 10px;
  padding: 2px 8px;
}

/* ---- Read link ---- */
.blog-read-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.25s ease;
}
.blog-read-link .bi { transition: transform 0.25s ease; }
.blog-featured:hover .blog-read-link .bi,
.blog-card:hover .blog-read-link .bi {
  transform: translateX(4px);
}
.blog-read-link.small { font-size: 13px; }

/* ---- Card grid ---- */
.blog-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---- Blog card ---- */
.blog-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  animation: blogCardFadeIn 0.5s ease both;
  position: relative;
}
@keyframes blogCardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--cyan-25);
}
.blog-card-top-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--cyan) 0%, #4fc3c3 100%);
}
.blog-card-top-accent.is-aeo {
  background: linear-gradient(90deg, var(--orange) 0%, #ff8a00 100%);
}
.blog-card-inner {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}
.blog-card-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 10px 0 12px;
}
.blog-card-excerpt {
  font-size: 13.5px;
  color: var(--gray);
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

/* ---- Empty state ---- */
.blog-empty {
  text-align: center;
  padding: 80px 32px;
}
.blog-empty-icon {
  font-size: 48px;
  color: var(--gray-200);
  margin-bottom: 16px;
}
.blog-empty h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.blog-empty p {
  color: var(--gray);
}

/* ---- Pagination ---- */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-border);
}
.blog-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.2s ease;
}
.blog-page-btn:hover {
  background: var(--gray-light);
  border-color: var(--gray-200);
  color: var(--navy);
}
.blog-page-btn.is-disabled {
  color: var(--gray-200);
  pointer-events: none;
}
.blog-page-nums {
  display: flex;
  gap: 4px;
}
.blog-page-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.blog-page-num:hover {
  background: var(--gray-light);
  color: var(--navy);
}
.blog-page-num.is-active {
  background: var(--navy);
  color: var(--white);
}

/* ---- Blog responsive ---- */
@media (max-width: 991.98px) {
  .blog-card-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-featured-side { display: none; }
  .blog-featured-body { padding: 28px 28px 24px; }
}
@media (max-width: 767.98px) {
  .blog-hero { padding: 48px 0 40px; }
  .blog-hero-title { font-size: 28px; }
  .blog-hero-title br { display: none; }
  .blog-hero-sub { font-size: 14px; }
  .blog-card-grid { grid-template-columns: 1fr; }
  .blog-featured { flex-direction: column; }
  .blog-featured-accent { width: 100%; min-height: 4px; height: 4px; }
  .blog-featured-body { padding: 24px; }
  .blog-featured-title { font-size: 20px; }
  .blog-grid-section { padding: 32px 0 48px; }
  .blog-pagination { flex-wrap: wrap; gap: 8px; }
}

/* ================================================================
   DASHBOARD DELIGHT — Micro-interactions & entrance animations
   Subtle sophistication for internal dashboard pages
   ================================================================ */

/* ---- Staggered card entrance ---- */
@keyframes dashCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dashboard-hero-card {
  opacity: 0;
  animation: dashCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.dashboard-hero-card:nth-child(1) { animation-delay: 0.04s; }
.dashboard-hero-card:nth-child(2) { animation-delay: 0.1s; }
.dashboard-hero-card:nth-child(3) { animation-delay: 0.16s; }
.dashboard-hero-card:nth-child(4) { animation-delay: 0.22s; }

.dashboard-bento-card {
  opacity: 0;
  animation: dashCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.25s;
}
.split-8-4 .dashboard-bento-card:nth-child(1) { animation-delay: 0.28s; }
.split-8-4 .dashboard-bento-card:nth-child(2) { animation-delay: 0.34s; }
.split-3-3-3-3 .dashboard-bento-card:nth-child(1) { animation-delay: 0.36s; }
.split-3-3-3-3 .dashboard-bento-card:nth-child(2) { animation-delay: 0.42s; }
.split-3-3-3-3 .dashboard-bento-card:nth-child(3) { animation-delay: 0.48s; }
.split-3-3-3-3 .dashboard-bento-card:nth-child(4) { animation-delay: 0.54s; }

.project-card-new {
  opacity: 0;
  animation: dashCardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.5s + var(--card-i, 0) * 0.06s);
}

/* ---- Hero icon hover animation ---- */
.dashboard-hero-card .hero-icon {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
}
.dashboard-hero-card:hover .hero-icon {
  transform: scale(1.1) rotate(-4deg);
  background: var(--cyan-15);
}

/* ---- Visibility bar grow animation ---- */
@keyframes visBarGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.vis-bar-fill {
  transform-origin: left;
  animation: visBarGrow 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.5s;
  transform: scaleX(0);
}

/* ---- Activity feed stagger ---- */
.activity-feed-item {
  opacity: 0;
  animation: dashCardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.activity-feed-item:nth-child(1) { animation-delay: 0.55s; }
.activity-feed-item:nth-child(2) { animation-delay: 0.65s; }
.activity-feed-item:nth-child(3) { animation-delay: 0.75s; }

/* ---- Grade badge entrance ---- */
@keyframes gradePop {
  0%   { opacity: 0; transform: scale(0.5); }
  60%  { transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}
.grade-badge {
  animation: gradePop 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

/* ---- Button press effect ---- */
.btn-primary:active,
.btn-outline-primary:active {
  transform: translateY(1px) scale(0.98);
  transition: transform 0.08s ease;
}

/* ---- Counter count-up glow ---- */
.hero-metric[data-counted] {
  transition: color 0.3s ease;
}

/* ---- Audit health score entrance ---- */
@keyframes scoreReveal {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.audit-health-score {
  animation: scoreReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

/* ---- Audit issue row stagger ---- */
.audit-issue-row {
  opacity: 0;
  animation: dashCardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.audit-issue-row:nth-child(1) { animation-delay: 0.55s; }
.audit-issue-row:nth-child(2) { animation-delay: 0.65s; }
.audit-issue-row:nth-child(3) { animation-delay: 0.75s; }

/* ---- Opportunity table row stagger ---- */
@keyframes rowSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.dashboard-bento-card tbody tr {
  opacity: 0;
  animation: rowSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.5s + var(--row-i, 0) * 0.04s);
}

/* ---- Empty state gentle float ---- */
.empty-state-card i {
  animation: floatUp 3s ease-in-out infinite;
}

/* ---- Time range toggle press ---- */
.time-range-toggle .range-btn {
  transition: all 0.15s ease, transform 0.1s ease;
}
.time-range-toggle .range-btn:active {
  transform: scale(0.93);
}

/* ---- Primary star shimmer ---- */
@keyframes starShimmer {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50%      { filter: drop-shadow(0 0 4px rgba(139,92,246, 0.5)); }
}
.project-card-new .primary-star {
  animation: starShimmer 2.5s ease-in-out infinite;
  animation-delay: 1s;
}

/* ---- Respect reduced motion ---- */
/* ================================================================
   FEATURE GATING — Upgrade Nudges & Blur Overlays
   ================================================================ */

/* ── Inline Upgrade Nudge ── */
.upgrade-nudge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(109,40,217, 0.06);
  border: 1px solid rgba(109,40,217, 0.12);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}
.upgrade-nudge i {
  color: #6D28D9;
  font-size: 13px;
  flex-shrink: 0;
}
.upgrade-nudge-link {
  color: #6D28D9;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  margin-left: 2px;
  transition: color 0.15s ease;
}
.upgrade-nudge-link:hover {
  color: #A78BFA;
  text-decoration: underline;
}

/* ── Block-level upgrade nudge (for cards) ── */
.upgrade-nudge-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(109,40,217,0.04) 0%, rgba(139,92,246,0.06) 100%);
  border: 1px dashed rgba(109,40,217, 0.18);
  margin-top: 12px;
}
.upgrade-nudge-block i {
  color: #6D28D9;
  font-size: 18px;
  flex-shrink: 0;
}
.upgrade-nudge-block .nudge-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.upgrade-nudge-block .nudge-text strong {
  color: var(--navy);
}
.upgrade-nudge-block .upgrade-nudge-link {
  font-size: 13px;
}

/* ── Premium Blur Overlay ── */
.premium-blur-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.premium-blur-content {
  filter: blur(5px);
  -webkit-filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
}
.premium-blur-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: var(--radius-sm);
}
.premium-blur-overlay i {
  font-size: 28px;
  color: #6D28D9;
}
.premium-blur-overlay .blur-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-heading);
}
.premium-blur-overlay .blur-sublabel {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 220px;
  text-align: center;
}
.premium-blur-overlay .btn-upgrade {
  margin-top: 4px;
  padding: 6px 20px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}
.premium-blur-overlay .btn-upgrade:hover {
  background: #6D28D9;
  box-shadow: 0 4px 16px rgba(109,40,217, 0.25);
}

/* ── Enhanced Sidebar Plan Widget ── */
.sidebar-plan-widget .plan-tier-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
  vertical-align: middle;
}
.sidebar-plan-widget .plan-tier-badge.tier-starter {
  background: rgba(139,92,246, 0.15);
  color: var(--cyan);
}
.sidebar-plan-widget .plan-tier-badge.tier-pro {
  background: rgba(139,92,246, 0.25);
  color: var(--cyan-light);
}
.sidebar-plan-widget .plan-tier-badge.tier-agency {
  background: linear-gradient(90deg, rgba(139,92,246,0.25), rgba(191,240,203,0.25));
  color: var(--mint);
}
.sidebar-plan-widget .usage-detail {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
.sidebar-upgrade-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 7px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6D28D9 0%, #A78BFA 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}
.sidebar-upgrade-btn:hover {
  box-shadow: 0 4px 16px rgba(139,92,246, 0.3);
  color: #fff;
  transform: translateY(-1px);
}
.sidebar-upgrade-btn i {
  margin-right: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-hero-card,
  .dashboard-bento-card,
  .project-card-new,
  .activity-feed-item,
  .grade-badge,
  .audit-health-score,
  .audit-issue-row,
  .dashboard-bento-card tbody tr,
  .vis-bar-fill {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
  .sidebar-link:hover { padding-left: 12px; }
  .sidebar-link:hover i { transform: none; }
  .project-card-new .primary-star { animation: none; }
  .empty-state-card i { animation: none; }
  .sidebar-upgrade-btn:hover { transform: none; }
}

/* ==========================================================================
   Module Picker — shared "Select a Project" grid
   Rendered by module index routes (AEO, SEO Tracker, On Page SEO, Tech SEO)
   for users with 2+ projects. See templates/_module_picker.html.
   ---
   Note: this block uses BEM-style __ element selectors. The rest of
   this file predominantly uses descendant selectors; this is a one-off
   because the module-picker is a self-contained partial with no parent
   selector, and BEM reads clearer when grep'd in isolation. Feel free
   to normalize later if the team standardizes.
   ========================================================================== */
.module-picker {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 0 48px;
  color: var(--navy);
}

.module-picker__header {
  text-align: center;
  margin-bottom: 28px;
}

.module-picker__header h1 {
  font-family: var(--font-heading, 'Manrope', sans-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.module-picker__tagline {
  font-size: 15px;
  color: rgba(23,19,50, 0.65);
  margin: 0;
}

.module-picker__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 36px;
  padding: 28px 40px;
  background: #fff;
  border: 1px solid rgba(23,19,50, 0.08);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23,19,50, 0.04);
  max-width: 260px;
}

.module-picker__stat-value {
  font-family: var(--font-heading, 'Manrope', sans-serif);
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(90deg, #6D28D9, #A78BFA);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.module-picker__stat-label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(23,19,50, 0.55);
}

.module-picker__section-title {
  font-family: var(--font-heading, 'Manrope', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 16px;
}

.module-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.module-picker__card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid rgba(23,19,50, 0.08);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(23,19,50, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  min-height: 140px;
}

.module-picker__card:hover {
  transform: translateY(-3px);
  border-color: rgba(139,92,246, 0.5);
  box-shadow: 0 0 0 3px rgba(139,92,246, 0.08), 0 6px 18px rgba(23,19,50, 0.06);
  color: var(--navy);
}

.module-picker__card:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}

.module-picker__card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Inner unclassed <div> wrapping card name + domain needs min-width: 0
   so that `text-overflow: ellipsis` actually triggers on long domains
   inside the flex parent. */
.module-picker__card-head > div {
  min-width: 0;
}

.module-picker__favicon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  background: #f6f7f8;
  object-fit: contain;
}

.module-picker__card-name {
  font-family: var(--font-heading, 'Manrope', sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-picker__card-domain {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(23,19,50, 0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-picker__card-cta {
  font-size: 13px;
  font-weight: 600;
  color: #7C3AED;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.module-picker__card-cta::after {
  content: "→";
  transition: transform 0.18s ease;
}

.module-picker__card:hover .module-picker__card-cta::after {
  transform: translateX(3px);
}

.module-picker__card--add {
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1.5px dashed rgba(23,19,50, 0.2);
  background: rgba(23,19,50, 0.015);
  box-shadow: none;
  color: rgba(23,19,50, 0.7);
}

.module-picker__card--add:hover {
  border-color: var(--green-600);
  background: rgba(109,40,217, 0.04);
  box-shadow: none;
  color: var(--green-600);
}

.module-picker__add-icon {
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
  color: var(--green-600);
}

.module-picker__add-label {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

/* ================================================================
   Ghostwing brand lockup (inline SVG mark + Sora wordmark)
   ================================================================ */
.gw-lockup { display: inline-flex; align-items: center; gap: 8px; }
.gw-lockup svg { flex: 0 0 auto; display: block; }
.gw-wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--gw-text-1);
  line-height: 1;
}
.gw-wordmark--light { color: #fff; }

/* ================================================================
   Ghostwing marketing components (landing, pricing, CTA)
   ================================================================ */
.btn-gw {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gw-brand-grad);
  color: #fff; border: 0; border-radius: var(--radius-pill);
  padding: 13px 28px; font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  transition: all .2s ease; text-decoration: none;
}
.btn-gw:hover {
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(124,58,237,.35);
}
.btn-gw:active { transform: translateY(0); box-shadow: none; }
.btn-gw-lg { padding: 16px 36px; font-size: 17px; }

.gw-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gw-violet-tint); color: var(--gw-violet-deep);
  border: 1px solid rgba(124,58,237,.18); border-radius: var(--radius-pill);
  padding: 6px 16px; font-size: 13px; font-weight: 600; letter-spacing: .02em;
}

.gw-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 640px 420px at 12% 8%, rgba(139,92,246,.14), transparent 65%),
    radial-gradient(ellipse 560px 400px at 88% 30%, rgba(20,184,166,.11), transparent 65%),
    radial-gradient(circle, rgba(23,19,50,0.04) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--gw-bg-page);
}

.gw-section { padding: 88px 0; }
.gw-section-alt { background: var(--gw-bg-section); }
.gw-section-title {
  font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(28px, 4vw, 40px); color: var(--gw-text-1);
}
.gw-section-sub { color: var(--gw-text-2); font-size: 17px; max-width: 640px; }

.gw-card {
  background: var(--gw-surface-1); border: 1px solid var(--gw-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}

/* Step cards (how it works) */
.gw-step { position: relative; padding: 28px; height: 100%; }
.gw-step-num {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--gw-brand-grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 17px;
  margin-bottom: 16px;
}

/* Pricing */
.gw-price-card {
  position: relative; background: var(--gw-surface-1);
  border: 1px solid var(--gw-border); border-radius: var(--radius-xl);
  padding: 36px 32px; height: 100%;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.gw-price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gw-price-featured {
  border: 2px solid var(--gw-violet);
  box-shadow: 0 0 0 4px rgba(124,58,237,.10), var(--shadow-lg);
}
.gw-price-flag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gw-brand-grad); color: #fff;
  border-radius: var(--radius-pill); padding: 5px 16px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
}
.gw-price-amount {
  font-family: var(--font-heading); font-weight: 800; font-size: 48px;
  letter-spacing: -0.03em; color: var(--gw-text-1); line-height: 1;
}
.gw-price-articles {
  font-family: var(--font-mono); font-size: 13px; color: var(--gw-violet-deep);
  background: var(--gw-violet-tint); border-radius: var(--radius-pill);
  padding: 5px 14px; display: inline-block; font-weight: 600;
}
.gw-price-feature-list { list-style: none; padding: 0; margin: 24px 0; flex: 1; }
.gw-price-feature-list li {
  padding: 7px 0; color: var(--gw-text-2); font-size: 14.5px;
  display: flex; gap: 10px; align-items: baseline;
}
.gw-price-feature-list li .bi-check-lg { color: var(--gw-ecto-deep); }

.gw-toggle {
  display: inline-flex; background: var(--gw-surface-3);
  border-radius: var(--radius-pill); padding: 4px; gap: 2px;
}
.gw-toggle button {
  border: 0; background: transparent; border-radius: var(--radius-pill);
  padding: 8px 20px; font-weight: 600; font-size: 14px; color: var(--gw-text-2);
  cursor: pointer; transition: all .15s ease;
}
.gw-toggle button.active { background: #fff; color: var(--gw-text-1); box-shadow: var(--shadow-xs); }
.gw-save-pill { color: var(--gw-ecto-deep); font-weight: 700; font-size: 12px; }

/* Integration logos row */
.gw-logo-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gw-surface-1); border: 1px solid var(--gw-border);
  border-radius: var(--radius-pill); padding: 10px 22px;
  color: var(--gw-text-2); font-weight: 600; font-size: 15px;
}
.gw-logo-chip i { font-size: 19px; color: var(--gw-violet); }

/* CTA band */
.gw-cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1E1745 0%, #322A6B 55%, #14424d 100%);
  border-radius: var(--radius-xl); padding: 72px 40px; text-align: center;
}
.gw-cta-band h2 { color: #fff; font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.02em; }
.gw-cta-band p { color: rgba(241,241,251,.75); }

/* Calendar mockup (hero) */
.gw-mock {
  background: var(--gw-surface-1); border: 1px solid var(--gw-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.gw-mock-head {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; border-bottom: 1px solid var(--gw-border);
  background: var(--gw-surface-2);
}
.gw-mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.gw-mock-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 16px; }
.gw-mock-day {
  border-radius: 8px; background: var(--gw-surface-2); min-height: 64px;
  padding: 6px; font-size: 9px; color: var(--gw-text-3);
}
.gw-mock-post {
  border-radius: 5px; padding: 4px 6px; margin-top: 4px;
  font-size: 8.5px; font-weight: 600; line-height: 1.25; color: var(--gw-text-1);
  background: var(--gw-surface-1); border-left: 3px solid var(--gw-violet);
  box-shadow: var(--shadow-xs);
}
.gw-mock-post.is-published { border-left-color: #34D399; }
.gw-mock-post.is-scheduled { border-left-color: #FBBF24; }

/* ================================================================
   Sidebar sections & collapsible toolkit group
   ================================================================ */
.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gw-text-3);
  padding: 14px 16px 6px;
  user-select: none;
}
.sidebar-group { margin: 0; }
.sidebar-group-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}
.sidebar-group-toggle::-webkit-details-marker { display: none; }
.sidebar-group-toggle .bi-chevron-down { transition: transform .2s ease; font-size: 11px; }
.sidebar-group[open] .sidebar-group-toggle .bi-chevron-down { transform: rotate(180deg); }
.sidebar-collapsed .sidebar-section-label { display: none; }
