/* Kepler Insights — View-specific Styles */

/* ── LOADING SCREEN ── */
.ki-loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: var(--bg);
  opacity: 0; transition: opacity 0.35s ease;
}
.ki-loading-screen.visible { display: flex; opacity: 1; }
.ki-loading-screen.fade-out { opacity: 0; }
.ki-loading-inner { text-align: center; }
.ki-loading-logo {
  height: 88px; width: auto; margin-bottom: 28px;
  animation: ki-pulse 1.8s ease-in-out infinite;
}
.dark .ki-loading-logo { filter: brightness(0) invert(1); }
@keyframes ki-pulse { 0%,100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
.ki-loading-bar {
  width: 180px; height: 3px; border-radius: 3px;
  background: var(--ink-lt); overflow: hidden; margin: 0 auto;
}
.ki-loading-bar-fill {
  height: 100%; width: 0; border-radius: 3px;
  background: var(--navy);
  animation: ki-loading-fill 1.6s ease-in-out infinite;
}
@keyframes ki-loading-fill { 0% { width: 0; margin-left: 0; } 50% { width: 60%; margin-left: 20%; } 100% { width: 0; margin-left: 100%; } }

/* ── TAB LOADING SKELETON ── */
.ki-tab-loading { padding: 24px 0; animation: ki-fade-in 0.3s ease; }
.ki-skel-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--bg); }
.ki-skel-circle { width: 38px; height: 38px; border-radius: 99px; background: var(--bg); flex-shrink: 0; }
.ki-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ki-skel-line { height: 10px; border-radius: 4px; background: var(--bg); }
.ki-skel-line.w60 { width: 60%; } .ki-skel-line.w40 { width: 40%; } .ki-skel-line.w80 { width: 80%; }
.ki-skel-row, .ki-skel-circle, .ki-skel-line { animation: ki-shimmer 1.4s ease-in-out infinite; }
@keyframes ki-shimmer { 0%,100% { opacity: 0.4; } 50% { opacity: 0.9; } }
@keyframes ki-fade-in { from { opacity: 0; } to { opacity: 1; } }
.ki-tab-loading-bar { width: 160px; height: 3px; border-radius: 3px; background: var(--ink-lt); overflow: hidden; margin: 8px auto 0; }
.ki-tab-loading-bar-fill { height: 100%; border-radius: 3px; background: var(--navy); animation: ki-loading-fill 1.6s ease-in-out infinite; }

/* ── GATE VIEW ── */
.gate-logo { display: flex; justify-content: center; margin-bottom: 32px; }
.gate-logo img { height: 80px; width: auto; }
.gate-title { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.5px; margin-bottom: 10px; }
.gate-sub { font-size: 15px; color: var(--ink-mid); line-height: 1.65; margin-bottom: 32px; }
.gate-note { font-size: 12px; color: var(--ink-lt); margin-top: 16px; }
.gate-error { font-size: 13px; color: var(--red); min-height: 18px; margin: 8px 0 4px; }
.gate-remember { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-mid); cursor: pointer; margin: 8px 0 2px; }
.gate-remember input { accent-color: var(--blue); cursor: pointer; }
.gate-links { display: flex; gap: 20px; justify-content: center; margin-top: 16px; }
.gate-link {
  font-size: 13px; color: var(--blue); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.gate-link:hover { color: var(--navy); }
.gate-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── LAUNCH VIEW ── */
.launch-header { margin-bottom: 32px; }
.launch-eyebrow {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--blue); letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 10px; display: block;
}
.launch-title { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.5px; margin-bottom: 8px; }
.launch-sub { font-size: 15px; color: var(--ink-mid); line-height: 1.65; }
.form-group { margin-bottom: 22px; }
.form-group:last-of-type { margin-bottom: 0; }
.form-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--ink-mid);
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ── COMPANY LOCKED NOTICE ── */
.company-locked-notice {
  background: var(--amber-lt); border: 1px solid var(--amber-border);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 20px;
}
.locked-title { font-size: 14px; font-weight: 600; color: var(--amber); margin-bottom: 4px; }
.locked-sub { font-size: 13px; color: var(--ink-mid); line-height: 1.5; }
.locked-sub a { color: var(--blue); text-decoration: none; }
.locked-sub a:hover { text-decoration: underline; }

/* ── LOADING VIEW ── */
.loading-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 0; }
.loading-title { font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.3px; margin-bottom: 8px; }
.loading-sub { font-size: 15px; color: var(--ink-mid); margin-bottom: 36px; line-height: 1.6; }

/* Telescope tile */
.loading-tile {
  width: 100%; max-width: 420px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 24px 28px;
  box-shadow: 0 4px 32px var(--shadow-color);
  overflow: hidden;
}
body.dark .loading-tile {
  background: var(--surface);
  border-color: var(--glass-border);
  box-shadow: 0 4px 48px var(--shadow-color);
}

.lt-scene {
  position: relative; width: 100%; height: 220px;
  display: flex; align-items: center; justify-content: center;
}

/* Easter egg: fullscreen galaxy overlay */
.easter-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #060B1A;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.easter-overlay.visible { opacity: 1; pointer-events: all; }
.easter-overlay .easter-galaxy {
  position: absolute; width: 60vmin; height: 60vmin;
  color: #818cf8;
  animation: galaxySpin 40s linear infinite;
}
.easter-overlay .easter-stars {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: #c4b5fd; opacity: 0.8;
}
.easter-overlay .easter-sat {
  position: relative; z-index: 1;
  width: 200px; height: 140px;
  color: #e2e8f0;
  animation: satelliteFloat 5s ease-in-out infinite;
  filter: drop-shadow(0 4px 16px rgba(124,58,237,0.25));
}
.lt-easter-bubble {
  position: fixed; bottom: 16%; right: 10%;
  font-family: var(--font); font-size: 15px; font-style: italic;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px; padding: 16px 22px;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none; z-index: 10000;
  max-width: 300px; line-height: 1.6;
}
.lt-easter-bubble.visible {
  opacity: 1; transform: translateY(0);
}
.lt-stars {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: var(--navy); opacity: 0.6;
}
body.dark .lt-stars { color: #c4b5fd; opacity: 0.8; }

.lt-galaxy {
  position: absolute; width: 180px; height: 180px;
  color: var(--blue);
  animation: galaxySpin 40s linear infinite;
}
body.dark .lt-galaxy { color: #818cf8; }
@keyframes galaxySpin { to { transform: rotate(360deg); } }

.lt-telescope {
  position: relative; z-index: 1;
  width: 140px; height: 100px;
  color: var(--blue);
  animation: satelliteFloat 5s ease-in-out infinite;
}
body.dark .lt-telescope {
  color: #e2e8f0;
  filter: drop-shadow(0 4px 16px rgba(124,58,237,0.25));
}
@keyframes satelliteFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

/* Status bar */
.lt-status {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 24px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--ink-mid); letter-spacing: 0.04em;
}
.lt-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue);
  animation: dotPulse 1.6s ease-in-out infinite;
}
body.dark .lt-dot { background: #818cf8; }
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}
.lt-label { transition: opacity 0.2s ease; }

/* ── SCORECARD VIEW ── */
.scorecard-view { max-width: 680px; }
.sc-right-col { display: none; } /* hidden on mobile; shown via desktop query */
.sc-page { width: 100%; display: flex; flex-direction: column; }
.sc-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 28px;
}
.sc-logo-wrap { margin-bottom: 18px; }
.sc-logo-wrap img { height: 44px; width: auto; display: block; }
.sc-logo-sub { font-size: 10px; font-weight: 500; color: var(--ink-lt); letter-spacing: 0.18em; text-transform: uppercase; margin-top: 1px; }
.sc-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.sc-certified { font-size: 10px; color: var(--ink-lt); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.chip-wrap { position: relative; display: inline-block; }
.rating-chip {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--white); background: var(--navy);
  padding: 4px 14px; border-radius: 4px; letter-spacing: 0.1em; cursor: default; user-select: none;
  white-space: nowrap;
}
.rating-tooltip {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 280px; background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 36px var(--shadow-color);
  padding: 14px; z-index: 100;
  opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.chip-wrap:hover .rating-tooltip { opacity: 1; pointer-events: all; transform: translateY(0); }
.tooltip-title { font-size: 10px; font-weight: 600; color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 10px; }
.tooltip-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; margin-bottom: 3px; transition: background 0.1s; }
.tooltip-row:last-child { margin-bottom: 0; }
.tooltip-row.active { background: var(--blue-lt); }
.tooltip-code { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--navy); width: 52px; flex-shrink: 0; }
.tooltip-label { font-size: 12px; font-weight: 500; color: var(--ink-mid); flex: 1; }
.tooltip-range { font-size: 11px; color: var(--ink-lt); font-family: var(--mono); }
.tooltip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.main-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 18px;
  padding: 36px 36px 28px; margin-bottom: 14px;
  box-shadow: 0 4px 16px var(--shadow-accent), 0 16px 56px var(--shadow-color);
  animation: fadeUp 0.5s ease forwards;
}
.company-row { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.company-name { font-size: 32px; font-weight: 600; color: var(--ink); letter-spacing: -0.5px; line-height: 1.1; }
.company-meta { font-size: 12px; color: var(--ink-lt); margin-top: 6px; font-weight: 400; letter-spacing: 0.04em; }
.score-pill {
  display: flex; flex-direction: column; align-items: center;
  background: var(--green-lt); border: 1px solid var(--green-border);
  border-radius: 16px; padding: 20px 28px 14px; min-width: 120px; flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(21,128,61,0.12);
}
.score-pill.amber { background: var(--amber-lt); border-color: var(--amber-border); box-shadow: 0 4px 20px rgba(180,83,9,0.10); }
.score-pill.red-t { background: var(--red-lt); border-color: var(--red-border); box-shadow: 0 4px 20px rgba(185,28,28,0.10); }
.score-number { font-size: 52px; font-weight: 700; color: var(--green); line-height: 1; letter-spacing: -1.5px; }
.score-pill.amber .score-number { color: var(--amber); }
.score-pill.red-t .score-number { color: var(--red); }
.score-denom { font-size: 10px; color: var(--ink-lt); font-weight: 400; letter-spacing: 0.06em; margin-top: 3px; }
.score-grade { font-size: 10px; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: 0.14em; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--green-border); width: 100%; text-align: center; }
.score-pill.amber .score-grade { color: var(--amber); border-top-color: var(--amber-border); }
.score-pill.red-t .score-grade { color: var(--red); border-top-color: var(--red-border); }
.divider { height: 1px; background: var(--border); margin: 0 0 24px; }
.section-label { font-size: 11px; font-weight: 700; color: var(--ink-mid); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 18px; }
.bucket-row { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; padding: 6px 0; }
.bucket-row:last-child { margin-bottom: 0; }
.bucket-name { font-size: 13px; font-weight: 500; color: var(--ink-mid); width: 176px; flex-shrink: 0; letter-spacing: 0.01em; }
.bucket-track { flex: 1; height: 8px; background: var(--track); border-radius: 99px; overflow: hidden; }
.bucket-fill { height: 100%; border-radius: 99px; background: var(--navy); width: 0%; transition: width 1s cubic-bezier(0.16, 1, 0.3, 1); }
.bucket-score { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); width: 34px; text-align: right; flex-shrink: 0; }
.bucket-wt { font-size: 11px; color: var(--ink-lt); width: 28px; text-align: right; flex-shrink: 0; }

/* Hover tooltip */
.bucket-row[data-tooltip] { position: relative; }
.bucket-row[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute; top: calc(100% + 4px); left: 8px; z-index: 10;
  background: var(--tooltip-bg); color: var(--tooltip-text);
  font-size: 11px; line-height: 1.4; max-width: 300px;
  padding: 6px 10px; border-radius: 6px;
  pointer-events: none; white-space: normal;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

/* Financial Health warning triangle */
.fh-warn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; cursor: pointer; margin-left: 3px;
  color: #B45309; position: relative; vertical-align: middle;
}
.fh-warn-popup {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%); z-index: 20;
  background: var(--tooltip-bg); color: var(--tooltip-text);
  font-size: 11px; line-height: 1.45; width: 240px;
  padding: 8px 12px; border-radius: 6px; white-space: normal;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  pointer-events: none; opacity: 0; transition: opacity 0.15s ease;
}
.fh-warn-popup.visible { opacity: 1; pointer-events: auto; }
.fh-warn-popup::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--tooltip-bg);
}

