/* ============================================================
   AEO Intelligence Platform — Styles
   BrandCopilot | v1.0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* v2 canonical tokens — light theme */
  --bg:           #ffffff;
  --surface:      #ffffff;
  --sunken:       #f7f7fa;
  --ink:          #1d1d1f;
  --muted:        #6e6e73;
  --faint:        #98989d;
  --line:         #ebe9f2;
  --accent:       #6c63ff;
  --accent-ink:   #5750e0;
  --accent-wash:  #f1f0ff;
  --good:         #2fa84f;
  --good-wash:    #eaf7ee;
  --warn:         #c98a1c;
  --warn-wash:    #fbf3e2;
  --bad:          #d64545;
  --bad-wash:     #fbeaea;
  --radius:       18px;
  --radius-sm:    12px;
  --shadow:       0 1px 2px rgba(20,20,40,.04), 0 14px 32px -18px rgba(20,20,40,.16);

  /* legacy token names, aliased to the tokens above so every existing
     var(--navy)/var(--cyan)/etc. usage across styles.css and app.js
     picks up the v2 palette without touching each call site. */
  --navy:     var(--bg);
  --navy2:    var(--sunken);
  --navy3:    var(--surface);
  --panel:    var(--surface);
  --panelb:   var(--sunken);
  --panelc:   #eeeef4;
  --border:   var(--line);
  --border2:  rgba(20,20,40,0.06);
  --cyan:     var(--accent);
  --cyan2:    var(--accent-ink);
  --amber:    var(--warn);
  --red:      var(--bad);
  --green:    var(--good);
  --purple:   #8b7cf0;
  --slate:    var(--muted);
  --dim:      rgba(20,20,40,0.62);
  --white:    var(--ink);
  --gpt:      #10A37F;
  --claude:   #C89664;
  --gemini:   #4285F4;
  --perp:     #A78BFA;
  --grok:     #FF6B35;
  --meta:     #0866FF;
  --deep:     #4FC3F7;
  --r:        var(--radius);
  --r2:       var(--radius-sm);
  --r3:       8px;
  --sidebar:  240px;
  --topbar:   56px;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy3); border-radius: 2px; }
input, textarea, select, button { font-family: inherit; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* ── SKELETON LOADING ───────────────────────────────────── */
.skeleton-block {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--sunken) 25%, var(--line) 37%, var(--sunken) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
@keyframes skeleton-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) {
  .skeleton-block { animation: none; background: var(--sunken); }
}

