/* ═══════════════════════════════════════════════════════════════════════════
   Telecom Intel — Styles
   T-Mobile magenta (#E20074) as primary accent
   ═══════════════════════════════════════════════════════════════════════════ */

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

:root {
  --bg:          #0D1117;
  --bg2:         #161B22;
  --bg3:         #1C2128;
  --bg4:         #21262D;
  --border:      #30363D;
  --border2:     #3D444D;
  --txt:         #E6EDF3;
  --txt2:        #8B949E;
  --txt3:        #656D76;
  --green:       #3FB950;
  --green-dim:   rgba(63, 185, 80, 0.12);
  --red:         #F85149;
  --red-dim:     rgba(248, 81, 73, 0.12);
  --yellow:      #D29922;
  --yellow-dim:  rgba(210, 153, 34, 0.15);
  --blue:        #388BFD;
  --blue-dim:    rgba(56, 139, 253, 0.12);

  /* Primary accent — T-Mobile magenta (replaces blue for interactive elements) */
  --magenta:     #E20074;
  --magenta-dim: rgba(226, 0, 116, 0.12);

  /* Competitor brand */
  --tmobile:  #E20074;
  --verizon:  #CD040B;
  --att:      #009FDB;
  --spectrum: #002F6C;
  --mint:     #52B848;

  /* Platform accent */
  --ig:  #E1306C;
  --tt:  #69C9D0;
  --x:   #9CA3AF;
  --th:  #C4C4C4;
  --fb:  #1877F2;
  --yt:  #FF4040;

  --radius:  10px;
  --radius2: 6px;
  --shadow:  0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow2: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--magenta); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(226,0,116,.3); color: #fff; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 58px;
  padding: 0 24px;
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  flex: 1;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-icon {
  font-size: 20px;
  color: var(--magenta);
  filter: drop-shadow(0 0 8px rgba(226, 0, 116, 0.6));
}

.brand-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--txt);
  letter-spacing: -0.3px;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: none;
  border: none;
  border-radius: var(--radius2);
  color: var(--txt2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.nav-tab:hover { background: var(--bg3); color: var(--txt); }
.nav-tab.active { background: var(--bg3); color: var(--txt); }

.nav-tab .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tab-star { font-size: 12px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.last-update {
  font-size: 12px;
  color: var(--txt3);
}

/* Status dot */
.status-dot-wrap {
  display: none;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
}
.status-dot.pulsing { animation: pulse-dot 1.2s ease-in-out infinite; }
.status-dot-label { font-size: 12px; color: var(--yellow); font-weight: 500; }

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.btn-update {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--magenta);
  color: #fff;
  border: none;
  border-radius: var(--radius2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-update:hover { background: #B8005D; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(226, 0, 116, 0.4); }
.btn-update:active { transform: translateY(0); }
.btn-update:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-icon { font-size: 15px; line-height: 1; }
.btn-label {}

/* ── Status bar ───────────────────────────────────────────────────────────── */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 11.5px;
  color: var(--txt2);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.status-bar .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse-dot 2s ease infinite;
}
/* status dot is always green */

.status-text { font-weight: 500; }
.subtitle-text {
  margin-left: auto;
  color: var(--txt3);
  font-size: 11px;
}

/* ── Alert banner ──────────────────────────────────────────────────────────── */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--yellow-dim);
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
}
.alert-banner.error {
  background: var(--red-dim);
  border-color: var(--red);
}
.alert-banner-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-banner-body { flex: 1; }
.alert-banner-title { font-weight: 700; margin-bottom: 2px; }
.alert-banner-detail { color: var(--txt2); font-size: 12px; }

.alert-text { flex: 1; }
.alert-close {
  background: none;
  border: none;
  color: var(--txt2);
  font-size: 18px;
  padding: 0 4px;
  line-height: 1;
  cursor: pointer;
}
.alert-close:hover { color: var(--txt); }

/* scrape-err-dot removed — dashboard never shows errors */
.scrape-err-dot { display: none; }

/* ── Loading overlay ───────────────────────────────────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
}
.loading-overlay.visible { display: flex; }

/* ── Hosted update info overlay ────────────────────────────────────────────── */
.hosted-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hosted-fade-in 0.2s ease;
}
@keyframes hosted-fade-in { from { opacity: 0; } to { opacity: 1; } }

.hosted-overlay-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  box-shadow: var(--shadow);
}
.hosted-overlay-icon { font-size: 32px; margin-bottom: 12px; }
.hosted-overlay-title { font-size: 18px; font-weight: 700; color: var(--txt); margin-bottom: 8px; }
.hosted-overlay-body { font-size: 14px; color: var(--txt2); line-height: 1.5; margin-bottom: 12px; }
.hosted-overlay-body strong { color: var(--txt); font-weight: 600; }
.hosted-overlay-ts { font-size: 12px; color: var(--txt3); margin-bottom: 20px; }
.hosted-overlay-btn {
  padding: 8px 28px;
  background: var(--magenta);
  color: #fff;
  border: none;
  border-radius: var(--radius2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.hosted-overlay-btn:hover { background: #B8005D; }

/* Hosted card (from HTML) */
.hosted-card {
  text-align: center;
  padding: 40px 48px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 400px;
  width: 90%;
  animation: fadeInUp .25s ease;
}
.hosted-icon { font-size: 40px; margin-bottom: 16px; }
.hosted-title { font-size: 18px; font-weight: 700; color: var(--txt); margin-bottom: 10px; }
.hosted-body { font-size: 13.5px; color: var(--txt2); line-height: 1.6; margin-bottom: 24px; }
.hosted-btn {
  padding: 10px 32px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--magenta);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}
.hosted-btn:hover { background: #B8005D; }

.loading-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 48px;
  text-align: center;
  max-width: 460px;
  width: 90%;
  box-shadow: var(--shadow);
}

.spinner, .loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--magenta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.loading-subtitle { font-size: 13px; color: var(--txt2); line-height: 1.6; margin-bottom: 20px; }

.loading-passes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 20px;
}

.loading-pass {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg3);
  border-radius: var(--radius2);
  font-size: 12px;
  color: var(--txt2);
}

.lp-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  color: var(--txt3);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s, color 0.3s;
}