/* Inline expand panel */
.bucket-expand { overflow: hidden; max-height: 0; transition: max-height 0.35s ease; margin: 0 -8px 0; }
.bucket-expand.open { max-height: 2400px; margin-bottom: 8px; }
.bucket-expand .be-sub {
  font-size: 12px; color: var(--ink-mid); padding: 10px 16px 0;
  font-style: italic;
}
.bucket-expand .be-categories { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.be-category {}
.be-cat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.be-cat-name { font-size: 12px; font-weight: 600; color: var(--ink); }
.be-cat-status { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 99px; }
.be-cat-status.elite          { background: #DCFCE7; color: #15803D; }
.be-cat-status.exceptional    { background: #CCFBF1; color: #0F766E; }
.be-cat-status.strong         { background: #DBEAFE; color: #1B3A6B; }
.be-cat-status.solid          { background: #EFF6FF; color: #2E6DB4; }
.be-cat-status.promising      { background: #E0F2FE; color: #0369A1; }
.be-cat-status.emerging       { background: #FEF3C7; color: #B45309; }
.be-cat-status.developing     { background: #FFF7ED; color: #92400E; }
.be-cat-status.early-stage    { background: #FEE2E2; color: #B91C1C; }
.be-cat-status.pre-traction   { background: #FECACA; color: #7F1D1D; }
.be-cat-status.moderate       { background: #FEF3C7; color: #B45309; }
.be-cat-status.needs-attention{ background: #FEE2E2; color: #B91C1C; }

/* Dark mode: status badges need inverted palette for legibility */
body.dark .be-cat-status.elite          { background: rgba(74,222,128,0.15); color: #4ade80; }
body.dark .be-cat-status.exceptional    { background: rgba(45,212,191,0.15); color: #2dd4bf; }
body.dark .be-cat-status.strong         { background: rgba(129,140,248,0.15); color: #a5b4fc; }
body.dark .be-cat-status.solid          { background: rgba(96,165,250,0.15); color: #93c5fd; }
body.dark .be-cat-status.promising      { background: rgba(56,189,248,0.15); color: #38bdf8; }
body.dark .be-cat-status.emerging       { background: rgba(251,191,36,0.15); color: #fbbf24; }
body.dark .be-cat-status.developing     { background: rgba(251,146,60,0.15); color: #fb923c; }
body.dark .be-cat-status.early-stage    { background: rgba(248,113,113,0.15); color: #f87171; }
body.dark .be-cat-status.pre-traction   { background: rgba(248,113,113,0.12); color: #fca5a5; }
body.dark .be-cat-status.moderate       { background: rgba(251,191,36,0.15); color: #fbbf24; }
body.dark .be-cat-status.needs-attention{ background: rgba(248,113,113,0.15); color: #f87171; }

.be-cat-bar { height: 3px; background: var(--track); border-radius: 99px; overflow: hidden; margin-bottom: 5px; }
.be-cat-fill { height: 100%; border-radius: 99px; background: var(--navy); width: 0%; }
.be-cat-insight { font-size: 11.5px; color: var(--ink-lt); line-height: 1.5; }

.be-signals-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-lt); padding: 14px 16px 4px; }
.be-signals { padding: 0 16px; display: flex; flex-direction: column; gap: 7px; }
.be-signal-row { display: flex; align-items: center; gap: 10px; }
.be-signal-name { font-size: 12px; color: var(--ink-mid); width: 160px; flex-shrink: 0; }
.be-signal-track { flex: 1; height: 4px; background: var(--track); border-radius: 99px; overflow: hidden; }
.be-signal-fill { height: 100%; border-radius: 99px; background: var(--navy); }
.be-signal-fill.elite       { background: #15803D; }
.be-signal-fill.exceptional { background: #0F766E; }
.be-signal-fill.strong      { background: #1B3A6B; }
.be-signal-fill.solid       { background: #2E6DB4; }
.be-signal-fill.promising   { background: #0369A1; }
.be-signal-fill.emerging    { background: #B45309; }
.be-signal-fill.developing  { background: #92400E; }
.be-signal-fill.early-stage { background: #B91C1C; }
.be-signal-fill.pre-traction{ background: #7F1D1D; }
.be-signal-fill.moderate  { background: var(--amber); }
.be-signal-fill.low       { background: #E11D48; }
.be-signal-score { font-family: var(--mono); font-size: 11px; color: var(--ink); width: 28px; text-align: right; flex-shrink: 0; }

.be-improvement {
  font-size: 11.5px; color: var(--ink-mid); line-height: 1.5;
  background: var(--bg); border-radius: 6px; padding: 10px 14px; margin: 12px 16px 14px;
}
.be-improvement-label { font-weight: 700; color: var(--navy); display: inline; margin-right: 4px; }

.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.context-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--blue); background: var(--blue-lt); border: 1px solid var(--tag-border); padding: 4px 12px; border-radius: 99px; letter-spacing: 0.04em; }
.context-tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.gen-date { font-size: 11px; color: var(--ink-lt); }
.method-strip { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.03); margin-bottom: 14px; }
.method-text { font-size: 11.5px; color: var(--ink-lt); line-height: 1.65; }
.method-text strong { color: var(--ink-mid); font-weight: 600; }
/* ── SCORECARD PAGE HEADER (spans full width above both tiles) ── */
.sc-page-header {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
  margin-bottom: 16px;
}

/* ── EMBED ACTION ROW ── */
.sc-action-row { display: flex; align-items: center; gap: 8px; }

.sc-embed-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: var(--navy); background: var(--white);
  border: 1.5px solid var(--border); border-radius: 8px;
  padding: 7px 14px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  letter-spacing: 0.02em; white-space: nowrap;
}
.sc-embed-btn:hover { border-color: var(--blue); background: var(--blue-lt); }
.sc-embed-btn svg { flex-shrink: 0; }

.portal-embed-copied {
  font-size: 12px; color: var(--green); font-weight: 600;
  opacity: 0; transition: opacity 0.2s; white-space: nowrap;
  width: 0; overflow: hidden;
}
.portal-embed-copied.show { opacity: 1; }

.sc-help-btn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 12px; font-weight: 700; color: var(--ink-lt);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0; transition: border-color 0.15s;
}
.sc-help-btn:hover { border-color: var(--blue); color: var(--blue); }
.sc-help-tooltip {
  position: absolute; bottom: calc(100% + 8px); right: -4px;
  background: var(--tooltip-bg); color: var(--tooltip-text); font-size: 12px; font-weight: 400;
  line-height: 1.5; padding: 10px 14px; border-radius: 8px;
  width: 230px; pointer-events: none; opacity: 0; transition: opacity 0.15s;
  white-space: normal; z-index: 999; text-align: left;
}
.sc-help-tooltip::after {
  content: ''; position: absolute; top: 100%; right: 6px;
  border: 5px solid transparent; border-top-color: var(--tooltip-bg);
}
.sc-help-btn:hover .sc-help-tooltip,
.sc-help-btn:focus .sc-help-tooltip { opacity: 1; }

/* Mobile: reposition tooltip below the button so it isn't clipped */
@media (max-width: 600px) {
  .sc-help-tooltip {
    position: absolute; bottom: auto; top: calc(100% + 8px); right: 0;
    width: 200px;
  }
  .sc-help-tooltip::after {
    top: auto; bottom: 100%;
    border-top-color: transparent; border-bottom-color: var(--tooltip-bg);
  }
}

.portal-embed-code-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 16px; margin-bottom: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-mid);
  word-break: break-all; line-height: 1.6; cursor: pointer;
  display: none;
}
.portal-embed-code-wrap.open { display: block; }
.portal-embed-code-wrap:hover { border-color: var(--blue); }

/* ── 3-DOT OPTIONS MENU ── */
.sc-options-wrap { position: relative; }
.sc-options-btn {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 6px 10px;
  font-size: 18px; line-height: 1; color: var(--ink-lt);
  cursor: pointer; transition: all 0.15s ease;
}
.sc-options-btn:hover { border-color: var(--navy); color: var(--navy); background: var(--blue-lt); }
.sc-options-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; min-width: 180px;
  box-shadow: 0 8px 24px var(--shadow-color);
  z-index: 200; overflow: hidden;
}
.sc-options-item {
  display: block; width: 100%; text-align: left;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  color: var(--ink-mid); background: none; border: none;
  padding: 11px 16px; cursor: pointer; transition: background 0.12s;
}
.sc-options-item:hover { background: var(--blue-lt); color: var(--navy); }
.sc-options-item + .sc-options-item { border-top: 1px solid var(--border); }

/* ── INTELLIGENCE PANEL CHECKLIST ── */
.sc-chips-row { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cc-checklist-progress {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--blue); background: var(--blue-lt);
  padding: 2px 8px; border-radius: 99px;
}
.checklist-progress-bar {
  width: 100%; height: 4px; background: var(--border);
  border-radius: 99px; overflow: hidden; margin-bottom: 14px;
}
.checklist-progress-fill {
  height: 100%; background: var(--green);
  border-radius: 99px; transition: width 0.4s ease;
}
.checklist-preview { display: flex; flex-direction: column; gap: 8px; }
.checklist-preview-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink-mid);
}
.checklist-preview-item.checked { text-decoration: line-through; opacity: 0.5; }
.checklist-preview-check { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.checklist-preview-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checklist-open-btn {
  width: 100%; font-family: var(--font); font-size: 13px; font-weight: 600;
  color: var(--blue); background: var(--blue-lt);
  border: 1px solid transparent; border-radius: 10px;
  padding: 10px; cursor: pointer; transition: all 0.15s ease;
  text-align: center;
}
.checklist-open-btn:hover { background: var(--navy); color: var(--white); }

/* Checklist overlay items */
.checklist-overlay-summary {
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border);
}
.checklist-overlay-count {
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.checklist-items { display: flex; flex-direction: column; gap: 2px; }
.checklist-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 12px; border-radius: 10px; cursor: pointer;
  transition: background 0.12s ease;
}
.checklist-item:hover { background: var(--bg); }
.checklist-item.checked { opacity: 0.45; }
.checklist-item.checked .checklist-item-label { text-decoration: line-through; }
.checklist-check {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--green); transition: all 0.12s ease; margin-top: 1px;
}
.checklist-item.checked .checklist-check {
  background: var(--green-lt); border-color: var(--green);
}
.checklist-item-content { flex: 1; min-width: 0; }
.checklist-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.checklist-item-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.checklist-score-badge {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  padding: 1px 7px; border-radius: 4px; flex-shrink: 0;
}
.checklist-score-badge--red   { color: var(--red);   background: var(--red-lt); }
.checklist-score-badge--amber { color: var(--amber); background: var(--amber-lt); }
.checklist-score-badge--green { color: var(--green); background: var(--green-lt); }
.checklist-guidance {
  font-size: 13px; color: var(--ink-lt); line-height: 1.55;
}

/* Connected signals in checklist */
.checklist-connected { margin-top: 8px; }
.checklist-connected-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--ink-lt); margin-bottom: 6px; display: block;
}
.checklist-signal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.checklist-signal-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--ink-mid);
  background: var(--bg); border-radius: 6px; padding: 3px 8px;
}
.checklist-signal-name { white-space: nowrap; }

/* Dark mode checklist */
body.dark .checklist-open-btn { background: rgba(99,102,241,0.14); color: var(--blue); border-color: transparent; }
body.dark .checklist-open-btn:hover { background: var(--navy); color: var(--white); }
body.dark .checklist-item:hover { background: rgba(255,255,255,0.04); }
body.dark .checklist-check { border-color: var(--border); }
body.dark .checklist-item.checked .checklist-check { background: rgba(74,222,128,0.12); border-color: var(--green); }

/* ── TAB SYSTEM (reusable) ── */
.ki-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.ki-tab {
  padding: 10px 18px; font-size: 12px; font-weight: 600; color: var(--ink-lt);
  cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s ease;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
.ki-tab:hover { color: var(--ink); }
.ki-tab.active { border-bottom-color: var(--navy); color: var(--navy); }
.ki-tab-body { display: none; }
.ki-tab-body.active { display: block; }
body.dark .ki-tab { color: rgba(255,255,255,0.45); }
body.dark .ki-tab:hover { color: rgba(255,255,255,0.8); }
body.dark .ki-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ── SIGNAL GUIDANCE CARDS (v2 — tier-aware) ── */
.be-signal-row.has-guidance { cursor: pointer; border-radius: 6px; padding: 4px 6px; margin: 0 -6px; transition: background 0.15s ease; }
.be-signal-row.has-guidance:hover { background: var(--bg); }
.be-signal-expand-icon { font-size: 13px; color: var(--ink-lt); flex-shrink: 0; transition: transform 0.2s ease; }

.be-guidance-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 0; margin: 6px 0 8px; display: flex; flex-direction: column; gap: 0;
  overflow: hidden;
}

/* Tier-colored verdict banner */
.guidance-verdict {
  padding: 10px 14px; font-weight: 600; font-size: 13px; line-height: 1.4;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.guidance-verdict--high { background: var(--green-lt); color: var(--green); }
.guidance-verdict--mid  { background: var(--amber-lt); color: var(--amber); }
.guidance-verdict--low  { background: var(--red-lt);   color: var(--red); }
body.dark .guidance-verdict--high { background: rgba(74,222,128,0.08); }
body.dark .guidance-verdict--mid  { background: rgba(251,191,36,0.08); }
body.dark .guidance-verdict--low  { background: rgba(248,113,113,0.08); }

.be-guidance-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }

.be-guidance-section {}
.be-guidance-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--navy); margin-bottom: 4px;
}
.be-guidance-text { font-size: 13px; color: var(--ink-mid); line-height: 1.6; }

/* Action callout (highlighted) */
.guidance-action {
  padding: 10px 14px; background: var(--blue-lt); border-radius: 8px;
  font-size: 13px; color: var(--ink-mid); line-height: 1.55;
}
.guidance-action-label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--navy); margin-bottom: 4px;
}
body.dark .guidance-action { background: rgba(99,102,241,0.08); }

/* Signal analysis full cards (tabbed view) */
.signal-card {
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px;
  overflow: hidden; transition: border-color 0.15s ease;
}
.signal-card:hover { border-color: var(--navy); }
.signal-card-header {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.signal-card-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.signal-card-score {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  min-width: 32px; text-align: right;
}
.signal-card-score.high { color: var(--green); }
.signal-card-score.mid  { color: var(--amber); }
.signal-card-score.low  { color: var(--red); }
.signal-card-bar { height: 3px; background: var(--bg); }
.signal-card-bar-fill { height: 100%; transition: width 0.5s ease; border-radius: 2px; }
.signal-card-bar-fill.high { background: var(--green); }
.signal-card-bar-fill.mid  { background: var(--amber); }
.signal-card-bar-fill.low  { background: var(--red); }
.signal-card-body { padding: 12px 14px; }
body.dark .signal-card { border-color: rgba(255,255,255,0.08); }
body.dark .signal-card:hover { border-color: var(--blue); }

/* ── Executive Summary ── */
.ki-exec-summary {
  margin: 12px 0; padding: 14px 16px;
  background: linear-gradient(135deg, rgba(27,58,107,0.03), rgba(46,109,180,0.05));
  border-left: 3px solid var(--navy); border-radius: 0 8px 8px 0;
}
.ki-exec-summary-label {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy);
  margin-bottom: 6px;
}
.ki-exec-summary-text {
  font-size: 13px; line-height: 1.6; color: var(--ink-mid);
}
body.dark .ki-exec-summary {
  background: linear-gradient(135deg, rgba(46,109,180,0.08), var(--shadow-color));
  border-left-color: var(--blue);
}
body.dark .ki-exec-summary-label { color: var(--blue); }
body.dark .ki-exec-summary-text { color: var(--ink-mid); }

/* ── AI Personalized Badge ── */
.ki-personalized-badge {
  display: inline-block; font-size: 9px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy); background: var(--shadow-accent);
  padding: 2px 7px; border-radius: 4px; margin-left: 8px;
  vertical-align: middle;
}
body.dark .ki-personalized-badge {
  color: var(--blue); background: rgba(46,109,180,0.15);
}

/* Data quality indicator */
.data-estimated {
  display: inline-block; font-size: 10px; color: var(--ink-lt); font-style: italic;
  padding: 2px 6px; background: var(--bg); border-radius: 4px; margin-left: 6px;
}

/* ── CORNER BRACKET BUMPER SYSTEM ── */
.ki-bumper {
  position: relative; padding: 20px; margin-bottom: 12px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.85) 40%, rgba(255,255,255,0) 100%);
}
body.dark .ki-bumper {
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.45) 40%, rgba(0,0,0,0) 100%);
}
.ki-bumper::before, .ki-bumper::after,
.ki-bumper .ki-bumper-bt::before, .ki-bumper .ki-bumper-bt::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  border-color: #000000; border-style: solid; pointer-events: none;
}
.ki-bumper::before      { top: 0; left: 0;  border-width: 2.5px 0 0 2.5px; }
.ki-bumper::after       { top: 0; right: 0; border-width: 2.5px 2.5px 0 0; }
.ki-bumper .ki-bumper-bt { position: absolute; inset: 0; pointer-events: none; }
.ki-bumper .ki-bumper-bt::before { bottom: 0; left: 0; top: auto; border-width: 0 0 2.5px 2.5px; }
.ki-bumper .ki-bumper-bt::after  { bottom: 0; right: 0; top: auto; border-width: 0 2.5px 2.5px 0; }
body.dark .ki-bumper::before, body.dark .ki-bumper::after,
body.dark .ki-bumper .ki-bumper-bt::before, body.dark .ki-bumper .ki-bumper-bt::after {
  border-color: #ffffff;
}
.ki-bumper-label {
  font-family: var(--mono); font-size: 14px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink);
  margin-bottom: 10px; display: block;
}
/* List items inside bumper boxes get faint dividers */
.ki-bumper [style*="border-bottom:1px solid var(--bg)"],
.ki-bumper [style*="border-bottom: 1px solid var(--bg)"] {
  border-bottom-color: rgba(0,0,0,0.08) !important;
}
body.dark .ki-bumper [style*="border-bottom:1px solid var(--bg)"],
body.dark .ki-bumper [style*="border-bottom: 1px solid var(--bg)"] {
  border-bottom-color: rgba(255,255,255,0.1) !important;
}

/* ── COMMAND CENTER LAYOUT: EDGE-PINNED SIDEBAR + FULL VIEWPORT ── */
.center-view {
  max-width: none !important; width: 100vw !important; padding: 0 !important;
  margin-left: calc(-50vw + 50%) !important; background: var(--bg);
  animation: none !important; opacity: 1 !important; transform: none !important;
}
.center-header { display: none; margin: 0; padding: 0; height: 0; overflow: hidden; }
/* Empty state: vertically + horizontally center in full viewport */
#cc-empty {
  display: flex; align-items: center; justify-content: center;
  position: fixed; top: 0; bottom: 80px; left: 0; right: 0;
  pointer-events: none; z-index: 1;
}
#cc-empty > * { pointer-events: auto; }
/* Free tier: scorecard card + upgrade strip. The paid tier needs center-view to be
   full-viewport (edge-pinned sidebar), but the free tier should align with the top
   nav bar — so `.cc-free-mode` unwinds the -50vw hack, letting #cc-free center within
   the normal page-wrap container. */
.center-view.cc-free-mode {
  width: auto !important;
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#cc-free {
  max-width: 1040px; margin: 0 auto;
  padding: 120px 40px 60px; box-sizing: border-box;
}
@media (max-width: 1024px) {
  #cc-free { padding: 24px 20px 40px; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#cc-empty .empty-state { animation: fadeIn 0.5s ease forwards; opacity: 0; }
/* Sidebar logo dark mode */
body.dark #cc-sidebar-logo img { filter: brightness(0) invert(1); }
.cc-layout { display: flex; gap: 0; height: calc(100vh - 120px); overflow: hidden; }
.cc-sidebar {
  width: 180px; flex-shrink: 0; border-right: 2px solid var(--border);
  padding: 20px 0 12px; display: flex; flex-direction: column; gap: 2px;
}
.cc-sidebar-btn {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--ink);
  background: none; border: none; cursor: pointer; text-align: left; width: 100%;
  border-left: 3px solid transparent; transition: all 0.12s ease;
}
.cc-sidebar-btn:hover { background: rgba(0,0,0,0.03); }
.cc-sidebar-btn.active { color: var(--navy); border-left-color: var(--navy); background: var(--blue-lt); }
.cc-sidebar-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.cc-content { flex: 1; padding: 16px 24px; min-width: 0; font-size: 15px; line-height: 1.5; overflow-y: auto; }
body.dark .cc-sidebar { border-right-color: var(--border); }
body.dark .cc-sidebar-btn:hover { background: rgba(255,255,255,0.04); }
body.dark .cc-sidebar-btn.active { background: rgba(99,102,241,0.1); }

/* Tab panels with fade transition */
.cc-tab-panel { display: none; }
.cc-tab-panel.active { display: block; animation: ccFadeIn 0.2s ease; }
@keyframes ccFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Smooth transitions for interactive elements */
.cc-sidebar-btn { transition: all 0.15s ease; }
.ki-bumper { transition: background 0.2s ease; }
.cc-bucket-btn { transition: all 0.15s ease; }
.nav-btn, .nav-dd-btn { transition: all 0.15s ease; }

/* View transitions */
.view.active { animation: ccFadeIn 0.25s ease; }

/* Breakdown bucket content fade */
.cc-breakdown-bucket { animation: ccFadeIn 0.2s ease; }

/* Expanded signal detail fade */
.guidance-verdict { animation: ccFadeIn 0.15s ease; }

/* ── WIDGET SYSTEM (Home tab) — 3-col grid, compact ── */
.cc-widget-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cc-widget { min-height: 0; }
.cc-home-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cc-home-header-title { font-size: 18px; font-weight: 800; color: var(--ink); }
.cc-home-settings-btn {
  background: none; border: 2px solid var(--border); border-radius: 6px;
  padding: 5px 10px; font-family: var(--font); font-size: 13px; font-weight: 700;
  color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 5px;
}
.cc-home-settings-btn:hover { border-color: var(--navy); color: var(--navy); }

/* Settings overlay — fixed top-right */
.cc-widget-settings-overlay {
  position: fixed; top: 80px; right: 24px; z-index: 900;
  background: var(--white); border: 2px solid #000; border-radius: 12px;
  padding: 18px 22px; width: 280px; box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
body.dark .cc-widget-settings-overlay { border-color: #fff; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.cc-widget-settings-title {
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center;
}
.cc-widget-settings-close {
  background: none; border: none; font-size: 18px; cursor: pointer; color: var(--ink);
  padding: 0 2px; line-height: 1;
}
.cc-widget-toggles { display: flex; flex-direction: column; gap: 10px; }
.cc-widget-toggle {
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink);
  cursor: pointer; user-select: none;
}
.cc-widget-toggle input[type="checkbox"] { accent-color: var(--navy); width: 16px; height: 16px; cursor: pointer; }

/* ── EMPTY STATE — welcome prompt ── */
.cc-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 32px; margin-top: 12px;
}
.cc-empty-state-title {
  font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 8px;
}
.cc-empty-state-sub {
  font-size: 13px; color: var(--ink-lt); max-width: 400px; line-height: 1.5; margin-bottom: 20px;
}
.cc-empty-state .cc-home-settings-btn { margin: 0 auto; }

/* ── PINNED COMPETITOR WIDGET ── */
.cc-pinned-rival-main {
  display: flex; align-items: center; gap: 12px; margin-top: 8px;
}
.cc-pinned-rival-score {
  font-family: var(--mono); font-size: 32px; font-weight: 700;
}
.cc-pinned-rival-info { flex: 1; }
.cc-pinned-rival-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.cc-pinned-rival-rating { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.cc-pinned-vs {
  font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 3px 8px;
  border-radius: 6px; white-space: nowrap;
}
.cc-pinned-vs.rival-vs--leading { background: #D1FAE5; color: #065F46; }
.cc-pinned-vs.rival-vs--trailing { background: #FEE2E2; color: #B91C1C; }
.cc-pinned-vs.rival-vs--tied { background: var(--bg); color: var(--ink-lt); }
.cc-unpin-rival-btn {
  background: none; border: none; font-size: 14px; cursor: pointer; color: var(--ink-lt);
  padding: 0 2px; line-height: 1; margin-left: 8px;
}
.cc-unpin-rival-btn:hover { color: var(--red, #B91C1C); }

/* ── PIN BUTTON on rival cards ── */
.rival-pin-btn {
  background: none; border: none; cursor: pointer; color: var(--ink-lt);
  padding: 4px; border-radius: 4px; display: flex; align-items: center;
}
.rival-pin-btn:hover { color: var(--navy); }
.rival-pin-btn--active { color: var(--navy); }

/* ── DELTA TAB — side-by-side, aligned ── */
.cc-delta-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: stretch; }
.cc-delta-row .ki-bumper { padding: 20px; margin-bottom: 6px; display: flex; flex-direction: column; }
.cc-delta-row .history-chart-wrap { height: 280px; padding: 12px; }
.cc-delta-row .history-section-header { margin-bottom: 6px; }
.cc-delta-row .section-label { font-size: 12px; }
.cc-delta-row .delta-cards-grid { gap: 8px; margin-top: 10px; }
.cc-delta-row .delta-card { padding: 10px 12px; }

/* ── PROFILE TAB — multi-column, boxes aligned ── */
.cc-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }

/* ── BREAKDOWN TAB — bucket selector + 2-col signals ── */
.cc-bucket-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.cc-bucket-btn {
  padding: 16px 12px; font-family: var(--font); font-size: 13px; font-weight: 700;
  color: var(--ink); background: var(--white); border: 2px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all 0.15s ease;
  text-align: center; line-height: 1.3;
}
.cc-bucket-btn:hover { border-color: var(--navy); transform: translateY(-1px); box-shadow: 0 4px 12px var(--shadow-accent); }
.cc-bucket-btn.active { border-color: var(--navy); color: var(--white); background: var(--navy); box-shadow: 0 4px 16px var(--shadow-color); }
body.dark .cc-bucket-btn { background: rgba(255,255,255,0.04); }
body.dark .cc-bucket-btn.active { background: var(--blue); border-color: var(--blue); color: #0d1330; }
.cc-breakdown-signals { display: flex; flex-direction: column; gap: 0; }
.bkdn-signal-card {
  position: relative;
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 20px; cursor: pointer;
  border-bottom: 1px solid var(--bg);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.bkdn-signal-card:last-child { border-bottom: none; }
.bkdn-signal-card:hover {
  background: rgba(46,109,180,0.04);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--shadow-accent);
  border-radius: 10px;
}
body.dark .bkdn-signal-card:hover { background: rgba(255,255,255,0.03); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.bkdn-signal-score-col { flex-shrink: 0; text-align: center; width: 56px; }
.bkdn-signal-score-num { font-family: var(--mono); font-size: 28px; font-weight: 700; line-height: 1; }
.bkdn-signal-score-tier { font-family: var(--mono); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }
.bkdn-signal-body { flex: 1; min-width: 0; }
.bkdn-signal-name { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.bkdn-signal-verdict { font-size: 14px; font-weight: 500; line-height: 1.5; }
.bkdn-signal-verdict.high { color: var(--green); }
.bkdn-signal-verdict.mid { color: var(--amber); }
.bkdn-signal-verdict.low { color: var(--red); }
.bkdn-signal-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-lt); margin-top: 6px; }
.bkdn-signal-arrow {
  flex-shrink: 0; width: 20px; height: 20px; color: var(--ink-lt);
  align-self: center; opacity: 0.3; transition: opacity 0.2s ease, transform 0.2s ease;
}
.bkdn-signal-card:hover .bkdn-signal-arrow { opacity: 1; transform: translateX(3px); }
.bkdn-signal-hint {
  position: absolute; bottom: 4px; right: 20px;
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--blue); opacity: 0;
  transition: opacity 0.2s ease;
}
.bkdn-signal-card:hover .bkdn-signal-hint { opacity: 0.7; }
@media (max-width: 600px) { .cc-bucket-selector { grid-template-columns: repeat(2, 1fr); } }

/* ── RESPONSIVE ── */
@media (max-width: 800px) {
  .cc-layout { flex-direction: column; height: auto; overflow: visible; }
  .center-view { width: 100% !important; margin-left: 0 !important; }
  .center-header { padding-left: 16px; }
  .cc-sidebar { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 2px solid var(--border); padding: 0; }
  .cc-sidebar-btn { border-left: none; border-bottom: 3px solid transparent; padding: 10px 14px; white-space: nowrap; font-size: 12px; }
  .cc-sidebar-btn.active { border-left-color: transparent; border-bottom-color: var(--navy); }
  .cc-content { padding: 16px; overflow-y: visible; }
  .cc-widget-grid { grid-template-columns: 1fr; }
  .cc-delta-row { grid-template-columns: 1fr; }
  .cc-profile-grid { grid-template-columns: 1fr; }
  .cc-breakdown-signals { columns: 1; }
  /* Empty state & KI bumpers — inset from screen edges */
  #cc-empty { left: 20px; right: 20px; }
  .ki-bumper { margin-left: 12px; margin-right: 12px; }
}

/* ── COMMAND CENTER VIEW ── */
.center-header { margin-bottom: 32px; padding-left: 24px; padding-top: 40px; }
.center-title { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.5px; margin-bottom: 8px; }
.center-sub { font-size: 15px; color: var(--ink-mid); }
.score-history-list { display: flex; flex-direction: column; gap: 12px; }
.history-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 16px; }
.history-card:hover { border-color: var(--navy); box-shadow: 0 4px 20px var(--shadow-color); transform: translateY(-1px); }
.history-score-badge { width: 56px; height: 56px; border-radius: 12px; background: var(--green-lt); border: 1px solid var(--green-border); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.history-score-badge.amber { background: var(--amber-lt); border-color: var(--amber-border); }
.history-badge-num { font-size: 16px; font-weight: 700; color: var(--green); line-height: 1; }
.history-score-badge.amber .history-badge-num { color: var(--amber); }
.history-badge-label { font-size: 9px; color: var(--green); font-weight: 500; margin-top: 1px; }
.history-score-badge.amber .history-badge-label { color: var(--amber); }
.history-info { flex: 1; }
.history-company { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.history-meta { font-size: 12px; color: var(--ink-lt); }
.history-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.history-chip { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--white); background: var(--navy); padding: 3px 10px; border-radius: 4px; letter-spacing: 0.1em; }
.history-date { font-size: 11px; color: var(--ink-lt); }
.history-chevron { font-size: 11px; font-weight: 500; color: var(--blue); letter-spacing: 0.02em; white-space: nowrap; }
.history-chevron span { font-size: 13px; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .main-card { padding: 24px 20px 20px; }
  .company-name { font-size: 24px; }
  .score-number { font-size: 36px; }
  .method-strip { flex-direction: column; align-items: flex-start; }
  .sc-actions { flex-direction: column; }

  /* Command center history card — stack on mobile */
  .history-card { flex-wrap: wrap; padding: 16px 18px; gap: 12px; }
  .history-score-badge { width: 48px; height: 48px; }
  .history-badge-num { font-size: 14px; }
  .history-info { min-width: 0; }
  .history-company { font-size: 14px; }
  .history-right {
    flex-basis: 100%; flex-direction: row; align-items: center;
    justify-content: space-between; border-top: 1px solid var(--border);
    padding-top: 10px; gap: 8px;
  }
  .history-chevron { margin-left: auto; }

  /* Command center company bar — tighter on mobile */
  .cc-company-bar { flex-wrap: wrap; padding: 14px 16px; gap: 10px; }
  .cc-co-badge { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
  .cc-co-info { min-width: 0; flex: 1 1 0; }
  .cc-co-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .cc-co-meta { font-size: 11px; flex-wrap: wrap; }
  .cc-co-right { flex-shrink: 0; }
  .cc-co-score-num { font-size: 20px; }
  .cc-co-rating { font-size: 9px; padding: 2px 7px; }
  .cc-co-view-btn { flex-basis: 100%; text-align: center; }
  .cc-co-rescore-btn { flex-basis: 100%; text-align: center; }

  /* Trajectory chart tile — shorter on mobile */
  .cc-tile .history-chart-wrap { height: 140px; }
  .cc-tile-body { padding: 12px 14px; }
}

/* ── HISTORY CHART + DELTA CARDS ── */
.history-section { margin-top: 8px; }
.history-section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px;
}
.history-date-range { font-size: 11px; color: var(--ink-lt); margin-top: 4px; }
.history-total-delta {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  padding: 4px 12px; border-radius: 99px;
}
.history-chart-container {
  margin: 4px 0 20px; padding: 0 2px;
}
.history-chart-wrap {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 20px 12px;
  box-shadow: 0 2px 8px var(--shadow-accent);
  height: 240px; position: relative;
}
.history-chart-wrap canvas { width: 100% !important; height: 100% !important; }

.delta-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px; margin-bottom: 8px;
}
.delta-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.delta-card--composite {
  background: var(--blue-lt); border-color: var(--tag-border);
  grid-column: 1 / -1;
  flex-direction: row; align-items: center; justify-content: space-between;
  padding: 10px 16px;
}
.delta-label { font-size: 11px; color: var(--ink-lt); font-weight: 500; }
.delta-now   { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1; }
.delta-card--composite .delta-now { font-size: 22px; }
.delta-change {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
}
.delta-up   { color: var(--green); background: var(--green-lt); }
.delta-down { color: var(--red);   background: var(--red-lt);   }
.delta-flat { color: var(--ink-lt);background: var(--bg);       }
.history-delta { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 99px; margin-left: 6px; }

.history-empty-notice {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 8px;
}
.history-loading { padding: 20px 0; }

/* ── COMMAND CENTER 2×2 TILES ── */
.cc-company-bar {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 20px; margin-bottom: 14px;
  flex-wrap: wrap;
}
.cc-co-badge {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--blue-lt); border: 1px solid var(--tag-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; color: var(--navy); flex-shrink: 0;
}
.cc-co-info { flex: 1; min-width: 0; }
.cc-co-name { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-co-meta { font-size: 12px; color: var(--ink-lt); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cc-co-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.cc-co-score-num { font-family: var(--mono); font-size: 26px; font-weight: 700; line-height: 1; }
.cc-co-rating {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  background: var(--navy); color: var(--white);
  padding: 3px 9px; border-radius: 4px; letter-spacing: 0.1em;
}
.cc-co-view-btn {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--navy); background: var(--blue-lt); border: 1px solid var(--tag-border);
  border-radius: 8px; padding: 8px 14px; cursor: pointer;
  transition: all 0.15s ease; white-space: nowrap;
  text-decoration: none; display: inline-block;
}
.cc-co-view-btn:hover { background: #dae6f5; border-color: var(--blue); }
.cc-co-rescore-btn {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--ink-lt); background: transparent; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px; cursor: pointer;
  transition: all 0.15s ease; white-space: nowrap;
}
.cc-co-rescore-btn:hover { color: var(--navy); border-color: var(--navy); background: var(--blue-lt); }

/* Tile expand button */
.cc-tile-expand-btn {
  margin-left: auto; background: none; border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 6px; cursor: pointer; color: var(--ink-lt);
  display: flex; align-items: center; transition: all 0.15s ease;
}
.cc-tile-expand-btn:hover { color: var(--navy); border-color: var(--navy); background: var(--blue-lt); }

/* Chart expand overlay */
.chart-overlay-card {
  background: var(--white); border-radius: 20px; width: 100%; max-width: 900px;
  box-shadow: 0 24px 80px var(--shadow-color);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}
.modal-overlay.open .chart-overlay-card { transform: translateY(0) scale(1); }
.chart-overlay-hd {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.chart-overlay-title { font-size: 18px; font-weight: 600; color: var(--ink); }
.chart-overlay-hd .modal-close-btn { margin-left: auto; }
.chart-overlay-body { padding: 24px; }
.chart-overlay-meta { font-size: 12px; color: var(--ink-lt); margin-bottom: 16px; }
.chart-overlay-canvas-wrap { height: 420px; position: relative; }

/* cc-grid removed — replaced by cc-tab-bar + cc-tab-panel system */
.cc-tile-traj-section { padding: 0; }
.cc-tile {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column; min-height: 200px;
}
.cc-tile-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 18px 11px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cc-tile-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.11em; color: var(--ink-mid);
}

.cc-tile-sub { font-size: 11px; color: var(--ink-lt); margin-left: auto; white-space: nowrap; }
.cc-traj-overall {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 2px 9px; border-radius: 99px; margin-left: auto;
}
.cc-tile-body { flex: 1; padding: 16px 18px; overflow: hidden; }
.cc-tile-body--scroll { overflow-y: auto; }

/* CC chart inside intel tile */
.cc-tile .history-chart-wrap { height: 180px; }
.cc-tile .history-section-header { margin-bottom: 10px; }
.cc-tile .section-label { display: none; }
.cc-tile .history-date-range { font-size: 11px; }

/* CC delta tile: single-column stack */
.cc-tile .delta-cards-grid { grid-template-columns: 1fr; margin-bottom: 0; }
.cc-tile .delta-card--composite { flex-direction: row; }

/* ── Momentum Index hero (inside Score Trajectory tile) ── */
.cc-mom-hero {
  padding: 24px 22px 18px;
}
.cc-mom-score-wrap {
  display: inline-flex; align-items: baseline; gap: 10px;
  background: var(--blue-lt); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 24px 12px;
}
.cc-mom-score {
  font-size: 48px; font-weight: 700; color: var(--navy-deep); line-height: 1;
}
.cc-mom-max {
  font-size: 14px; color: var(--ink-lt); font-family: var(--mono);
}
.cc-mom-delta {
  font-family: var(--mono); font-size: 15px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px; margin-left: 6px;
}
.cc-mom-empty {
  padding: 16px 18px; font-size: 13px; color: var(--ink-lt); text-align: center;
  border-bottom: 1px solid var(--border);
}

/* ── Momentum signal detail panel ── */
#cc-momentum-detail {
  padding: 0 18px 12px;
}
.cc-mom-detail-header {
  display: grid; grid-template-columns: 1fr 50px 60px; gap: 6px;
  padding: 10px 0 6px; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.1em;
}
.cc-mom-detail-header span:nth-child(2),
.cc-mom-detail-header span:nth-child(3) { text-align: right; }
.cc-mom-sig-row {
  display: grid; grid-template-columns: 1fr 50px 60px; gap: 6px;
  padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--ink-mid); align-items: center;
}
.cc-mom-sig-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-mom-sig-score { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink-lt); }
.cc-mom-sig-delta { text-align: right; font-family: var(--mono); font-size: 12px; font-weight: 600; }

/* Score Trajectory sub-label + expand button row */
.cc-traj-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.cc-traj-sub-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.12em;
}

/* Momentum help question mark */
.cc-mom-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--border); color: var(--ink-lt);
  font-size: 11px; font-weight: 700; font-family: var(--mono);
  cursor: pointer; margin-left: 6px; flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.cc-mom-help:hover { background: var(--blue); color: #fff; }
.cc-mom-help-panel {
  margin: 10px 0 4px; padding: 12px 14px;
  background: var(--blue-lt); border: 1px solid var(--border); border-radius: 8px;
  font-size: 12px; color: var(--ink-mid); line-height: 1.6;
}
.cc-mom-help-panel strong { color: var(--navy-deep); font-size: 12px; }

/* Composite label in company profile */
.cc-profile-score-label {
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.1em;
  text-align: right;
}

/* CC Intelligence tile */
.cc-intel-why {
  font-size: 12px; font-weight: 600; color: var(--ink);
  padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.cc-intel-bucket-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--bg);
}
.cc-intel-bucket-name { font-size: 11px; font-weight: 600; color: var(--ink); width: 120px; flex-shrink: 0; }
.cc-intel-bar-wrap { flex: 1; background: var(--bg); border-radius: 99px; height: 5px; overflow: hidden; }
.cc-intel-bar { height: 5px; border-radius: 99px; }
.cc-intel-bucket-score { font-family: var(--mono); font-size: 13px; font-weight: 700; width: 30px; text-align: right; flex-shrink: 0; }
.cc-intel-bucket-delta {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 99px; min-width: 48px; text-align: center; flex-shrink: 0;
}
.cc-intel-sigs-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ink-lt); margin: 14px 0 8px;
}
.cc-intel-sig-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.cc-intel-sig-name { font-size: 11px; color: var(--ink); flex: 1; }
.cc-intel-sig-bar-wrap { width: 52px; background: var(--bg); border-radius: 99px; height: 4px; flex-shrink: 0; }
.cc-intel-sig-bar { height: 4px; border-radius: 99px; }
.cc-intel-sig-bar.elite      { background: #15803D; }
.cc-intel-sig-bar.strong     { background: #1B3A6B; }
.cc-intel-sig-bar.solid      { background: #2E6DB4; }
.cc-intel-sig-bar.emerging   { background: #B45309; }
.cc-intel-sig-bar.developing { background: #92400E; }
.cc-intel-sig-bar.early-stage{ background: #B91C1C; }
.cc-intel-sig-bar.moderate   { background: var(--blue); }
.cc-intel-sig-bar.low        { background: var(--red); }
.cc-intel-sig-score { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink-mid); width: 26px; text-align: right; flex-shrink: 0; }

/* CC free-tier upgrade strip */
.cc-upgrade-strip {
  display: flex; align-items: center; gap: 14px;
  background: var(--blue-lt); border: 1px solid var(--tag-border);
  border-radius: 14px; padding: 18px 20px; margin-top: 14px; flex-wrap: wrap;
}
.cc-upgrade-icon {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--white); border: 1px solid var(--tag-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cc-upgrade-icon svg { stroke: var(--navy); }
.cc-upgrade-text { flex: 1; min-width: 180px; }
.cc-upgrade-title { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.cc-upgrade-desc { font-size: 12px; color: var(--ink-mid); line-height: 1.5; }
.cc-upgrade-btn {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: var(--white); background: var(--navy); border: none;
  border-radius: 10px; padding: 10px 18px; cursor: pointer;
  white-space: nowrap; text-decoration: none; display: inline-block;
  transition: background 0.15s ease;
}
.cc-upgrade-btn:hover { background: var(--navy-deep); }

/* Right column: profile on top, checklist below */
#cc-tile-profile   { grid-column: 2; grid-row: 1; }
#cc-tile-checklist { grid-column: 2; grid-row: 2; }

/* ── COMPANY PROFILE TILE ──────────────────────────────────────────────────── */
.cc-profile-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.cc-profile-badge {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.cc-profile-name { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.cc-profile-domain { font-size: 11px; color: var(--ink-lt); margin-top: 2px; }
.cc-profile-score-pill {
  margin-left: auto; text-align: right; flex-shrink: 0;
}
.cc-profile-score-num {
  font-family: var(--mono); font-size: 20px; font-weight: 700;
  line-height: 1; color: var(--ink);
}
.cc-profile-rating {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-lt); margin-top: 2px;
}

.cc-profile-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-lt);
  margin: 14px 0 8px;
}
.cc-profile-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 5px 0; border-bottom: 1px solid var(--bg);
  font-size: 12px;
}
.cc-profile-row-label { color: var(--ink-lt); }
.cc-profile-row-value { font-weight: 600; color: var(--ink); text-align: right; max-width: 55%; }

.cc-profile-bucket-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 0;
}
.cc-profile-bucket-name { font-size: 11px; color: var(--ink-mid); width: 108px; flex-shrink: 0; }
.cc-profile-bucket-bar-wrap {
  flex: 1; height: 5px; background: var(--bg); border-radius: 99px; overflow: hidden;
}
.cc-profile-bucket-bar { height: 5px; border-radius: 99px; }
.cc-profile-bucket-val {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  width: 28px; text-align: right; flex-shrink: 0;
}

.cc-profile-sig-row {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
}
.cc-profile-sig-dot {
  width: 7px; height: 7px; border-radius: 99px; flex-shrink: 0;
}
.cc-profile-sig-dot--strong   { background: var(--green); }
.cc-profile-sig-dot--mod      { background: var(--blue); }
.cc-profile-sig-dot--low      { background: var(--red); }
.cc-profile-sig-name { font-size: 11px; color: var(--ink); flex: 1; }
.cc-profile-sig-score {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--ink-lt); flex-shrink: 0;
}

/* ── COMPANY PROFILE OVERLAY ────────────────────────────────────────────────── */
.profile-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(10,10,26,0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.profile-overlay.open { opacity: 1; pointer-events: all; }
.profile-overlay-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; width: 440px; max-width: 92vw;
  max-height: 85vh; display: flex; flex-direction: column;
  box-shadow: 0 16px 48px rgba(10,10,26,0.28);
  transform: translateY(12px); transition: transform 0.2s ease;
}
.profile-overlay.open .profile-overlay-card { transform: translateY(0); }
.profile-overlay-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.profile-overlay-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.profile-overlay-close {
  font-size: 20px; line-height: 1; color: var(--ink-lt);
  background: none; border: none; cursor: pointer; padding: 2px 6px;
  border-radius: 6px; transition: background 0.15s ease;
}
.profile-overlay-close:hover { background: var(--bg); color: var(--ink); }
.profile-overlay-body { flex: 1; overflow-y: auto; padding: 18px 20px 20px; }
.edit-profile-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--blue); background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.edit-profile-btn:hover { background: var(--blue-lt); border-color: var(--blue); }
.edit-profile-field { margin-bottom: 16px; }
.edit-profile-field label {
  display: block; font-size: 11px; font-weight: 600; color: var(--ink-lt);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px;
}
.edit-profile-field input,
.edit-profile-field select {
  width: 100%; font-family: var(--font); font-size: 14px; color: var(--ink);
  background: var(--white); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; box-sizing: border-box;
  transition: border-color 0.15s;
}
.edit-profile-field input:focus,
.edit-profile-field select:focus { outline: none; border-color: var(--blue); }

/* ── RIVAL KI INTELLIGENCE TILE ─────────────────────────────────────────────── */
.rival-intel-toggle {
  padding: 9px 16px; font-size: 12px; font-weight: 600; color: var(--blue);
  cursor: pointer; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 5px;
  background: var(--blue-lt); transition: background 0.15s ease;
}
.rival-intel-toggle:hover { background: #dce9f7; }
.rival-intel-wrap { display: none; padding: 14px 16px; border-top: 1px solid var(--border); }
.rival-seo-toggle {
  padding: 9px 16px; font-size: 12px; font-weight: 600; color: var(--green);
  cursor: pointer; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 5px;
  background: var(--green-lt); transition: background 0.15s ease;
}
.rival-seo-toggle:hover { background: #d1fae5; }
.rival-seo-wrap { padding: 14px 16px; border-top: 1px solid var(--border); }
body.dark .rival-seo-toggle { background: rgba(74,222,128,0.08); color: var(--green); }
body.dark .rival-seo-toggle:hover { background: rgba(74,222,128,0.14); }

/* ── SEO COMPARISON BARS ───────────────────────────────────────────────────── */
.seo-compare-chart { margin-bottom: 16px; }
.seo-compare-label {
  font-size: 11px; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.seo-compare-bars { display: flex; flex-direction: column; gap: 5px; }
.seo-compare-bar-row { display: flex; align-items: center; gap: 8px; }
.seo-compare-bar-who {
  font-size: 10px; font-weight: 600; color: var(--ink-lt);
  width: 56px; flex-shrink: 0; text-align: right;
}
.seo-compare-bar-track {
  flex: 1; height: 7px; background: var(--bg);
  border-radius: 99px; overflow: hidden;
}
.seo-compare-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.seo-compare-bar-fill--you   { background: var(--navy); }
.seo-compare-bar-fill--rival { background: var(--ink-lt); opacity: 0.5; }
body.dark .seo-compare-bar-fill--you   { background: #a78bfa; }
body.dark .seo-compare-bar-fill--rival { background: #64748b; opacity: 0.7; }
.seo-compare-bar-val {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--ink-mid); width: 80px; flex-shrink: 0; text-align: right;
}
.seo-insights-box {
  background: var(--blue-lt); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.seo-insight-item {
  font-size: 12.5px; line-height: 1.55; color: var(--ink-mid);
  padding-left: 14px; position: relative;
}
.seo-insight-item::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--navy);
}
body.dark .seo-insights-box { background: rgba(129,140,248,0.06); }
body.dark .seo-insight-item::before { background: #a78bfa; }

.rival-intel-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
/* Small variant of .ki-brand-badge used in rival intel + breakdown */
.rival-intel-ki-badge--sm {
  flex-shrink: 0;
}
.rival-intel-ki-badge--sm .ki-brand-badge-img {
  height: 28px;
  margin: -6px 0 -8px -2px;
}
/* In breakdown signal rows, badge sits on its own line */
.cc-breakdown-signals .ki-brand-badge {
  display: flex; margin-top: 2px;
}
.signal-card-name .ki-brand-badge {
  display: flex; margin-top: 2px; margin-left: 0;
}
.signal-card-name { display: flex; flex-wrap: wrap; align-items: center; }
.rival-intel-title { font-size: 13px; font-weight: 700; color: var(--ink); }

.rival-intel-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--bg);
}
.rival-intel-bucket { font-size: 11px; font-weight: 600; color: var(--ink); width: 110px; flex-shrink: 0; }
.rival-intel-scores { display: flex; align-items: center; gap: 4px; flex: 1; font-family: var(--mono); font-size: 11px; }
.rival-intel-you  { color: var(--navy); font-weight: 700; }
.rival-intel-vs   { color: var(--ink-lt); }
.rival-intel-them { font-weight: 700; }
.rival-intel-gap {
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 99px; margin-left: auto; flex-shrink: 0;
}
.rival-intel-gap--ahead  { background: var(--green-lt); color: var(--green); }
.rival-intel-gap--behind { background: var(--amber-lt); color: var(--amber); }
.rival-intel-gap--tied   { background: var(--bg);       color: var(--ink-lt); }

.rival-intel-lens {
  margin-top: 12px; padding: 10px 13px;
  background: var(--blue-lt); border: 1px solid var(--border);
  border-radius: 10px; font-size: 12px; color: var(--ink-mid); line-height: 1.6;
}
.rival-intel-lens strong { color: var(--navy); }
.rival-intel-edge {
  margin-top: 8px; padding: 10px 13px;
  background: var(--green-lt); border: 1px solid var(--green-border);
  border-radius: 10px; font-size: 12px; color: var(--green); line-height: 1.6;
}
body.dark .rival-intel-edge { border-color: rgba(74,222,128,0.25); color: #4ade80; }

/* Rival card scoring state */
.rival-card-scoring-wrap {
  padding: 28px 16px; display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.rival-scoring-msg { font-size: 12px; color: var(--ink-lt); }

/* Dark mode bucket bar tracks (hardcoded #EEF1F6 needs override) */
body.dark .bucket-track     { background: rgba(255,255,255,0.08); }
body.dark .lb-track         { background: rgba(255,255,255,0.08); }
body.dark .be-cat-bar       { background: rgba(255,255,255,0.08); }
body.dark .be-signal-track  { background: rgba(255,255,255,0.08); }
body.dark .portal-embed-code-wrap { background: rgba(255,255,255,0.05); }
body.dark .company-locked-notice { background: var(--amber-lt); border-color: var(--border); }
body.dark .be-improvement { background: rgba(255,255,255,0.04); }
body.dark .sc-options-menu { box-shadow: 0 8px 24px rgba(0,0,0,0.40); }
body.dark .context-tag { border-color: var(--border); }

/* Dark mode scorecard logo */
body.dark .sc-logo-wrap img { filter: brightness(0) invert(1); }

/* Dark mode intel bar colors (inline colors won't inherit — override via specific classes) */
body.dark .cc-intel-why { border-color: var(--border); color: var(--ink); }
body.dark .rival-intel-toggle { background: var(--blue-lt); color: var(--blue); }
body.dark .rival-intel-toggle:hover { background: rgba(99,102,241,0.18); }
body.dark .rival-intel-lens { background: var(--blue-lt); border-color: var(--border); color: var(--ink-mid); }

/* Dark mode profile overlay */
body.dark .profile-overlay-card { box-shadow: 0 16px 48px rgba(0,0,0,0.55); }

/* ── DARK MODE NAV THEME TOGGLE ─────────────────────────────────────────────── */
/* Moon icon visible in light mode; sun icon visible in dark mode */
.theme-icon--sun { display: none; }
body.dark .theme-icon--moon { display: none; }
body.dark .theme-icon--sun  { display: block; }

/* Responsive: stack tiles on narrow screens */
@media (max-width: 680px) {
  .cc-company-bar { gap: 10px; }
  .cc-tab-bar { gap: 0; }
  .cc-tab { padding: 10px 14px; font-size: 12px; }
  .cc-upgrade-strip { flex-direction: column; align-items: flex-start; }
}

/* ── EMBED BADGE ── */
.embed-confirm {
  font-size: 12px; font-weight: 500; color: var(--green);
  background: var(--green-lt); border: 1px solid var(--green-border);
  border-radius: 8px; padding: 8px 14px; margin-bottom: 10px;
  text-align: center; opacity: 0; transition: opacity 0.2s ease;
  pointer-events: none;
}
.embed-confirm.visible { opacity: 1; }

/* ── PERCENTILE ROW ── */
.percentile-row {
  background: var(--blue-lt); border: 1px solid var(--tag-border);
  border-radius: 8px; padding: 8px 14px; margin-bottom: 20px;
  text-align: center;
}
.percentile-text {
  font-size: 12px; font-weight: 500; color: var(--navy);
}

/* ── DATA QUALITY WARNING BANNER ── */
.dq-warning {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--amber-lt); border: 1px solid var(--amber);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 20px;
}
.dq-warning--high { background: var(--red-lt); border-color: var(--red); }
.dq-warning-icon { flex-shrink: 0; font-size: 14px; margin-top: 1px; }
.dq-warning-body { flex: 1; }
.dq-warning-title {
  font-size: 12px; font-weight: 700; color: var(--amber);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
}
.dq-warning--high .dq-warning-title { color: var(--red); }
.dq-warning-msg { font-size: 12px; color: var(--ink); line-height: 1.55; }
.dq-warning--high .dq-warning-msg { color: var(--ink); }
.dq-warning-impact {
  display: inline-block; margin-top: 5px;
  font-size: 11px; font-weight: 600; color: var(--amber);
  background: var(--amber-lt); border-radius: 4px; padding: 2px 6px;
}
.dq-warning--high .dq-warning-impact { color: var(--red); background: var(--red-lt); }

/* ── RIVALS VIEW ── */
.rivals-header { margin-bottom: 28px; }
.rivals-eyebrow {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--blue); letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 10px; display: block;
}
.rivals-title { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.5px; margin-bottom: 8px; }
.rivals-sub   { font-size: 15px; color: var(--ink-mid); line-height: 1.65; }

/* Add form */
.rival-add-wrap { margin-bottom: 28px; }
.rival-add-form { width: 100%; }
.rival-add-fields {
  display: flex; gap: 10px; align-items: flex-start;
}
.rival-search-input { margin-bottom: 0; }
.rival-add-btn {
  flex-shrink: 0; height: 44px; padding: 0 20px;
  background: var(--navy); color: var(--white);
  border: none; border-radius: 10px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.rival-add-btn:hover    { background: var(--navy-deep); }
.rival-add-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.rival-add-error {
  font-size: 12px; color: var(--red); min-height: 18px; margin-top: 8px;
}
.rival-limit-notice {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-lt);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; margin-top: 10px;
}

/* Loading / empty */
.rivals-loading { padding: 40px 0; display: flex; justify-content: center; }
.rivals-error   { font-size: 13px; color: var(--red); padding: 24px; text-align: center; }
.rivals-empty {
  text-align: center; padding: 48px 24px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px;
}
.rivals-empty-icon {
  width: 52px; height: 52px; margin: 0 auto 16px;
  background: var(--blue-lt); border: 1px solid var(--tag-border);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
}
.rivals-empty-icon svg { width: 22px; height: 22px; stroke: var(--navy); }
.rivals-empty-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.rivals-empty-sub   { font-size: 14px; color: var(--ink-mid); line-height: 1.6; }

/* Rival card */
.rival-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; margin-bottom: 14px; overflow: hidden;
  transition: box-shadow 0.15s;
}
.rival-card:hover { box-shadow: 0 4px 20px var(--shadow-color); }
.rival-card-main {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
}

/* Score pill */
.rival-score-pill {
  flex-shrink: 0; width: 72px; text-align: center;
  border: 1px solid; border-radius: 12px; padding: 10px 6px;
}
.rival-score-num {
  font-family: var(--mono); font-size: 22px; font-weight: 700; line-height: 1;
  margin-bottom: 6px;
}
.rival-rating-chip {
  display: inline-block; font-family: var(--mono); font-size: 9px; font-weight: 600;
  color: var(--white); padding: 2px 7px; border-radius: 4px; letter-spacing: 0.08em;
  white-space: nowrap;
}

/* Rival info */
.rival-info   { flex: 1; min-width: 0; }
.rival-name   { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.rival-domain { font-size: 11px; color: var(--ink-lt); font-family: var(--mono); margin-bottom: 10px; }

/* Bucket mini-bars */
.rival-buckets   { display: flex; flex-direction: column; gap: 5px; }
.rival-bucket-row {
  display: flex; align-items: center; gap: 8px;
}
.rival-bucket-label {
  font-size: 10px; font-weight: 600; color: var(--ink-lt);
  text-transform: uppercase; letter-spacing: 0.06em;
  width: 60px; flex-shrink: 0;
}
.rival-bucket-track {
  flex: 1; height: 4px; background: var(--bg); border-radius: 99px; overflow: hidden;
}
.rival-bucket-fill {
  height: 100%; border-radius: 99px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.rival-bucket--strong { background: var(--green); }
.rival-bucket--mod    { background: var(--blue);  }
.rival-bucket--low    { background: var(--amber); }
.rival-bucket-val {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mid);
  width: 28px; text-align: right; flex-shrink: 0;
}

/* Right column */
.rival-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0;
}
.rival-vs-badge {
  display: flex; flex-direction: column; align-items: center;
  border-radius: 8px; padding: 6px 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 700; line-height: 1;
}
.rival-vs--leading  { background: var(--green-lt); color: var(--green); }
.rival-vs--trailing { background: var(--red-lt);   color: var(--red);   }
.rival-vs--tied     { background: var(--bg);        color: var(--ink-lt);}
.rival-remove-btn {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  width: 26px; height: 26px; cursor: pointer; color: var(--ink-lt);
  font-size: 16px; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.rival-remove-btn:hover { border-color: var(--red); color: var(--red); }

/* Unscored card */
.rival-card--unscored { border-style: dashed; }
.rival-unscored-msg {
  display: flex; align-items: center; gap: 12px; flex: 1;
}
.rival-unscored-msg span { font-size: 13px; color: var(--ink-lt); }
.rival-score-now-btn {
  background: none; border: 1px solid var(--blue); border-radius: 8px;
  padding: 5px 12px; color: var(--blue); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: background 0.15s, color 0.15s;
}
.rival-score-now-btn:hover { background: var(--blue); color: var(--white); }

/* History toggle */
.rival-history-toggle {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  font-size: 11px; font-weight: 500; color: var(--blue);
  padding: 8px 20px; cursor: pointer; border-top: 1px solid var(--border);
  background: var(--bg); transition: background 0.15s;
  letter-spacing: 0.02em;
}
.rival-history-toggle:hover { background: var(--blue-lt); }
.rival-toggle-arrow { font-size: 14px; transition: transform 0.2s; }
.rival-history-wrap { padding: 0 20px 20px; }

/* Base (non-desktop) max-widths for views that had inline styles */
.center-view { max-width: 680px; }
.rivals-view  { max-width: 760px; }

/* ── DESKTOP LAYOUT (≥ 1024px) ── */
@media (min-width: 1024px) {

  /* Tighten nav-to-content gap */
  .page-wrap { padding-top: 82px; }

  /* Scorecard: full-width on desktop */
  .view.scorecard-view { max-width: none; width: 100%; }
  .sc-page {
    display: flex;
    flex-direction: column;
    column-gap: 28px;
    align-items: start;
  }
  .sc-left { min-width: 0; }

  /* Trajectory section merged inside main-card */
  .sc-traj-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
  .sc-traj-section .history-chart-wrap { height: 240px; }
  .sc-traj-section .history-loading { padding: 24px 0; }
  .sc-traj-section .history-section { margin-top: 0; }
  .sc-traj-section .history-section-header .section-label { display: none; }
  .sc-traj-section::before {
    content: 'Score Trajectory';
    display: block;
    font-size: 10px; font-weight: 600; color: var(--ink-lt);
    text-transform: uppercase; letter-spacing: 0.16em;
    margin-bottom: 14px;
  }

  /* Intel panel: full height right column */
  .ki-intel-panel { margin-top: 0; width: 100%; }

  /* Widen the scorecard main card internals */
  .company-name { font-size: 36px; }
  .score-number { font-size: 56px; }
  .bucket-name  { width: 200px; }

  /* Command center */
  .center-view { max-width: 1000px; }
  .history-chart-wrap { height: 280px; }
  .delta-cards-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  /* Rivals: 2-column card grid */
  .rivals-view { max-width: 1100px; }
  #rivals-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .rival-card { margin-bottom: 0; }

  /* Launch: wider form */
  #view-launch .form-card { padding: 44px 48px; }
  #view-launch .form-row { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── LARGE SCREEN LAYOUT ── */
@media (min-width: 1440px) {
  .view { max-width: 1200px; }
  .center-view { max-width: 1200px; }
}
@media (min-width: 1920px) {
  .view { max-width: 1400px; }
  .center-view { max-width: 1400px; }
  .main-card { max-width: 1200px; margin-left: auto; margin-right: auto; }
}

/* ── DATA COMPLETENESS RING ── */
.sc-completeness-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; margin-bottom: 16px;
  background: var(--bg); border-radius: 10px;
}
.sc-completeness-ring { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.sc-completeness-ring svg { transform: rotate(-90deg); }
.sc-completeness-ring .ring-track { fill: none; stroke: var(--border); stroke-width: 3.5; }
.sc-completeness-ring .ring-fill { fill: none; stroke-width: 3.5; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(0.16,1,0.3,1); }
.sc-completeness-ring .ring-fill.green { stroke: var(--green); }
.sc-completeness-ring .ring-fill.blue { stroke: var(--blue); }
.sc-completeness-ring .ring-fill.amber { stroke: var(--amber); }
.sc-completeness-pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink);
}
.sc-completeness-info { flex: 1; min-width: 0; }
.sc-completeness-label { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--ink-mid); text-transform: uppercase; letter-spacing: 0.1em; }
.sc-completeness-sub { font-size: 11px; color: var(--ink-lt); margin-top: 2px; }
body.dark .sc-completeness-row { background: rgba(255,255,255,0.04); }

/* ── CONTEXT ADJUSTMENT PILLS ── */
.sc-adjustments { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; }
.sc-adj-label { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.1em; margin-right: 4px; }
.sc-adj-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--navy);
  background: var(--blue-lt); border: 1px solid rgba(46,109,180,0.15);
  padding: 3px 10px; border-radius: 99px;
}
body.dark .sc-adj-pill { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.25); color: #c4b5fd; }