/* ── ACCESSIBILITY ──────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 12px; z-index: 200;
  background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: top 0.15s;
}
.skip-link:focus { top: 12px; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#page-content:focus { outline: none; }

/* ── AUTH SCREEN ────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 40%, rgba(108,99,255,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(139,124,240,0.04) 0%, transparent 50%),
              var(--navy);
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.auth-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 28px;
  text-decoration: none;
}
.auth-logo-icon {
  width: 36px; height: 36px;
  background: #111111;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #ffffff;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.auth-logo-text { font-size: 15px; font-weight: 700; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: var(--white); }
.auth-logo-sub { font-size: 10px; color: var(--slate); }
.auth-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.auth-sub { font-size: 13px; color: var(--slate); margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--slate); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.form-input {
  width: 100%; padding: 10px 14px;
  background: var(--panelb); border: 1px solid var(--border);
  border-radius: var(--r2); color: var(--white); font-size: 14px;
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(108,99,255,0.1); }
.form-select {
  width: 100%; padding: 10px 14px;
  background: var(--panelb); border: 1px solid var(--border);
  border-radius: var(--r2); color: var(--white); font-size: 14px;
  outline: none; cursor: pointer;
  transition: border-color 0.15s;
}
.form-select:focus { border-color: var(--cyan); }
.form-textarea {
  width: 100%; padding: 10px 14px;
  background: var(--panelb); border: 1px solid var(--border);
  border-radius: var(--r2); color: var(--white); font-size: 13px;
  resize: vertical; min-height: 80px; outline: none;
  transition: border-color 0.15s;
}
.form-textarea:focus { border-color: var(--cyan); }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; }
.auth-switch { font-size: 13px; color: var(--slate); margin-top: 20px; text-align: center; }
.auth-switch a { color: var(--cyan); font-weight: 600; cursor: pointer; }
.auth-hint {
  background: rgba(108,99,255,0.06); border: 1px solid rgba(108,99,255,0.15);
  border-radius: var(--r3); padding: 10px 12px; margin-top: 20px;
  font-size: 11.5px; color: var(--dim); line-height: 1.5;
}
.auth-hint strong { color: var(--cyan); display: block; margin-bottom: 4px; }

/* ── APP SHELL ──────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--panelb);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}
.sb-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sb-logo {
  width: 30px; height: 30px;
  background: #111111;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #ffffff;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  flex-shrink: 0;
}
.sb-brand-text .name { font-size: 13px; font-weight: 700; letter-spacing: 0.03em; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.sb-brand-text .sub  { font-size: 9px; color: var(--cyan); letter-spacing: 0.08em; text-transform: uppercase; }
.sb-section { padding: 12px 10px 6px; }
.sb-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--slate); text-transform: uppercase;
  padding: 0 8px; margin-bottom: 4px; display: block;
}
.sb-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--r3);
  font-size: 12.5px; font-weight: 500; color: var(--dim);
  cursor: pointer; margin-bottom: 1px;
  transition: all 0.12s;
  user-select: none;
  position: relative;
}
.sb-item:hover { background: rgba(108,99,255,0.06); color: var(--white); }
.sb-item.active { background: rgba(108,99,255,0.11); color: var(--cyan); }
.sb-item .icon { width: 16px; text-align: center; flex-shrink: 0; font-size: 14px; }
.sb-badge {
  margin-left: auto;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; padding: 0 5px;
}
.sb-badge.red   { background: rgba(214,69,69,0.15); color: var(--red); }
.sb-badge.amber { background: rgba(201,138,28,0.15); color: var(--amber); }
.sb-badge.cyan  { background: rgba(108,99,255,0.12); color: var(--cyan); }
.sb-account {
  margin: 4px 12px 12px;
  margin-top: auto;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.sb-account-top { display: flex; align-items: center; gap: 9px; cursor: pointer; width: 100%; background: none; border: none; padding: 0; text-align: left; font-family: inherit; }
.sb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.sb-account-info { flex: 1; min-width: 0; line-height: 1.25; }
.sb-account-info .uname { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-account-info .urole { font-size: 10.5px; color: var(--slate); }
.sb-chevron { width: 12px; height: 12px; color: var(--faint); flex-shrink: 0; }
.sb-account-actions {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line);
}
.sb-signout {
  position: relative; flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px; border-radius: 8px;
  background: var(--sunken);
  border: none; font-family: inherit;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: background 0.12s, color 0.12s;
}
.sb-signout:hover { background: var(--bad-wash); color: var(--bad); }

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar);
  flex-shrink: 0;
  background: var(--panelb);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left .page-title { font-size: 15px; font-weight: 700; }
.topbar-left .page-sub   { font-size: 11px; color: var(--slate); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--slate); margin-bottom: 2px; }
.breadcrumb a { color: var(--slate); cursor: pointer; }
.breadcrumb a:hover { color: var(--cyan); text-decoration: none; }
.breadcrumb span:last-child { color: var(--white); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.period-tabs { display: flex; gap: 2px; background: var(--navy2); border-radius: 980px; padding: 3px; }
.period-tab { padding: 5px 11px; border-radius: 980px; font-size: 11px; font-weight: 600; color: var(--dim); cursor: pointer; background: none; border: none; font-family: inherit; }
.period-tab.active { background: var(--navy3); color: var(--white); box-shadow: var(--shadow); }
.live-indicator {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--r3);
  background: rgba(47,168,79,0.08); border: 1px solid rgba(47,168,79,0.2);
  color: var(--green); font-size: 11.5px; font-weight: 500;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: live-pulse 2s infinite;
}
@keyframes live-pulse { 0%,100%{opacity:1;} 50%{opacity:.3;} }
.icon-btn {
  width: 32px; height: 32px;
  border-radius: var(--r3);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--slate);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  transition: all 0.12s;
  position: relative;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(108,99,255,0.05); }
.notif-count {
  position: absolute; top: -4px; right: -4px;
  width: 14px; height: 14px; border-radius: 7px;
  background: var(--red); color: #fff;
  font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tier-badge {
  padding: 3px 10px; border-radius: 12px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.tier-guest    { background: rgba(110,110,115,0.12); color: var(--slate); }
.tier-silver   { background: rgba(192,192,192,0.15); color: #C0C0C0; }
.tier-gold     { background: rgba(201,138,28,0.15); color: var(--amber); }
.tier-platinum { background: rgba(139,124,240,0.15); color: var(--purple); }

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-wrap { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.page-content { flex: 1; overflow-y: auto; padding: 22px 24px; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r2);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--cyan); color: var(--navy); }
.btn-primary:hover { background: #8a83ff; }
.btn-secondary { background: var(--panelc); color: var(--white); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-danger { background: rgba(214,69,69,0.12); color: var(--red); border: 1px solid rgba(214,69,69,0.2); }
.btn-danger:hover { background: rgba(214,69,69,0.2); }
.btn-ghost { background: transparent; color: var(--cyan); padding: 6px 12px; }
.btn-ghost:hover { background: rgba(108,99,255,0.06); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { width: 30px; height: 30px; padding: 0; border-radius: var(--r3); justify-content: center; font-size: 15px; }

/* ── CARDS & PANELS ─────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 13.5px; font-weight: 700; }
.card-subtitle { font-size: 11px; color: var(--slate); margin-top: 1px; }
.card-body { padding: 16px 18px; }
.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--sunken);
}
.card-action {
  font-size: 11.5px; color: var(--cyan); cursor: pointer; font-weight: 500;
  padding: 4px 10px; border-radius: 4px;
  background: rgba(108,99,255,0.07);
  transition: background 0.12s;
}
.card-action:hover { background: rgba(108,99,255,0.14); }

/* ── GRID ────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.grid-left { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.grid-right { display: grid; grid-template-columns: 360px 1fr; gap: 16px; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* ── SECTION DIVIDER ────────────────────────────────────── */
.section-div {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 12px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--slate);
}
.section-div::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── KPI CARDS ───────────────────────────────────────────── */
.kpi-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.kpi-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
}
.kpi-cyan::before   { background: var(--cyan); }
.kpi-green::before  { background: var(--green); }
.kpi-amber::before  { background: var(--amber); }
.kpi-red::before    { background: var(--red); }
.kpi-purple::before { background: var(--purple); }
.kpi-label { font-size: 10px; font-weight: 700; color: var(--slate); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.kpi-value { font-family: 'JetBrains Mono', monospace; font-size: 28px; font-weight: 700; line-height: 1; }
.kpi-cyan   .kpi-value { color: var(--cyan); }
.kpi-green  .kpi-value { color: var(--green); }
.kpi-amber  .kpi-value { color: var(--amber); }
.kpi-red    .kpi-value { color: var(--red); }
.kpi-purple .kpi-value { color: var(--purple); }
.kpi-delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; margin-top: 6px;
  padding: 2px 7px; border-radius: 4px;
}
.delta-up { background: rgba(47,168,79,0.1); color: var(--green); }
.delta-dn { background: rgba(214,69,69,0.1); color: var(--red); }
.delta-na { background: rgba(110,110,115,0.1); color: var(--slate); }
.kpi-sub { font-size: 11px; color: var(--slate); margin-top: 3px; }