.loading-pass.active .lp-num { background: var(--magenta); color: #fff; }
.loading-pass.active .lp-label { color: var(--txt); font-weight: 500; }
.loading-pass.done .lp-num { background: color-mix(in srgb, var(--green) 20%, var(--bg3)); color: var(--green); }
.loading-pass.done .lp-label { color: var(--txt3); }

.loading-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.loading-platforms span {
  padding: 3px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  color: var(--txt2);
  animation: pulse-fade 1.5s ease-in-out infinite;
}
.loading-platforms span:nth-child(1) { animation-delay: 0s; }
.loading-platforms span:nth-child(2) { animation-delay: 0.25s; }
.loading-platforms span:nth-child(3) { animation-delay: 0.5s; }
.loading-platforms span:nth-child(4) { animation-delay: 0.75s; }
.loading-platforms span:nth-child(5) { animation-delay: 1s; }
.loading-platforms span:nth-child(6) { animation-delay: 1.25s; }

@keyframes pulse-fade {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.loading-timer {
  font-size: 12px;
  color: var(--txt3);
  font-variant-numeric: tabular-nums;
}

/* ── Main content ──────────────────────────────────────────────────────────── */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.page { display: none; }
.page.active { display: block; }

/* ── Page header ───────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--txt2);
}

.week-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--txt2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-icon { font-size: 48px; color: var(--txt3); margin-bottom: 16px; }
.empty-state h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--txt2); margin-bottom: 24px; }

/* ── Competitor grid (overview) ────────────────────────────────────────────── */
.competitor-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) { .competitor-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .competitor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .competitor-grid { grid-template-columns: 1fr; } }

/* ── Competitor overview card ──────────────────────────────────────────────── */
.comp-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  animation: fadeInUp 0.4s ease both;
}
.comp-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.comp-card:nth-child(1) { animation-delay: 0s; }
.comp-card:nth-child(2) { animation-delay: 0.06s; }
.comp-card:nth-child(3) { animation-delay: 0.12s; }
.comp-card:nth-child(4) { animation-delay: 0.18s; }
.comp-card:nth-child(5) { animation-delay: 0.24s; }

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.card-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.card-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.card-total {
  text-align: right;
  flex-shrink: 0;
}

.card-total strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--txt);
  line-height: 1.2;
}

.card-total-label {
  font-size: 10px;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.card-platforms { padding: 4px 0; }

.platform-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 5px 14px;
  gap: 0;
  transition: background 0.1s;
}
.platform-row:hover { background: var(--bg3); }

.platform-row-line {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.platform-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.platform-name {
  font-size: 12px;
  color: var(--txt2);
  width: 68px;
  flex-shrink: 0;
}

.platform-count {
  font-size: 12px;
  font-weight: 600;
  flex: 1;
  text-align: right;
}

.platform-flag {
  font-size: 12px;
  cursor: help;
  flex-shrink: 0;
}

.verified-ts {
  font-size: 10px;
  color: var(--txt3);
  margin-left: 2px;
}

.change {
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  min-width: 72px;
}
.change.positive { color: var(--green); }
.change.negative { color: var(--red); }
.change.neutral  { color: var(--txt3); }
.change.na       { color: var(--txt3); font-weight: 400; }
.change.pending  { color: var(--txt3); font-style: italic; font-size: 10px; }

.card-footer {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer-link { font-size: 12px; color: var(--txt3); font-weight: 500; }
.card-arrow { font-size: 14px; color: var(--txt3); transition: transform 0.15s; }
.comp-card:hover .card-arrow { transform: translateX(3px); color: var(--txt2); }

/* ── Key Takeaways page ────────────────────────────────────────────────────── */
.takeaways-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) { .takeaways-grid { grid-template-columns: 1fr; } }

.takeaway-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeInUp 0.4s ease both;
}
.takeaway-card:nth-child(1) { animation-delay: 0s; }
.takeaway-card:nth-child(2) { animation-delay: 0.06s; }
.takeaway-card:nth-child(3) { animation-delay: 0.12s; }
.takeaway-card:nth-child(4) { animation-delay: 0.18s; }
.takeaway-card:nth-child(5) { animation-delay: 0.24s; }

.tk-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.tk-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.tk-name { font-size: 15px; font-weight: 700; }
.tk-meta { font-size: 11px; color: var(--txt3); margin-top: 1px; }

.tk-body { padding: 0; }

.tk-section {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.tk-section:last-child { border-bottom: none; }

.tk-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--txt3);
  margin-bottom: 8px;
}

.tk-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tk-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.tk-bullet-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--txt3);
  flex-shrink: 0;
  margin-top: 7px;
}

.tk-bullet.positive .tk-bullet-dot { background: var(--green); }
.tk-bullet.negative .tk-bullet-dot { background: var(--red); }
.tk-bullet.warn     .tk-bullet-dot { background: var(--yellow); }

.tk-news-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.tk-news-item:last-child { border-bottom: none; }

.tk-news-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--magenta);
  text-decoration: none;
  line-height: 1.4;
}
.tk-news-title:hover { text-decoration: underline; }

.tk-news-meta { font-size: 11px; color: var(--txt3); }

.tk-no-news {
  font-size: 12px;
  color: var(--txt3);
  font-style: italic;
}

.tk-alert {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--yellow);
  line-height: 1.4;
}

/* ── Competitor detail page ────────────────────────────────────────────────── */
.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.detail-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  color: var(--txt2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.detail-back:hover { border-color: var(--border2); color: var(--txt); background: var(--bg3); text-decoration: none; }

.detail-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.detail-title { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }
.detail-subtitle { font-size: 13px; color: var(--txt2); margin-top: 2px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}

@media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-main { display: flex; flex-direction: column; gap: 20px; }
.detail-side { display: flex; flex-direction: column; gap: 20px; }

/* ── Panels ────────────────────────────────────────────────────────────────── */
.panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--txt2);
}

.panel-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--txt2);
}

.panel-body { padding: 20px; }

/* ── Chart ─────────────────────────────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  height: 300px;
}

/* ── Stats table ───────────────────────────────────────────────────────────── */
.stats-table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--txt3);
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.stats-table th:not(:first-child) { text-align: right; }

.stats-table td {
  padding: 9px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.stats-table tr:last-child td { border-bottom: none; }
.stats-table td:not(:first-child) { text-align: right; }
.stats-table tr:hover td { background: var(--bg3); }

.platform-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-badge {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.stat-followers { font-weight: 600; }
.stat-na { color: var(--txt3); font-weight: 400; }

/* Warning flag inline */
.flag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
}
.flag-icon.warn { color: var(--yellow); }

/* Tooltip */
.tooltip-wrap {
  position: relative;
  display: inline-block;
}
.tooltip-text {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: var(--radius2);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--txt);
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow2);
  pointer-events: none;
}
.tooltip-wrap:hover .tooltip-text { display: block; }

