/* ── eureach.eu — Competitor Tracker ───────────────────── */

.ct-page {
  min-height: 100vh;
  padding-top: 70px;
  background: var(--navy);
}

/* ── Header ───────────────────────────────────────────── */
.ct-header {
  background: var(--navy2);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.ct-header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ct-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.ct-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Stats bar ────────────────────────────────────────── */
.ct-stats {
  display: flex;
  gap: 0;
  border-left: 1px solid var(--border);
}

.ct-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 24px;
  border-right: 1px solid var(--border);
  gap: 2px;
}

.ct-stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.ct-stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ct-stat-alert .ct-stat-val { color: #f87171; }

/* ── Body layout (panel + board) ──────────────────────── */
.ct-body {
  display: flex;
  align-items: flex-start;
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 28px;
  gap: 24px;
}

/* ── Search panel ─────────────────────────────────────── */
.ct-panel {
  width: 260px;
  flex-shrink: 0;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 84px;
}

.ct-panel-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue2);
  margin-bottom: 4px;
}

.ct-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

.ct-run-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border: none;
  border-radius: 10px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  font-family: inherit;
  margin-top: 4px;
}
.ct-run-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.ct-run-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.ct-run-err {
  font-size: 0.78rem;
  color: #f87171;
  min-height: 16px;
  text-align: center;
}

/* ── Board grid ───────────────────────────────────────── */
.ct-board {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  align-items: start;
}

/* ── Empty state ──────────────────────────────────────── */
.ct-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.ct-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.ct-empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.ct-empty-sub {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 340px;
  margin: 0 auto;
}

/* ── Competitor card ──────────────────────────────────── */
.ct-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.ct-card:hover {
  border-color: rgba(255,255,255,0.14);
}

.ct-card.ct-card-alert {
  border-color: rgba(248,113,113,0.35);
}

.ct-card-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ct-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.ct-card-url {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 3px;
}

.ct-card-url a {
  color: var(--muted);
  text-decoration: none;
}

.ct-card-url a:hover { color: var(--text); }

.ct-card-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ct-alert-badge {
  background: rgba(248,113,113,0.15);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  letter-spacing: 0.04em;
}

.ct-industry-tag {
  background: var(--glass2);
  color: var(--muted);
  border-radius: 6px;
  font-size: 0.68rem;
  padding: 3px 8px;
}