/* ── DATA TABLES ─────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  font-size: 10px; font-weight: 700; color: var(--slate);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border2);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(20,20,40,0.015); }
.data-table .td-mono { font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.data-table .td-action { text-align: right; white-space: nowrap; }

/* ── STATUS PILLS ────────────────────────────────────────── */
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 12px;
  font-size: 11px; font-weight: 600;
}
.s-active    { background: rgba(47,168,79,0.12); color: var(--green); }
.s-pending   { background: rgba(201,138,28,0.12); color: var(--amber); }
.s-paused    { background: rgba(110,110,115,0.12); color: var(--slate); }
.s-archived  { background: rgba(214,69,69,0.08); color: var(--red); }
.s-open      { background: rgba(108,99,255,0.1); color: var(--cyan); }
.s-inprog    { background: rgba(201,138,28,0.12); color: var(--amber); }
.s-review    { background: rgba(139,124,240,0.12); color: var(--purple); }
.s-complete  { background: rgba(47,168,79,0.12); color: var(--green); }
.s-ready     { background: rgba(47,168,79,0.12); color: var(--green); }
.s-running   { background: rgba(108,99,255,0.1); color: var(--cyan); }
.s-error     { background: rgba(214,69,69,0.1); color: var(--red); }

/* ── PRIORITY PILLS ─────────────────────────────────────── */
.priority-pill {
  display: inline-block; padding: 2px 8px;
  border-radius: 10px; font-size: 10.5px; font-weight: 700;
}
.p-critical { background: rgba(214,69,69,0.12); color: var(--red); }
.p-high     { background: rgba(201,138,28,0.12); color: var(--amber); }
.p-medium   { background: rgba(108,99,255,0.1); color: var(--cyan); }
.p-low      { background: rgba(110,110,115,0.1); color: var(--slate); }

/* Key Contacts role — was reusing .sb-badge (a fixed 18x18px circular
   count badge meant for sidebar numbers), which clipped any real role
   text down to invisible. */
.contact-role-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
  background: rgba(108,99,255,0.1); color: var(--cyan);
}