/* ── News section ──────────────────────────────────────────────────────────── */
.news-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.news-item:first-child { padding-top: 4px; }
.news-item:last-child { border-bottom: none; padding-bottom: 4px; }

.news-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--magenta);
  text-decoration: none;
  line-height: 1.4;
}
.news-title:hover { text-decoration: underline; }

.news-meta { font-size: 11px; color: var(--txt3); }

.news-snippet {
  font-size: 12px;
  color: var(--txt2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Posts section ─────────────────────────────────────────────────────────── */
.posts-platform-group { border-bottom: 1px solid var(--border); }
.posts-platform-group:last-child { border-bottom: none; }

.posts-platform-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt2);
  background: var(--bg3);
  border-top: 1px solid var(--border);
}

.posts-platform-title .pdot,
.pdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.posts-count-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 7px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.post-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  border-top: 1px solid var(--border);
  transition: background 0.1s;
}
.post-item:hover { background: var(--bg3); }

.post-num { font-size: 11px; color: var(--txt3); width: 16px; flex-shrink: 0; }

.post-link {
  font-size: 12px;
  color: var(--magenta);
  text-decoration: none;
  word-break: break-all;
  flex: 1;
}
.post-link:hover { text-decoration: underline; }

.post-date { font-size: 11px; color: var(--txt3); white-space: nowrap; flex-shrink: 0; }

.no-posts {
  padding: 10px 20px;
  font-size: 12px;
  color: var(--txt3);
  font-style: italic;
}

/* ── Summary section ───────────────────────────────────────────────────────── */
.summary-content {
  font-size: 14px;
  line-height: 1.75;
  color: var(--txt);
  white-space: pre-wrap;
  word-break: break-word;
}

.summary-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--txt3);
}
.summary-source .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.summary-source.custom .dot { background: var(--magenta); }

.summary-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.btn-sm {
  padding: 6px 14px;
  border-radius: var(--radius2);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--txt);
  transition: all 0.15s;
}
.btn-sm:hover { border-color: var(--border2); background: var(--bg4); }
.btn-sm.primary { background: var(--magenta); color: #fff; border-color: var(--magenta); }
.btn-sm.primary:hover { background: #B8005D; border-color: #B8005D; }
.btn-sm.danger { color: var(--red); }
.btn-sm.danger:hover { background: var(--red-dim); border-color: var(--red); }

.summary-editor { display: none; flex-direction: column; gap: 10px; }
.summary-editor.visible { display: flex; }

.summary-textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  color: var(--txt);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.15s;
}
.summary-textarea:focus { outline: none; border-color: var(--magenta); }

.summary-editor-actions { display: flex; gap: 8px; }

/* ── Scrape log ────────────────────────────────────────────────────────────── */
.scrape-log { padding: 0; }

.log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.4;
}
.log-item:last-child { border-bottom: none; }

.log-item.error    { background: var(--red-dim); }
.log-item.warn     { background: var(--yellow-dim); }
.log-item.ok       { background: var(--green-dim); }
.log-item.fallback { border-left-color: var(--magenta); opacity: 0.8; }
.log-item.fallback .log-icon { color: var(--magenta); }

.log-icon { flex-shrink: 0; font-size: 13px; margin-top: 1px; }
.log-label { font-weight: 600; color: var(--txt); }
.log-detail { color: var(--txt2); margin-top: 1px; }

.no-issues {
  padding: 12px 20px;
  font-size: 12px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Week nav ──────────────────────────────────────────────────────────────── */
.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.week-nav-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  color: var(--txt2);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.week-nav-btn:hover { border-color: var(--border2); color: var(--txt); }
.week-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.week-nav-label { font-size: 12px; font-weight: 600; color: var(--txt); white-space: nowrap; }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideUp 0.25s ease;
  max-width: 340px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--green); }
.toast.warn    { border-left: 3px solid var(--yellow); }
.toast.info    { border-left: 3px solid var(--blue); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Utility ───────────────────────────────────────────────────────────────── */
.text-muted { color: var(--txt3); }
.text-sm    { font-size: 12px; }

/* ── Mode toggle ───────────────────────────────────────────────────────────── */
.mode-toggle {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius2);
  padding: 2px;
  gap: 1px;
  flex-shrink: 0;
}

.mode-btn {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: none;
  color: var(--txt2);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.mode-btn:hover:not(.active) { color: var(--txt); }

.mode-btn.active {
  background: var(--bg4);
  color: var(--txt);
  border-color: var(--border2);
}

/* ── Social Tracker ────────────────────────────────────────────────────────── */
.social-matrix-section { margin-bottom: 20px; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--txt3);
  margin-bottom: 12px;
}

.social-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.social-table th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--txt3);
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  white-space: nowrap;
}

.social-th-plat {
  text-align: left;
  min-width: 110px;
}

.social-th-comp {
  text-align: center;
  min-width: 110px;
}

.social-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.social-table tr:last-child td { border-bottom: none; }
.social-table tr:hover td { background: var(--bg3); }

.matrix-platform {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--txt2);
  white-space: nowrap;
}

.matrix-platform .pdot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.matrix-cell {
  text-align: center;
  vertical-align: middle;
}

.matrix-val {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.matrix-change {
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
}

.matrix-change.positive { color: var(--green); }
.matrix-change.negative { color: var(--red); }
.matrix-change.neutral  { color: var(--txt3); }

.matrix-flag {
  font-size: 11px;
  color: var(--yellow);
  margin-left: 3px;
}

.matrix-zero .matrix-val { color: var(--txt3); font-weight: 400; }
.matrix-high .matrix-val { color: var(--green); }

.matrix-total-row td {
  background: var(--bg3);
  border-top: 2px solid var(--border2);
}

.matrix-anomaly {
  background: color-mix(in srgb, var(--yellow) 8%, var(--bg2)) !important;
}

/* ── Social Tracker — Post Links section ──────────────────────────────────── */
.social-post-comp {
  border-bottom: 1px solid var(--border);
}
.social-post-comp:last-child { border-bottom: none; }

.social-post-comp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 6px;
  font-size: 13px;
  color: var(--txt);
}

.social-post-platform {
  padding: 0 20px 8px 38px;
}

.social-post-plat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--txt2);
  padding: 4px 0;
}

