/* ==========================================================================
   Trajektory Case Study Template — Shared Styles
   Draft/review build. Placeholder brand color; swap --accent for real brand.
   ========================================================================== */

:root {
  --accent: #4f46e5;
  --accent-dark: #3730a3;
  --ink: #14161f;
  --ink-soft: #4b4f5c;
  --ink-faint: #8a8d99;
  --line: #e4e5ec;
  --surface: #ffffff;
  --surface-alt: #f6f6fb;
  --surface-dark: #14161f;
  --placeholder-bg: #eef0fb;
  --placeholder-text: #5b5fc7;
  --radius: 10px;
  --max-width: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Version switcher bar ---------- */
.version-bar {
  background: var(--surface-dark);
  color: #fff;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.version-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.version-bar-label {
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

.version-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

@media (max-width: 700px) {
  .version-link { font-size: 12px; padding: 5px 9px; }
}

.version-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.version-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.version-link.active {
  background: var(--accent);
  color: #fff;
}

.version-link.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- Draft notice ---------- */
.draft-notice {
  background: #fff8e6;
  border-bottom: 1px solid #f0ddab;
  color: #7a5b00;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--ink-faint);
}

.breadcrumb a { text-decoration: none; color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 6px; }
.breadcrumb .current { color: var(--ink-soft); font-weight: 600; }

/* ---------- Placeholder copy styling ---------- */
.ph {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  border: 1px dashed #c7c9f4;
  border-radius: 6px;
  padding: 2px 8px;
  font-style: italic;
  font-size: 0.92em;
  display: inline-block;
}

.ph-block {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  border: 1px dashed #c7c9f4;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-style: italic;
  font-size: 0.95em;
  line-height: 1.5;
}

/* ---------- Hero ---------- */
.hero {
  padding: 28px 0 40px;
}

.category-tag {
  display: inline-block;
  background: var(--placeholder-bg);
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 16px;
  max-width: 16ch;
}

.hero .value-prop {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 24px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.meta-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

/* ---------- Speaker row (hero) ---------- */
.speaker-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.speaker-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.avatar.lg {
  width: 88px;
  height: 88px;
  font-size: 22px;
}

.speaker-mini-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.speaker-mini-role {
  font-size: 12px;
  color: var(--ink-faint);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s;
}

.btn:hover { background: var(--accent-dark); }

.btn-block { width: 100%; text-align: center; }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover { background: var(--placeholder-bg); }

/* ---------- Layout: content + sticky sidebar ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  padding-bottom: 60px;
  align-items: start;
}

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

.sidebar {
  position: sticky;
  top: 70px;
}

.sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(20, 22, 31, 0.06);
}

.sidebar-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.sidebar-card .sub {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 18px;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.sidebar-fineprint {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 12px;
  text-align: center;
}

.sidebar-speaker-strip {
  display: flex;
  gap: -8px;
  margin-bottom: 14px;
}
.sidebar-speaker-strip .avatar { margin-right: -10px; border: 2px solid #fff; }

/* ---------- Section shell ---------- */
.section {
  padding: 36px 0 4px;
  border-top: 1px solid var(--line);
}

.section:first-of-type { border-top: none; }

.section h2 {
  font-size: 1.5rem;
  margin: 0 0 6px;
}

.section .section-sub {
  color: var(--ink-faint);
  font-size: 14px;
  margin: 0 0 20px;
}

/* ---------- What you'll learn ---------- */
.learn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.learn-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.learn-list .check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--placeholder-bg);
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}

/* ---------- Agenda ---------- */
.agenda-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.agenda-list li {
  display: flex;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.agenda-list li:last-child { border-bottom: none; }

.agenda-time {
  color: var(--accent);
  font-weight: 700;
  min-width: 90px;
  flex-shrink: 0;
}

/* ---------- Data callouts ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr; }
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: var(--surface-alt);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Who should attend ---------- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.audience-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.audience-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.audience-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Speaker bios ---------- */
.bio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.bio-card {
  display: flex;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.bio-card h4 {
  margin: 0 0 2px;
  font-size: 16px;
}

.bio-role {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.bio-card p.bio-text {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Final CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-radius: 16px;
  padding: 44px 40px;
  text-align: center;
  margin: 36px 0;
}

.cta-banner h2 {
  margin: 0 0 10px;
  font-size: 1.75rem;
}

.cta-banner p {
  margin: 0 0 22px;
  opacity: 0.9;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .btn {
  background: #fff;
  color: var(--accent-dark);
}
.cta-banner .btn:hover { background: #eef0fb; }

/* ---------- Related content ---------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.related-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.related-thumb {
  height: 120px;
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-style: italic;
}

.related-body { padding: 14px 16px; }

.related-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 6px;
}

.related-body h4 {
  margin: 0;
  font-size: 14px;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  padding: 18px 4px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--accent);
  font-weight: 400;
}

.faq-item[open] summary::after { content: "\2212"; }

.faq-item p {
  margin: 0 4px 18px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}

/* ---------- Coming soon stub ---------- */
.coming-soon {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

.coming-soon h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.coming-soon p {
  color: var(--ink-faint);
  max-width: 46ch;
}

/* ==========================================================================
   Version 2 — Interactive Report page components
   ========================================================================== */

.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Interactive bar chart ---------- */
.chart-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  padding: 24px 20px 12px;
}

.bar-chart { width: 100%; height: auto; display: block; }

.bar-chart .bar {
  fill: var(--accent);
  cursor: pointer;
  transition: fill 0.15s;
}

.bar-chart .bar:hover { fill: var(--accent-dark); }

.bar-chart .axis-line { stroke: var(--line); stroke-width: 1; }

.bar-chart .bar-label {
  fill: var(--ink-faint);
  font-size: 11px;
  font-family: inherit;
  text-anchor: middle;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.1s;
  white-space: nowrap;
  z-index: 5;
}

.chart-tooltip.visible { opacity: 1; }

/* ---------- Hover rankings ---------- */
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}

.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: var(--surface-alt); }

.rank-num {
  width: 22px;
  font-weight: 800;
  color: var(--ink-faint);
  font-size: 13px;
  flex-shrink: 0;
}

.rank-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.rank-name {
  font-weight: 600;
  font-size: 14px;
  flex-grow: 1;
}

.rank-extra {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.18s, transform 0.18s;
  white-space: nowrap;
}

.rank-row:hover .rank-extra {
  opacity: 1;
  transform: translateX(0);
}

.rank-extra.down { color: #dc2626; }

/* ---------- Broadcast carousel ---------- */
.carousel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
}

.carousel-track {
  position: relative;
  height: 220px;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  padding: 20px;
  text-align: center;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-thumb {
  width: 100%;
  max-width: 420px;
  height: 120px;
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  border: 1px dashed #c7c9f4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  font-size: 13px;
}

.carousel-caption {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 0;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  padding: 0;
}

.carousel-dots .dot.active { background: var(--accent); }

/* ---------- Locked / unlock section ---------- */
.lock-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  background: var(--surface-alt);
  text-align: center;
}

.lock-icon { font-size: 28px; margin-bottom: 8px; }

.locked-content {
  position: relative;
  margin-top: 24px;
  text-align: left;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.rank-table th, .rank-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-align: left;
}

.rank-table th {
  background: var(--surface-alt);
  color: var(--ink-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rank-table.blurred {
  filter: blur(6px);
  user-select: none;
  transition: filter 0.4s;
}

.rank-table.blurred.unlocked {
  filter: blur(0);
}

.unlock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(246,246,251,0.4), rgba(246,246,251,0.92) 40%);
  transition: opacity 0.3s;
}

.unlock-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.unlock-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 420px;
  width: 100%;
}

.unlock-form input {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.unlocked-message {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  color: #16a34a;
  font-weight: 700;
  font-size: 14px;
}

.unlocked-message.visible { display: flex; }

/* ==========================================================================
   Version 3 — Narrative-first Intelligence Report page components
   ========================================================================== */

.hero-centered { text-align: center; }
.hero-centered .value-prop { margin-left: auto; margin-right: auto; }
.hero-centered .meta-row,
.hero-centered .hero-cta-row,
.hero-centered .speaker-row { justify-content: center; }

.stat-hero-wrap { margin: 18px 0 22px; }

.stat-hero-number {
  font-size: clamp(3.2rem, 9vw, 5.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-hero-label {
  font-size: 1rem;
  margin-top: 10px;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn:hover { color: var(--ink-soft); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- TV clip cards ---------- */
.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.clip-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--placeholder-bg);
}

.clip-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--placeholder-text);
  font-style: italic;
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

.clip-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--accent);
  box-shadow: 0 4px 14px rgba(20, 22, 31, 0.18);
  transition: transform 0.15s;
}

.clip-card:hover .clip-play { transform: translate(-50%, -50%) scale(1.08); }
.clip-card.playing .clip-play { background: var(--accent); color: #fff; }

.clip-caption {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

/* ---------- Heatmap ---------- */
.heatmap-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface-alt);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--accent);
  cursor: pointer;
}

/* ---------- Logo grid ---------- */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.logo-chip {
  height: 60px;
  border: 1px dashed #c7c9f4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--placeholder-text);
  background: var(--placeholder-bg);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  padding: 6px;
}

/* ---------- Methodology steps ---------- */
.method-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.method-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}

.method-step .step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--placeholder-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
}