/* ── HEATMAP TABLE ───────────────────────────────────────── */
.hm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.hm-table th {
  font-size: 9px; font-weight: 700; color: var(--slate);
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 8px; text-align: center; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.hm-table th.q-col { text-align: left; min-width: 200px; padding-left: 14px; }
.hm-table td { padding: 6px 8px; font-family: 'JetBrains Mono', monospace; font-weight: 700; text-align: center; border-bottom: 1px solid var(--border2); }
.hm-table td.q-col { font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 500; text-align: left; color: var(--dim); padding-left: 14px; }
.hm-table tr:hover td { background: rgba(20,20,40,0.02); }
.cell-strong { color: #2fa84f; background: rgba(47,168,79,0.12); border-radius: 4px; }
.cell-good   { color: #5cbf7a; background: rgba(92,191,122,0.08); border-radius: 4px; }
.cell-mid    { color: var(--amber); background: rgba(201,138,28,0.1); border-radius: 4px; }
.cell-weak   { color: #e0824a; background: rgba(224,130,74,0.1); border-radius: 4px; }
.cell-low    { color: var(--red); background: rgba(214,69,69,0.08); border-radius: 4px; }
.cell-zero   { color: var(--slate); opacity: 0.4; }

/* ── TOP-3 PRESENCE TABLE ────────────────────────────────── */
.top3-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--slate); }
.top3-legend-item { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.top3-legend-swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.top3-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; }
.top3-table thead th {
  text-align: left; font-size: 11px; font-weight: 700; color: var(--slate); letter-spacing: 0.04em;
  padding: 0 10px 10px; border-bottom: 1px solid var(--border);
}
.top3-table thead th.top3-cat-col { min-width: 170px; }
.top3-table thead th.top3-plat-col { text-align: center; min-width: 84px; }
.top3-table tbody tr td { border-bottom: 1px solid var(--border2); }
.top3-table tbody tr:last-child td { border-bottom: none; }
.top3-table tbody td.top3-cat-cell { padding: 5px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.top3-table tbody td.top3-cat-cell .top3-q-count { font-weight: 400; color: var(--faint); font-size: 10.5px; margin-left: 6px; }
.top3-table tbody td.top3-rank-cell { padding: 3px 6px; text-align: center; }
.top3-rank-pill { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 20px; border-radius: 6px; cursor: default; transition: transform .12s ease; }
.top3-rank-pill:hover { transform: scale(1.06); }
.top3-rank-1 { background: #1c7a3e; }
.top3-rank-2 { background: var(--good); }
.top3-rank-3 { background: var(--amber); }
.top3-rank-0 { background: var(--panelc); }

/* ── COMPETITOR BAR ──────────────────────────────────────── */
.comp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--border2);
}
.comp-row:last-child { border-bottom: none; }
.comp-row .rank { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--slate); width: 18px; text-align: right; flex-shrink: 0; }
.comp-row .name { font-size: 12px; font-weight: 600; width: 90px; flex-shrink: 0; }
.comp-row .name.hl { color: var(--cyan); }
.comp-row .bar-wrap { flex: 1; height: 5px; background: rgba(20,20,40,0.05); border-radius: 3px; }
.comp-row .bar-fill { height: 5px; border-radius: 3px; background: var(--slate); }
.comp-row .bar-fill.hl { background: linear-gradient(90deg, var(--cyan), var(--cyan2)); }
.comp-row .score { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; width: 30px; text-align: right; flex-shrink: 0; }
.comp-row .chg { font-size: 10px; width: 30px; text-align: right; flex-shrink: 0; }
.comp-row .chg.up { color: var(--green); }
.comp-row .chg.dn { color: var(--red); }

/* ── PLATFORM CARDS ──────────────────────────────────────── */
.plat-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 8px; }
.plat-card {
  background: var(--panelb); border-radius: var(--r3);
  padding: 10px 8px; text-align: center; border: 1px solid var(--border);
}
.plat-icon {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; margin: 0 auto 6px;
}
.plat-name { font-size: 9px; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.plat-score { font-family: 'JetBrains Mono', monospace; font-size: 20px; font-weight: 700; }
.plat-bar { height: 3px; border-radius: 2px; margin-top: 6px; }

/* ── BHT PILLARS ─────────────────────────────────────────── */
.bht-pillar {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.bht-pillar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--cyan); }
.bht-score { font-family: 'JetBrains Mono', monospace; font-size: 38px; font-weight: 700; line-height: 1; color: var(--white); }
.bht-metric { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.bht-metric-label { font-size: 11px; color: var(--dim); width: 120px; flex-shrink: 0; }
.bht-metric-bar-wrap { flex: 1; height: 4px; background: rgba(20,20,40,0.07); border-radius: 2px; }
.bht-metric-bar { height: 4px; border-radius: 2px; transition: width 1s ease; }
.bht-metric-val { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; width: 30px; text-align: right; }
.spark-wrap { height: 48px; margin-top: 12px; }

/* ── RECOMMENDATION CARDS ────────────────────────────────── */
.rec-card {
  background: var(--panelb); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 14px 16px; margin-bottom: 10px;
  border-left: 3px solid transparent;
  transition: border-color 0.15s;
}
.rec-card:hover { border-color: var(--cyan); }
.rec-card.c { border-left-color: var(--red); }
.rec-card.h { border-left-color: var(--amber); }
.rec-card.m { border-left-color: var(--cyan); }
.rec-card.l { border-left-color: var(--slate); }
.rec-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rec-title  { font-size: 13px; font-weight: 700; flex: 1; }
.rec-body   { font-size: 12px; color: var(--dim); margin-top: 6px; line-height: 1.5; }
.rec-meta   { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rec-tag    { font-size: 10px; color: var(--slate); background: rgba(20,20,40,0.05); padding: 2px 8px; border-radius: 8px; }
.rec-impact { font-size: 11px; font-weight: 600; }

/* ── ACTION WORKFLOW ─────────────────────────────────────── */
.action-card {
  background: var(--panelb); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 14px 16px; margin-bottom: 10px;
}
.action-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.action-title  { font-size: 13px; font-weight: 700; }
.action-meta   { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.action-notes  { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.note-item { font-size: 11.5px; color: var(--dim); padding: 6px 0; border-bottom: 1px solid var(--border2); }
.note-item:last-child { border-bottom: none; }
.note-meta { font-size: 10px; color: var(--slate); margin-top: 2px; }

/* ── ALERT ITEMS ─────────────────────────────────────────── */
.alert-item {
  display: flex; gap: 12px;
  background: var(--panelb); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 12px 14px; margin-bottom: 8px;
  border-left: 3px solid transparent;
}
.alert-item.critical { border-left-color: var(--red); }
.alert-item.high     { border-left-color: var(--amber); }
.alert-item.info     { border-left-color: var(--cyan); }
.alert-item.unread   { background: rgba(108,99,255,0.03); }
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-msg  { font-size: 12.5px; font-weight: 600; }
.alert-time { font-size: 10.5px; color: var(--slate); margin-top: 3px; }

/* ── SOURCE ATTRIBUTION ──────────────────────────────────── */
.source-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--panelb); border-radius: var(--r3);
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--border);
}
.source-icon { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.source-info { flex: 1; }
.source-name { font-size: 12.5px; font-weight: 600; }
.source-type { font-size: 10px; color: var(--slate); }
.source-bar-wrap { width: 80px; height: 3px; background: rgba(20,20,40,0.07); border-radius: 2px; margin-top: 4px; }
.source-bar  { height: 3px; border-radius: 2px; }
.source-score { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  animation: slideUp 0.25s ease;
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 800; }
.modal-close { font-size: 20px; cursor: pointer; color: var(--slate); padding: 4px; transition: color 0.12s; background: none; border: none; line-height: 1; font-family: inherit; }
.modal-close:hover { color: var(--white); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes slideUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }

/* ── TOAST ───────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 2000; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--panelc); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 12px 16px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  display: flex; align-items: center; gap: 10px;
  min-width: 280px; max-width: 380px;
  animation: toastIn 0.25s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--cyan); }
.toast.warn    { border-left: 3px solid var(--amber); }
@keyframes toastIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-input {
  padding: 8px 14px 8px 36px;
  background: var(--panelb); border: 1px solid var(--border);
  border-radius: var(--r2); color: var(--white); font-size: 13px;
  outline: none; transition: border-color 0.15s; width: 220px;
}
.search-input:focus { border-color: var(--cyan); width: 280px; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--slate); pointer-events: none; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--slate);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state .empty-title { font-size: 15px; font-weight: 600; color: var(--dim); margin-bottom: 6px; }
.empty-state .empty-sub { font-size: 13px; line-height: 1.5; }

/* ── MINING PROGRESS ─────────────────────────────────────── */
.mining-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border2);
  font-size: 13px;
}
.mining-step:last-child { border-bottom: none; }
.mining-step .step-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.mining-step .step-text { flex: 1; }
.mining-step .step-time { font-size: 11px; color: var(--slate); font-family: 'JetBrains Mono', monospace; }
.progress-bar-wrap { height: 6px; background: rgba(20,20,40,0.06); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.progress-bar-fill { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--cyan), var(--purple)); transition: width 0.5s ease; }