/* ── Patterns grid ─────────────────────────────────────────────────────────── */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.pattern-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.pattern-card.positive { border-left: 3px solid var(--green); }
.pattern-card.negative { border-left: 3px solid var(--red); }
.pattern-card.warn     { border-left: 3px solid var(--yellow); }

.pattern-icon { font-size: 20px; flex-shrink: 0; line-height: 1; margin-top: 1px; }

.pattern-label {
  font-size: 11px;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-bottom: 3px;
}

.pattern-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
  line-height: 1.4;
}

/* ── Intel Feed ────────────────────────────────────────────────────────────── */
.intel-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.intel-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--txt2);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.intel-filter-btn:hover { border-color: var(--border2); color: var(--txt); }

.intel-filter-btn.active {
  background: var(--bg4);
  color: var(--txt);
  border-color: var(--border2);
}

.intel-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.intel-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.intel-item:last-child { border-bottom: none; }
.intel-item:hover { background: var(--bg3); }

.intel-company-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--txt2);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
  min-width: 96px;
  justify-content: center;
}

.intel-content { flex: 1; min-width: 0; }

.intel-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--magenta);
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
}

.intel-title:hover { text-decoration: underline; }

.intel-meta {
  font-size: 11px;
  color: var(--txt3);
}

.intel-snippet {
  font-size: 12px;
  color: var(--txt2);
  line-height: 1.5;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Post fallback links ──────────────────────────────────────────────────── */
.post-fallback-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 4px 0;
  background: color-mix(in srgb, var(--magenta) 8%, var(--bg2));
  border: 1px solid color-mix(in srgb, var(--magenta) 20%, var(--border));
  border-radius: 8px;
  font-size: 13px;
  color: var(--magenta);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.post-fallback-link:hover {
  background: color-mix(in srgb, var(--magenta) 14%, var(--bg2));
  border-color: color-mix(in srgb, var(--magenta) 40%, var(--border));
  text-decoration: none;
}

.post-fallback-arrow {
  margin-left: auto;
  opacity: 0.6;
  font-size: 14px;
}

.post-fallback-brief {
  font-size: 11px;
  color: var(--magenta);
  text-decoration: none;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--magenta) 30%, var(--border));
  border-radius: 4px;
  margin-left: 4px;
  white-space: nowrap;
}
.post-fallback-brief:hover { text-decoration: underline; }

.matrix-fallback { opacity: 0.65; }

.matrix-fallback-link {
  display: inline-block;
  font-size: 10px;
  color: var(--magenta);
  text-decoration: none;
  margin-top: 2px;
  opacity: 0.85;
}
.matrix-fallback-link:hover { text-decoration: underline; }

/* ── Scrape Status Panel ─────────────────────────────────────────────────── */
.scrape-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 24px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 12px;
  color: var(--txt2);
  user-select: none;
  transition: background 0.15s;
}
.scrape-status-bar:hover { background: var(--bg3); }

.scrape-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--txt3);
}
.scrape-dot.green  { background: var(--green); }
.scrape-dot.yellow { background: var(--yellow); }
.scrape-dot.red    { background: var(--red); }

.scrape-status-text { flex: 1; }

.scrape-expand-label {
  font-size: 11px;
  color: var(--txt3);
  margin-left: auto;
}

.scrape-status-detail {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 16px;
  overflow-x: auto;
}

.scrape-status-table {
  border-collapse: collapse;
  font-size: 11px;
  width: 100%;
  min-width: 500px;
}
.scrape-status-table th {
  text-align: left;
  padding: 4px 10px;
  color: var(--txt3);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.scrape-status-table td {
  padding: 4px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  color: var(--txt2);
  white-space: nowrap;
}
.scrape-status-table td.ok    { color: var(--green); }
.scrape-status-table td.warn  { color: var(--yellow); }
.scrape-status-table td.error { color: var(--green); }

/* ── Scrape status panel (fixed position) ─────────────────────────────────── */
.scrape-status-panel {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 500;
  width: 360px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: fadeInUp .2s ease;
}

.scrape-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
}

.scrape-status-close {
  background: none;
  border: none;
  color: var(--txt2);
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
  cursor: pointer;
}
.scrape-status-close:hover { color: var(--txt); }

.scrape-status-body {
  padding: 12px 16px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 12px;
  color: var(--txt2);
}

/* ── Anomaly warning banners ─────────────────────────────────────────────── */
.anomaly-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 2px;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--yellow) 10%, var(--bg2));
  border: 1px solid color-mix(in srgb, var(--yellow) 30%, var(--border));
  border-radius: 6px;
  font-size: 11px;
  color: var(--yellow);
}
.anomaly-banner-icon { font-size: 12px; flex-shrink: 0; }
.anomaly-banner-text { flex: 1; min-width: 0; line-height: 1.4; }
.anomaly-banner-text strong { font-weight: 600; }