/* ── Score section ────────────────────────────────────── */
.ct-score-section {
  padding: 18px 18px 14px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.ct-score-big {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}

.ct-score-num {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.ct-score-num.score-green  { color: #4ade80; }
.ct-score-num.score-orange { color: #fbbf24; }
.ct-score-num.score-red    { color: #f87171; }

.ct-score-denom {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

.ct-score-meta {
  flex: 1;
  min-width: 0;
}

.ct-last-checked {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ── Breakdown mini-bars ──────────────────────────────── */
.ct-breakdown {
  padding: 0 18px 14px;
}

.ct-breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ct-breakdown-label {
  font-size: 0.7rem;
  color: var(--muted);
  width: 120px;
  flex-shrink: 0;
}

.ct-bar-track {
  flex: 1;
  height: 5px;
  background: var(--glass2);
  border-radius: 3px;
  overflow: hidden;
}

.ct-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.ct-bar-fill.score-green  { background: #4ade80; }
.ct-bar-fill.score-orange { background: #fbbf24; }
.ct-bar-fill.score-red    { background: #f87171; }

.ct-breakdown-score {
  font-size: 0.7rem;
  font-weight: 700;
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}

/* ── SVG trend chart ──────────────────────────────────── */
.ct-chart-wrap {
  padding: 4px 18px 14px;
}

.ct-chart-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.ct-chart {
  width: 100%;
  height: 56px;
  display: block;
}

.ct-chart-single {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
  padding: 8px 0;
}

/* ── Card footer ──────────────────────────────────────── */
.ct-card-footer {
  display: flex;
  gap: 6px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.ct-btn {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  text-align: center;
}

.ct-btn:hover {
  background: var(--glass2);
  color: var(--white);
  border-color: rgba(255,255,255,0.18);
}

.ct-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ct-btn-danger {
  color: #f87171;
  border-color: rgba(248,113,113,0.2);
}

.ct-btn-danger:hover {
  background: rgba(248,113,113,0.1);
  color: #f87171;
  border-color: rgba(248,113,113,0.35);
}

/* ── Snapshot timeline ────────────────────────────────── */
.ct-timeline {
  border-top: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.ct-timeline.open {
  max-height: 300px;
  overflow-y: auto;
}

.ct-timeline-header {
  padding: 10px 18px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ct-timeline-header:hover { color: var(--text); }

.ct-timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
}

.ct-timeline-date { color: var(--muted); flex: 1; }
.ct-timeline-score { font-weight: 700; width: 36px; text-align: right; }
.ct-timeline-delta { font-size: 0.68rem; width: 40px; text-align: right; }
.ct-delta-up   { color: #4ade80; }
.ct-delta-down { color: #f87171; }
.ct-delta-flat { color: var(--muted); }

/* ── Modals ───────────────────────────────────────────── */
.ct-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.ct-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.ct-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  width: 92%;
  max-width: 480px;
  z-index: 401;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: var(--shadow);
}

.ct-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.ct-report-modal {
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
}

.ct-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.ct-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.ct-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
}

.ct-modal-close:hover { color: var(--white); background: var(--glass2); }

.ct-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ct-field { display: flex; flex-direction: column; gap: 6px; }

.ct-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ct-input {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.ct-input:focus { border-color: var(--blue2); }

.ct-modal-err {
  font-size: 0.8rem;
  color: #f87171;
  min-height: 16px;
  display: none;
}

.ct-modal-err.visible { display: block; }

.ct-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Loading spinner inside card ──────────────────────── */
.ct-card-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 18px;
  font-size: 0.82rem;
  color: var(--muted);
}

.ct-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--blue2);
  border-radius: 50%;
  animation: ctSpin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes ctSpin { to { transform: rotate(360deg); } }

/* ── Report modal content ─────────────────────────────── */
.ct-report-content {
  padding: 20px 24px;
}

.ct-report-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.ct-report-score-big {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
}

.ct-report-meta { flex: 1; }
.ct-report-meta-name { font-size: 1.1rem; font-weight: 700; color: var(--white); }
.ct-report-meta-url  { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.ct-report-meta-date { font-size: 0.75rem; color: var(--muted); margin-top: 8px; }

.ct-report-section {
  margin-bottom: 18px;
}

.ct-report-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.ct-report-breakdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--text);
}

.ct-report-breakdown-row span:first-child {
  width: 140px;
  flex-shrink: 0;
}

.ct-report-bar-track {
  flex: 1;
  height: 6px;
  background: var(--glass2);
  border-radius: 3px;
  overflow: hidden;
}

.ct-report-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.ct-report-score-val {
  width: 30px;
  text-align: right;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ct-report-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ct-report-list li {
  font-size: 0.82rem;
  color: var(--text);
  padding: 7px 10px;
  background: var(--glass);
  border-radius: 7px;
  border: 1px solid var(--border);
}

.ct-report-list li::before {
  margin-right: 8px;
}

.ct-report-list.strengths li::before { content: "✓"; color: #4ade80; }
.ct-report-list.weaknesses li::before { content: "✕"; color: #f87171; }
.ct-report-list.recs li::before { content: "→"; color: var(--blue2); }

/* ── My Business banner ───────────────────────────────── */
.ct-biz-banner {
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.25);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.4;
}
.ct-biz-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue2);
  display: block;
  margin-bottom: 2px;
}
.ct-biz-banner a { color: var(--blue2); }

/* ── Main content area ────────────────────────────────── */
.ct-main {
  flex: 1;
  min-width: 0;
}

/* ── Tracked board inside ct-main ─────────────────────── */
#ct-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  align-items: start;
}

/* ── Section title ────────────────────────────────────── */
.ct-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ── Search result cards ──────────────────────────────── */
.ct-results-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ct-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}

.ct-result-card:hover { border-color: rgba(255,255,255,0.14); }

.ct-result-info { flex: 1; min-width: 0; }

.ct-result-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.75rem;
  color: var(--muted);
}

.ct-result-meta a {
  color: var(--muted);
  text-decoration: none;
}

.ct-result-meta a:hover { color: var(--text); }

/* ── Audit button on result cards ─────────────────────── */
.ct-audit-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border: none;
  border-radius: 9px;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(37,99,235,0.25);
}

.ct-audit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.ct-audit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.ct-audit-btn.ct-audit-btn-done {
  background: var(--glass2);
  box-shadow: none;
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.25);
}

/* ── Search button ────────────────────────────────────── */
.ct-search-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border: none;
  border-radius: 10px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  font-family: inherit;
  margin-top: 4px;
}
.ct-search-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.ct-search-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── Select wrappers ──────────────────────────────────── */
.ct-select-wrap { position: relative; }

/* ── Manual audit accordion ───────────────────────────── */
.ct-manual-toggle {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s;
  user-select: none;
}

.ct-manual-toggle:hover { color: var(--text); }

.ct-manual-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .ct-body { flex-direction: column; padding: 16px; }
  .ct-panel { width: 100%; position: static; }
}
@media (max-width: 640px) {
  #ct-board { grid-template-columns: 1fr; }
  .ct-header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ct-stats { border-left: none; border-top: 1px solid var(--border); }
  .ct-stat { padding: 10px 16px; }
  .ct-card-footer { gap: 5px; }
  .ct-btn { font-size: 0.7rem; padding: 7px 7px; }
  .ct-result-card { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ct-audit-btn { width: 100%; text-align: center; }
}

.ct-add-manual-btn {
  width: 100%;
  background: transparent;
  border: 1.5px dashed rgba(255,255,255,0.25);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  font-family: inherit;
  margin-top: 10px;
  letter-spacing: 0.01em;
}
.ct-add-manual-btn:hover {
  border-color: rgba(99,179,237,0.6);
  color: var(--white);
  background: rgba(99,179,237,0.07);
}

/* ── Sidebar saved competitors ───────────────────────── */
.ct-sidebar-saved {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ct-sidebar-saved-item {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ct-sidebar-saved-item:hover {
  background: var(--glass2);
  border-color: rgba(255,255,255,0.14);
}

.ct-sidebar-saved-item.active {
  border-color: rgba(99,179,237,0.5);
  background: rgba(99,179,237,0.08);
}

.ct-sidebar-saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ct-sidebar-saved-info {
  flex: 1;
  min-width: 0;
}

.ct-sidebar-saved-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.ct-sidebar-saved-meta {
  font-size: 0.67rem;
  color: var(--muted);
}

.ct-sidebar-saved-del {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: inherit;
  flex-shrink: 0;
  line-height: 1;
}

.ct-sidebar-saved-del:hover {
  color: #f87171;
  background: rgba(248,113,113,0.1);
}

/* ── Sidebar saved competitors ───────────────────────── */
.ct-sidebar-saved {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ct-sidebar-saved-item {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ct-sidebar-saved-item:hover { background: var(--glass2); border-color: rgba(255,255,255,0.14); }
.ct-sidebar-saved-item.active { border-color: rgba(99,179,237,0.5); background: rgba(99,179,237,0.08); }
.ct-sidebar-saved-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ct-sidebar-saved-info { flex: 1; min-width: 0; }
.ct-sidebar-saved-label { font-size: 0.8rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.ct-sidebar-saved-meta { font-size: 0.67rem; color: var(--muted); }
.ct-sidebar-saved-del { background: none; border: none; color: var(--muted); font-size: 0.75rem; cursor: pointer; padding: 2px 5px; border-radius: 4px; font-family: inherit; flex-shrink: 0; line-height: 1; }
.ct-sidebar-saved-del:hover { color: #f87171; background: rgba(248,113,113,0.1); }

/* ── My Business badge ────────────────────────────────── */
.ct-my-biz-badge {
  background: rgba(74,222,128,0.15);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  letter-spacing: 0.04em;
}

/* ── Set Mine button ──────────────────────────────────── */
.ct-set-mine-btn { color: var(--muted); }
.ct-set-mine-btn:hover { color: #4ade80; border-color: rgba(74,222,128,0.35); background: rgba(74,222,128,0.08); }
.ct-set-mine-active { color: #4ade80 !important; border-color: rgba(74,222,128,0.35) !important; background: rgba(74,222,128,0.08) !important; }

/* ── Compare button in header ─────────────────────────── */
.ct-header-right { display: flex; align-items: center; gap: 16px; }

.ct-compare-btn {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 18px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.ct-compare-btn:hover { background: var(--glass2); color: var(--white); border-color: rgba(255,255,255,0.18); }

/* ── Compare modal ────────────────────────────────────── */
.ct-compare-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  background: var(--navy2);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  width: 94%;
  max-width: 860px;
  max-height: 88vh;
  overflow-y: auto;
  z-index: 401;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: var(--shadow);
}
.ct-compare-modal.open { opacity: 1; pointer-events: all; transform: translate(-50%, -50%) scale(1); }

/* ── Comparison table ─────────────────────────────────── */
.ct-cmp-wrap { overflow-x: auto; padding-bottom: 4px; }
.ct-cmp-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.ct-cmp-table thead tr { border-bottom: 2px solid var(--border); }
.ct-cmp-row-label { padding: 10px 14px; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; text-align: left; white-space: nowrap; min-width: 140px; }
.ct-cmp-th { padding: 10px 16px; color: var(--text); font-size: 0.78rem; font-weight: 700; text-align: center; min-width: 120px; border-left: 1px solid var(--border); line-height: 1.3; }
.ct-cmp-mine-th { background: rgba(74,222,128,0.06); color: #4ade80; }
.ct-cmp-url { font-size: 0.65rem; font-weight: 400; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.ct-cmp-label { padding: 10px 14px; color: var(--text); font-size: 0.82rem; white-space: nowrap; border-top: 1px solid var(--border); }
.ct-cmp-td { padding: 10px 16px; text-align: center; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.ct-cmp-mine { background: rgba(74,222,128,0.04); }
.ct-cmp-ahead { background: rgba(74,222,128,0.1); }
.ct-cmp-behind { background: rgba(248,113,113,0.1); }
.ct-cmp-equal { background: transparent; }
.ct-cmp-score { font-size: 1rem; font-weight: 800; }
.ct-cmp-na { color: var(--muted); font-size: 0.8rem; }

/* ── Legend ───────────────────────────────────────────── */
.ct-cmp-legend {
  display: flex;
  gap: 20px;
  padding: 14px 0 16px;
  flex-wrap: wrap;
}
.ct-cmp-leg-item { display: flex; align-items: center; gap: 7px; font-size: 0.75rem; color: var(--muted); }
.ct-cmp-leg-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.ct-cmp-leg-dot.ahead  { background: rgba(74,222,128,0.5); }
.ct-cmp-leg-dot.behind { background: rgba(248,113,113,0.5); }
.ct-cmp-leg-dot.equal  { background: var(--border); }

.ct-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 400;
}

.ct-site-updated, .ct-site-updates-list {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}
.ct-site-updated strong { color: var(--text); }