/* ── CONTENT BRIEF ───────────────────────────────────────── */
.brief-section { margin-bottom: 18px; }
.brief-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cyan); margin-bottom: 8px; }
.brief-tag { display: inline-block; background: var(--panelc); border: 1px solid var(--border); border-radius: var(--r3); padding: 4px 10px; font-size: 12px; margin: 3px; }

/* ── CHART CANVAS WRAPPERS ───────────────────────────────── */
.chart-wrap { position: relative; }
canvas { display: block; }

/* ── MINI SPARKLINES ─────────────────────────────────────── */
.spark { height: 46px; }

/* ── RADAR CHART WRAP ────────────────────────────────────── */
.radar-wrap { display: flex; align-items: center; justify-content: center; height: 240px; }

/* ── COPY HINT ───────────────────────────────────────────── */
.copy-hint { font-size: 11px; color: var(--slate); margin-top: 6px; }

/* ── HAMBURGER BUTTON ───────────────────────────────────── */
.hamburger-btn {
  display: none;
  width: 36px; height: 36px;
  border: none; background: transparent;
  cursor: pointer; padding: 6px;
  flex-shrink: 0;
}
.hamburger-btn svg { width: 100%; height: 100%; }
.hamburger-btn line { stroke: var(--slate); stroke-width: 2; stroke-linecap: round; transition: all .25s ease; }
.hamburger-btn:hover line { stroke: var(--cyan); }

/* ── SIDEBAR BACKDROP (mobile overlay) ─────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
  opacity: 0; transition: opacity .25s ease;
}
.sidebar-backdrop.visible { opacity: 1; }

/* ── RESPONSIVE — TABLET ────────────────────────────────── */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-left { grid-template-columns: 1fr; }
  .grid-right { grid-template-columns: 1fr; }
  .plat-grid { grid-template-columns: repeat(4,1fr); }
  .sidebar { width: 60px; }
  .sb-brand-text, .sb-label, .sb-item span:not(.icon), .sb-badge { display: none; }
  .sb-item { justify-content: center; padding: 10px; }
  .sb-account { padding: 6px; }
  .sb-account-top { justify-content: center; }
  .sb-account-info, .sb-chevron, .sb-account-actions { display: none; }
  .page-content { padding: 18px 16px; }
}

/* ── RESPONSIVE — MOBILE ────────────────────────────────── */
@media (max-width: 768px) {
  .hamburger-btn { display: flex; align-items: center; justify-content: center; }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar);
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 100;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar.open ~ .main-wrap .sidebar-backdrop { display: block; }

  .sb-brand-text, .sb-label, .sb-item span:not(.icon), .sb-badge { display: revert; }
  .sb-item { justify-content: flex-start; padding: 7px 10px; }
  .sb-account { padding: 10px; }
  .sb-account-top { justify-content: flex-start; }
  .sb-account-info, .sb-chevron, .sb-account-actions { display: revert; }
  .sb-account-actions { display: flex; }

  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-left .page-title { font-size: 14px; }
  .topbar-left .page-sub { display: none; }
  .topbar-right { gap: 6px; }
  .period-tabs { display: none; }
  .live-indicator { display: none; }
  .page-content { padding: 14px 12px; }

  #platform-filter-wrap { padding: 4px 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .platform-filter-bar { flex-wrap: nowrap; gap: 4px; padding-bottom: 4px; }
  .plat-pill { white-space: nowrap; font-size: 10px; padding: 2px 8px; }
  .pf-label { display: none; }

  .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-left { grid-template-columns: 1fr; }
  .grid-right { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: 1fr 1fr; }

  .kpi-value { font-size: 22px; }
  .card-header { padding: 10px 14px; }
  .card-body { padding: 12px 14px; }
  .card-title { font-size: 12.5px; }

  .data-table { font-size: 12px; }
  .data-table th { padding: 8px 10px; font-size: 9px; }
  .data-table td { padding: 8px 10px; }

  .seg-plat-matrix { font-size: 11px; }
  .spm-seg-col { width: 140px; min-width: 120px; }

  .btn { padding: 8px 14px; font-size: 12px; }
  .modal-box { width: 95vw !important; max-height: 90vh; }
  .form-group input, .form-group select, .form-input, .form-select { font-size: 16px; }
}

/* ── RESPONSIVE — SMALL PHONE ───────────────────────────── */
@media (max-width: 400px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: 1fr; }
  .topbar-left .page-title { font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .aud-kpi-score { font-size: 18px; }
}