.anomaly-confirm-btn, .anomaly-dismiss-btn {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.anomaly-confirm-btn:hover, .anomaly-dismiss-btn:hover { opacity: 0.8; }
.anomaly-confirm-btn {
  background: color-mix(in srgb, var(--green) 15%, transparent);
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  color: var(--green);
}
.anomaly-dismiss-btn {
  background: color-mix(in srgb, var(--red) 15%, transparent);
  border-color: color-mix(in srgb, var(--red) 40%, var(--border));
  color: var(--red);
}

.anomaly-val { color: var(--yellow); }
.verified-small { font-size: 10px; margin-left: 2px; }
.anomaly-confirmed { color: var(--green); }
.anomaly-dismissed { color: var(--txt3); }

/* Discrepancy choice UI */
.disc-choice {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.disc-choice-btn {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--txt2);
  transition: all 0.15s;
  white-space: nowrap;
}
.disc-choice-btn:hover {
  background: var(--bg4);
  color: var(--txt);
  border-color: var(--magenta);
}
.disc-choice-label {
  font-size: 10px;
  color: var(--yellow);
  margin-top: 2px;
  display: block;
}

/* ── Platform hyperlinks ─────────────────────────────────────────────────── */
.platform-link {
  font-size: 12px;
  color: var(--txt2);
  text-decoration: none;
  width: 68px;
  flex-shrink: 0;
  display: inline-block;
  transition: color 0.12s;
}
.platform-link:hover { color: var(--magenta); text-decoration: underline; }

.platform-cell-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.platform-cell-link:hover { color: var(--magenta); }

.matrix-ext-link {
  display: inline-block;
  font-size: 9px;
  color: var(--txt3);
  text-decoration: none;
  margin-left: 3px;
  opacity: 0.7;
}
.matrix-ext-link:hover { color: var(--magenta); opacity: 1; }

/* ── Auto-update progress bar ────────────────────────────────────────────── */
.auto-update-bar {
  position: sticky;
  top: 56px;
  z-index: 89;
  height: 34px;
  background: color-mix(in srgb, var(--magenta) 8%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--magenta) 25%, var(--border));
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  overflow: hidden;
}
.auto-update-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: color-mix(in srgb, var(--magenta) 15%, transparent);
  width: 0%;
  transition: width 1.5s ease;
  pointer-events: none;
}
.auto-update-icon {
  position: relative;
  font-size: 13px;
  color: var(--magenta);
  flex-shrink: 0;
  display: inline-block;
}
.auto-update-icon.spinning { animation: au-spin 1.2s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }
.auto-update-text {
  position: relative;
  font-size: 12px;
  color: var(--txt2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.auto-update-dismiss {
  position: relative;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--txt3);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}
.auto-update-dismiss:hover { color: var(--txt2); }

/* ── Ideas to Watch ────────────────────────────────────────────────────────── */
.ideas-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ideas-type-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.ideas-count {
  font-size: 12px;
  color: var(--txt3);
  margin-bottom: 12px;
}

.ideas-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.idea-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.idea-item:last-child { border-bottom: none; }

.idea-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.idea-item.priority-high .idea-priority-dot   { background: var(--red); }
.idea-item.priority-medium .idea-priority-dot { background: var(--yellow); }
.idea-item.priority-low .idea-priority-dot    { background: var(--txt3); }

.idea-body {
  flex: 1;
  min-width: 0;
}

.idea-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.idea-type-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.idea-type-badge.type-content  { background: var(--blue-dim); color: var(--blue); }
.idea-type-badge.type-collab   { background: color-mix(in srgb, #a855f7 15%, var(--bg3)); color: #a855f7; }
.idea-type-badge.type-product  { background: var(--green-dim); color: var(--green); }
.idea-type-badge.type-campaign { background: color-mix(in srgb, #f97316 15%, var(--bg3)); color: #f97316; }

.idea-comp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  background: var(--bg3);
  color: var(--txt2);
}

.idea-platform-tag {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--txt3);
}

.idea-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--txt);
}

.ideas-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--txt3);
  font-size: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Ideas panel (competitor detail side) ─────────────────────────────────── */
.idea-panel-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.idea-panel-item:last-child { border-bottom: none; }

.idea-panel-content {
  flex: 1;
  min-width: 0;
}

.idea-type-tag {
  display: inline;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-right: 6px;
}
.idea-type-tag.type-content  { color: var(--blue); }
.idea-type-tag.type-collab   { color: #a855f7; }
.idea-type-tag.type-product  { color: var(--green); }
.idea-type-tag.type-campaign { color: #f97316; }

.idea-panel-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--txt2);
}

/* ── Mobile Responsive ────────────────────────────────────────────────────── */

/* ── Tablet (≤ 768px) ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    height: auto;
    padding: 10px 16px 6px;
    gap: 0;
  }
  .nav-left { display: contents; }
  .nav-brand { grid-column: 1; grid-row: 1; align-self: center; }
  .nav-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 8px 0 2px;
  }
  .nav-right {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    gap: 8px;
  }

  .mode-toggle { display: none; }
  .last-update { display: none; }
  .subtitle-text { display: none; }

  .main-content { padding: 20px 16px 60px; }
  .page-title { font-size: 22px; }

  .social-matrix-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .panel-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auto-update-bar { position: relative; top: auto; }

  .takeaways-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }

  /* Social tables: ensure horizontal scroll with min-width */
  .social-table { min-width: 600px; }

  /* Scrape status panel: prevent overflow on small viewports */
  .scrape-status-panel {
    right: 8px;
    left: 8px;
    width: auto;
  }

  /* Detail header: stack week-nav on its own row when wrapping */
  .detail-header .week-nav {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  /* Summary editor actions wrap */
  .summary-editor-actions { flex-wrap: wrap; }
}

/* ── Mobile (≤ 480px) ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .navbar { padding: 8px 12px 4px; }
  .nav-tab { padding: 8px 10px; font-size: 12px; }

  .btn-label { display: none; }
  .btn-update { padding: 8px 10px; }
  .btn-icon { font-size: 16px; }

  .status-dot-label { display: none; }
  .brand-text { display: none; }

  .main-content { padding: 16px 12px 48px; }

  .page-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
  }
  .page-title { font-size: 20px; }
  .page-subtitle { font-size: 12px; }
  .week-badge { align-self: flex-start; }

  .competitor-grid { gap: 12px; }

  .detail-title { font-size: 18px; }
  .detail-logo { width: 36px; height: 36px; border-radius: 9px; font-size: 14px; }
  .detail-subtitle { font-size: 12px; }

  .chart-wrap { height: 220px; }

  .panel-header { padding: 10px 14px; }
  .panel-body { padding: 14px; }

  .post-item { padding: 6px 14px; }
  .posts-platform-title { padding: 8px 14px; }

  .intel-item {
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
  }
  .intel-company-chip { min-width: auto; align-self: flex-start; }

  .idea-item { padding: 12px 14px; }

  .tk-header { padding: 12px 14px; }
  .tk-section { padding: 10px 14px; }

  .log-item { padding: 8px 14px; }

  .toast { left: 12px; right: 12px; max-width: none; }

  .loading-card { padding: 28px 20px; }

  .scrape-status-bar { padding: 6px 12px; }
  .scrape-status-detail { padding: 10px 12px; }

  .alert-banner { padding: 10px 12px; }

  .intel-filter-bar, .ideas-filter-bar { padding: 10px 12px; gap: 6px; }

  /* Hide vertical divider in ideas filter bar — meaningless when wrapped */
  .ideas-type-divider { display: none; }

  /* Anomaly banners: allow text wrapping */
  .anomaly-banner { font-size: 10px; }
  .anomaly-banner-text { word-break: break-word; }

  /* Disc-choice buttons wrap tighter */
  .disc-choice { gap: 4px; }

  /* Toast full-width on mobile */
  .toast-container { right: 12px; left: 12px; }

  .hosted-overlay-card, .hosted-card { padding: 28px 24px; }

  /* Week nav: full width */
  .detail-header .week-nav {
    margin-left: 0;
    width: 100%;
  }

  /* Loading pass labels: tighter padding */
  .loading-pass { padding: 6px 10px; gap: 8px; }
  .lp-label { font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Telecom Intel — Company Intel + Compare
   ═══════════════════════════════════════════════════════════════════════════ */

.ci-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 90px; }
.ci-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ci-title { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.ci-sub { font-size: 13px; color: var(--txt2); margin-top: 2px; }
.ci-jump { color: var(--magenta); font-weight: 600; text-decoration: none; }
.ci-jump:hover { text-decoration: underline; }

.ci-brand-pill {
  display: inline-block; vertical-align: middle;
  padding: 2px 9px; border-radius: 10px;
  background: var(--magenta-dim); color: #FF6FB5; border: 1px solid rgba(226, 0, 116, 0.35);
  font-size: 11px; font-weight: 600; letter-spacing: 0; white-space: nowrap;
}

.ci-hero .panel-body { display: flex; flex-direction: column; gap: 12px; }
.ci-headline { font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--txt); }