.method-step h4 { margin: 0 0 6px; font-size: 14px; }

/* ==========================================================================
   Version 4 — Real-data + interactive 3D report
   ========================================================================== */

.theme-trajektory-dark {
  --accent: #ff6a1f;
  --accent-dark: #d94e0a;
  --ink: #f4f5fa;
  --ink-soft: #c3c6d6;
  --ink-faint: #888dab;
  --line: #262b4a;
  --surface: #0c0f26;
  --surface-alt: #131737;
  --surface-dark: #05060f;
  --placeholder-bg: #1c2148;
  --placeholder-text: #b7b9ff;
  background: var(--surface);
  color: var(--ink);
}

.theme-trajektory-dark .sidebar-card,
.theme-trajektory-dark .stat-card,
.theme-trajektory-dark .related-card,
.theme-trajektory-dark .agenda-list,
.theme-trajektory-dark .rank-list,
.theme-trajektory-dark .rank-table,
.theme-trajektory-dark .earned-card,
.theme-trajektory-dark .cta-banner-outline {
  background: var(--surface-alt);
}

/* ---------- Hero split (text + real photo) ---------- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

@media (min-width: 820px) {
  .hero-split { grid-template-columns: 1.15fr 0.85fr; }
}

.hero-photo img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

/* ---------- 3D chart ---------- */
.chart3d-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 20%, #171c40, var(--surface-alt));
  overflow: hidden;
}