/* ── PRINT / PDF ─────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .page-content { padding: 0; overflow: visible; }
  body { background: white; color: black; }
  .card { border: 1px solid #ddd; break-inside: avoid; }
}


/* ── PLATFORM FILTER BAR ─────────────────────────────────────────────────── */
#platform-filter-wrap {
  padding: 6px 24px;
  background: var(--navy2);
  border-bottom: 1px solid rgba(20,20,40,0.04);
}

.platform-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.plat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid transparent;
  background: transparent;
  line-height: 1.4;
}

.plat-pill:hover { filter: brightness(1.2); }
.plat-pill-on  { opacity: 1; }
.plat-pill-off { opacity: 0.55; }
.plat-pill-off:hover { opacity: 0.8; }

/* ── MODAL TABS ──────────────────────────────────────────────────────────── */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid rgba(20,20,40,0.08);
  padding: 0 24px;
}

.modal-tab {
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--slate);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}

.modal-tab.active,
.modal-tab:hover {
  color: var(--cyan);
}

.modal-tab.active {
  border-bottom-color: var(--cyan);
}

/* ── ADMIN PREVIEW BANNER ────────────────────────────────────────────────── */
#admin-preview-banner {
  background: var(--amber);
  color: var(--navy);
  padding: 7px 24px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 50;
}

#admin-preview-banner a {
  color: var(--navy) !important;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* ── AUDIENCE ANALYSIS VIEW ─────────────────────────────────────────────── */
.aud-kpi-card {
  background: var(--panel);
  border-radius: var(--r2);
  padding: 16px;
  border: 1px solid rgba(20,20,40,0.06);
  transition: border-color .2s;
}
.aud-kpi-card:hover { border-color: rgba(108,99,255,0.2); }

.aud-kpi-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.aud-seg-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.aud-seg-label {
  flex: 1;
  font-weight: 700;
  font-size: 12px;
  color: var(--white);
  line-height: 1.3;
}
.aud-kpi-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1;
}
.aud-kpi-sub { font-size: 10px; color: var(--slate); margin-bottom: 4px; }

/* grid-5: 5-column auto-fill */
.grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* ── SEGMENT × PLATFORM MATRIX ──────────────────────────────────────────── */
.seg-plat-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.seg-plat-matrix th,
.seg-plat-matrix td {
  border: none;
  border-bottom: 1px solid rgba(20,20,40,0.04);
}

.spm-seg-col  { width: 200px; min-width: 180px; text-align: left; padding: 0 16px; }
.spm-plat-col { text-align: center; padding: 10px 8px; font-weight: 700; font-size: 11px; letter-spacing: .04em; }
.spm-avg-col  { text-align: center; padding: 10px 16px; font-size: 11px; color: var(--slate); font-weight: 700; width: 80px; }

.spm-seg-cell {
  padding: 12px 16px;
  vertical-align: middle;
  background: var(--navy2);
  border-right: 1px solid rgba(20,20,40,0.04);
}

.spm-score-cell {
  padding: 8px 6px;
  text-align: center;
  vertical-align: middle;
  transition: background .2s;
}
.spm-score-cell:hover { filter: brightness(1.3); }