.ci-stock { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ci-stock-price { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.ci-stock-meta { font-size: 12px; color: var(--txt2); }
.ci-stock-note { font-size: 12px; color: var(--txt3); margin-top: 4px; line-height: 1.5; }

.ci-rev-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ci-big { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; }
.ci-muted { color: var(--txt2); font-size: 13px; }
.ci-small { font-size: 12px; }
.ci-chart-wrap { height: 240px; }
.ci-caption { font-size: 12px; color: var(--txt2); margin-top: 12px; line-height: 1.5; }
.ci-text { font-size: 13.5px; line-height: 1.65; color: var(--txt); }

.ci-chip { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--bg3); color: var(--txt2); border: 1px solid var(--border); white-space: nowrap; }
.ci-chip.positive { background: var(--green-dim); color: var(--green); border-color: rgba(63, 185, 80, 0.35); }
.ci-chip.negative { background: var(--red-dim); color: var(--red); border-color: rgba(248, 81, 73, 0.35); }

.ci-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ci-list li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.55; }
.ci-list li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--txt3); }
.ci-list-sm { margin-top: 10px; }
.ci-list-sm li { font-size: 12px; color: var(--txt2); }

.ci-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--bg3); border: 1px dashed var(--border2); border-radius: var(--radius2); font-size: 13px; color: var(--txt2); line-height: 1.5; }
.ci-note + .ci-note { margin-top: 8px; }
.chart-wrap + .ci-note { margin-top: 14px; }
.ci-note-icon { flex-shrink: 0; }

.ci-timeline { display: flex; flex-direction: column; }
.ci-tl-item { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.ci-tl-item:last-child { padding-bottom: 0; }
.ci-tl-item::before { content: ''; position: absolute; left: 4px; top: 14px; bottom: 0; width: 1px; background: var(--border); }
.ci-tl-item:last-child::before { display: none; }
.ci-tl-dot { flex-shrink: 0; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 0 3px var(--magenta-dim); }
.ci-tl-date { font-size: 11px; font-weight: 600; color: var(--txt3); text-transform: uppercase; letter-spacing: 0.4px; }
.ci-tl-title { font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.ci-tl-detail { font-size: 12.5px; color: var(--txt2); line-height: 1.5; margin-top: 2px; }

.ci-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ci-tag { padding: 3px 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; font-size: 12px; color: var(--txt2); }
.ci-initiatives { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ci-init { padding: 10px 12px; background: var(--bg3); border-radius: var(--radius2); border: 1px solid var(--border); }
.ci-init-name { font-size: 13px; font-weight: 600; }
.ci-init-detail { font-size: 12.5px; color: var(--txt2); line-height: 1.5; margin-top: 2px; }

.ci-person { padding: 10px 0; border-bottom: 1px solid var(--border); }
.ci-person:first-child { padding-top: 0; }
.ci-person:last-child { border-bottom: none; padding-bottom: 0; }
.ci-person-name { font-size: 13.5px; font-weight: 600; }
.ci-person-title { font-size: 12px; color: var(--txt2); }
.ci-person-focus { font-size: 12px; color: var(--txt3); line-height: 1.5; margin-top: 3px; }

.ci-quote { margin: 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--magenta); }
.ci-quote + .ci-quote { margin-top: 14px; }
.ci-quote p { font-size: 13.5px; line-height: 1.6; font-style: italic; }
.ci-quote footer { font-size: 12px; color: var(--txt3); margin-top: 4px; }

.ci-appear { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ci-appear:first-child { padding-top: 0; }
.ci-appear:last-child { border-bottom: none; padding-bottom: 0; }
.ci-appear-event { font-size: 13px; font-weight: 600; }
.ci-subhead { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--txt3); margin: 14px 0 6px; }

.ci-bottom { border-left: 4px solid var(--magenta); }
.ci-bottom-label { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--txt2); margin-bottom: 6px; }

.ci-sources { display: flex; flex-wrap: wrap; gap: 8px; }
.ci-source { padding: 5px 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; font-size: 12px; color: var(--txt); text-decoration: none; transition: all 0.15s; }
.ci-source:hover { border-color: var(--magenta); color: #FF6FB5; }

/* Compare tab */
.cmp-stack { display: flex; flex-direction: column; gap: 16px; }
.cmp-section-title { font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--txt2); margin-top: 12px; }
.cmp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1200px) { .cmp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px)  { .cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .cmp-grid { grid-template-columns: 1fr; } }
.cmp-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.cmp-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.cmp-head .tk-logo { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.cmp-name { font-size: 14px; font-weight: 700; }
.cmp-head .ci-brand-pill { margin-top: 2px; font-size: 10px; }
.cmp-body { padding: 14px; flex: 1; }
.cmp-number { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; margin-top: 2px; }
.cmp-yoy { margin-top: 8px; }
.cmp-stock { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.cmp-stock .ci-stock-price { font-size: 16px; }

/* Phones: keep the Brief / Standard / Deep Dive toggle available */
@media (max-width: 768px) {
  .nav-right { display: contents; }
  .btn-update { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
  .mode-toggle { display: flex; grid-column: 1 / -1; grid-row: 3; justify-self: start; margin: 6px 0 4px; }
  .ci-header { flex-direction: column; gap: 8px; }
  .ci-chart-wrap { height: 220px; }
}
@media (max-width: 480px) {
  .ci-headline { font-size: 15px; }
  .ci-big { font-size: 20px; }
}

/* Laptop widths: tighten nav tabs so every company tab stays visible */
@media (max-width: 1600px) and (min-width: 769px) {
  .tab-star { display: none; }
  .nav-tab { padding: 5px 9px; }
}
@media (max-width: 1500px) and (min-width: 769px) {
  .navbar { display: grid; grid-template-columns: 1fr auto; height: auto; padding: 10px 24px 6px; row-gap: 4px; }
  .nav-left { display: contents; }
  .nav-brand { grid-column: 1; grid-row: 1; }
  .nav-right { grid-column: 2; grid-row: 1; }
  .nav-tabs { grid-column: 1 / -1; grid-row: 2; }
}

/* Company intel is the whole company page now */
.ci-section { margin-top: 0; padding-top: 0; border-top: none; }
.ci-cross { margin-left: auto; }
.detail-header .ci-cross + .week-nav { margin-left: 12px; }

/* Header: main nav + collapsible Social menu, sticky together */
.site-header { position: sticky; top: 0; z-index: 100; }
.site-header .navbar { position: relative; top: auto; }

.nav-social-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 10px; padding: 5px 14px;
  background: var(--bg2); color: var(--txt);
  border: 1.5px solid var(--magenta); border-radius: var(--radius2);
  font-family: inherit; font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.nav-social-toggle:hover { background: var(--magenta-dim); }
.nav-social-toggle.active, .nav-social-toggle.open { background: var(--magenta-dim); color: #FF6FB5; }
.social-caret { display: inline-block; font-size: 11px; transition: transform 0.15s; }
.nav-social-toggle.open .social-caret { transform: rotate(180deg); }

.social-subnav {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  padding: 6px 24px;
  background: rgba(22, 27, 34, 0.97);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 2px 0 var(--magenta);
}
.social-subnav[hidden] { display: none; }
.social-subnav-label {
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: #FF6FB5; margin-right: 10px;
}

/* Goals */
.ci-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ci-goal { padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border); border-left: 3px solid var(--magenta); border-radius: var(--radius2); }
.ci-goal-title { font-size: 13.5px; font-weight: 700; line-height: 1.45; }
.ci-goal-detail { font-size: 12.5px; color: var(--txt2); line-height: 1.5; margin-top: 4px; }
.ci-goal-src { display: inline-block; font-size: 11.5px; margin-top: 6px; }

/* Launches */
.ci-launches { display: flex; flex-direction: column; gap: 10px; }
.ci-launch { padding: 10px 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius2); }
.ci-launch-name { font-size: 13.5px; font-weight: 700; display: block; line-height: 1.4; }
.ci-link { color: var(--txt); }
.ci-link:hover { color: #FF6FB5; }
a.ci-tl-title { display: block; }

/* Speaker videos */
.ci-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ci-video { display: flex; flex-direction: column; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius2); overflow: hidden; color: var(--txt); text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.ci-video:hover { border-color: var(--magenta); transform: translateY(-1px); text-decoration: none; }
.ci-video-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--bg4), var(--bg2)); display: flex; align-items: center; justify-content: center; }
.ci-video-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ci-video-play { position: relative; width: 44px; height: 44px; border-radius: 50%; background: rgba(226, 0, 116, 0.92); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; padding-left: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
.ci-video-kind { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.55); color: var(--txt2); }
.ci-video-body { padding: 10px 12px; }
.ci-video-title { font-size: 13px; font-weight: 600; line-height: 1.4; }
.ci-video-meta { font-size: 11.5px; color: var(--txt3); margin-top: 4px; line-height: 1.4; }