.chart3d-canvas {
  width: 100%;
  height: 420px;
  touch-action: none;
  cursor: grab;
}

.chart3d-canvas:active { cursor: grabbing; }

.chart3d-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-faint);
  flex-wrap: wrap;
}

.chart3d-reset {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.chart3d-reset:hover { border-color: var(--accent); color: var(--accent); }

.chart3d-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}

.chart3d-legend span.rank { color: var(--accent); font-weight: 800; margin-right: 4px; }

/* ---------- Earned TV cards ---------- */
.earned-card {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

@media (min-width: 700px) {
  .earned-card { grid-template-columns: 1fr 1fr; }
}

.earned-card img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 200px; }

.earned-card-body { padding: 24px; }

.earned-card-body h3 { margin: 0 0 4px; font-size: 1.1rem; }
.earned-card-body .earned-sub { color: var(--accent); font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.earned-card-body p { font-size: 13px; color: var(--ink-soft); margin: 0 0 16px; }

.earned-stat-row { display: flex; gap: 20px; flex-wrap: wrap; }
.earned-stat .num { font-size: 1.9rem; font-weight: 800; color: var(--accent); line-height: 1; }
.earned-stat .label { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 6px; }

/* ---------- Real-data table (reuses .rank-table look, non-blurred) ---------- */
.data-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.footer-logo { height: 22px; opacity: 0.7; margin-bottom: 8px; }

/* ---------- 3D sponsor-arena ---------- */
.arena3d-canvas {
  position: relative;
  width: 100%;
  height: 480px;
  touch-action: none;
  cursor: grab;
  overflow: hidden;
}

.arena3d-canvas:active { cursor: grabbing; }

.arena3d-canvas canvas { position: absolute; inset: 0; z-index: 1; display: block; }

.hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* AI logo-detection bounding boxes — styled after Trajektory's real detection output */
.detect-hud {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #4be9f5;
  text-shadow: 0 0 6px rgba(75, 233, 245, 0.7);
  opacity: 0.85;
}

.detect-box {
  position: absolute;
  border: 2px solid #22e5ee;
  box-shadow: 0 0 8px rgba(34, 229, 238, 0.45), inset 0 0 6px rgba(34, 229, 238, 0.12);
  pointer-events: none;
  animation: detect-pulse 2.4s ease-in-out infinite;
}

@keyframes detect-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(34, 229, 238, 0.35), inset 0 0 4px rgba(34, 229, 238, 0.08); }
  50% { box-shadow: 0 0 16px rgba(34, 229, 238, 0.85), inset 0 0 10px rgba(34, 229, 238, 0.2); }
}