/* ── ENRICHMENT STATS GRID ── */
.sc-enrichment-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 12px;
}
.sc-enrichment-stat {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 10px; text-align: center;
  animation: fadeUp 0.4s ease both;
}
.sc-enrichment-val { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.sc-enrichment-label { font-family: var(--mono); font-size: 8px; font-weight: 500; color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 4px; }
body.dark .sc-enrichment-stat { background: rgba(255,255,255,0.04); }
@media (max-width: 600px) { .sc-enrichment-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── PERCENTILE BADGE ── */
.percentile-row {
  margin-bottom: 14px; display: none;
}
.percentile-text {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--navy);
  background: var(--blue-lt); border: 1px solid rgba(46,109,180,0.15);
  padding: 6px 14px; border-radius: 8px;
}
body.dark .percentile-text { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.2); color: #a5b4fc; }

/* ── BUCKET BAR COLOR TIERS ── */
.bucket-fill.tier-high { background: linear-gradient(90deg, #15803D, #22c55e); }
.bucket-fill.tier-mid { background: linear-gradient(90deg, var(--navy), var(--blue)); }
.bucket-fill.tier-low { background: linear-gradient(90deg, #B45309, #f59e0b); }
.bucket-fill.tier-critical { background: linear-gradient(90deg, #B91C1C, #ef4444); }

/* ── CC WIDGET HERO (score summary spans 2 cols) ── */
.cc-widget.cc-widget-hero { grid-column: span 2; }
/* accent removed — visual distinction handled by widget content */
@media (max-width: 800px) { .cc-widget.cc-widget-hero { grid-column: span 1; } }

/* ── EXPANDABLE WIDGET SYSTEM ── */
.cc-widget[data-expandable] { cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.cc-widget[data-expandable]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--shadow-color);
}
.cc-widget[data-expandable]::after {
  content: '';
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 3px; border-radius: 99px;
  background: var(--border); opacity: 0.6;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.cc-widget[data-expandable]:hover::after { opacity: 1; background: var(--blue); }
body.dark .cc-widget[data-expandable]:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.3); }
body.dark .cc-widget[data-expandable]:hover::after { background: var(--accent, #4ade80); }

/* Expand hint label */
.cc-widget-hint {
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-lt); opacity: 0;
  transition: opacity 0.2s ease;
  margin-top: 8px; text-align: center;
}
.cc-widget[data-expandable]:hover .cc-widget-hint { opacity: 1; }

/* Expanded overlay */
.cc-widget-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(6,3,17,0.45); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 80px 20px 40px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
}
.cc-widget-overlay.open { opacity: 1; pointer-events: all; }
.cc-widget-expanded {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 640px;
  padding: 32px 28px 24px; position: relative;
  box-shadow: 0 20px 60px var(--shadow-color);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  animation: widgetExpandIn 0.35s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes widgetExpandIn {
  from { transform: translateY(16px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
body.dark .cc-widget-expanded { background: var(--surface, #0f1629); border-color: var(--border); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.cc-widget-expanded-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 22px; color: var(--ink-lt);
  cursor: pointer; line-height: 1; padding: 4px;
}
.cc-widget-expanded-close:hover { color: var(--ink); }
.cc-widget-expanded-title {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink);
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.cc-widget-expanded-section {
  margin-bottom: 18px;
}
.cc-widget-expanded-section-label {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-lt);
  margin-bottom: 10px;
}
.cc-expanded-signal-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--bg);
}
.cc-expanded-signal-row:last-child { border-bottom: none; }
.cc-expanded-signal-dot { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }
.cc-expanded-signal-name { flex: 1; font-size: 13px; color: var(--ink-mid); }
.cc-expanded-signal-score { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--ink); width: 32px; text-align: right; }
.cc-expanded-signal-bar { width: 60px; height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.cc-expanded-signal-bar-fill { height: 100%; border-radius: 99px; transition: width 0.5s ease; }
.cc-expanded-delta { font-family: var(--mono); font-size: 12px; font-weight: 700; width: 44px; text-align: right; }
.cc-expanded-verdict { font-size: 12px; color: var(--ink-mid); padding: 6px 10px; background: var(--bg); border-radius: 6px; margin-top: 4px; line-height: 1.5; }
body.dark .cc-expanded-verdict { background: rgba(255,255,255,0.04); }

/* ── STAGGERED ENTRANCE ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.bucket-row { animation: fadeUp 0.35s ease both; }
.bucket-row:nth-child(1) { animation-delay: 0s; }
.bucket-row:nth-child(2) { animation-delay: 0.08s; }
.bucket-row:nth-child(3) { animation-delay: 0.16s; }
.bucket-row:nth-child(4) { animation-delay: 0.24s; }
.sc-enrichment-stat:nth-child(1) { animation-delay: 0.05s; }
.sc-enrichment-stat:nth-child(2) { animation-delay: 0.10s; }
.sc-enrichment-stat:nth-child(3) { animation-delay: 0.15s; }
.sc-enrichment-stat:nth-child(4) { animation-delay: 0.20s; }
.sc-enrichment-stat:nth-child(5) { animation-delay: 0.25s; }
.sc-enrichment-stat:nth-child(6) { animation-delay: 0.30s; }

/* ── ACCOUNT OVERLAY ── */
.account-overlay {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 72px 16px 16px; /* below nav */
  background: var(--overlay-bg);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.account-overlay.open { opacity: 1; pointer-events: all; }
.account-overlay-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; width: 360px;
  max-height: calc(100vh - 88px); overflow-y: auto;
  box-shadow: 0 20px 60px var(--shadow-color);
  transform: translateY(-10px);
  transition: transform 0.2s ease;
}
.account-overlay.open .account-overlay-card { transform: translateY(0); }
.account-overlay-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 0; margin-bottom: 0;
}
.account-overlay-title {
  font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -0.2px;
}
.account-overlay-close {
  font-size: 20px; line-height: 1; color: var(--ink-lt); background: none;
  border: none; cursor: pointer; padding: 2px 6px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.account-overlay-close:hover { color: var(--ink); background: var(--bg); }
.account-overlay-body { padding: 0 22px 22px; }

/* ── PERSISTENT TIER BADGE (always visible for paid users) ── */
.persistent-tier-badge {
  position: fixed; top: 16px; right: 16px; z-index: 999;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 99px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  pointer-events: none; user-select: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.persistent-tier-badge.hidden {
  opacity: 0; transform: translateY(-10px); pointer-events: none;
}
.persistent-tier-badge.tier-pro_insight {
  background: var(--purple-lt); border: 1px solid var(--purple-border);
  padding: 5px 14px 5px 6px;
  display: inline-flex !important; align-items: center; justify-content: center;
}
.persistent-tier-badge.tier-pro_insight .ki-brand-badge {
  display: inline-flex !important; align-items: center; gap: 2px;
}
.persistent-tier-badge.tier-pro_insight .ki-brand-badge-img {
  height: 22px !important; width: auto;
  margin: 0 !important; filter: invert(1);
}
.persistent-tier-badge.tier-pro_insight .ki-brand-badge-text {
  font-size: 11px; line-height: 1;
}
body.dark .persistent-tier-badge.tier-pro_insight {
  background: var(--glass); border-color: var(--purple-border);
  box-shadow: 0 2px 12px var(--shadow-accent);
}
body.dark .persistent-tier-badge.tier-pro_insight .ki-brand-badge-img {
  filter: none;
}
/* ── Pro Venture persistent badge ── */
.persistent-tier-badge.tier-pro_venture {
  background: linear-gradient(135deg, #0F2347, #1B3A6B);
  border: 1px solid rgba(46,109,180,0.35);
  padding: 5px 14px 5px 6px;
  display: inline-flex !important; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(15,35,71,0.25);
}
.persistent-tier-badge.tier-pro_venture .ki-brand-badge {
  display: inline-flex !important; align-items: center; gap: 2px;
}
.persistent-tier-badge.tier-pro_venture .ki-brand-badge-img {
  height: 22px !important; width: auto;
  margin: 0 !important; filter: none;
}
.persistent-tier-badge.tier-pro_venture .ki-brand-badge-text {
  font-size: 11px; line-height: 1; color: #FFFFFF;
}
body.dark .persistent-tier-badge.tier-pro_venture {
  background: linear-gradient(135deg, #0a1a3a, #162d5a);
  border-color: rgba(46,109,180,0.45);
  box-shadow: 0 2px 12px rgba(46,109,180,0.3);
}
@media (max-width: 600px) {
  .persistent-tier-badge { top: 10px; right: 10px; font-size: 10px; padding: 4px 10px; }
}

/* ── ACCOUNT VIEW (shared styles for overlay body) ── */
.account-hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 32px 0 28px;
}
.account-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  font-size: 26px; font-weight: 700; letter-spacing: -0.5px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.account-email {
  font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 10px;
}
.account-tier-badge {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 99px;
  background: var(--blue-lt); color: var(--blue); border: 1px solid var(--tag-border);
}
.account-tier-badge.tier-pro_insight {
  background: var(--purple-lt); border-color: var(--purple-border);
  padding: 4px 12px; display: inline-flex; align-items: center;
}
body.dark .account-tier-badge.tier-pro_insight {
  background: var(--glass); border-color: var(--purple-border);
}
.account-tier-badge.tier-pro_venture {
  background: linear-gradient(135deg, #0F2347, #1B3A6B); border-color: rgba(46,109,180,0.35);
  padding: 4px 12px; display: inline-flex; align-items: center; color: #FFFFFF;
}
body.dark .account-tier-badge.tier-pro_venture {
  background: linear-gradient(135deg, #0a1a3a, #162d5a); border-color: rgba(46,109,180,0.45);
}
.account-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px 24px; margin-bottom: 12px;
  box-shadow: 0 2px 8px var(--shadow-accent);
}
.account-card-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--ink-lt); margin-bottom: 16px;
}
.account-plan-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.account-plan-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.account-plan-active {
  font-size: 11px; font-weight: 600; color: var(--green);
  background: var(--green-lt); border: 1px solid var(--green-border);
  padding: 2px 10px; border-radius: 99px;
}
.account-plan-detail { font-size: 14px; color: var(--ink-mid); line-height: 1.6; margin-bottom: 14px; }
.account-plan-detail a { color: var(--navy); }
.account-plan-features { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.account-plan-feature { font-size: 14px; color: var(--ink-mid); }
.account-plan-feature.off { color: var(--ink-lt); }
.account-upgrade-link { font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none; }
.account-upgrade-link:hover { text-decoration: underline; }
.account-upgrade-cta {
  display: block; text-align: center; font-size: 14px; font-weight: 600;
  color: var(--white); background: var(--navy); border-radius: 10px;
  padding: 12px; text-decoration: none; margin-top: 4px;
  transition: background 0.15s;
}
.account-upgrade-cta:hover { background: var(--navy-deep); }
.account-action-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  color: var(--ink-mid); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; cursor: pointer; transition: all 0.15s;
  text-align: left;
}
.account-action-btn:hover { border-color: var(--navy); color: var(--navy); background: var(--blue-lt); }
.account-action-btn--danger { color: var(--red); }
.account-action-btn--danger:hover { border-color: var(--red); background: var(--red-lt); color: var(--red); }

/* Danger Zone card */
.account-card--danger-zone {
  border: 1px solid var(--red-lt);
  background: var(--red-lt);
}
.account-card-title--danger { color: var(--red); }
.account-danger-desc {
  font-size: 12px; color: var(--ink-lt); line-height: 1.55; margin-bottom: 12px;
}
.account-action-btn--delete {
  background: var(--white);
  border-color: var(--red);
}
.account-action-btn--delete:hover {
  background: var(--red); color: var(--white) !important; border-color: var(--red);
}

/* Danger zone dark mode */
body.dark .account-card--danger-zone {
  border-color: var(--red-border);
  background: var(--red-lt);
}
body.dark .account-action-btn--delete { background: var(--white); }
body.dark .account-action-btn--delete:hover { background: var(--red); }

.account-legal-links {
  text-align: center; padding-top: 14px; margin-top: 4px;
  font-size: 11px; color: var(--ink-lt);
}
.account-legal-links a {
  color: var(--ink-lt); text-decoration: underline;
  text-decoration-color: var(--border); text-underline-offset: 2px;
  transition: color 0.15s;
}
.account-legal-links a:hover { color: var(--ink); }
.account-legal-links span { margin: 0 8px; opacity: 0.5; }


/* ─────────────────────────────────────────────────────────────
   KEPLER INSIGHTS BRAND BADGE (reusable inline lockup)
───────────────────────────────────────────────────────────── */
.ki-brand-badge {
  display: inline-flex; align-items: center; gap: 0;
  flex-shrink: 0;
}
.ki-brand-badge-img {
  height: 32px; width: auto;
  margin: -8px 0 -10px -3px;
  display: block; flex-shrink: 0;
  filter: invert(1);
}
body.dark .ki-brand-badge-img { filter: none; }
.ki-brand-badge-text {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--purple); letter-spacing: 0.06em; text-transform: lowercase;
}
body.dark .ki-brand-badge-text { color: var(--purple); }

/* ─────────────────────────────────────────────────────────────
   KEPLER INSIGHTS INTELLIGENCE PANEL — ACCORDION
───────────────────────────────────────────────────────────── */
.ki-intel-panel { margin-top: 0; }

.ki-intel-panel-inner {
  background: linear-gradient(160deg, #0d0520 0%, #0c0a2e 45%, #0a1628 100%);
  border: 1px solid rgba(139,92,246,0.22);
  border-radius: 20px; padding: 22px 24px 16px;
  box-shadow: 0 4px 32px rgba(109,40,217,0.08);
}

.ki-intel-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(139,92,246,0.14);
}
.ki-intel-panel-label {
  font-size: 12px; font-weight: 500; color: #94a3b8; margin-left: 10px;
}
.ki-intel-panel-plan {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #a78bfa; background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.25);
  padding: 2px 8px; border-radius: 99px;
}
.ki-intel-panel-plan.active {
  color: var(--green); background: var(--green-lt);
  border-color: var(--green-border);
}

/* ── ACCORDION ROW ── */
.ki-acc-row {
  border-bottom: 1px solid rgba(139,92,246,0.10);
}
.ki-acc-row:last-child { border-bottom: none; }

.ki-acc-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; cursor: pointer; user-select: none;
  transition: opacity 0.15s;
}
.ki-acc-hd:hover { opacity: 0.8; }

.ki-acc-hd-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ki-acc-hd-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.ki-acc-hd-name {
  font-size: 12px; font-weight: 600; color: #e2e8f0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ki-acc-hd-sub {
  font-size: 10px; color: #64748b; white-space: nowrap;
}
.ki-acc-hd-score {
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: #a78bfa;
}
.ki-acc-chevron {
  font-size: 10px; color: #64748b; transition: transform 0.2s ease; flex-shrink: 0;
  line-height: 1;
}

/* ── ACCORDION BODY ── */
.ki-acc-body { padding: 0 0 12px 0; }

.ki-acc-cat-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ki-acc-cat-row:last-of-type { border-bottom: none; }
.ki-acc-cat-left { flex: 1; min-width: 0; }
.ki-acc-cat-name {
  font-size: 12px; font-weight: 500; color: #cbd5e1; line-height: 1.3; margin-bottom: 2px;
}
.ki-acc-cat-insight { font-size: 11px; color: #94a3b8; line-height: 1.55; }
.ki-acc-cat-status {
  font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 2px 7px; border-radius: 99px; flex-shrink: 0; margin-top: 2px; white-space: nowrap;
}
.ki-acc-cat-status.elite           { color: #15803D; background: #DCFCE7; }
.ki-acc-cat-status.exceptional     { color: #0F766E; background: #CCFBF1; }
.ki-acc-cat-status.strong          { color: #1B3A6B; background: #DBEAFE; }
.ki-acc-cat-status.solid           { color: #2E6DB4; background: #EFF6FF; }
.ki-acc-cat-status.promising       { color: #0369A1; background: #E0F2FE; }
.ki-acc-cat-status.emerging        { color: #B45309; background: #FEF3C7; }
.ki-acc-cat-status.developing      { color: #92400E; background: #FFF7ED; }
.ki-acc-cat-status.early-stage     { color: #B91C1C; background: #FEE2E2; }
.ki-acc-cat-status.pre-traction    { color: #7F1D1D; background: #FECACA; }
.ki-acc-cat-status.moderate        { color: var(--amber); background: var(--amber-lt); }
.ki-acc-cat-status.needs-attention { color: var(--red);   background: var(--red-lt);   }

body.dark .ki-acc-cat-status.elite           { background: rgba(74,222,128,0.15); color: #4ade80; }
body.dark .ki-acc-cat-status.exceptional     { background: rgba(45,212,191,0.15); color: #2dd4bf; }
body.dark .ki-acc-cat-status.strong          { background: rgba(129,140,248,0.15); color: #a5b4fc; }
body.dark .ki-acc-cat-status.solid           { background: rgba(96,165,250,0.15); color: #93c5fd; }
body.dark .ki-acc-cat-status.promising       { background: rgba(56,189,248,0.15); color: #38bdf8; }
body.dark .ki-acc-cat-status.emerging        { background: rgba(251,191,36,0.15); color: #fbbf24; }
body.dark .ki-acc-cat-status.developing      { background: rgba(251,146,60,0.15); color: #fb923c; }
body.dark .ki-acc-cat-status.early-stage     { background: rgba(248,113,113,0.15); color: #f87171; }
body.dark .ki-acc-cat-status.pre-traction    { background: rgba(248,113,113,0.12); color: #fca5a5; }
body.dark .ki-acc-cat-status.moderate        { background: rgba(251,191,36,0.15); color: #fbbf24; }
body.dark .ki-acc-cat-status.needs-attention { background: rgba(248,113,113,0.15); color: #f87171; }

.ki-acc-improvement {
  margin-top: 10px; padding: 8px 10px;
  background: rgba(124,58,237,0.07);
  border: 1px solid rgba(139,92,246,0.12);
  border-radius: 8px;
  font-size: 11px; color: #94a3b8; line-height: 1.6;
}
.ki-acc-improvement-label {
  display: block; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: #7c3aed; margin-bottom: 4px;
}

/* ── TOP SIGNALS SECTION ── */
.ki-acc-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(139,92,246,0.14); }
.ki-acc-section-hd {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none; padding-bottom: 6px;
}
.ki-acc-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: #7c3aed;
}
.ki-acc-section-body { padding-top: 4px; }

.ki-acc-sig-row {
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ki-acc-sig-row:last-child { border-bottom: none; }
.ki-acc-sig-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; cursor: pointer; user-select: none;
}
.ki-acc-sig-hd:hover .ki-acc-sig-name { color: #e2e8f0; }
.ki-acc-sig-name {
  font-size: 12px; color: #94a3b8; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s;
}
.ki-acc-sig-bar-wrap {
  width: 60px; height: 4px; background: rgba(255,255,255,0.07);
  border-radius: 99px; overflow: hidden; flex-shrink: 0;
}
.ki-acc-sig-bar {
  height: 100%; border-radius: 99px; background: rgba(167,139,250,0.6);
  transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
}
.ki-acc-sig-bar.elite      { background: rgba(21,128,61,0.7); }
.ki-acc-sig-bar.strong     { background: rgba(27,58,107,0.7); }
.ki-acc-sig-bar.solid      { background: rgba(46,109,180,0.7); }
.ki-acc-sig-bar.emerging   { background: rgba(180,83,9,0.7); }
.ki-acc-sig-bar.developing { background: rgba(146,64,14,0.7); }
.ki-acc-sig-bar.early-stage{ background: rgba(239,68,68,0.7); }
.ki-acc-sig-bar.moderate   { background: rgba(251,191,36,0.7); }
.ki-acc-sig-bar.low        { background: rgba(239,68,68,0.7); }
.ki-acc-sig-score {
  font-family: var(--mono); font-size: 11px; color: #94a3b8;
  width: 24px; text-align: right; flex-shrink: 0;
}
.ki-acc-sig-score.elite      { color: rgba(21,128,61,0.9); }
.ki-acc-sig-score.strong     { color: rgba(27,58,107,0.9); }
.ki-acc-sig-score.solid      { color: rgba(46,109,180,0.9); }
.ki-acc-sig-score.emerging   { color: rgba(180,83,9,0.9); }
.ki-acc-sig-score.developing { color: rgba(146,64,14,0.9); }
.ki-acc-sig-score.early-stage{ color: rgba(239,68,68,0.9); }
.ki-acc-sig-score.moderate   { color: rgba(251,191,36,0.9); }
.ki-acc-sig-score.low        { color: rgba(239,68,68,0.9); }

.ki-acc-sig-body { padding: 0 0 10px 0; }
.ki-acc-guid-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: #7c3aed; margin-bottom: 3px; margin-top: 6px;
}
.ki-acc-guid-text { font-size: 11px; color: #94a3b8; line-height: 1.6; }

/* ── FREE-TIER BLUR OVERLAY ── */
.ki-intel-blur-wrap { position: relative; }
.ki-intel-blur-content { filter: blur(3.5px); user-select: none; pointer-events: none; }
.ki-intel-upgrade-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; z-index: 10;
}
.ki-intel-upgrade-card {
  background: rgba(12,10,46,0.90); border: 1px solid rgba(139,92,246,0.40);
  border-radius: 16px; padding: 24px 28px; text-align: center;
  backdrop-filter: blur(10px); max-width: 300px;
  box-shadow: 0 8px 40px rgba(109,40,217,0.2);
}
.ki-intel-upgrade-badge { display: inline-flex; margin-bottom: 14px; }
.ki-intel-upgrade-title {
  font-size: 15px; font-weight: 700; color: #e2e8f0;
  margin-bottom: 7px; line-height: 1.3; letter-spacing: -0.02em;
}
.ki-intel-upgrade-sub {
  font-size: 12px; color: #94a3b8; line-height: 1.6; margin-bottom: 18px;
}
.ki-intel-upgrade-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: #dbb8ff; text-decoration: none;
  background: linear-gradient(135deg, #0d0520 0%, #1e1054 45%, #1B3A6B 100%);
  border: 1px solid rgba(139,92,246,0.4);
  padding: 9px 18px; border-radius: 8px;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.ki-intel-upgrade-btn:hover { filter: brightness(1.18); transform: translateY(-1px); }

/* Intel panel responsive (mobile full-width) */
@media (max-width: 900px) {
  .ki-intel-panel-inner { padding: 18px 16px 12px; }
}

/* ── SANDBOX VIEW ────────────────────────────────────────────────────────── */
.sandbox-banner {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #f97316;
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.28);
  border-radius: 10px; padding: 10px 16px; margin-bottom: 28px;
  box-shadow: 0 0 16px rgba(249,115,22,0.12);
}
.sandbox-banner-icon { font-size: 14px; }
body.dark .sandbox-banner {
  background: rgba(249,115,22,0.10);
  box-shadow: 0 0 20px rgba(249,115,22,0.20);
}

/* ── ADMIN PANEL VIEW ────────────────────────────────────────────────────── */
.admin-eyebrow { color: #f97316 !important; }

.admin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
body.dark .admin-card {
  background: var(--white);
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.30);
}

.admin-card-hd {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 700; color: var(--ink);
  margin-bottom: 8px;
}
.admin-card-hd svg { color: #f97316; flex-shrink: 0; }

.admin-card-desc {
  font-size: 13px; color: var(--ink-lt); line-height: 1.6;
  margin-bottom: 16px;
}
.admin-card-desc code {
  font-family: var(--mono); font-size: 11px;
  background: rgba(0,0,0,0.06); border-radius: 4px; padding: 1px 5px;
}
body.dark .admin-card-desc code { background: rgba(255,255,255,0.08); }

.admin-input-row {
  display: flex; gap: 10px; align-items: center;
}
.admin-domain-input { flex: 1; margin-bottom: 0 !important; }

.admin-action-btn {
  font-family: var(--font); font-size: 13px; font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff; background: #f97316;
  border: none; border-radius: 8px; padding: 10px 18px;
  cursor: pointer; transition: filter 0.15s ease, transform 0.15s ease;
  white-space: nowrap; flex-shrink: 0;
}
.admin-action-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.admin-action-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }
.admin-action-btn--danger {
  background: var(--red);
}

.admin-status {
  font-size: 12px; font-family: var(--mono); margin-top: 10px;
  min-height: 16px; transition: color 0.2s;
}
.admin-status--ok    { color: var(--green); }
.admin-status--error { color: var(--red); }

/* ─────────────────────────────────────────────────────────
   LAUNCH STEP FLOW
   ───────────────────────────────────────────────────────── */

/* Progress dots */
.ls-progress {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 32px;
}
.ls-step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: background 0.25s;
  flex-shrink: 0;
}
.ls-step-dot.active { background: var(--blue); }
.ls-step-dot.done   { background: var(--green); }
.ls-step-line {
  flex: 1; height: 2px; background: var(--border); margin: 0 6px;
}

/* Each step pane */
.ls-step { width: 100%; }

/* Launch bumper containers */
.ls-bumper { padding: 28px 24px; animation: fadeUp 0.4s ease forwards; }
.ls-bumper .form-field { margin-bottom: 20px; }

/* Search error */
.ls-search-error {
  font-size: 13px; color: var(--red); margin-bottom: 14px;
}

/* Search results list */
.ls-results { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
/* Result items — bumper style (no card border/radius) */
.ls-result-item.ki-bumper {
  padding: 14px 16px; margin-bottom: 0;
  border: none; border-radius: 0; box-shadow: none;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.75) 40%, rgba(255,255,255,0) 100%);
  cursor: pointer; transition: background 0.2s ease;
  animation: fadeUp 0.35s ease forwards;
  opacity: 0;
}
.ls-results .ls-result-item:nth-child(1) { animation-delay: 0s; }
.ls-results .ls-result-item:nth-child(2) { animation-delay: 0.05s; }
.ls-results .ls-result-item:nth-child(3) { animation-delay: 0.1s; }
.ls-results .ls-result-item:nth-child(4) { animation-delay: 0.15s; }
.ls-results .ls-result-item:nth-child(5) { animation-delay: 0.2s; }
.ls-results .ls-result-none { animation: fadeUp 0.35s ease 0.25s forwards; opacity: 0; }
.ls-result-item.ki-bumper:hover {
  background: radial-gradient(ellipse at center, rgba(46,109,180,0.10) 40%, rgba(255,255,255,0) 100%);
}
.ls-result-item.ki-bumper.selected {
  background: radial-gradient(ellipse at center, rgba(46,109,180,0.14) 40%, rgba(255,255,255,0) 100%);
}
.ls-result-item.ki-bumper.selected::before, .ls-result-item.ki-bumper.selected::after,
.ls-result-item.ki-bumper.selected .ki-bumper-bt::before, .ls-result-item.ki-bumper.selected .ki-bumper-bt::after {
  border-color: var(--navy);
}
.ls-result-inner {
  display: flex; align-items: center; gap: 14px;
}
body.dark .ls-result-item.ki-bumper {
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.45) 40%, rgba(0,0,0,0) 100%);
}
body.dark .ls-result-item.ki-bumper:hover {
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.12) 40%, rgba(0,0,0,0) 100%);
}
body.dark .ls-result-item.ki-bumper.selected::before, body.dark .ls-result-item.ki-bumper.selected::after,
body.dark .ls-result-item.ki-bumper.selected .ki-bumper-bt::before, body.dark .ls-result-item.ki-bumper.selected .ki-bumper-bt::after {
  border-color: var(--navy);
}
.ls-result-logo {
  width: 36px; height: 36px; border-radius: 8px; object-fit: contain;
  border: 1px solid var(--border); flex-shrink: 0; background: var(--bg);
}
.ls-result-initials {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--blue); background: var(--bg);
}
.ls-result-info { flex: 1; min-width: 0; }
.ls-result-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.ls-result-domain { font-family: var(--mono); font-size: 11px; color: var(--ink-lt); }
.ls-result-none {
  text-align: center; font-size: 13px; color: var(--ink-lt);
  cursor: pointer; padding: 12px; border-radius: 10px;
  border: 1.5px dashed var(--border); transition: border-color 0.15s ease;
}
.ls-result-none:hover { border-color: var(--ink-lt); color: var(--ink-mid); }

/* Company card — now uses ki-bumper */
.ls-company-card.ki-bumper {
  padding: 22px; margin-bottom: 20px;
  border: none; border-radius: 0; box-shadow: none;
  animation: fadeUp 0.4s ease forwards;
}
.ls-card-logo-wrap {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.ls-card-logo {
  width: 48px; height: 48px; border-radius: 10px;
  object-fit: contain; border: 1px solid var(--border); flex-shrink: 0;
}
.ls-card-initials {
  width: 48px; height: 48px; border-radius: 10px;
  border: 1px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: var(--blue);
  background: var(--surface);
}
.ls-card-name  { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.ls-card-domain { font-family: var(--mono); font-size: 12px; color: var(--blue); margin-bottom: 6px; }
.ls-card-meta  { font-size: 12px; color: var(--ink-lt); }

.ls-card-actions { display: flex; flex-direction: column; gap: 10px; }

/* Back / secondary buttons */
.ls-back-btn {
  background: none; border: none; color: var(--ink-lt);
  font-size: 13px; cursor: pointer; text-align: center;
  padding: 8px; width: 100%;
}
.ls-back-btn:hover { color: var(--ink); }

/* Inline field errors */
.ls-field-error {
  font-size: 12px; color: var(--red); min-height: 16px; margin-top: 6px;
}

/* OTP input */
.ls-otp-input {
  text-align: center; font-family: var(--mono);
  font-size: 22px; letter-spacing: 0.3em;
}

/* Resend row */
.ls-resend-row {
  text-align: center; font-size: 12px;
  color: var(--ink-lt); margin-top: 12px;
}
.ls-resend-row a { color: var(--blue); text-decoration: none; }
.ls-resend-row a:hover { text-decoration: underline; }

/* Verified badge */
.ls-verified-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; margin-top: 12px; margin-bottom: 8px;
  background: var(--green-bg, rgba(34,197,94,0.08));
  border: 1px solid var(--green, #22c55e);
  border-radius: 8px; font-size: 13px; color: var(--green, #22c55e);
}
.ls-verified-icon {
  font-size: 16px; font-weight: 700;
}

/* No-match helper text */
.ls-no-match {
  font-size: 12px; color: var(--ink-lt); margin-top: 8px;
}
.ls-no-match a { color: var(--blue); text-decoration: none; }
.ls-no-match a:hover { text-decoration: underline; }

/* form-field spacing inside step cards */
.ls-step .form-card .form-field { margin-bottom: 16px; }
.ls-step .form-card .form-field:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   ESTABLISHED SCORECARD LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── BUSINESS HEALTH SNAPSHOT — Hero Stats ── */
.est-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 20px;
}
.est-stat-badge {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 10px; text-align: center;
}
.est-stat-label {
  font-family: var(--mono); font-size: 9px; font-weight: 500;
  color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.est-stat-value {
  font-family: var(--mono); font-size: 18px; font-weight: 600;
  color: var(--ink); line-height: 1.2;
}
.est-stat-indicator {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font); font-size: 12px; font-weight: 600;
}
.est-stat-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.est-stat-dot.stable   { background: var(--green); }
.est-stat-dot.moderate { background: var(--amber); }
.est-stat-dot.volatile { background: var(--red); }
.est-stat-indicator.stable   { color: var(--green); }
.est-stat-indicator.moderate { color: var(--amber); }
.est-stat-indicator.volatile { color: var(--red); }

/* ── Established — Composite Score Row (smaller, inline) ── */
.est-score-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.est-score-pill {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 14px; border-radius: 10px;
  background: var(--green-lt); border: 1px solid var(--green);
}
.est-score-pill.amber { background: var(--amber-lt); border-color: var(--amber); }
.est-score-pill.red-t { background: var(--red-lt); border-color: var(--red); }
.est-score-num {
  font-family: var(--mono); font-size: 28px; font-weight: 700;
  color: var(--green); line-height: 1;
}
.est-score-pill.amber .est-score-num { color: var(--amber); }
.est-score-pill.red-t .est-score-num { color: var(--red); }
.est-score-grade {
  font-family: var(--font); font-size: 11px; font-weight: 600;
  color: var(--green); text-transform: uppercase; letter-spacing: 0.06em;
}
.est-score-pill.amber .est-score-grade { color: var(--amber); }
.est-score-pill.red-t .est-score-grade { color: var(--red); }

/* ── Established — Section labels ── */
.est-section-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.16em;
  margin: 18px 0 12px;
}

/* ── RISK ASSESSMENT PANEL ── */
.est-risk-section {
  margin-bottom: 20px; padding: 14px; border-radius: 10px;
  background: rgba(139,92,246,0.06); border: 1px solid rgba(139,92,246,0.15);
}
body.dark .est-risk-section {
  background: rgba(139,92,246,0.10); border-color: rgba(139,92,246,0.25);
}
.est-risk-header {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--ink-lt); text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 10px;
}
.est-risk-overall {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--ink);
}
.est-risk-badge {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; text-transform: uppercase;
  letter-spacing: 0.08em;
}
.est-risk-badge.low      { background: var(--green-lt); color: var(--green); }
.est-risk-badge.moderate { background: var(--amber-lt); color: var(--amber); }
.est-risk-badge.high     { background: var(--red-lt); color: var(--red); }

.est-risk-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 12px; color: var(--ink-mid);
}
.est-risk-row-label { flex: 1; }
.est-risk-row-status {
  display: flex; align-items: center; gap: 5px;
  font-weight: 600; font-size: 11px;
}

/* ── BUSINESS HEALTH DASHBOARD ── */
.est-dash-section { margin-bottom: 20px; }
.est-dash-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--ink);
}
.est-dash-row:last-child { border-bottom: none; }
.est-dash-label { color: var(--ink-mid); font-weight: 500; }
.est-dash-value { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.est-dash-stars {
  color: var(--amber); font-size: 13px; letter-spacing: 1px; margin-right: 6px;
}
.est-dash-sub { font-size: 10px; color: var(--ink-lt); margin-left: 4px; }

/* ── PROFILE TOGGLE ── */
.profile-toggle {
  display: inline-flex; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: var(--white);
}
.profile-toggle-opt {
  padding: 5px 14px; font-family: var(--font); font-size: 11px;
  font-weight: 600; color: var(--ink-lt); cursor: pointer;
  border: none; background: transparent; transition: all 0.15s;
  letter-spacing: 0.02em;
}
.profile-toggle-opt.active {
  background: var(--navy); color: #fff;
}
body.dark .profile-toggle-opt.active {
  background: var(--blue); color: #0d1330;
}
.profile-toggle-opt:not(.active):hover {
  background: var(--blue-lt); color: var(--ink);
}

/* ── PROFILE SWITCH OVERLAY ── */
.profile-switch-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(6,11,24,0.92); backdrop-filter: blur(8px);
}
.profile-switch-logo {
  width: 80px; height: auto;
  animation: pulseLogo 1.5s ease-in-out infinite;
}
@keyframes pulseLogo {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.05); }
}
.profile-switch-text {
  margin-top: 18px; font-family: var(--font); font-size: 14px;
  font-weight: 500; color: #94a3b8; letter-spacing: 0.04em;
}

/* ── MOMENTUM INDEX OVERLAY ── */
.momentum-overlay {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,11,24,0.85); backdrop-filter: blur(6px);
}
.momentum-overlay-card {
  background: var(--white); border-radius: 18px; padding: 28px;
  max-width: 480px; width: 90%; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
}
.momentum-overlay-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 20px; color: var(--ink-lt);
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.momentum-overlay-close:hover { color: var(--ink); background: var(--blue-lt); }

/* ── CC VIEW MOMENTUM BUTTON ── */
.est-momentum-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--white);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--navy); cursor: pointer; transition: all 0.15s;
  margin-top: 10px;
}
.est-momentum-btn:hover { border-color: var(--blue); background: var(--blue-lt); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .est-stats-row { grid-template-columns: 1fr 1fr; }
  .est-stat-value { font-size: 15px; }
  .est-score-num { font-size: 22px; }
  .profile-toggle { width: 100%; }
  .profile-toggle-opt { flex: 1; text-align: center; }
  .sc-card-grid { flex-direction: column; }
}

/* ── SCORECARD — TWO-COLUMN GRID (desktop) ── */
.sc-card-grid {
  display: flex; flex-direction: column;
}
.sc-col-left { min-width: 0; }
.sc-col-right { min-width: 0; }

@media (min-width: 900px) {
  .sc-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
  }
}

/* ── PROFILE SELECTION PROMPT ── */
.profile-select-tile {
  background: var(--white); border: 2px solid var(--border);
  border-radius: 14px; padding: 24px 16px; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  text-align: center;
}
.profile-select-tile:hover {
  border-color: var(--blue); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.ps-tile-icon { font-size: 32px; margin-bottom: 12px; }
.ps-tile-title {
  font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 8px;
}
.ps-tile-desc {
  font-size: 12px; color: var(--ink-mid); line-height: 1.55;
}

/* ── RISK ASSESSMENT — EXPANDABLE EXPLANATIONS ── */
.est-risk-row { cursor: pointer; transition: background 0.1s; border-radius: 4px; padding: 6px 4px; }
.est-risk-row:hover { background: rgba(139,92,246,0.08); }
.est-risk-explain {
  font-size: 11px; color: var(--ink-lt); line-height: 1.5;
  padding: 4px 4px 8px; display: none;
}
.est-risk-row.open + .est-risk-explain { display: block; }

/* ── CC PROFILE TAG ── */
.cc-profile-tag {
  display: inline-block; font-family: var(--mono); font-size: 9px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 2px 8px; border-radius: 4px; margin-left: 8px;
  background: var(--blue-lt); color: var(--blue);
}

/* ── INTEL PANEL IN CC TILE: uses theme tokens for light/dark ── */
.cc-intel-body .est-risk-section { color: var(--ink); }
.cc-intel-body .est-risk-header { color: var(--ink-lt); }
.cc-intel-body .est-risk-overall { color: var(--ink); }
.cc-intel-body .est-risk-row { color: var(--ink); }
.cc-intel-body .est-risk-row-label { color: var(--ink-mid); }
.cc-intel-body .est-risk-row-status { color: var(--ink); }
.cc-intel-body .est-risk-explain { color: var(--ink-lt); }
.cc-intel-body .est-risk-section {
  background: var(--blue-lt); border-color: var(--border);
}
.cc-intel-body .est-risk-row:hover { background: var(--blue-lt); }
.cc-intel-body .est-dash-row { color: var(--ink); border-bottom-color: var(--border); }
.cc-intel-body .est-dash-label { color: var(--ink-mid); }
.cc-intel-body .est-dash-value { color: var(--ink); }
.cc-intel-body .est-dash-sub { color: var(--ink-lt); }
.cc-intel-body .ki-acc-hd-name { color: var(--ink); }
.cc-intel-body .ki-acc-hd-sub { color: var(--ink-lt); }
.cc-intel-body .ki-acc-hd-score { color: var(--ink); }
.cc-intel-body .ki-acc-cat-name { color: var(--ink); }
.cc-intel-body .ki-acc-cat-insight { color: var(--ink-mid); }
.cc-intel-body .ki-acc-improvement { color: var(--ink-mid); }
.cc-intel-body .ki-acc-section-label { color: var(--blue); }
.cc-intel-body .ki-acc-sig-name { color: var(--ink); }
.cc-intel-body .ki-acc-sig-score { color: var(--ink); }
.cc-intel-body .ki-acc-sig-detail { color: var(--ink-mid); }

/* ═══════════════════════════════════════════════════════════════════════════
   V1.75: NEW UI COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Momentum Score Hero ─────────────────────────────────────────────────── */
.score-hero-row { display: flex; align-items: flex-start; gap: 16px; }
.score-hero-momentum {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 20px; border-radius: 16px;
  background: rgba(139,92,246,0.08); border: 1.5px solid rgba(139,92,246,0.25);
}
.momentum-value {
  font-family: var(--mono); font-size: 32px; font-weight: 700;
  color: #8b5cf6; line-height: 1;
}
.momentum-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: #8b5cf6; margin-top: 4px;
}
body.dark .score-hero-momentum { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.3); }
body.dark .momentum-value { color: #a78bfa; }
body.dark .momentum-label { color: #a78bfa; }

/* ── Signal Movers Panel ─────────────────────────────────────────────────── */
.movers-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin: 16px 0;
}
.movers-heading {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 8px; padding-left: 2px;
}
.movers-up .movers-heading { color: #15803D; }
.movers-down .movers-heading { color: #B45309; }
body.dark .movers-up .movers-heading { color: #4ade80; }
body.dark .movers-down .movers-heading { color: #fbbf24; }

.mover-card {
  padding: 8px 10px; border-radius: 10px; margin-bottom: 6px;
  border: 1px solid var(--bg);
}
.movers-up .mover-card { background: rgba(21,128,61,0.04); }
.movers-down .mover-card { background: rgba(180,83,9,0.04); }
body.dark .movers-up .mover-card { background: rgba(74,222,128,0.06); }
body.dark .movers-down .mover-card { background: rgba(251,191,36,0.06); }

.mover-header { display: flex; justify-content: space-between; align-items: center; }
.mover-label { font-size: 12px; font-weight: 600; color: var(--ink); }
.mover-delta {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px;
}
.mover-delta-up { color: #15803D; background: rgba(21,128,61,0.1); }
.mover-delta-down { color: #B45309; background: rgba(180,83,9,0.1); }
body.dark .mover-delta-up { color: #4ade80; background: rgba(74,222,128,0.15); }
body.dark .mover-delta-down { color: #fbbf24; background: rgba(251,191,36,0.15); }

.mover-scores {
  font-family: var(--mono); font-size: 10px; color: var(--ink-lt);
  margin-top: 2px;
}

@media (max-width: 600px) {
  .movers-panel { grid-template-columns: 1fr; }
  .score-hero-row { flex-direction: column; gap: 10px; }
}

/* ── CC Tab Headers ──────────────────────────────────────────────────────── */
.cc-tab-header { margin-bottom: 20px; }
.cc-tab-title { font-size: 20px; font-weight: 700; color: var(--ink); }
.cc-tab-sub { font-size: 13px; color: var(--ink-lt); margin-top: 2px; }
.cc-tab-updated { font-size: 11px; color: var(--ink-lt); margin-top: 6px; font-family: var(--mono); letter-spacing: 0.02em; opacity: 0.7; }
.cc-empty-tab { text-align: center; padding: 60px 24px; }
.cc-empty-tab .empty-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.cc-empty-tab .empty-sub { font-size: 13px; color: var(--ink-lt); }

/* ── SEO Intelligence Tab ────────────────────────────────────────────────── */
.seo-keyword-pulse {
  background: var(--white); border: 1px solid var(--bg); border-radius: 14px;
  padding: 20px; margin-bottom: 16px;
}
.seo-pulse-hero { display: flex; justify-content: space-around; text-align: center; margin-bottom: 14px; }
.seo-pulse-stat { flex: 1; }
.seo-pulse-num {
  font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--ink);
}
.seo-gained .seo-pulse-num { color: #15803D; }
.seo-lost .seo-pulse-num { color: #B91C1C; }
body.dark .seo-gained .seo-pulse-num { color: #4ade80; }
body.dark .seo-lost .seo-pulse-num { color: #f87171; }
.seo-pulse-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-lt); margin-top: 2px; }

.seo-pulse-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--bg); }
.seo-bar-gained { background: #15803D; border-radius: 99px 0 0 99px; transition: width 0.6s ease; }
.seo-bar-lost { background: #B91C1C; border-radius: 0 99px 99px 0; transition: width 0.6s ease; }
body.dark .seo-bar-gained { background: #4ade80; }
body.dark .seo-bar-lost { background: #f87171; }

.seo-new-kw {
  text-align: center; padding: 16px; margin-bottom: 16px;
  background: var(--white); border: 1px solid var(--bg); border-radius: 14px;
}
.seo-new-kw-num { font-family: var(--mono); font-size: 32px; font-weight: 700; color: var(--ink); }
.seo-new-kw-label { font-size: 12px; color: var(--ink-lt); margin-top: 2px; }

.seo-stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.seo-stat-card {
  background: var(--white); border: 1px solid var(--bg); border-radius: 12px;
  padding: 16px; text-align: center;
}
.seo-stat-num { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--ink); }
.seo-stat-label { font-size: 11px; color: var(--ink-lt); margin-top: 4px; }

/* ── Team Health Tab ─────────────────────────────────────────────────────── */
.team-section { margin-bottom: 20px; }
.team-section-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-lt); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.team-headcount {
  font-weight: 500; text-transform: none; letter-spacing: 0;
  font-size: 12px; color: var(--ink-lt);
}
.team-ceo-badge {
  font-weight: 600; text-transform: none; letter-spacing: 0;
  font-size: 11px; color: #8b5cf6; background: rgba(139,92,246,0.08);
  padding: 2px 8px; border-radius: 6px;
}
body.dark .team-ceo-badge { color: #a78bfa; background: rgba(167,139,250,0.12); }

.team-radar-wrap {
  max-width: 380px; margin: 0 auto;
}

.team-dna-bar {
  display: flex; height: 28px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--bg);
}
.team-dna-segment {
  display: flex; align-items: center; justify-content: center;
  min-width: 2px; transition: width 0.4s ease;
}
.team-dna-label {
  font-size: 9px; font-weight: 600; color: #fff; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.team-dna-legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin-top: 10px; padding: 0 2px;
}
.team-dna-legend-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink-lt);
}
.team-dna-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.team-hiring-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.team-hiring-stat {
  background: var(--white); border: 1px solid var(--bg); border-radius: 12px;
  padding: 14px; text-align: center;
}
.team-hiring-num { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--ink); }
.team-hiring-label { font-size: 11px; color: var(--ink-lt); margin-top: 3px; }

/* ── Traffic Source Donut ────────────────────────────────────────────────── */
.traffic-donut-section {
  margin-top: 20px; padding: 20px;
  background: var(--white); border: 1px solid var(--bg); border-radius: 14px;
}
.traffic-donut-wrap {
  max-width: 300px; margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   V1.75b: INNER TAB SYSTEM + METRIC INSIGHTS + LOADING REVAMP
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Inner Tab System (reusable within any CC page) ──────────────────────── */
.cc-inner-tabs {
  display: flex; gap: 0; border-bottom: 2px solid var(--bg);
  margin-bottom: 24px;
}
.cc-inner-tab {
  padding: 10px 20px; font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-lt); background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cc-inner-tab:hover { color: var(--ink); }
.cc-inner-tab.active { color: var(--navy); border-bottom-color: var(--navy); }
body.dark .cc-inner-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.cc-inner-panel { display: none; animation: ccFadeIn 0.2s ease; }
.cc-inner-panel.active { display: block; }

/* ── Metric Insight Card (reusable) ──────────────────────────────────────── */
.metric-insight { margin-bottom: 20px; }
.metric-insight-hero { text-align: center; padding: 24px 16px 16px; }
.metric-insight-num {
  font-family: var(--mono); font-size: 36px; font-weight: 700;
  color: var(--ink); line-height: 1.1;
}
.metric-insight-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-lt); margin-top: 6px;
}
.metric-insight-verdict {
  padding: 10px 16px; font-size: 13px; font-weight: 600; line-height: 1.5;
  border-top: 1px solid var(--bg);
}
.metric-insight-verdict.tier-high { color: var(--green); }
.metric-insight-verdict.tier-mid { color: var(--amber); }
.metric-insight-verdict.tier-low { color: var(--red); }
body.dark .metric-insight-verdict.tier-high { color: #4ade80; }
body.dark .metric-insight-verdict.tier-mid { color: #fbbf24; }
body.dark .metric-insight-verdict.tier-low { color: #f87171; }
.metric-insight-body {
  padding: 12px 16px; font-size: 13px; line-height: 1.65; color: var(--ink-mid);
}
.metric-insight-action {
  padding: 10px 16px; border-top: 1px solid var(--bg);
}
.metric-insight-action-label {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-lt);
  margin-bottom: 4px;
}
.metric-insight-action-text { font-size: 13px; line-height: 1.6; color: var(--ink-mid); }

/* ── Large Chart Container ───────────────────────────────────────────────── */
.chart-large-wrap { position: relative; height: 350px; margin-bottom: 20px; }
.chart-large-wrap canvas { width: 100% !important; height: 100% !important; }

/* ── Smooth Expand Animation (global for all expandable sections) ────────── */
[id^="seo-expand-"] {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
[id^="seo-expand-"].seo-expand-open { opacity: 1; }
/* Generic expandable pattern — used by ki-acc-body, cc-all-movers, etc. */
.expand-smooth {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.expand-smooth.open { opacity: 1; }

/* ── Loading Screen Progress Bar ─────────────────────────────────────────── */
.loading-progress-wrap { width: 100%; max-width: 420px; margin: 24px auto 0; }
.loading-progress-bar {
  height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden;
}
.loading-progress-fill {
  height: 100%; border-radius: 99px; width: 0%;
  background: linear-gradient(90deg, var(--navy), var(--blue));
  transition: width 0.5s ease;
}
body.dark .loading-progress-fill { background: linear-gradient(90deg, #818cf8, #a78bfa); }
.loading-progress-meta {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-family: var(--mono); font-size: 11px;
}
.loading-progress-pct { font-weight: 700; color: var(--ink); }
.loading-progress-eta { color: var(--ink-lt); }

/* ── Loading Screen Data Source Checklist ─────────────────────────────────── */
.loading-checklist { width: 100%; max-width: 420px; margin: 20px auto 0; text-align: left; }
.loading-checklist-title {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-lt);
  margin-bottom: 10px;
}
.loading-check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--bg);
  transition: opacity 0.3s ease;
}
.loading-check-icon {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  width: 22px; text-align: center; flex-shrink: 0;
  color: var(--ink-lt); transition: color 0.3s ease;
}
.loading-check-item[data-state="loading"] .loading-check-icon {
  color: var(--blue); animation: dotPulse 1.6s ease-in-out infinite;
}
.loading-check-item[data-state="done"] .loading-check-icon { color: var(--green); }
body.dark .loading-check-item[data-state="loading"] .loading-check-icon { color: #818cf8; }
body.dark .loading-check-item[data-state="done"] .loading-check-icon { color: #4ade80; }
.loading-check-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.loading-check-sub { font-size: 11px; color: var(--ink-lt); margin-left: auto; }

/* ── Momentum Hero (full-width on Home) ──────────────────────────────────── */
.cc-widget-momentum-hero { grid-column: 1 / -1 !important; }
.cc-momentum-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px;
}
.cc-momentum-score-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.cc-momentum-score {
  font-family: var(--mono); font-size: 52px; font-weight: 700; color: var(--navy);
}
body.dark .cc-momentum-score { color: #a78bfa; }
.cc-momentum-denom { font-size: 16px; color: var(--ink-lt); }
.cc-momentum-gauge { width: 120px; height: 70px; flex-shrink: 0; }
.cc-momentum-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 16px;
}
.cc-momentum-col-title {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-lt);
  margin-bottom: 10px;
}
.cc-momentum-sig-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 0;
  font-size: 12px;
}
.cc-momentum-sig-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cc-momentum-sig-name { flex: 1; color: var(--ink); font-weight: 500; }
.cc-momentum-sig-score { font-family: var(--mono); font-weight: 700; color: var(--ink); width: 32px; text-align: right; }
.cc-momentum-expand-btn {
  width: 100%; margin-top: 14px; padding: 10px; background: none;
  border: 2px solid var(--border); border-radius: 8px;
  font-family: var(--font); font-size: 13px; font-weight: 700;
  color: var(--ink); cursor: pointer; transition: all 0.15s ease;
}
.cc-momentum-expand-btn:hover { border-color: var(--navy); color: var(--navy); }
body.dark .cc-momentum-expand-btn:hover { border-color: var(--blue); color: var(--blue); }

/* ── Arc Gauge SVG ───────────────────────────────────────────────────────── */
.arc-gauge-track { stroke: var(--bg); }
.arc-gauge-fill { stroke: var(--navy); transition: stroke-dashoffset 1s ease; }
body.dark .arc-gauge-fill { stroke: #a78bfa; }
.arc-gauge-label {
  font-family: var(--mono); font-weight: 700; fill: var(--ink);
}

/* ── Momentum Signals Full Page (Delta Tab 2) ────────────────────────────── */
.momentum-full-grid {
  display: grid; grid-template-columns: 1fr 80px 60px;
  gap: 0; border-top: 1px solid var(--bg);
}
.momentum-full-header {
  display: grid; grid-template-columns: 1fr 80px 60px;
  gap: 0; padding: 8px 0; border-bottom: 1px solid var(--bg);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-lt);
}
.momentum-full-row {
  display: grid; grid-template-columns: 1fr 80px 60px;
  gap: 0; padding: 8px 0; border-bottom: 1px solid var(--bg);
  align-items: center; font-size: 13px;
}
.momentum-full-row .mom-bar-wrap {
  height: 5px; background: var(--bg); border-radius: 99px; overflow: hidden;
}
.momentum-full-row .mom-bar-fill { height: 100%; border-radius: 99px; }

/* ── Responsive for inner tabs + new components ──────────────────────────── */
@media (max-width: 680px) {
  .cc-inner-tabs { overflow-x: auto; white-space: nowrap; }
  .cc-inner-tab { padding: 8px 14px; font-size: 11px; }
  .cc-momentum-grid { grid-template-columns: 1fr; }
  .chart-large-wrap { height: 250px; }
  .metric-insight-num { font-size: 28px; }
  .cc-momentum-score { font-size: 40px; }
  .loading-check-sub { display: none; }
}