/* What's new / coming up feeds */
.ci-feed { display: flex; flex-direction: column; }
.ci-feed-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.ci-feed-item:first-child { padding-top: 0; }
.ci-feed-item:last-child { border-bottom: none; padding-bottom: 0; }
.ci-feed-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.ci-feed-kind { font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--txt3); }
.ci-feed-kind.launch { color: #FF6FB5; }

/* Compare snapshot cards */
.cmp-snap { cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.cmp-snap:hover { border-color: var(--magenta); transform: translateY(-1px); }
.cmp-headline { font-size: 12.5px; color: var(--txt2); }
.cmp-snap .cmp-stock { margin-top: 10px; }
.cmp-open { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 600; color: #FF6FB5; }

/* Phones: wrap the tab rows so Compare, every company and Social stay visible */
@media (max-width: 768px) {
  .nav-tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 4px; }
  .nav-social-toggle { margin-left: 4px; }
  .social-subnav { padding: 6px 12px; }
  .ci-cross { margin-left: 0; }
}

/* Video cards: play in place (YouTube) or open in a new tab (webcasts) */
.ci-video { cursor: default; }
.ci-video:hover { transform: none; }
button.ci-video-thumb, a.ci-video-thumb { width: 100%; border: none; padding: 0; cursor: pointer; color: inherit; font: inherit; text-decoration: none; }
.ci-video-thumb:hover .ci-video-play { transform: scale(1.08); background: var(--magenta); }
.ci-video-play { transition: transform 0.15s, background 0.15s; }
.ci-video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000; }
.ci-video-company { margin-bottom: 6px; }
.ci-video-speaker { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #FF6FB5; margin-bottom: 3px; }
.ci-video-title { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; }
.ci-video-source { font-size: 11px; color: var(--txt3); margin-top: 4px; }
.ci-video-expired .ci-video-thumb { opacity: .55; }
.ci-video-expired .ci-video-title { color: var(--txt2); }

/* ═══════════════════════════════════════════════════════════════════════════
   Design refresh — stronger titles, brand accents, stat callouts, motion
   ═══════════════════════════════════════════════════════════════════════════ */

:root { --accent: #E20074; --accent-text: #FF6FB5; }

/* Titles */
.page-title { font-size: 32px; font-weight: 800; letter-spacing: -0.6px; display: flex; align-items: center; gap: 12px; }
.page-title .ci-icon { width: 38px; height: 38px; border-radius: 11px; }
.page-title .ci-icon svg { width: 22px; height: 22px; }
.detail-title { font-size: 30px; letter-spacing: -0.6px; }
.detail-logo { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 8px 26px -8px var(--accent); }

.ci-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.ci-icon svg { width: 16px; height: 16px; }

.ci-panel .panel-header { padding: 16px 22px; border-bottom-color: color-mix(in srgb, var(--accent) 16%, var(--border)); }
.ci-panel-title {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 800; letter-spacing: -0.1px; text-transform: none; color: var(--txt);
}
.ci-panel .panel-body { padding: 20px 22px; }

.cmp-section-title {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 20px; font-weight: 800; letter-spacing: -0.3px; text-transform: none; color: var(--txt);
  margin-top: 22px;
}
.cmp-section-sub { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--txt3); }
.cmp-name { font-size: 16px; font-weight: 800; color: var(--accent-text, var(--txt)); }

/* Spacing */
.cmp-stack { gap: 20px; }
.ci-section { gap: 24px; }
.detail-grid, .detail-main, .detail-side { gap: 24px; }

/* Cards and panels: brand-tinted gradient, glow, hover lift */
.ci-panel, .cmp-card, .pb-card {
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ci-panel {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--bg2)) 0%, var(--bg2) 140px);
  border-color: color-mix(in srgb, var(--accent) 20%, var(--border));
}
.ci-panel:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  box-shadow: 0 12px 34px -18px color-mix(in srgb, var(--accent) 70%, transparent);
}
.cmp-card {
  border-top: 3px solid var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--bg2)) 0%, var(--bg2) 110px);
}
.cmp-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  border-top-color: var(--accent);
  box-shadow: 0 16px 38px -18px color-mix(in srgb, var(--accent) 75%, transparent);
}
.cmp-snap .ci-stock-price { font-size: 26px; letter-spacing: -0.5px; }
.cmp-number { font-size: 28px; letter-spacing: -0.6px; }
.cmp-open { color: var(--accent-text); }