.detect-label {
  position: absolute;
  transform: translateY(-100%);
  padding-bottom: 4px;
  cursor: pointer;
  pointer-events: auto;
}

.detect-name {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 800;
  font-size: 12px;
  color: #22e5ee;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(34, 229, 238, 0.6);
  white-space: nowrap;
}

.detect-conf { color: #9df6fb; opacity: 0.85; font-weight: 600; }

.detect-details {
  display: none;
  margin-top: 4px;
  background: rgba(4, 8, 20, 0.94);
  border: 1px solid #22e5ee;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: #dff9ff;
  line-height: 1.5;
  white-space: normal;
  max-width: 200px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.detect-label.open .detect-details { display: block; }
.detect-type { color: #22e5ee; font-weight: 800; }

/* ==========================================================================
   Version 5 — Full interactive report + persistent funnel sidebar
   ========================================================================== */

/* ---------- Animated KPI cards ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 760px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }

.kpi-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  background: var(--surface-alt);
}

.kpi-number { font-size: 2.1rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 6px; }
.kpi-label { font-size: 12px; color: var(--ink-soft); }

/* ---------- Sortable rankings table ---------- */
.sortable-table th[data-sort] { cursor: pointer; user-select: none; }
.sortable-table th[data-sort]:hover { color: var(--accent); }
.sort-arrow { display: inline-block; width: 10px; font-size: 10px; color: var(--accent); }

.league-note { font-size: 12px; color: var(--ink-faint); margin-bottom: 14px; }
.league-note strong { color: var(--ink-soft); }
.league-note .soon { opacity: 0.6; }

/* ---------- Partner comparison ---------- */
.compare-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

@media (max-width: 640px) { .compare-row { grid-template-columns: 1fr; } }

.compare-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}

.compare-vs { text-align: center; font-weight: 800; color: var(--ink-faint); font-size: 13px; }

.compare-bars { display: grid; gap: 18px; }

.compare-bar-group h4 { margin: 0 0 10px; font-size: 13px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.03em; }

.compare-bar-line { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }

.compare-bar-line .name { color: var(--ink-soft); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-bar-line .val { text-align: right; color: var(--ink-faint); }

.compare-bar-track { height: 10px; background: var(--surface-alt); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.compare-bar-fill { height: 100%; border-radius: 6px; transition: width 0.4s ease; background: var(--accent); }
.compare-bar-fill.b { background: #6f8dff; }

/* ---------- Clip thumb with real image ---------- */
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Persistent funnel sidebar ---------- */
.funnel-card .kicker {
  display: inline-block;
  background: var(--placeholder-bg);
  color: var(--accent);
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.funnel-card h3 { margin: 0 0 6px; font-size: 1.15rem; line-height: 1.25; }
.funnel-card .sub { margin-bottom: 16px; }

.funnel-benefits { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.funnel-benefits li { font-size: 12px; color: var(--ink-soft); display: flex; gap: 6px; }
.funnel-benefits li::before { content: '✓'; color: var(--accent); font-weight: 800; }