.spm-score-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.spm-score-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.spm-score-bar {
  width: 40px;
  height: 3px;
  background: rgba(20,20,40,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.spm-avg-cell {
  text-align: center;
  padding: 8px 16px;
  vertical-align: middle;
  background: rgba(108,99,255,0.03);
  border-left: 1px solid rgba(108,99,255,0.08);
}

.spm-footer td {
  background: rgba(20,20,40,0.02) !important;
  border-top: 1px solid rgba(20,20,40,0.08);
  border-bottom: none;
}
.spm-footer-cell { padding: 10px 6px; }

/* ── LANDING PAGE ──────────────────────────────────────── */
.lp-page { background: #ffffff; color: #1d1d1f; }
.lp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.85); border-bottom: 1px solid rgba(20,20,40,0.07);
}
.lp-nav-inner {
  max-width: 960px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.lp-nav-logo { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; color: #1d1d1f; text-decoration: none; letter-spacing: -0.3px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.lp-nav-logo span { color: #6c63ff; }
.lp-nav-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: #111111; color: #ffffff !important;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.lp-nav-right { display: flex; align-items: center; gap: 12px; }
.lp-nav-link {
  font-size: 13px; color: rgba(20,20,40,0.62); text-decoration: none;
  padding: 6px 14px; border-radius: 6px; transition: all 0.2s; cursor: pointer;
}
.lp-nav-link:hover { color: #1d1d1f; background: rgba(20,20,40,0.04); text-decoration: none; }
.lp-nav-cta {
  font-size: 13px; font-weight: 500; color: #fff;
  padding: 7px 18px; border-radius: 7px;
  background: #6c63ff; border: none; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
}
.lp-nav-cta:hover { background: #5750e0; transform: translateY(-1px); text-decoration: none; }

.lp-hero {
  padding: 120px 24px 64px; text-align: center;
  background: radial-gradient(ellipse 600px 400px at 50% 30%, rgba(108,99,255,0.18), transparent);
}
.lp-hero-inner { max-width: 640px; margin: 0 auto; }
.lp-stat-num {
  font-size: 72px; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #6c63ff, #8a83ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lp-stat-label { font-size: 15px; color: rgba(20,20,40,0.42); margin-top: 6px; }
.lp-hero h1 { font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 16px; }
.lp-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #6c63ff, #8a83ff);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lp-hero-sub { font-size: 16px; color: rgba(20,20,40,0.62); line-height: 1.6; max-width: 520px; margin: 0 auto 28px; }
.lp-hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; color: #fff;
  padding: 12px 28px; border-radius: 10px;
  background: #6c63ff; border: none; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
  box-shadow: 0 4px 24px rgba(108,99,255,0.3);
}
.lp-hero-cta:hover { background: #5750e0; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(108,99,255,0.4); text-decoration: none; }
.lp-hero-cta svg { width: 18px; height: 18px; }
.lp-platform-strip {
  display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
  padding: 20px 24px 0; margin-top: 12px;
}
.lp-platform-strip span { font-size: 12px; letter-spacing: 0.5px; }
.lp-signin-strip { text-align: center; padding: 16px 24px 0; font-size: 13px; color: rgba(20,20,40,0.42); }
.lp-signin-strip a { color: #6c63ff; text-decoration: none; font-weight: 500; cursor: pointer; }
.lp-signin-strip a:hover { text-decoration: underline; }

.lp-showcase { padding: 56px 24px; }
.lp-showcase-inner { max-width: 880px; margin: 0 auto; }
.lp-showcase-label {
  font-size: 11px; color: #6c63ff; text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 20px; text-align: center;
}
.lp-showcase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lp-panel {
  background: #ffffff;
  border: 1px solid rgba(108,99,255,0.15);
  border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow);
}
.lp-panel-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: rgba(108,99,255,0.06);
  border-bottom: 0.5px solid rgba(108,99,255,0.12);
}
.lp-panel-dot { width: 7px; height: 7px; border-radius: 50%; }
.lp-panel-title { font-size: 11px; font-weight: 500; color: rgba(20,20,40,0.62); margin-left: 4px; }
.lp-panel-body { padding: 16px; }

.lp-scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.lp-tile {
  background: rgba(108,99,255,0.06); border-radius: 8px; padding: 10px 8px;
  text-align: center; border: 0.5px solid rgba(108,99,255,0.1);
}
.lp-tile-val { font-size: 22px; font-weight: 700; color: #6c63ff; }
.lp-tile-lbl { font-size: 9px; color: rgba(20,20,40,0.42); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.lp-chart {
  height: 48px; display: flex; align-items: flex-end; gap: 3px;
  padding: 0 3px 3px; background: rgba(108,99,255,0.04); border-radius: 6px; margin-bottom: 10px;
}
.lp-chart .bar {
  flex: 1; border-radius: 2px 2px 0 0; opacity: 0.7;
  background: linear-gradient(180deg, #6c63ff, #8a83ff);
}
.lp-platforms { display: flex; gap: 4px; flex-wrap: wrap; }
.lp-plat {
  font-size: 9px; padding: 3px 7px; border-radius: 10px;
  border: 0.5px solid rgba(20,20,40,0.08);
  display: flex; align-items: center; gap: 3px;
}
.lp-plat-dot { width: 5px; height: 5px; border-radius: 50%; }
.lp-caption { font-size: 10px; color: rgba(20,20,40,0.42); margin-top: 10px; text-align: center; }
.lp-divider { height: 0.5px; background: rgba(108,99,255,0.12); margin: 12px 0; }
.lp-table-title { font-size: 9px; color: rgba(20,20,40,0.42); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.lp-qtable { width: 100%; border-collapse: collapse; font-size: 9px; }
.lp-qtable th {
  text-align: left; padding: 4px 5px; color: rgba(20,20,40,0.42); font-weight: 500;
  border-bottom: 0.5px solid rgba(108,99,255,0.1); font-size: 8px; text-transform: uppercase; letter-spacing: 0.3px;
}
.lp-qtable td { padding: 5px 5px; border-bottom: 0.5px solid rgba(20,20,40,0.03); color: rgba(20,20,40,0.62); }
.lp-qtable tr:last-child td { border-bottom: none; }
.lp-qtable .q-cat { color: #1d1d1f; font-weight: 500; }
.lp-score-bar { display: inline-block; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.lp-score-val { font-size: 9px; font-weight: 600; vertical-align: middle; }
.lp-radar-wrap { position: relative; display: flex; justify-content: center; align-items: center; }
.lp-radar-svg { width: 100%; max-width: 220px; height: auto; }
.lp-radar-legend { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.lp-radar-legend-item { display: flex; align-items: center; gap: 4px; font-size: 8px; color: rgba(20,20,40,0.42); }
.lp-radar-legend-dot { width: 6px; height: 6px; border-radius: 50%; }

.lp-wf-rec {
  border: 0.5px solid rgba(108,99,255,0.1); border-radius: 8px;
  padding: 10px; margin-bottom: 8px; background: rgba(108,99,255,0.03);
}
.lp-wf-rec-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.lp-wf-rec-title { font-size: 11px; font-weight: 500; color: #1d1d1f; }
.lp-wf-badge {
  font-size: 8px; padding: 2px 6px; border-radius: 3px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.lp-wf-badge-critical { background: rgba(214,69,69,0.15); color: #d64545; }
.lp-wf-badge-high { background: rgba(201,138,28,0.15); color: #c98a1c; }
.lp-wf-badge-medium { background: rgba(138,131,255,0.15); color: #8a83ff; }
.lp-wf-rec-desc { font-size: 10px; color: rgba(20,20,40,0.42); line-height: 1.4; margin-bottom: 8px; }
.lp-wf-assignees { display: flex; align-items: center; gap: 4px; }
.lp-wf-avatar {
  width: 20px; height: 20px; border-radius: 50%; font-size: 8px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #ffffff;
}
.lp-wf-avatar-brand { background: rgba(108,99,255,0.25); color: #6c63ff; }
.lp-wf-avatar-content { background: rgba(47,168,79,0.2); color: #2fa84f; }
.lp-wf-avatar-tech { background: rgba(66,133,244,0.2); color: #4285F4; }
.lp-wf-avatar-ecom { background: rgba(201,138,28,0.2); color: #c98a1c; }
.lp-wf-assign-label { font-size: 9px; color: rgba(20,20,40,0.42); margin-left: 4px; }
.lp-wf-status-row {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px; padding-top: 6px; border-top: 0.5px solid rgba(20,20,40,0.04);
}
.lp-wf-status-dot { width: 6px; height: 6px; border-radius: 50%; }
.lp-wf-status-text { font-size: 9px; color: rgba(20,20,40,0.42); }
.lp-wf-progress { flex: 1; height: 3px; background: rgba(20,20,40,0.06); border-radius: 2px; overflow: hidden; }
.lp-wf-progress-fill { height: 100%; border-radius: 2px; }
.lp-wf-teams { margin-top: 12px; }
.lp-wf-teams-label { font-size: 9px; color: rgba(20,20,40,0.42); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.lp-wf-team-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 0.5px solid rgba(20,20,40,0.03);
}
.lp-wf-team-row:last-child { border-bottom: none; }
.lp-wf-team-icon {
  width: 24px; height: 24px; border-radius: 6px; font-size: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lp-wf-team-info { flex: 1; }
.lp-wf-team-name { font-size: 10px; font-weight: 500; color: #1d1d1f; }
.lp-wf-team-role { font-size: 9px; color: rgba(20,20,40,0.42); }
.lp-wf-team-count { font-size: 9px; color: rgba(20,20,40,0.42); background: rgba(20,20,40,0.04); padding: 2px 6px; border-radius: 8px; }

.lp-values { padding: 48px 24px; background: #f7f7fa; }
.lp-values-inner { max-width: 640px; margin: 0 auto; }
.lp-values-label {
  font-size: 11px; color: #6c63ff; text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 20px; text-align: center;
}
.lp-values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-value-card {
  background: #ffffff; border: 1px solid rgba(20,20,40,0.08);
  border-radius: 12px; padding: 18px; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}
.lp-value-card:hover { border-color: rgba(20,20,40,0.12); transform: translateY(-2px); }
.lp-value-icon { margin-bottom: 10px; }
.lp-value-title { font-size: 14px; font-weight: 500; color: #1d1d1f; margin-bottom: 4px; }
.lp-value-desc { font-size: 12px; color: rgba(20,20,40,0.42); line-height: 1.5; }

.lp-contact {
  padding: 64px 24px 80px;
  background: radial-gradient(ellipse 500px 300px at 50% 60%, rgba(108,99,255,0.18), transparent);
}
.lp-contact-inner { max-width: 480px; margin: 0 auto; text-align: center; }
.lp-contact-inner h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.3px; color: #1d1d1f; }
.lp-contact-sub { font-size: 14px; color: rgba(20,20,40,0.62); margin-bottom: 28px; line-height: 1.5; }
.lp-contact-form {
  background: #ffffff; border: 1px solid rgba(20,20,40,0.08);
  border-radius: 14px; padding: 24px; text-align: left;
  box-shadow: var(--shadow);
}
.lp-form-row { margin-bottom: 14px; }
.lp-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.lp-form-label { display: block; font-size: 12px; color: rgba(20,20,40,0.62); margin-bottom: 6px; font-weight: 500; }
.lp-form-input, .lp-form-textarea {
  width: 100%; padding: 10px 14px; font-size: 14px;
  background: rgba(20,20,40,0.04); border: 0.5px solid rgba(20,20,40,0.1);
  border-radius: 8px; color: #1d1d1f; font-family: inherit; transition: border-color 0.2s;
}
.lp-form-input:focus, .lp-form-textarea:focus { outline: none; border-color: #6c63ff; }
.lp-form-input::placeholder, .lp-form-textarea::placeholder { color: rgba(20,20,40,0.42); }
.lp-form-textarea { resize: vertical; min-height: 80px; }
.lp-form-submit {
  width: 100%; padding: 12px; font-size: 14px; font-weight: 500;
  background: #6c63ff; color: #fff; border: none; border-radius: 8px;
  cursor: pointer; transition: all 0.2s; margin-top: 4px;
}
.lp-form-submit:hover { background: #5750e0; }
.lp-form-note { text-align: center; margin-top: 12px; font-size: 11px; color: rgba(20,20,40,0.42); }

.lp-footer {
  border-top: 0.5px solid rgba(20,20,40,0.07); padding: 24px;
  text-align: center; font-size: 12px; color: rgba(20,20,40,0.42);
}
.lp-footer a { color: #6c63ff; text-decoration: none; }

@media (max-width: 720px) {
  .lp-showcase-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .lp-stat-num { font-size: 56px; }
  .lp-hero h1 { font-size: 26px; }
  .lp-hero-sub { font-size: 14px; }
  .lp-values-grid { grid-template-columns: 1fr; }
  .lp-form-row-2 { grid-template-columns: 1fr; }
  .lp-scores { grid-template-columns: 1fr; }
  .lp-platform-strip { gap: 12px; }
}