/* Company hero + stat callouts */
.ci-hero {
  position: relative; overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  border-left: 4px solid var(--accent);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--bg2)), var(--bg2));
}
.ci-hero .panel-body { gap: 18px; padding: 24px; }
.ci-headline { font-size: 18px; font-weight: 700; line-height: 1.5; }
.ci-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ci-stat {
  padding: 14px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.ci-stat-value { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.1; color: var(--txt); }
.ci-stat-label { font-size: 12.5px; font-weight: 600; color: var(--txt2); margin-top: 4px; }
.ci-stat-sub { font-size: 11.5px; color: var(--txt3); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ci-stat-sub .ci-chip { font-size: 11px; padding: 1px 8px; }
.ci-big { font-size: 30px; letter-spacing: -0.7px; }
.ci-bottom { border-left-color: var(--accent); }

/* Accent touches inside company pages */
.ci-tl-dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.ci-goal { border-left-color: var(--accent); }
.ci-quote { border-left-color: var(--accent); }
.ci-video-speaker { color: var(--accent-text); }

/* Marketing Playbook */
.pb-section { display: flex; flex-direction: column; gap: 14px; }
.pb-title { margin-top: 4px; }
.pb-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1280px) { .pb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .pb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .pb-grid { grid-template-columns: 1fr; } }
.pb-card {
  display: flex; flex-direction: column; cursor: pointer; overflow: hidden;
  border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-top: 4px solid var(--accent);
  background:
    radial-gradient(140% 90% at 50% -10%, color-mix(in srgb, var(--accent) 20%, transparent) 0%, transparent 60%),
    var(--bg2);
}
.pb-card:hover, .pb-card:focus-visible {
  transform: translateY(-4px); outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); border-top-color: var(--accent);
  box-shadow: 0 18px 42px -18px color-mix(in srgb, var(--accent) 80%, transparent);
}
.pb-card .cmp-head { border-bottom-color: color-mix(in srgb, var(--accent) 18%, var(--border)); }
.pb-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.pb-approach { font-size: 14.5px; font-weight: 700; line-height: 1.45; color: var(--txt); margin-bottom: 6px; }
.pb-label { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-text); margin-top: 6px; }
.pb-inits { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pb-inits li {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg3));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.pb-goal { font-size: 13px; line-height: 1.55; color: var(--txt2); }

/* Fade-in as sections appear */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.reveal.in:hover { transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease; }

/* Phones */
@media (max-width: 480px) {
  .page-title { font-size: 24px; }
  .page-title .ci-icon { width: 32px; height: 32px; }
  .detail-title { font-size: 24px; }
  .ci-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ci-stat-value { font-size: 24px; }
  .cmp-section-title { font-size: 18px; }
  .ci-panel-title { font-size: 15px; }
}

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .cmp-card:hover, .pb-card:hover, .pb-card:focus-visible { transform: none; }
}

/* Speaker videos — each card in its own company's colors */
.ci-video {
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-top: 3px solid var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--bg3)) 0%, var(--bg3) 120px);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ci-video:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); border-top-color: var(--accent);
  box-shadow: 0 16px 36px -18px color-mix(in srgb, var(--accent) 80%, transparent);
}
.ci-video-play { background: var(--accent); box-shadow: 0 2px 14px color-mix(in srgb, var(--accent) 60%, rgba(0,0,0,.5)); }
.ci-video-thumb:hover .ci-video-play { background: var(--accent); filter: brightness(1.15); }
.ci-video-thumb { overflow: hidden; }

/* Branded thumbnail for webcasts without an official image */
.ci-thumb-brand {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px 14px; text-align: left; color: #fff;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 70%, transparent) 0%, transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, #0D1117) 0%, #0D1117 100%);
}
.ci-thumb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ci-thumb-logo {
  width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.25);
}
.ci-thumb-kind { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.35); }
.ci-thumb-speaker { font-size: 15px; font-weight: 800; line-height: 1.25; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.ci-thumb-event {
  font-size: 11.5px; font-weight: 600; line-height: 1.35; color: rgba(255,255,255,.85);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Play button sits bottom-right on branded thumbnails so the text stays readable */
.ci-video-thumb:has(.ci-thumb-brand) { justify-content: flex-end; align-items: flex-end; padding: 10px; }
.ci-video-thumb:has(.ci-thumb-brand) .ci-video-play { width: 36px; height: 36px; font-size: 13px; }
.ci-video-expired .ci-video-kind { z-index: 1; }

/* Exactly three per company */
.ci-videos-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .ci-videos-3 { grid-template-columns: 1fr; } }

/* Leadership Speaking: one row per company */
.ls-groups { display: flex; flex-direction: column; gap: 22px; }
.ls-group { padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); }
.ls-group:first-child { padding-top: 0; border-top: none; }
.ls-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ls-head .idea-comp-chip { font-size: 13px; font-weight: 700; padding: 4px 12px; }
.ci-feed-kind.launch { color: var(--accent-text); }
